Hello Everyone
I created an OrderInvoics and ReceivedInvouce for company , because When We have Order to any products , We should to know how many type of Items we have at products
I created 1 Query for both Items ( Product_name , Items , OrderTons and OrderPrice , ReceivedTons , ReceivedPrice = OrderTons-ReceivedTons) here will tell me How many Tons stayed at products or you have on away .
but I have a problem with Price
for example : I bought this seize ( Pipe 40*40*1.50 MM = 50 tons by 500$ ) in 1/1/2017 , and after that I also bought that seize (30 tons by 510$) in 5/1/2017 , when that product send to me Email and buy that price it's normal , but when this seize comes to me by ( 515$ ) that 30 tons will be duplicate in program
it means will tell me , you have 100 tons in this products , in real I have 80 tons
I used Join between both ( Items to Items and Product_name to Product_name ) here I used Join for Product_name , duplicated my Items that seize to many Items by that name .
Can someone help me , please ? When send to me different price , it tell me , you entered different price or doesn't duplicate tons ?