Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Item Revaluation Journal - possible Bug?

Posted on by 6,092

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:

  • The quantity to be revalued differs from the physical inventory of this date. But why? Because you have entries not completely invoiced (what about partially invoiced?), so you can't touch them.
  • If an item ledger entry gets completely invoiced at a later date and you want to revaluate at an earlier date (year's end closing), you can't do this. I have not understood why, since it's a valuation at date. Adjust Cost Item Entries would take care of subsequent invoices and adjust the changed cost accordingly. 

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans