We got the below error while running the currency conversion. Can anyone suggest me how to solve this?
The above error occurs at Classes\LedgerCurrencyConversionProvider_FIM\balanceSubLedgerJournalAcctEntDist() and the error is due to the imbalanced accounting currency amount and reporting currency amount in the SubledgerJournalAccountEntryDistribution table for the single Voucher.
Thanks in Advance
i think the key is "the record has never been selected" ,check the code whether you have used "record.selectForUpdate(true)" when you edit the record;
Thanks for your reply. I have checked the code and it is not related to record.selectForUpdate(true)
Any suggestion for this?
Gopinath M said:the error is due to the imbalanced accounting currency amount and reporting currency amount in the SubledgerJournalAccountEntryDistribution table for the single Voucher
Have you tried debugging?
Looking at the code, it is unable to find a SubledgerJournalAccountEntryDistribution record to update.
Also search in LCS for any known issues
For the below Voucher's SubLedgerJournalEntries , the Vendor balance Reporting Currency Amount was additionally created as 0.01 as there is a difference between the Acc Currency & Rep Currency.
Currency Exchange Rate - PEN to ZAR - 4.015333725787
(3979.81 - 477.58 ) = 3502.23 * 4.015333725787 = 14062.62223446301
15980.27 - 1917.64 = 14062.63
So , here my problem is that for the 0.01 vendor balance record there are records inserted in SubLedgerJournalAccountEntryDistribution which causes the voucher to imbalance in respect of the SubLedgerJournalAccountEntryDistribution table.
So , when i run the GeneralLedger --> Reporting Currency Conversion , the method in LedgerCurrencyConversionProvider_FIM --- > balanceSubledgerJournalAccountEntryDist() , tries to balance the Voucher , and in my case it picks the Posting Type - Penny Difference in reporting Currency as First OffSet and it joins the table SubLedgerJournalAccountEntry with SubLedgerJournalAccountEntryDistribution , but it has no record in the SubLedgerJournalAccountEntryDistribution and finally i am getting the above error.
Any Help would be appreciated
The issue seems to be unusual.
If there is no code change around, then search in LCS for any related bugs. If you don't see any issue in LCS, then try logging one to Microsoft.