KVSFCYCalculationConditionMgmt#
Procedures#
ApplyItemCalcCond(Record Item, Code[10], Date) :#
Summary: Applies item-specific calculation conditions to update cost parameters in the KUMAVISION factory system. This procedure applies calculation conditions to an item based on its properties, variant code, and effective date. It evaluates calculation rules, updates cost fields (direct costs, indirect costs, overhead rates), and ensures proper cost calculation setup for manufacturing and material cost analysis. The procedure handles standard calculation conditions without advanced planning worksheet integration or detailed cost breakdown analysis.
procedure ApplyItemCalcCond(var itemVar: Record "Item"; itemVariantCodePar: Code[10]; conditionDatePar: Date):
Parameters:
itemVar: The item record to apply calculation conditions to (passed by reference for direct field updates)itemVariantCodePar: The variant code for the item to consider in calculation condition lookupconditionDatePar: The effective date for determining which calculation conditions apply
DiffMatCost2MatCostAndOvhdCost(Decimal, Decimal, Decimal, Decimal, Record Item Ledger Entry, Boolean, Record KVSFCYCalculationConditionHead) :#
Summary: Differentiates item ledger entry costs into material cost and material overhead cost components in the KUMAVISION factory system. This procedure separates total item costs from item ledger entries into direct material costs and material overhead costs based on the item's calculation conditions and overhead rates. It applies item-specific calculation conditions to determine the proper cost allocation, handles both local currency and additional currency amounts, and updates the provided cost variables with the calculated material and overhead cost components for accurate cost accounting analysis.
procedure DiffMatCost2MatCostAndOvhdCost(var actMatCost2Var: Decimal; var actMatOvhdCost2Var: Decimal; var actMatCostCostACY2Var: Decimal; var actMatOvhdCostCostACY2Var: Decimal; var itemLedgerEntryVar: Record "Item Ledger Entry"; checkAlsoCalcPartsPar: Boolean; var calcConditionHeaderVar: Record "KVSFCYCalculationConditionHead"):
Parameters:
actMatCost2Var: The actual material cost amount to be updated (passed by reference for direct modification)actMatOvhdCost2Var: The actual material overhead cost amount to be updated (passed by reference for direct modification)actMatCostCostACY2Var: The actual material cost in additional currency to be updated (passed by reference for direct modification)actMatOvhdCostCostACY2Var: The actual material overhead cost in additional currency to be updated (passed by reference for direct modification)itemLedgerEntryVar: The item ledger entry containing the cost amounts to be differentiated (passed by reference for field access)checkAlsoCalcPartsPar: Whether to also check and validate calculation parts in addition to cost groupscalcConditionHeaderVar: The calculation condition header that will be populated with the applied calculation conditions (passed by reference)
Events#
OnBeforeCalcCondLine(Enum Capacity Type, Record Work Center, Record Machine Center, Code[20], Code[10], Code[10], Boolean, Date, Code[20], Boolean, Decimal, Record KVSFCYWorkplaceCalcCondition, Record KVSFCYCalculationConditionHead, Record KVSFCYCalculationConditionLine) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('This Event is obsolete. Use OnBeforeGetCheckedWorkplcCalcCondLinesCalcCondLine instead', '24.1')]
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcCondLine(workplaceTypePar: Enum "Capacity Type"; var WorkCenter: Record "Work Center"; var MachineCenter: Record "Machine Center"; RoutingNo: Code[20]; RoutingVersionNo: Code[10]; OperationNo: Code[10]; CheckAlsoCalcParts: Boolean; ConditionDate: Date; CalcPlanWkshName: Code[20]; IgnoreDetailLines: Boolean; var DirectUnitCost: Decimal; var WorkplaceCalcCondition: Record "KVSFCYWorkplaceCalcCondition"; var CalcConditionHeader: Record "KVSFCYCalculationConditionHead"; var CalcConditionLine: Record "KVSFCYCalculationConditionLine"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculationConditionMgmt", 'OnBeforeCalcCondLine', '', false, false)]
local procedure DoSomethingOnBeforeCalcCondLine(workplaceTypePar: Enum "Capacity Type"; var WorkCenter: Record "Work Center"; var MachineCenter: Record "Machine Center"; RoutingNo: Code[20]; RoutingVersionNo: Code[10]; OperationNo: Code[10]; CheckAlsoCalcParts: Boolean; ConditionDate: Date; CalcPlanWkshName: Code[20]; IgnoreDetailLines: Boolean; var DirectUnitCost: Decimal; var WorkplaceCalcCondition: Record "KVSFCYWorkplaceCalcCondition"; var CalcConditionHeader: Record "KVSFCYCalculationConditionHead"; var CalcConditionLine: Record "KVSFCYCalculationConditionLine")
begin
end;
OnBeforeGetCheckedWorkplcCalcCondLinesCalcCondLine(Enum Capacity Type, Record Work Center, Record Machine Center, Code[20], Code[20], Code[10], Boolean, Date, Code[20], Boolean, Decimal, Record KVSFCYWorkplaceCalcCondition, Record KVSFCYCalculationConditionHead, Record KVSFCYCalculationConditionLine) :#
[IntegrationEvent(false, false)]
local procedure OnBeforeGetCheckedWorkplcCalcCondLinesCalcCondLine(workplaceTypePar: Enum "Capacity Type"; var WorkCenter: Record "Work Center"; var MachineCenter: Record "Machine Center"; RoutingNo: Code[20]; RoutingVersionNo: Code[20]; OperationNo: Code[10]; CheckAlsoCalcParts: Boolean; ConditionDate: Date; CalcPlanWkshName: Code[20]; IgnoreDetailLines: Boolean; var DirectUnitCost: Decimal; var WorkplaceCalcCondition: Record "KVSFCYWorkplaceCalcCondition"; var CalcConditionHeader: Record "KVSFCYCalculationConditionHead"; var CalcConditionLine: Record "KVSFCYCalculationConditionLine"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculationConditionMgmt", 'OnBeforeGetCheckedWorkplcCalcCondLinesCalcCondLine', '', false, false)]
local procedure DoSomethingOnBeforeGetCheckedWorkplcCalcCondLinesCalcCondLine(workplaceTypePar: Enum "Capacity Type"; var WorkCenter: Record "Work Center"; var MachineCenter: Record "Machine Center"; RoutingNo: Code[20]; RoutingVersionNo: Code[20]; OperationNo: Code[10]; CheckAlsoCalcParts: Boolean; ConditionDate: Date; CalcPlanWkshName: Code[20]; IgnoreDetailLines: Boolean; var DirectUnitCost: Decimal; var WorkplaceCalcCondition: Record "KVSFCYWorkplaceCalcCondition"; var CalcConditionHeader: Record "KVSFCYCalculationConditionHead"; var CalcConditionLine: Record "KVSFCYCalculationConditionLine")
begin
end;
OnBeforeGetWorkplcCalcValuesHarmonized(Enum Capacity Type, Record Work Center, Record Machine Center, Code[20], Code[10], Code[10], Boolean, Date, Code[20], Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('This Event is obsolete. Use OnBeforeGetWorkplaceCalcValuesHarmonized instead', '24.1')]
[IntegrationEvent(false, false)]
local procedure OnBeforeGetWorkplcCalcValuesHarmonized(WorkplaceType: Enum "Capacity Type"; var WorkCenter: Record "Work Center"; var MachineCenter: Record "Machine Center"; RoutingNo: Code[20]; RoutingVersionNo: Code[10]; OperationNo: Code[10]; CheckAlsoCalcParts: Boolean; ConditionDate: Date; CalcPlanWkshName: Code[20]; IgnoreDetailLines: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculationConditionMgmt", 'OnBeforeGetWorkplcCalcValuesHarmonized', '', false, false)]
local procedure DoSomethingOnBeforeGetWorkplcCalcValuesHarmonized(WorkplaceType: Enum "Capacity Type"; var WorkCenter: Record "Work Center"; var MachineCenter: Record "Machine Center"; RoutingNo: Code[20]; RoutingVersionNo: Code[10]; OperationNo: Code[10]; CheckAlsoCalcParts: Boolean; ConditionDate: Date; CalcPlanWkshName: Code[20]; IgnoreDetailLines: Boolean)
begin
end;
OnBeforeGetWorkplaceCalcValuesHarmonized(Enum Capacity Type, Record Work Center, Record Machine Center, Code[20], Code[20], Code[10], Boolean, Date, Code[20], Boolean) :#
[IntegrationEvent(false, false)]
local procedure OnBeforeGetWorkplaceCalcValuesHarmonized(WorkplaceType: Enum "Capacity Type"; var WorkCenter: Record "Work Center"; var MachineCenter: Record "Machine Center"; RoutingNo: Code[20]; RoutingVersionNo: Code[20]; OperationNo: Code[10]; CheckAlsoCalcParts: Boolean; ConditionDate: Date; CalcPlanWkshName: Code[20]; IgnoreDetailLines: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculationConditionMgmt", 'OnBeforeGetWorkplaceCalcValuesHarmonized', '', false, false)]
local procedure DoSomethingOnBeforeGetWorkplaceCalcValuesHarmonized(WorkplaceType: Enum "Capacity Type"; var WorkCenter: Record "Work Center"; var MachineCenter: Record "Machine Center"; RoutingNo: Code[20]; RoutingVersionNo: Code[20]; OperationNo: Code[10]; CheckAlsoCalcParts: Boolean; ConditionDate: Date; CalcPlanWkshName: Code[20]; IgnoreDetailLines: Boolean)
begin
end;
OnBeforeGetCheckedPORtngCalcCondLines(Boolean, Code[20], Record Prod. Order Routing Line, Boolean, Date, Code[20], Boolean, Record KVSFCYProdRoutingCalcCondition, Boolean) :#
Summary: Event raised before getting checked production order routing calculation condition lines.
[IntegrationEvent(false, false)]
local procedure OnBeforeGetCheckedPORtngCalcCondLines(SpecificUnitCost: Boolean; RtngVersionCode: Code[20]; var ProdOrderRtngLine: Record "Prod. Order Routing Line"; CheckAlsoCalcParts: Boolean; ConditionDate: Date; CalcPlanWkshName: Code[20]; IgnoreDetailLines: Boolean; var ProdRtngCalcCondition: Record "KVSFCYProdRoutingCalcCondition"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculationConditionMgmt", 'OnBeforeGetCheckedPORtngCalcCondLines', '', false, false)]
local procedure DoSomethingOnBeforeGetCheckedPORtngCalcCondLines(SpecificUnitCost: Boolean; RtngVersionCode: Code[20]; var ProdOrderRtngLine: Record "Prod. Order Routing Line"; CheckAlsoCalcParts: Boolean; ConditionDate: Date; CalcPlanWkshName: Code[20]; IgnoreDetailLines: Boolean; var ProdRtngCalcCondition: Record "KVSFCYProdRoutingCalcCondition"; var IsHandled: Boolean)
begin
end;
Parameters:
SpecificUnitCost: Indicates whether specific unit cost calculation should be used.RtngVersionCode: The routing version code for the production order routing.ProdOrderRtngLine: The production order routing line record that can be modified.CheckAlsoCalcParts: Indicates whether calculation parts should also be validated.ConditionDate: The date for which the routing calculation conditions are evaluated.CalcPlanWkshName: The name of the calculation planning worksheet.IgnoreDetailLines: Indicates whether detail lines should be ignored during processing.ProdRtngCalcCondition: The production routing calculation condition record that can be modified.IsHandled: Set to true to skip default processing and use custom logic.
OnAfterGetCalcConditionHeader(Record KVSFCYCalculationConditionHead, Record KVSFCYItemCalcConditionna, Boolean) :#
Summary: Event raised after getting calculation condition header from item calculation condition.
[IntegrationEvent(false, false)]
local procedure OnAfterGetCalcConditionHeader(var KVSFCYCalculationConditionHead: Record "KVSFCYCalculationConditionHead"; KVSFCYItemCalcConditionna: Record "KVSFCYItemCalcConditionna"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalculationConditionMgmt", 'OnAfterGetCalcConditionHeader', '', false, false)]
local procedure DoSomethingOnAfterGetCalcConditionHeader(var KVSFCYCalculationConditionHead: Record "KVSFCYCalculationConditionHead"; KVSFCYItemCalcConditionna: Record "KVSFCYItemCalcConditionna"; var IsHandled: Boolean)
begin
end;
Parameters:
KVSFCYCalculationConditionHead: The calculation condition header record that can be modified after retrieval.KVSFCYItemCalcConditionna: The item calculation condition record used as source for the header.IsHandled: Set to true to indicate that custom processing was performed and default logic should be skipped.