KVSFCYGenJnlPostLineMgt#
Events#
OnBeforeCalcCurrencyRealizedGainLoss(Record CV Ledger Entry Buffer, Record Detailed CV Ledg. Entry Buffer, Record Gen. Journal Line, Decimal, Decimal, Boolean) :#
Summary: Integration event that is raised before calculating currency realized gain/loss during payment application processes, providing an extension point for implementing custom currency exchange rate gain/loss calculation logic or overriding the standard calculation method for foreign currency transactions.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcCurrencyRealizedGainLoss(var CVLedgEntryBuf: Record "CV Ledger Entry Buffer"; var TempDtldCVLedgEntryBuf: Record "Detailed CV Ledg. Entry Buffer" temporary; var GenJnlLine: Record "Gen. Journal Line"; var AppliedAmount: Decimal; var AppliedAmountLCY: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYGenJnlPostLineMgt", 'OnBeforeCalcCurrencyRealizedGainLoss', '', false, false)]
local procedure DoSomethingOnBeforeCalcCurrencyRealizedGainLoss(var CVLedgEntryBuf: Record "CV Ledger Entry Buffer"; var TempDtldCVLedgEntryBuf: Record "Detailed CV Ledg. Entry Buffer" temporary; var GenJnlLine: Record "Gen. Journal Line"; var AppliedAmount: Decimal; var AppliedAmountLCY: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
CVLedgEntryBuf: CV Ledger Entry Buffer record (passed by reference) containing the customer/vendor ledger entry being applied with currency information and exchange rates for gain/loss calculation context.TempDtldCVLedgEntryBuf: Detailed CV Ledger Entry Buffer record (passed by reference, temporary) for creating detailed entries with calculated gain/loss amounts, enabling custom detailed entry manipulation for currency adjustments.GenJnlLine: General Journal Line record (passed by reference) containing the payment transaction details including posting dates, currency codes, and amounts for gain/loss calculation context.AppliedAmount: Decimal variable (passed by reference) containing the applied amount in the transaction currency, providing the base amount for currency conversion and gain/loss calculations.AppliedAmountLCY: Decimal variable (passed by reference) containing the applied amount in local currency (LCY), enabling comparison with converted amounts for gain/loss determination.IsHandled: Boolean variable (passed by reference) that should be set to true by the extension if it has completely handled the currency gain/loss calculation, preventing execution of standard calculation logic.
OnAfterCalcCurrencyRealizedGainLoss(Record CV Ledger Entry Buffer, Decimal, Decimal, Decimal) :#
Summary: Integration event that is raised after calculating currency realized gain/loss during payment application processes, providing an extension point for modifying the calculated gain/loss amount or implementing additional processing based on the currency exchange rate differences between transaction and payment dates.
[IntegrationEvent(false, false)]
local procedure OnAfterCalcCurrencyRealizedGainLoss(var CVLedgEntryBuf: Record "CV Ledger Entry Buffer"; AppliedAmount: Decimal; AppliedAmountLCY: Decimal; var RealizedGainLossLCY: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYGenJnlPostLineMgt", 'OnAfterCalcCurrencyRealizedGainLoss', '', false, false)]
local procedure DoSomethingOnAfterCalcCurrencyRealizedGainLoss(var CVLedgEntryBuf: Record "CV Ledger Entry Buffer"; AppliedAmount: Decimal; AppliedAmountLCY: Decimal; var RealizedGainLossLCY: Decimal)
begin
end;
Parameters:
CVLedgEntryBuf: CV Ledger Entry Buffer record (passed by reference) containing the customer/vendor ledger entry with currency information and exchange rate context that was used for gain/loss calculation.AppliedAmount: Decimal value containing the applied amount in the transaction currency, providing the original foreign currency amount that was applied for reference and additional calculations.AppliedAmountLCY: Decimal value containing the applied amount in local currency (LCY) as calculated during the payment application, providing the converted amount for validation or adjustment purposes.RealizedGainLossLCY: Decimal variable (passed by reference) containing the calculated realized gain or loss amount in local currency, allowing extensions to modify the final gain/loss amount before posting or implement custom adjustment logic.