Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

NAV2013 Rollup4+: Handling of Adjustments on Unapply, dimensions in CU 12

Posted on by 6,092

Hi,

I stumbled over this change in NAV2013 RU4+. It is also there in NAV2013R2. The best fitting KB ID seems to be 348287, "The G/L entries dimension code is wrong when you unapply a sales invoice or a purchase invoice". The ID belongs to RU3, though... strange.

In the unapply functions for customer / vendor ledger entries there is changed code:

 UpdateTotalAmounts(

   TempInvPostBuf,GenJnlLine."Dimension Set ID",DtldCVLedgEntryBuf."Amount (LCY)",

   DtldCVLedgEntryBuf."Additional-Currency Amount");

 IF NOT (DtldCVLedgEntryBuf."Entry Type" IN [

                                             DtldCVLedgEntryBuf."Entry Type"::"Initial Entry",

                                             DtldCVLedgEntryBuf."Entry Type"::Application])

 THEN

   CollectAddjustment(DebitAddjustment,DebitAddjustmentAddCurr,

     CreditAddjustment,CreditAddjustmentAddCurr,

     -DtldCVLedgEntryBuf."Amount (LCY)",-DtldCVLedgEntryBuf."Additional-Currency Amount");

 AutoEntrForDtldCustLedgEntries(DtldCVLedgEntryBuf,DtldCustLedgEntry2."Transaction No.");

This code change is there to consider the fact that the applied entries might have different Dimension Set IDs, and the G/L entries need to reflect this. So far, so good. My first question is why is this only of importance in the unapply functions, not in the apply functions too?

The next thing that puzzles me is that CollectAddjustment() gets called, but no HandlDtlAddJustment(). This function is there to show the adjustment part of the posting on the receivables or payables account. Since unapplying entries can revert adjustments, why doesn't it post this way in the G/L?

If I would assume that HandlDtlAddjustment() should be called in the unapply functions, then the mess begins: CollectAddjustment() would need to collect by Dimension ID, and HandlDtlAddjustment() also by Dimension ID. So, I would expect a similar structure to be found in PostDtldCustledgEntries(), PostDtldVendLedgEntries(),UnapplyCustLedgEntry(),UnapplyVendLedgEntry() - all collecting and posting adjustments by Dimension Set ID.That's what our Add-On actually does with the transaction currency (essentially the same problem). Using the invoice posting buffer for the amounts by dimension set / currency / date would be a bad fit, therefore we have our own buffer table for it.

Does somebody else have an opinion on this?

with best regards

Jens

*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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans