FIFO Perpetual Inventory Method

Jan 31 2015 2:39 AM
Hi to all..
 
I am trying to develop an Accounting System which includes in handling inventory costing (particularly in Purchase Orders) and Sales. My problem is that I am using FIFO perpetual method and i am having difficulties in developing its formula. 
 
Is there anyone here that could help or give me some references or existing SDKs that uses this kind of method?
 
Thank you all as always. God Bless!!