I have three table
1.request for quotation
2.request for quotation detail (product in quotation)
3.request for quotation price
process
admin>
1.add data to request for quotation form
2.add any product
then send each supplier
suppler 1
get request for quotation form and product name and quantity
suppler 2
get same request for quotation form and product name and quantity
then suppler 1 add and supplier 2 add price
3.get price for each request for quotation depend on product and supplier and RFQ NO.
ex
<<admin
admin add rfq_no our_company add supplier
admin add product in detail page (it depend on rfq_no)
add rfq
rfq_no our_company supplier
100 intel canon
100 intel kodak
100 intel sony
rfq detail
rfq no product quantity price
100 camera lens 1 null
100 camera film 1 null
<<supplier
see product quantity and price own page
s/he edit record only price
canon
rfq no product quantity price
100 camera lens 1 50 <<<<different price
100 camera film 1 10 <<<<different price
kodak
rfq no product quantity price
100 camera lens 1 40 <<<<different price
100 camera film 1 20 <<<<different price
sony
rfq no product quantity price
100 camera lens 1 30 <<<<different price
100 camera film 1 30 <<<<different price
problem1 : each supplier has same product but different in price because rfq_no I use one table don't copy record
problem2 : how to sum price
problem3 : when I add number 012345678 then record output is 12345678 (zero doesn't appear) where I set this value to appear
ex
product1 10
product2 50
product3 10
product4 30
total 100
SELECT
`_rfq`.rfq_id,
`_rfq`.rfq_no,
`_rfq`.company_id,
`_company`.company_address,
`_company`.company_postcode,
`_company`.company_telephone,
`_company`.province_id AS province_id1,
`_company`.company_email,
`_company`.company_website,
`_supplier`.supplier_address,
`_supplier`.province_id,
`_supplier`.supplier_postcode,
`_supplier`.supplier_telephone,
`_supplier`.supplier_fax,
`_supplier`.supplier_email,
`_supplier`.supplier_website,
`_supplier`.supplier_detail,
`_rfq`.supplier_id
FROM `_rfq`
INNER JOIN `_company` ON `_rfq`.company_id = `_company`.company_id
INNER JOIN `_supplier` ON `_rfq`.supplier_id = `_supplier`.supplier_id
SELECT
rfq_detail_id,
product_id,
rfq_quantity,
unit_id,
rfq_no,
supplier_id
FROM `_rfq_detail`
SELECT
`_rfq_detail`.rfq_no AS rfq_no1,
`_rfq`.supplier_id,
`_rfq_detail`.product_id AS product_id1,
`_rfq_detail`.unit_id,
`_rfq_detail`.rfq_quantity,
`_qo_price`.supplier_id AS supplier_id1,
`_qo_price`.rfq_no,
`_qo_price`.product_id,
`_qo_price`.qo_price
FROM `_qo_price`
RIGHT OUTER JOIN `_rfq_detail` ON `_rfq_detail`.product_id = `_qo_price`.product_id
RIGHT OUTER JOIN `_rfq` ON `_rfq`.rfq_no = `_rfq_detail`.rfq_no
Sorry am newbie I know little bit about php code can you suggest me to chage table or help some php code
Thank you <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=9426&image=1&table=forumtopics' class='bbc_emoticon' alt=':lol:' />