April 21, 201213 yr Hi, I have a problem for update my stock price. I have a table : product with productID,ProductName,qty,Price and Invoice table: InvoiceID,Invoicedate,Customername and InvoiceLine:InvoiceID,ProductName,qty,price,cTotal(qty*price). my problem is: If my porodcut price's(prodcut A=1$) change from (1$ to 2$), I want to see this change in my invoice. sample: 2012/4/12 1 Product A 1$ 10 10$ after change price: 2012/4/12 1 Prodcut A 2$ 10 20$ what I should do? thank you
April 22, 201213 yr Product prices are typically defined as lookups or auto-entered calcs in the Line Items table. You want to capture the price at the time of invoice (and not have it updated when the price changes...as you would be changing history). If an invoice is still in the "writing" stage and not yet finalized, you could have an Update Prices button that relookups the line item prices. btw, I think that you should have a ProductID foreign key in your line items table. You should not build the relationship btw the LineItems and Products by name, but rather by ID.
Create an account or sign in to comment