Hi there,
I'm just checking the item revaluation for our year's end closing and I came across a possible bug. It concerns the entries allowed for revaluation. As it is now coded in R5899 "Calculate Inventory Value", not all item ledger entries are considered for the inventory value at date.
When calculated by item, the item ledger entries are traversed and written into a buffer:
InsertValJnlBuffer(
ItemLedgEntry."Item No.",ItemLedgEntry."Variant Code",
ItemLedgEntry."Location Code",RemQty,
ItemLedgEntry.CalculateRemInventoryValue(ItemLedgEntry."Entry No.",ItemLedgEntry.Quantity,RemQty,
IncludeExpectedCost AND NOT ItemLedgEntry."Completely Invoiced",PostingDate));
Function IncludeEntryInCalc(ItemLedgEntry : Record "Item Ledger Entry";PostingDate : Date;IncludeExpectedCost : Boolean) : Boolean
WITH ItemLedgEntry DO BEGIN
IF IncludeExpectedCost THEN
EXIT("Posting Date" IN [0D..PostingDate]);
EXIT("Completely Invoiced" AND ("Last Invoice Date" IN [0D..PostingDate]));
END;
And the function in Item Ledger Entry:
CalculateRemQuantity(ItemLedgEntryNo : Integer;PostingDate : Date) : Decimal
ItemApplnEntry.SETCURRENTKEY("Inbound Item Entry No.");
ItemApplnEntry.SETRANGE("Inbound Item Entry No.",ItemLedgEntryNo);
RemQty := 0;
IF ItemApplnEntry.FINDSET THEN
REPEAT
IF ItemApplnEntry."Posting Date" <= PostingDate THEN
RemQty += ItemApplnEntry.Quantity;
UNTIL ItemApplnEntry.NEXT = 0;
EXIT(RemQty);
Basically, what you can see is that the remaining quantity of the item ledger entry is calculated at valuation date by traversing the item application entries, regardless of the "open" flag of the item ledger entry. But it is not handled this way when the completely invoiced state is checked, or the last invoicing date. But these are also time-dependent. This leads to some questions:
It is pretty difficult to allocate a global revaluation to the items this way, since your base for the revaluation doesn't match with the physical inventory. and it prompts questions from auditors.
Can anybody shed some light on this? Thanks in advance.
with best regards
*This post is locked for comments
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156