Let's define inventory value at the current time, without date filters as the sum of the cost amount actual of all item ledger entries. A bit oversimplifed because you should really use value entries, but without date filters, for current time it works.
Let's also determine the age of the stock. This can be done as taking all Open item ledger entries, with remaining quantity not zero, and calculating the remaining value on stock as (remaining quantity / quantity) * cost amount actual. And the posting date of these entries gives you the age of the stock. And sum it up. In all normal cases this will match the above. Because it should.
Now I have a case when it does not match. I have run adjust costs which ensures all outgoing entries are valued from incoming entries. I also ensured no weird shenanigans like negative remaining quantity happened. What the heck could be the reason? The quantity matches, i.e. sum quantity = sum remaining quantity.
It's stuff we did not sell for over a year, just sitting in a warehouse so people don't even remember if any weird thing ever happened during posting that could give me a clue.
0