Hi all..I'm a little bit confuse with this problem.
I have 3 tables, stock_in, stock_level, and stock_out.
stock_in used for save the data product when there's new purchase.
stock_out used for save the data product out.
stock_level used for count how many stock in warehouse.
When user input the product data, automatically its enter to stock_level. And, when there's stock out, automatically decrease the stock_in_unit on stock_level table with FIFO base.
for example (the column is just, date, stock_in_unit to make easy)
Product purchased (saved to stock_in and stock_level)
Product Out
Because I use FIFO, so, on stock_level table now fill with
I have do until this step, but the problem is :
How about if, for example, the user make a mistake, the product out should be 3, and not 7, how can I do the edit?because, the stock_level table now should be
I'm confuse how the algorithm to do that. Please give any suggestions. All appreciated.
Thank you so much
I have 3 tables, stock_in, stock_level, and stock_out.
stock_in used for save the data product when there's new purchase.
stock_out used for save the data product out.
stock_level used for count how many stock in warehouse.
Code:
stock_in : in_id[PK], product_id, stock_in_unit, stock_in_price, unit_id, supplier_id stock_out : out_id[PK], out_date, product_id, stock_out_unit, unit_id stock_level : stock_level_id, in_date, stock_in_unit, stock_in_price, product_id, in_id[FK from stock_in]
for example (the column is just, date, stock_in_unit to make easy)
Product purchased (saved to stock_in and stock_level)
Code:
08/01/2008 2 08/02/2008 3 08/03/2008 5
Code:
08/04/2008 7
Code:
08/01/2008 0 08/02/2008 0 08/03/2008 3
How about if, for example, the user make a mistake, the product out should be 3, and not 7, how can I do the edit?because, the stock_level table now should be
Code:
08/01/2008 0 08/02/2008 2 08/03/2008 5
Thank you so much
Comment