Have A Great day
I Need Some Idea Or hint Suggestion For Fifo inventory management.
Basic Is i Have six table
as for Maintain Stock And the currently available stock is very easy but one Deep Dive is i want the current available stock Value as per my purchase rate. In the way Of FIFO.
if I have Product mobile
with two time Purchase, first time purchase is 10000$ 1 qty second time 9000$ 1 qty
if I will sales One mobile then Stock quantity Will Remain 1 So logically I want the Stock amount is 9500 this is also we can do with the most recent.
more Deep Dive is
if I have Product
with two time Purchase, first time purchase is 10000$ 2 qty second time 9000$ 1 qty
**if I will sale One mobile then Stock quantity Will Remain 2 as 1 from the first purchase and 1 from the second purchase So The Stock amount Should be calculated as 10000$*1 9000$*1 = 19000$.
Please Need Suggestion For Expression as well as a Required column.