Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello to All !

Dear fellows i am working on a Point of Sale project for a Trading Company in VB.NET 2010 and SQL Server 2008.

My Client asked me to manage FIFO rule for Costing of their items.

The requirement is that when an item is sold in a large quantity let say 10000 units then system should charge the cost according FIFO rule.

Now i explain in detail.

In above example when 10000 units of a same item are sold and system has 12000 units available in stock but these 12000 units were purchased in four different creditors at different purchase rates i.e.
in 1st purchase 3000 units purchased @ 110/unit
in 2nd purchase 3000 units purchased @ 115/unit
in 3rd purchase 3000 units purchased @ 120/unit
in 4th purchase 3000 units purchased @ 125/unit

now when 10000 units are going to be sold i want that system should charge the cost of these 10000 units of the item as following

3000 units @ 110/unit (from 1st purchase) +
3000 units @ 115/unit (from 2nd purchase) +
3000 units @ 120/unit (from 3rd purchase) +
1000 units @ 125/unit (from 2nd purchase)

how can i manage it ?

if anyone has done the same practice he must have the solution.

thanks in advance !
Posted
Comments
Patrice T 6-Sep-15 13:54pm    
What have you done ? What is your problem ? It looks look homework.

Try to do it by hand, it is not so complicated. then try to do it programaticaly.
[no name] 6-Sep-15 21:50pm    
Suggest your client finds a programmer.
Mehdi Gholam 7-Sep-15 2:10am    
:)
Richard MacCutchan 7-Sep-15 3:49am    
Presumably the item costs will be in the database along with all the other information, so you just need to read it out and charge accordingly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900