Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing FIFO inventory in C#
Message
 
 
To
12/07/2012 07:47:05
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01548062
Message ID:
01548313
Views:
37
>>>I'm not sure I follow why a location transfer would have any impact on cost. You're just moving
>something from one location to another. No sale, no revenue, no decrement of inventory quantity.
>That's true, Mike,
>I was thinking of "landed" cost (pure item cost + shipping, handling, overhead, etc), which includes different overhead costs at different locations, but that would only be applied to the initial receipt, not transfers.

In our case we want to be able to calculate the COGs on the location level also.

----------------------------
I think I figured out a way I will suggest us to proceed. Let me all know what do you think:

Inventory Table - 3 new columns added (null initially)

RemovedPrior -- populated only for S rows

COG_RWAC COG_FIFO -- populated for all rows

----------------------------
New table is also maintained called InventoryCosts that inserts a row for each positive inventory movement (purchases, adjustments, transfers) with the reference to original inventory pri_key, date, ref_no (just in case), units_from units_thru unit_cost

------------------------------------------------------------------------------------------------------------------------------------------------
One job which is run, say, once a week, re-calculates all of this (or just for department for huge inventories).
Another job which is run more frequently (say, every 15 minutes) updates all non-processed movements.

Having this all in place we can get OnHand by simply summing the information and same goes for Cost of Goods Sold.

-------------------------------------
I plan to put this in writing for consideration of design and implementation. Now I am open to your thoughts.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform