ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Change] Codeunit 5940 ServContractManagement - OnBeforeCalcContractAmount

Open amploba opened this issue 5 years ago • 1 comments

Hello

Can you modify the event 'OnBeforeCalcContractAmount' in the codeunit 'ServContractManagement' add a new parameters? like this

procedure CalcContractAmount(ServContractHeader: Record "Service Contract Header"; PeriodStarts: Date; PeriodEnds: Date) AmountCalculated: Decimal
var
    ServContractLine: Record "Service Contract Line";
    Currency: Record Currency;
    LinePeriodStarts: Date;
    LinePeriodEnds: Date;
    ContractLineIncluded: Boolean;
    isHandled: Boolean
begin
    IsHandled := false;
    //OnBeforeCalcContractAmount(ServContractHeader, PeriodStarts, PeriodEnds);
    OnBeforeCalcContractAmount(ServContractHeader, PeriodStarts, PeriodEnds, AmountCalculated, isHandled);
    if not IsHandled then begin
        Currency.InitRoundingPrecision;
        AmountCalculated := 0;

This is the event modifed

[IntegrationEvent(false, false)]
local procedure OnBeforeCalcContractAmount(var ServiceContractHeader: Record "Service Contract Header"; PeriodStarts: Date; PeriodEnds: Date; var AmountCalculated: Decimal; var isHandled: Boolean)
begin
end;

amploba avatar Nov 02 '21 17:11 amploba

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 Nov 09 '21 10:11 JesperSchulz