Dear Frends
i have a table of stock and i want to track the amount of the balance figure and i want to implement the FIFO (first in first out) method for stock evaluation.
in the table while making entries for issue and receipt i'm saving both the date and time.
in the receipts i may receive the same good at different times at different rates e.g.
Receipt
Sr# Date Qty Rate
1. 09-29-04 1,000 6.50
2. 09-30-04 1,500 8.00
3. 10-02-04 800 5.50
i have total 3,300 units of value 22,900/-
at the time of issue i can check if the balance qty is less than or equal to the last purchase
then i can just get the value of the issued items at the rate in the last purchase and the balance value by just subtracting the previous balance from the current balance.
and if the quantity in balance is greater than the last purchase then there is a share of the previous purchase that might be at some different rate.
plz advise how can i achieve this.
i have a table of stock and i want to track the amount of the balance figure and i want to implement the FIFO (first in first out) method for stock evaluation.
in the table while making entries for issue and receipt i'm saving both the date and time.
in the receipts i may receive the same good at different times at different rates e.g.
Receipt
Sr# Date Qty Rate
1. 09-29-04 1,000 6.50
2. 09-30-04 1,500 8.00
3. 10-02-04 800 5.50
i have total 3,300 units of value 22,900/-
at the time of issue i can check if the balance qty is less than or equal to the last purchase
then i can just get the value of the issued items at the rate in the last purchase and the balance value by just subtracting the previous balance from the current balance.
and if the quantity in balance is greater than the last purchase then there is a share of the previous purchase that might be at some different rate.
plz advise how can i achieve this.