going back to your original question
How I will know When you sent to me my orders , I will know price and tons are identical ?
you should know because when you sent the order to the supplier, you would have provided them with an order number. When they send goods to you, they would include that order number in the paperwork.
in a simple setup, your tables might look like this
tblOrders
OrderPK autonumber
OrderNum text/number
OrderDate date
SupplierFK long link to supplier table
tblProducts
ProductPK autonumber
ProductDesc text
tblTransactions
TransactionPK autonumber
TransactionDate date
TransactionType text (order/goods in/goods issued/stock adjustment etc)
OrderFK long link to tblOrders (only complete for an order or goods in for an order)
ProductFK long - link to tblProducts
Qty number
Price currency
TransactionPK..TransactionDate..TransactionType..O rderFK..ProductFK..Qty..Price
1 01/01/2016........order.................3...........4... ...........10....$200
2 01/01/2016........order.................3...........5... ...........20....$100
3 01/02/2016........goods in.............3...........4..............5....$20 0
4 01/02/2016........goods in.............3...........5..............12....$1 00
5 01/03/2016........goods issued.......0...........4..............-3....$200
query to determine outstanding orders would be something like
Code:
SELECT O.OrderFK, O.ProductFK, TransactionDate, Price, Qty, Recd, Qty-Recd as Outstanding
FROM tblTransactions O LEFT JOIN (SELECT OrderFK, ProductFK, sum(Qty) as Recd FROM tblTransactions WHERE TransactionType='goods in' GROUP BY OrderFK, ProductFK) R
ON O.OrderFK=R.OrderFK AND O.ProductFK=R.ProductFK
WHERE TransactionType='order'
Query to determine current stock would be something like
Code:
SELECT ProductFK, sum(qty) as currentstock
FROM tblTransactions
WHERE transactionType<>'order'
GROUP BY ProductFK