ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Table 5870 - "BOM Buffer" - OnBeforeCalcOvhdCost
Dear Support,
We would like to add a new event OnBeforeCalcOvhdCost in the following Procedure below, using the IsHandled pattern. This would allow us to further customize the code and migrate existing customizations.
procedure CalcOvhdCost()
var
Item: Record Item;
UOMMgt: Codeunit "Unit of Measure Management";
LotSize: Decimal;
IsHandled: Boolean; //New Code --++
begin
//New Code --
IsHandled := false;
OnBeforeCalcOvhdCost(Rec, IsHandled);
if IsHandled then
exit;
//New Code ++
LotSize := 1;
if "Lot Size" <> 0 then
LotSize := "Lot Size";
Item.Get("No.");
"Overhead Rate" :=
RoundUnitAmt("Overhead Rate", UOMMgt.GetQtyPerUnitOfMeasure(Item, "Unit of Measure Code") * "Qty. per Top Item");
"Single-Level Mfg. Ovhd Cost" +=
(("Single-Level Material Cost" +
"Single-Level Capacity Cost" +
"Single-Level Subcontrd. Cost" +
"Single-Level Cap. Ovhd Cost") *
"Indirect Cost %" / 100) +
("Overhead Rate" * LotSize);
"Single-Level Mfg. Ovhd Cost" := RoundUnitAmt("Single-Level Mfg. Ovhd Cost", 1);
"Rolled-up Mfg. Ovhd Cost" +=
(("Rolled-up Material Cost" +
"Rolled-up Capacity Cost" +
"Rolled-up Subcontracted Cost" +
"Rolled-up Capacity Ovhd. Cost" +
"Rolled-up Mfg. Ovhd Cost") *
"Indirect Cost %" / 100) +
("Overhead Rate" * LotSize);
"Rolled-up Mfg. Ovhd Cost" := RoundUnitAmt("Rolled-up Mfg. Ovhd Cost", 1);
end;
Event Signature:
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcOvhdCost(var BOMBuffer: Record "BOM Buffer"; var IsHandled: Boolean)
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: 53020.