10

Hello!


We found one issue with Bank account Reconciliation in Business central SAAS, that seems to be a bug.


The error ‘Remaining Amount must be equal to … in Bank Account Ledger entry … ’ appears when we have multiple lines in bank statement that matched the sum of multiple lines in Bank acc ledger entries.

 

One of our client has this situation in real life (the sum of four lines in bank statement that correspond to the sum of two bank account ledger entries) and I also could reproduce the issue in Cronus company of standard database (without any extensions)

 

Steps to reproduce an example of the problem:

 

  1. Create 2 bank payments of 5000 and 6000 , for example
  2. In bank reconciliation , 4 lines of 2000, 2500, 3200, 3300
  3. Then do manual match 5000 bank acc ledger entry to statement lines 2000 and 2500, 6000 – to 3200 and 3300
  4. Total difference is 0.
  5. while posting Bank statement, you will get an error: Remaining amount must be equal to -4500 in Bank Account Ledger Entry. Entry No. : ... Current value is -5000.

 

 After debugging, the problem seems to be in the code of codeunit 370 "Bank Acc. Reconciliation Post" in the function :


local procedure CloseBankAccLEManyToOne(BankAccRecMatchBuffer: Record "Bank Acc. Rec. Match Buffer"; var AppliedAmount: Decimal; StatementDate: Date);

    var

        BankAccRecMatchBufferCopy: Record "Bank Acc. Rec. Match Buffer";

        BankAccRecLine: Record "Bank Acc. Reconciliation Line";

        LedgerEntryNo: Integer;

        TotalRecLinesAmount: Decimal;

    begin

        BankAccRecMatchBufferCopy.SetRange("Bank Account No.", BankAccRecMatchBuffer."Bank Account No.");

        BankAccRecMatchBufferCopy.SetRange("Statement No.", BankAccRecMatchBuffer."Statement No.");

        BankAccRecMatchBufferCopy.SetRange("Match ID", BankAccRecMatchBuffer."Match ID");

        if (not BankAccRecMatchBufferCopy.IsEmpty()) then

            if BankAccRecMatchBufferCopy.FindSet() then

                repeat

                    LedgerEntryNo := BankAccRecMatchBufferCopy."Ledger Entry No.";

                    BankAccRecMatchBufferCopy."Is Processed" := true;

                    BankAccRecMatchBufferCopy.Modify();

                    BankAccRecLine.SetRange("Bank Account No.", BankAccRecMatchBufferCopy."Bank Account No.");

                    BankAccRecLine.SetRange("Statement No.", BankAccRecMatchBufferCopy."Statement No.");

                    BankAccRecLine.SetRange("Statement Line No.", BankAccRecMatchBufferCopy."Statement Line No.");

                    if BankAccRecLine.FindFirst() then

                        TotalRecLinesAmount += BankAccRecLine."Statement Amount";

                until BankAccRecMatchBufferCopy.Next() = 0;


I think, it must be Applied amount instead of Statement Amount in the line TotalRecLinesAmount += BankAccRecLine."Statement Amount" . it should help to solve the issue.


Hope you can consider this idea to fix. Thank you.

 

 


 

STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team