Codeunit "Calculate Assembly Cost"

ID 912
Namespace: Microsoft.Assembly.Costing

Methods

SetProperties

procedure SetProperties(NewCalculationDate: Date, NewCalcMultiLevel: Boolean, NewLogErrors: Boolean, NewStdCostWkshName: Text[50], NewShowDialog: Boolean)

Parameters

Name Type Description
NewCalculationDate Date
NewCalcMultiLevel Boolean
NewLogErrors Boolean
NewStdCostWkshName Text[50]
NewShowDialog Boolean

TestPreconditions

procedure TestPreconditions(var Item: Record Item)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item

CalcItem

procedure CalcItem(ItemNo: Code[20])

Parameters

Name Type Description
ItemNo Code[20]

CalcItems

procedure CalcItems(var Item: Record Item, var NewTempItem: Record Item)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
NewTempItem Table Microsoft.Inventory.Item.Item

CalcAssemblyItemPrice

procedure CalcAssemblyItemPrice(ItemNo: Code[20])

Parameters

Name Type Description
ItemNo Code[20]

CalculateAssemblyCostExp

procedure CalculateAssemblyCostExp(AssemblyHeader: Record "Assembly Header", var ExpCost: array[5] of Decimal)

Parameters

Name Type Description
AssemblyHeader Table Microsoft.Assembly.Document."Assembly Header"
ExpCost array[5] of Decimal

CalcOverHeadAmt

procedure CalcOverHeadAmt(CostAmt: Decimal, IndirectCostPct: Decimal, OverheadRateAmt: Decimal): Decimal

Parameters

Name Type Description
CostAmt Decimal
IndirectCostPct Decimal
OverheadRateAmt Decimal

Returns

Type Description
Decimal

CalcAsmOrderStatistics

procedure CalcAsmOrderStatistics(AssemblyHeader: Record "Assembly Header", var Value: array[5, 5] of Decimal)

Parameters

Name Type Description
AssemblyHeader Table Microsoft.Assembly.Document."Assembly Header"
Value array[5, 5] of Decimal

CalcPostedAsmOrderStatistics

procedure CalcPostedAsmOrderStatistics(PostedAssemblyHeader: Record "Posted Assembly Header", var Value: array[5, 5] of Decimal)

Parameters

Name Type Description
PostedAssemblyHeader Table Microsoft.Assembly.History."Posted Assembly Header"
Value array[5, 5] of Decimal

Events

OnAfterSetProperties

[IntegrationEvent(False,False)]
local procedure OnAfterSetProperties(var NewCalculationDate: Date, var NewCalcMultiLevel: Boolean, var NewLogErrors: Boolean, var NewStdCostWkshName: Text[50], var NewShowDialog: Boolean)

Parameters

Name Type Description
NewCalculationDate Date
NewCalcMultiLevel Boolean
NewLogErrors Boolean
NewStdCostWkshName Text[50]
NewShowDialog Boolean

OnBeforeCalcItems

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcItems(var Item: Record Item)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item

OnBeforeCalcItem

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcItem(var Item: Record Item, var IsHandled: Boolean)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
IsHandled Boolean

OnCalcAssemblyItemOnAfterInitItemCost

[IntegrationEvent(False,False)]
local procedure OnCalcAssemblyItemOnAfterInitItemCost(var Item: Record Item)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item

OnCalcAssemblyItemOnAfterCalcItemRolledupCost

[IntegrationEvent(False,False)]
local procedure OnCalcAssemblyItemOnAfterCalcItemRolledupCost(var Item: Record Item)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item

OnCalcAssemblyItemOnAfterCalcSingleLevelCost

[IntegrationEvent(False,False)]
local procedure OnCalcAssemblyItemOnAfterCalcSingleLevelCost(var Item: Record Item)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item

OnCalcAssemblyItemOnAfterCalcItemCost

[IntegrationEvent(False,False)]
local procedure OnCalcAssemblyItemOnAfterCalcItemCost(var Item: Record Item, CompItem: Record Item, BOMComponent: Record "BOM Component", ComponentQuantity: Decimal)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
CompItem Table Microsoft.Inventory.Item.Item
BOMComponent Table Microsoft.Inventory.BOM."BOM Component"
ComponentQuantity Decimal

OnCalcItemOnBeforeShowStrMenu

[IntegrationEvent(False,False)]
local procedure OnCalcItemOnBeforeShowStrMenu(var Item: Record Item, var ShowStrMenu: Boolean, var NewCalcMultiLevel: Boolean)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
ShowStrMenu Boolean
NewCalcMultiLevel Boolean

OnCalcItemOnAfterCalcShowConfirm

[IntegrationEvent(False,False)]
local procedure OnCalcItemOnAfterCalcShowConfirm(Item: Record Item, var CalcMfgItems: Boolean, var ShowConfirm: Boolean)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
CalcMfgItems Boolean
ShowConfirm Boolean

OnAfterGetItem

[IntegrationEvent(False,False)]
local procedure OnAfterGetItem(var Item: Record Item, StdCostWkshName: Text[50], IsInBuffer: Boolean)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
StdCostWkshName Text[50]
IsInBuffer Boolean

OnBeforeSetProperties

[IntegrationEvent(False,False)]
local procedure OnBeforeSetProperties(var NewCalculationDate: Date, var NewCalcMultiLevel: Boolean, var NewLogErrors: Boolean, var NewStdCostWkshName: Text[50], var NewShowDialog: Boolean)

Parameters

Name Type Description
NewCalculationDate Date
NewCalcMultiLevel Boolean
NewLogErrors Boolean
NewStdCostWkshName Text[50]
NewShowDialog Boolean

OnBeforeDoCalcAssemblyItemPrice

[IntegrationEvent(False,False)]
local procedure OnBeforeDoCalcAssemblyItemPrice(var Item: Record Item, Level: Integer, MaxLevel: Integer, CalcMultiLevel: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
Level Integer
MaxLevel Integer
CalcMultiLevel Boolean
IsHandled Boolean

OnDoCalcAssemblyItemPriceOnAfterSetBOMCompFilters

[IntegrationEvent(False,False)]
local procedure OnDoCalcAssemblyItemPriceOnAfterSetBOMCompFilters(var Item: Record Item, var BOMComponent: Record "BOM Component")

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
BOMComponent Table Microsoft.Inventory.BOM."BOM Component"

OnGetResCostOnBeforeAssignPriceListLineToTemp

[IntegrationEvent(False,False)]
local procedure OnGetResCostOnBeforeAssignPriceListLineToTemp(var PriceListLine: Record "Price List Line", var TempItem: Record Item temporary, StdCostWkshName: Text[50])

Parameters

Name Type Description
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
TempItem Table Microsoft.Inventory.Item.Item
StdCostWkshName Text[50]

See also