KVSICOCalcStandardUnitCost#
Procedures#
SetProperties(Date, Text[80], Boolean) :#
Summary: Using the procedure SetProperties you can define some parameters for the calculation of the standard unit cost.
procedure SetProperties(newCalcDate: Date; newCalculationBatchDescription: Text[80]; newOnlyDefault: Boolean):
Parameters:
newCalcDate
: Use this parameter to set the given date as calculation date.newCalculationBatchDescription
: Defines the description that will be transfered to the field "Calc. Batch Description" within the calculation worksheet. Can be used to describe the batch.newOnlyDefault
: Defines whether only the default parameters will be calculated. If activated, only the default calculation parameters will be used.
CalcItems(Record Item, Boolean, Boolean, Boolean) :#
Summary: The procedure CalcItems is used to do the calculation of the standard unit cost and to fill then calculation worksheet. You can use the procedure SetProperties just before this procedure in order to set some parameters for the calculation.
procedure CalcItems(var item: Record "Item"; showDialog: Boolean; var rolledUp: Boolean; var newErrorInserted: Boolean):
Parameters:
item
: Defines the item records which should be used for calculation.showDialog
: Defines whether a dialog should be displayed showing the actual number of calculated items.rolledUp
: Referenced parameter defining if the procedure has rolled up minimum one item.newErrorInserted
: Referenced parameter defining if an error occured during calculation of items.
Events#
OnBeforeRoutingErrorCheckUnitCost(Record Routing Line, Record Work Center, Record Machine Center, Decimal, Boolean, Boolean) :#
[IntegrationEvent(false, false)]
local procedure OnBeforeRoutingErrorCheckUnitCost(var routingLine: Record "Routing Line"; var workCenter: Record "Work Center"; var machineCenter: Record "Machine Center"; var qty: Decimal; var errorInserted: Boolean; var isHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSICOCalcStandardUnitCost", 'OnBeforeRoutingErrorCheckUnitCost', '', false, false)]
local procedure DoSomethingOnBeforeRoutingErrorCheckUnitCost(var routingLine: Record "Routing Line"; var workCenter: Record "Work Center"; var machineCenter: Record "Machine Center"; var qty: Decimal; var errorInserted: Boolean; var isHandled: Boolean)
begin
end;
OnBeforeRoutingErrorCheckRuntime(Record Routing Line, Decimal, Boolean, Boolean) :#
[IntegrationEvent(false, false)]
local procedure OnBeforeRoutingErrorCheckRuntime(var routingLine: Record "Routing Line"; var qty: Decimal; var errorInserted: Boolean; var isHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSICOCalcStandardUnitCost", 'OnBeforeRoutingErrorCheckRuntime', '', false, false)]
local procedure DoSomethingOnBeforeRoutingErrorCheckRuntime(var routingLine: Record "Routing Line"; var qty: Decimal; var errorInserted: Boolean; var isHandled: Boolean)
begin
end;
OnBeforeInsertCalcValueForProdBOMLine(Record KVSICOCalculationParameter, Record Production BOM Line, Record Item, Decimal, Integer, Integer, Decimal, Decimal, Boolean) :#
[IntegrationEvent(false, false)]
local procedure OnBeforeInsertCalcValueForProdBOMLine(calcParameter: Record "KVSICOCalculationParameter"; prodBOMLine: Record "Production BOM Line"; item: Record "Item"; qty: Decimal; level: Integer; structureBOMEntryNo: Integer; lotSizeHigherLevel: Decimal; qtyBaseHigherLevel: Decimal; var isHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSICOCalcStandardUnitCost", 'OnBeforeInsertCalcValueForProdBOMLine', '', false, false)]
local procedure DoSomethingOnBeforeInsertCalcValueForProdBOMLine(calcParameter: Record "KVSICOCalculationParameter"; prodBOMLine: Record "Production BOM Line"; item: Record "Item"; qty: Decimal; level: Integer; structureBOMEntryNo: Integer; lotSizeHigherLevel: Decimal; qtyBaseHigherLevel: Decimal; var isHandled: Boolean)
begin
end;