Stock Value
The Stock or Inventory cost calculation shows the inventory cost for each day.
If no transactions occur during a period, the last known cost is shown.
Total Item cost is the accumulated cost of items over time.
Example
Ten (10) items are purchased at unit cost of 2 LCY on day one, and then 5 items are sold but the cost is registered at 1 per unit. The result is Inventory cost of 10*2 - 5*1 = Total inventory cost is 15 LCY.
The average cost is registered by item, variant, and location for each date if a sale is made. The result is a table [fItemCostAdjustment]
with columns for Item No, Variant, Location, ValidFrom date, ValidTo Date, and AverageCost valid for the period between the ValidFrom and ValidTo dates.
Table 1 - Example of fItemCostAdjustment
Item No_ | Variant Code | Location Code | ValidFromDate | ValidToDate | AverageCost |
6 | LOCATION 1 | 16.12.2016 | 4.5.2020 | 18,0 | |
6 | LOCATION 1 | 10.11.2016 | 15.12.2016 | 15,0 | |
6 | LOCATION 1 | 1.1.1901 | 9.11.2016 | 20,0 | |
6 | LOCATION 2 | 1.1.1901 | 4.5.2020 | 17,0 | |
6 | LOCATION 3 | 27.12.2016 | 4.5.2020 | 20,0 | |
6 | LOCATION 3 | 16.12.2016 | 26.12.2016 | 15,0 | |
6 | LOCATION 3 | 13.11.2016 | 15.12.2016 | 10,0 |
When the Inventory table is processed, the stored procedure looks up if the current item, variant, and location combination has a cost that matches the date range and provides that as a cost for the adjustment in quantity made. If no cost is available in fItemCostAdjustment
, the cost in the Item table is used for that adjustment. For each date the accumulative sum of cost per item (both negative and positive) is the Inventory Cost for the selected item or items.
Table 2 - Example of Inventory cost for Item 6, Location 1
Date | Quantity | AverageCost | Inventory Cost by date | Accumulative Inventory Cost by date |
1.11.2016 | 10 | 20 | 200 | 200 |
9.11.2016 | -5 | 20 | - 100 | 100 |
17.11.2016 | -5 | 15 | -75 | 25 |
25.11.2016 | 25 | 15 | 375 | 400 |
3.12.2016 | -20 | 15 | - 300 | 100 |
11.12.2016 | 100 | 15 | 1.500 | 1.600 |
19.12.2016 | -70 | 20 | - 1.400 | 200 |
27.12.2016 | 20 | 20 | 400 | 600 |
4.1.2017 | -30 | 20 | - 600 | 0 |