ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Page 233 "Apply Vendor Entries" new events to support custom CalcType

Open kristjano opened this issue 4 years ago • 1 comments

Hi, Is it possible to add new events to Apply Vendor Entries page so that I can add custom CalcType. OnSetApplyingVendLedgEntry:

procedure SetApplyingVendLedgEntry()
begin
    OnBeforeSetApplyingVendLedgEntry(TempApplyingVendLedgEntry, GenJnlLine, PurchHeader, CalcType);
    case CalcType of
        CalcType::"Purchase Header":
            ...
        CalcType::Direct
            ...
        CalcType::"Gen. Jnl. Line":
            ...
        else
            OnSetApplyingVendLedgEntry(TempApplyingVendLedgEntry, CalcType);  <-- New event
    end;
    OnAfterSetApplyingVendLedgEntry(TempApplyingVendLedgEntry, GenJnlLine, PurchHeader);
end;

and OnCalcApplnAmount:

procedure CalcApplnAmount()
begin
    OnBeforeCalcApplnAmount(Rec, GenJnlLine);
    ...
    case CalcType of
        CalcType::Direct
            ...
        CalcType::"Gen. Jnl. Line":
            ...
        CalcType::"Purchase Header":
            ...
        else
            OnCalcApplnAmount(Rec, CalcType, AppliedAmount, ApplyingAmount, AppliedVendLedgEntry);  <-- New event
    end;

    OnAfterCalcApplnAmount(Rec, AppliedAmount, ApplyingAmount, CalcType, AppliedVendLedgEntry, GenJnlLine);
end;

Signatures:

[IntegrationEvent(true, false)]
local procedure OnSetApplyingVendLedgEntry(var TempApplyingVendorLedgerEntry: Record "Vendor Ledger Entry"; CalcType: Enum "Vendor Apply Calculation Type")
begin
end;

[IntegrationEvent(true, false)]
local procedure OnCalcApplnAmount(VendorLedgerEntry: Record "Vendor Ledger Entry"; CalcType: Enum "Vendor Apply Calculation Type"; var AppliedAmount: Decimal; var ApplyingAmount: Decimal; var AppliedVendLedgEntry: Record "Vendor Ledger Entry")
begin
end;

kristjano avatar May 10 '22 11:05 kristjano

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.

JesperSchulz avatar May 17 '22 04:05 JesperSchulz