Hi,
this one is pretty old, but as it seems the issue is not completely resolved. The complete unapply() functions have been redesigned in NAV2009, and now there is a check for currency = ACY (in a strange way).
From NAV2013 (7.00.00.34587), UnapplyCustLedgentry():
IF (GLSetup."Additional Reporting Currency" <> DtldCVLedgEntryBuf."Currency Code") OR
(DtldCVLedgEntryBuf."Entry Type" = DtldCVLedgEntryBuf."Entry Type"::Application)
THEN
DtldCVLedgEntryBuf."Additional-Currency Amount" :=
CalcAddCurrForUnapplication(DtldCVLedgEntryBuf."Posting Date",DtldCVLedgEntryBuf."Amount (LCY)")
ELSE
IF GLSetup."Additional Reporting Currency" <> '' THEN
DtldCVLedgEntryBuf."Additional-Currency Amount" := DtldCVLedgEntryBuf.Amount;
The result is that for the application entries the ACY always gets calculated (at posting date), even if the currency code of the entries was ACY. This code leads to a deviation in the handling of application entries during application and un-application. CalcApplication() doesn't calculate ACY amounts. The amounts on the receivables account are the accumulated balance of the application and all other adjustments during the application (function CollectAddjustment()). Only residuals of this would be posted to the receivables account (depending on the NAV version).
So... there is more than one bug here, unfortunately. The better way would be to always calculate ACY on application/unappplication in the same way. And to merge PostDtldCustLedgentries() and AutoEntrForDtldCustLedgEntries() into one function, this would reduce the code in CU12 by a third or so. ;)
with best regards
Jens