ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Parameter Request] Table "Gen. Journal Line" - OnUpdateLineBalanceOnAfterAssignBalanceLCY

Open KennyTangBS opened this issue 3 years ago • 1 comments

Please add a new record parameter Rec to OnUpdateLineBalanceOnAfterAssignBalanceLCY event in table "Gen. Journal Line"

procedure UpdateLineBalance()
    begin
        "Debit Amount" := 0;
        "Credit Amount" := 0;

        if ((Amount > 0) and (not Correction)) or
           ((Amount < 0) and Correction)
        then
            "Debit Amount" := Amount
        else
            if Amount <> 0 then
                "Credit Amount" := -Amount;

        if "Currency Code" = '' then
            "Amount (LCY)" := Amount;
        case true of
            ("Account No." <> '') and ("Bal. Account No." <> ''):
                "Balance (LCY)" := 0;
            "Bal. Account No." <> '':
                "Balance (LCY)" := -"Amount (LCY)";
            else
                "Balance (LCY)" := "Amount (LCY)";
        end;

        OnUpdateLineBalanceOnAfterAssignBalanceLCY("Balance (LCY)", Rec);

        Clear(GenJnlAlloc);
        GenJnlAlloc.UpdateAllocations(Rec);

        UpdateSalesPurchLCY();

        if ("Deferral Code" <> '') and (Amount <> xRec.Amount) and ((Amount <> 0) and (xRec.Amount <> 0)) then
            Validate("Deferral Code");
    end;
[IntegrationEvent(TRUE, false)]
    local procedure OnUpdateLineBalanceOnAfterAssignBalanceLCY(var BalanceLCY: Decimal; var Rec: Record "Gen. Journal Line")
    begin
    end;

KennyTangBS avatar Aug 18 '23 19:08 KennyTangBS

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. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 11948.

JesperSchulz avatar Aug 25 '23 07:08 JesperSchulz