ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Table 25 - Vendor Ledger Entry - RecalculateAmounts

Open almatlansag opened this issue 7 years ago • 1 comments

Could you please create an Integration event in Table 25 Vendor Ledger Entry, in function RecalculateAmounts ?

[External] RecalculateAmounts(FromCurrencyCode : Code[10];ToCurrencyCode : Code[10];PostingDate : Date)
IF ToCurrencyCode = FromCurrencyCode THEN
  EXIT;

"Remaining Amount" :=
  CurrExchRate.ExchangeAmount("Remaining Amount",FromCurrencyCode,ToCurrencyCode,PostingDate);
"Remaining Pmt. Disc. Possible" :=
  CurrExchRate.ExchangeAmount("Remaining Pmt. Disc. Possible",FromCurrencyCode,ToCurrencyCode,PostingDate);
"Accepted Payment Tolerance" :=
  CurrExchRate.ExchangeAmount("Accepted Payment Tolerance",FromCurrencyCode,ToCurrencyCode,PostingDate);
"Amount to Apply" :=
  CurrExchRate.ExchangeAmount("Amount to Apply",FromCurrencyCode,ToCurrencyCode,PostingDate);

// >>>>
OnAfterRecalculateAmounts(Rec, FromCurrencyCode, ToCurrencyCode, PostingDate);
// <<<<

Event signature:

LOCAL [IntegrationEvent] OnAfterRecalculateAmounts(VAR Rec : Record "Vendor Ledger Entry";FromCurrencyCode : Code[10];ToCurrencyCode : Code[10];PostingDate : Date)

For our extension, we need to recalculate our own amount fields.

almatlansag avatar Nov 11 '19 18:11 almatlansag

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.

bc-ghost avatar Nov 27 '19 10:11 bc-ghost