ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] codeunit 7002 "Price Calculation - V16" implements "Price Calculation" -> OnAfterCalcBestAmount
Could you please integrate the event OnAfterCalcBestAmount?
procedure CalcBestAmount(AmountType: Enum "Price Amount Type"; var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt."; var PriceListLine: Record "Price List Line") FoundBestPrice: Boolean;
var
BestPriceListLine: Record "Price List Line";
begin
OnBeforeCalcBestAmount(AmountType, PriceCalculationBufferMgt, PriceListLine);
PriceListLine.SetRange(Status, PriceListLine.Status::Active);
if PriceListLine.FindSet() then
repeat
if PriceCalculationBufferMgt.IsInMinQty(PriceListLine) then begin
PriceCalculationBufferMgt.ConvertAmount(AmountType, PriceListLine);
PickBestLine(AmountType, PriceListLine, BestPriceListLine, FoundBestPrice);
end;
until PriceListLine.Next() = 0;
if FoundBestPrice then
PriceListLine := BestPriceListLine;
//New Event
OnAfterCalcBestAmount(AmountType, PriceCalculationBufferMgt, PriceListLine);
end;
[IntegrationEvent(false, false)]
local procedure OnAfterCalcBestAmount(AmountType: Enum "Price Amount Type"; var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt."; var PriceListLine: Record "Price List Line")
begin
end;
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: 44246.