Click here to Skip to main content
15,919,028 members
Please Sign up or sign in to vote.
1.67/5 (3 votes)
See more:
Hello
Can any one help in c# coding to following scenario?
Thanks


Purchase Inventory 300 units at $6
Purchase Inventory 400 units at $7
Sell 300 units at $12
Purchase Inventory 200 units at $8
Sell 400 units at $12
Purchase Inventory 200 units at $5

FIFO

Total Sales 700 units. Assumption first units purchased are sold
Cost of Goods Sold = (300 x $6 + 400 x $7) = $4,600

LIFO

Total Sales 700 units. Assumption last unit purchased are sold
Cost of Goods Sold = (200 x $5 +200 x $8) = $2,600

Weighted Average

Total Sales 700 units. Assume a weighted average cost per unit
Average Weighted Cost per unit = $7,200/1100 = $6.55
Posted
Comments
Sergey Alexandrovich Kryukov 27-Jan-14 2:08am    
And?..
—SA
Rahul VB 27-Jan-14 4:58am    
hahahahahha :)
Asa code 27-Jan-14 2:46am    
actually the final output should be mean of various prices of product quantity... I need to fulfill this task

It seems, you didn't start anything :sigh:

Already I gave you answer for previous question. Real time problem of goods price[^]

No one is gonna write code for you. Come with your effort. If you're struck with logic, you could use the previous answer(need little bit customization). If you're struck with code, come with your code. First of all, discuss these things with your lead, he could help you for start.
 
Share this answer
 
CP helps people to learn. We neither do their assignments/homeworks/projects nor supply source code.
what-have-you-tried[^]
If you encounter any difficulties with your coding, always consult Google first, everything else fails, then visit CP and ask questions related to specific issues.
 
Share this answer
 

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