[Event Request] Codeunit 32000000 "Ref. Payment Management" - MatchLinesOnBeforeFindCustLedgerEntry
A new Event Publisher is need in the Codeunit 32000000 "Ref. Payment Management".
Event:
local procedure MatchLinesOnBeforeFindCustLedgerEntry(RefPmtImport: Record "Ref. Payment - Imported"; var CustLedgEntry: Record "Cust. Ledger Entry")
Code
procedure MatchLines(JnlTemplateName: Code[20]; JnlBatchName: Code[20])
var
NoMatchLines: Boolean;
begin
RefPmtImport.Reset();
RefPmtImport.SetRange("Record ID", 3, 5);
RefPmtImport.SetRange("Posted to G/L", false);
if RefPmtImport.FindSet then
repeat
CustLedgEntry.Reset();
CustLedgEntry.SetFilter("Reference No.", RefPmtImport."Reference No.");
CustLedgEntry.SetFilter("Document Type", '%1', 2);
CustLedgEntry.SetRange(Open, true);
MatchLinesOnBeforeFindCustLedgerEntry(RefPmtImport,CustLedgEntry);
if CustLedgEntry.FindFirst then begin
RefPmtImport."Entry No." := CustLedgEntry."Entry No.";
RefPmtImport.Validate("Customer No.", CustLedgEntry."Customer No.");
RefPmtImport."Document No." := CustLedgEntry."Document No.";
RefPmtImport."Posting Date" := CustLedgEntry."Posting Date";
RefPmtImport.Matched := true;
RefPmtImport."Matched Date" := Today;
RefPmtImport."Matched Time" := Time;
RefPmtImport.Modify();
end else
NoMatchLines := true;
until RefPmtImport.Next = 0;
if NoMatchLines then
Message(Text1090001);
RefPmtImport.Reset();
SetLines(RefPmtImport, JnlBatchName, JnlTemplateName);
end;
Need to apply / include additional filters when finding the Customer Ledger Entry in the MatchLines Procedure related to Combine SEPA Payments. The new event should be invoked before Finding the Customer Ledger Entry. Could you please add the requested Publisher?
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.