Skip to content

[Event Request] Table 31257 "Payment Order Line CZB".AppliesToCustLedgEntryNo #29853

@fridrichovsky

Description

@fridrichovsky

Why do you need this change?

Please create new event that allow skip fill bank information we need meet this condition
SkipFillBankInformation := not ((PaymentOrderLineCZB."Cust./Vendor Bank Account Code" = '') and (CustLedgerEntry."Bank Account Code CZL" <> '')) or
((PaymentOrderLineCZB."Account No." = '') and (CustLedgerEntry."Bank Account No. CZL" <> '')) or
((PaymentOrderLineCZB.IBAN = '') and (CustLedgerEntry."IBAN CZL" <> ''));

that say if bank information should be filled or not.
This event is used also for fill another fields in record.

Describe the request

procedure AppliesToCustLedgEntryNo()
    var
        CustLedgerEntry: Record "Cust. Ledger Entry";
        //---------------------------- OnAppliesToCustLedgEntryNoOnBeforeFillBankInformation:BEGIN
        SkipFillBankInformation: Boolean;
        //---------------------------- OnAppliesToCustLedgEntryNoOnBeforeFillBankInformation:END
    begin
        CustLedgerEntry.Get("Applies-to C/V/E Entry No.");
        "Applies-to Doc. Type" := CustLedgerEntry."Document Type";
        "Applies-to Doc. No." := CustLedgerEntry."Document No.";
        "Variable Symbol" := CustLedgerEntry."Variable Symbol CZL";
        if CustLedgerEntry."Constant Symbol CZL" <> '' then
            "Constant Symbol" := CustLedgerEntry."Constant Symbol CZL";
        Description := CreateDescription(GetPlaceholderDescriptionValues(CustLedgerEntry));
        if Description = '' then
            Description := CustLedgerEntry.Description;
        Type := Type::Customer;
        "No." := CustLedgerEntry."Customer No.";
        Validate("No.", CustLedgerEntry."Customer No.");
        //---------------------------- OnAppliesToCustLedgEntryNoOnBeforeFillBankInformation:BEGIN
        OnAppliesToCustLedgEntryNoOnBeforeFillBankInformation(Rec, CustLedgerEntry, SkipFillBankInformation);
        if not SkipFillBankInformation then begin
        //---------------------------- OnAppliesToCustLedgEntryNoOnBeforeFillBankInformation:END
            "Cust./Vendor Bank Account Code" :=
            CopyStr(CustLedgerEntry."Bank Account Code CZL", 1, MaxStrLen("Cust./Vendor Bank Account Code"));
            "Account No." := CustLedgerEntry."Bank Account No. CZL";
            "Specific Symbol" := CustLedgerEntry."Specific Symbol CZL";
            "Transit No." := CustLedgerEntry."Transit No. CZL";
            IBAN := CustLedgerEntry."IBAN CZL";
            "SWIFT Code" := CustLedgerEntry."SWIFT Code CZL";
        //---------------------------- OnAppliesToCustLedgEntryNoOnBeforeFillBankInformation:BEGIN
        end;
        //---------------------------- OnAppliesToCustLedgEntryNoOnBeforeFillBankInformation:END
        Validate("Applied Currency Code", CustLedgerEntry."Currency Code");
        if CustLedgerEntry."Due Date" > "Due Date" then
            "Due Date" := CustLedgerEntry."Due Date";
        "Original Due Date" := CustLedgerEntry."Due Date";
        UpdateAmounts(CustLedgerEntry);
        OnAfterAppliesToCustLedgEntryNo(Rec, CustLedgerEntry);
    end;
    //---------------------------- OnAppliesToCustLedgEntryNoOnBeforeFillBankInformation:BEGIN
    [IntegrationEvent(false, false)]
    local procedure OnAppliesToCustLedgEntryNoOnBeforeFillBankInformation(var PaymentOrderLineCZB: Record "Payment Order Line CZB"; CustLedgerEntry: Record "Cust. Ledger Entry"; var SkipFillBankInformation: Boolean)
    begin
    end;
    //---------------------------- OnAppliesToCustLedgEntryNoOnBeforeFillBankInformation:END

Internal work item: AB#626300

Metadata

Metadata

Assignees

No one assigned

    Labels

    FinanceGitHub request for Finance areaevent-requestRequest for adding an event

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions