Closed UrbMigle closed 1 day ago
We cannot just take this as it will conflict/confuse on the naming When calling we are using BookValue2 OnCalculateDeprAmountOnBeforeCalculateDeprAmount(FA, SkipOnZero, DeprBookCode, Amount, BookValue2, SalvageValue2, EndingBookValue, FinalRoundingAmount, IsHandled);
but it gets exposed as BookValue [IntegrationEvent(false, false)] local procedure OnCalculateDeprAmountOnBeforeCalculateDeprAmount(FixedAsset: Record "Fixed Asset"; SkipOnZero: Boolean; DeprBookCode: Code[20]; var Amount: Decimal; BookValue: Decimal; SalvageValue2: Decimal; EndingBookValue: Decimal; FinalRoundingAmount: Decimal; var IsHandled: Boolean; BookValue: Decimal; UntilDate: Date) begin end;
We cannot change this without deprecated the old event and create a new
I trust the two otter events OnAfterCalculateFinalAmount(DeprBook, Amount, IsHandled, FA, UntilDate, BookValue);
OnAfterCalculateDeprAmount(
FA, SkipOnZero, DeprBookCode, Amount, Abs(BookValue2), -Abs(SalvageValue2), EndingBookValue, FinalRoundingAmount);
will give you some possibility to change the calculation
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:
Describe the request
Hello,
Please add two additional parameters to the event OnCalculateDeprAmountOnBeforeCalculateDeprAmount. They are needed for us to change the value of the Amount variable.
Additional context
We want to change calculation of the amount, but are missing the parameters to do so, could you please add them to the event publisher? Thank you Internal work item: AB#545278