I need help to solve method fifo using codeigniter
Table 1 barang
id barang | name |
---|---|
1 | book |
2 | pen |
table 2 stock in
id_stock_in | id_barang | supplier | stock_in |
---|---|---|---|
1 | 1 | supplier 1 | 20 |
2 | 1 | supplier 2 | 30 |
table 2 stock out
id_stock_out | id_barang | supplier | stock_out |
---|---|---|---|
1 | 1 | supplier 1 | 40 |
I want result like this table last stock
id_last_stock | id_barang | supplier | stock_in | stock_out | last_stock |
---|---|---|---|---|---|
1 | 1 | supplier 1 | 20 | 40 | 0 |
2 | 1 | supplier 2 | 30 | 0 | 10 |
source https://stackoverflow.com/questions/68595858/method-fifo-in-codeigniter
Comments
Post a Comment