how to calculate both Opening stock and Closing Stock from one field?
Closing Stock = sum(Closing_stock) of Jul 2013 i.e 10000
Opening Stock = 10000 of Aug 2013
i.e the value I get as Closing Stock of Jul 2013 is same as Opening Stock of Aug 2013
eg,
July 2013 Aug 2013 Sep 2013 Oct2013
Opening Stock 0 10000 5000 0
Closing Stock 10000 5000 0 2000
I am calculating Closing Stock as Sum(closing_stock) . the table has only one value closing_stock , depending on closing_stock I have to calculate Opening Stock.