Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Event Request] codeunit 699 "Exch. Rate Adjmt. Process" - OnAdjustExchRateCustAfterCalcFields #27141

@RZ440

Description

@RZ440

Describe the request

Hello, can you please add a new Event OnAdjustExchRateCustAfterCalcFields in codeunit 699 "Exch. Rate Adjmt. Process"?

    procedure AdjustExchRateCust(GenJournalLine: Record "Gen. Journal Line"; var TempCustLedgerEntry: Record "Cust. Ledger Entry" temporary)
    var
        Customer: Record Customer;
        CustLedgerEntry2: Record "Cust. Ledger Entry";
        DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry";
        PostingDate2: Date;
    begin
        PostingDate2 := GenJournalLine."Posting Date";
        if TempCustLedgerEntry.FindSet() then
            repeat
                CustLedgerEntry2.Get(TempCustLedgerEntry."Entry No.");
                CustLedgerEntry2.SetRange("Date Filter", 0D, PostingDate2);
                CustLedgerEntry2.CalcFields("Remaining Amount", "Remaining Amt. (LCY)");
                OnAdjustExchRateCustAfterCalcFields(CustLedgerEntry2);
                if ShouldAdjustEntry(
                        PostingDate2, CustLedgerEntry2."Currency Code", CustLedgerEntry2."Remaining Amount",
                        CustLedgerEntry2."Remaining Amt. (LCY)", CustLedgerEntry2."Adjusted Currency Factor")
                then begin
    [IntegrationEvent(false, false)]
    local procedure OnAdjustExchRateCustAfterCalcFields(var CustomerLedgerEntry: Record "Cust. Ledger Entry")
    begin
    end;

Additional context

We have additional values to calculate the Remaining Amount and need to recalculate it to get the correct output of ShouldAdjustEntry.
Internal work item: AB#546848

Metadata

Metadata

Assignees

No one assigned

    Labels

    FinanceGitHub request for Finance areaevent-requestRequest for adding an eventships-in-future-updateFix ships in a future update

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions