Billz Posted October 20, 2022 Share Posted October 20, 2022 Please help me let me explain with this..... ``` purchase table id purchase_id product_id qty net_unit_cost created_at 1 1 1 10 10 2022-10-10 2 2 1 20 12 2022-10-10 Sale table sale_id product_id qty net_unit_price created_at 1 1 11 15 2022-10-10 ``` in this, if i sold '11' units then how can i subtract from the rows to get remaining units? i've to subtract '10' units from first row and '1' unit from second row. Please help how to calculate fifo in php Link to comment Share on other sites More sharing options...
Recommended Posts
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