ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Codeunit 5812 "Calculate Standard Cost", CalcProdBOMCost

Open IngoStender opened this issue 6 years ago • 1 comments

In codeunit 5812 "Calculate Standard Cost", function CalcProdBOMCost, please add publisher OnCalcProdBOMCostOnAfterCalcMfgItem as follows:

                    case Type of
                        Type::Item:
                            begin
                                CalcMfgItem("No.", CompItem, Level + 1);
                                IncrCost(SLMat, CompItem."Standard Cost", CompItemQtyBase);
                                IncrCost(RUMat, CompItem."Rolled-up Material Cost", CompItemQtyBase);
                                IncrCost(RUCap, CompItem."Rolled-up Capacity Cost", CompItemQtyBase);
                                IncrCost(RUSub, CompItem."Rolled-up Subcontracted Cost", CompItemQtyBase);
                                IncrCost(RUCapOvhd, CompItem."Rolled-up Cap. Overhead Cost", CompItemQtyBase);
                                IncrCost(RUMfgOvhd, CompItem."Rolled-up Mfg. Ovhd Cost", CompItemQtyBase);

                                // >> ----New
                                OnCalcProdBOMCostOnAfterCalcMfgItem(ProdBOMLine, MfgItem, MfgItemQtyBase, CompItem, CompItemQtyBase, Level, IsTypeItem, UOMFactor)
                                // << ----New
                            end;

    [IntegrationEvent(false, false)]
    local procedure OnCalcProdBOMCostOnAfterCalcMfgItem(var ProdBOMLine: Record "Production BOM Line"; MfgItem: Record Item; MfgItemQtyBase: Decimal; CompItem: Record Item; CompItemQtyBase: Decimal; Level: Integer; IsTypeItem: Boolean; UOMFactor: Decimal)
    begin
    end;

IngoStender avatar Mar 04 '20 15:03 IngoStender

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. We will update this issue with information about availability.

bc-ghost avatar Mar 19 '20 10:03 bc-ghost