moj6054 Posted April 21, 2012 Posted April 21, 2012 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
bcooney Posted April 22, 2012 Posted April 22, 2012 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.
Recommended Posts
This topic is 4655 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now