Skip to content

KVSFCYCalcSchedManagemen#

Procedures#

OnRun#

procedure OnRun(Rec: Record "KVSFCYCalcScheduleLine")

CalcCell(Record KVSFCYCalcScheduleLine, Record KVSFCYCalcScheduleColumn) : Decimal#

Summary: Calculates the value for a specific cell in the calculation schedule matrix. This is the main calculation procedure that computes the intersection value between a schedule line and a schedule column, applying all relevant filters, formulas, and display options. The procedure handles caching of calculated values for performance optimization and manages various display rules such as showing only positive/negative values and sign reversal options. It serves as the primary entry point for cell value calculation in the KUMAVISION factory calculation schedule system, supporting complex financial and operational calculations.

procedure CalcCell(var calcSchedLineVar: Record "KVSFCYCalcScheduleLine"; var calcSchedColumnVar: Record "KVSFCYCalcScheduleColumn"): Decimal

Parameters:

  • calcSchedLineVar: Calculation schedule line record passed by reference, containing row definition and totaling rules
  • calcSchedColumnVar: Calculation schedule column record passed by reference, containing column definition and calculation parameters

Returns: The calculated decimal value for the intersection of the specified line and column, after applying all display rules and formatting

Events#

OnBeforeCalcCalculationPart(Record KVSFCYCalculationPart, Record KVSFCYCalcScheduleColumn, Decimal, Boolean) :#

Summary: This event is triggered before calculating a calculation part value

[IntegrationEvent(false, false)]
local procedure OnBeforeCalcCalculationPart(var CalcPart: Record "KVSFCYCalculationPart"; ColLayoutRec2: Record "KVSFCYCalcScheduleColumn"; var ColValueRtrn: Decimal; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalcSchedManagemen", 'OnBeforeCalcCalculationPart', '', false, false)]
local procedure DoSomethingOnBeforeCalcCalculationPart(var CalcPart: Record "KVSFCYCalculationPart"; ColLayoutRec2: Record "KVSFCYCalcScheduleColumn"; var ColValueRtrn: Decimal; var IsHandled: Boolean)
begin
end;

Parameters:

  • CalcPart: The calculation part record to be calculated
  • ColLayoutRec2: The calculation schedule column layout record containing calculation parameters
  • ColValueRtrn: The calculated column value result (can be modified to override calculation)
  • IsHandled: Set to true to skip the default calculation logic

OnAfterSetCalcColumnFilter(Record KVSFCYCalcScheduleLine, Record KVSFCYCalculationPart, Record KVSFCYCalcScheduleColumn) :#

Summary: This event is triggered after setting calculation column filters on calculation parts

[IntegrationEvent(false, false)]
local procedure OnAfterSetCalcColumnFilter(var CalcScheduleLine: Record "KVSFCYCalcScheduleLine"; var CalcPart: Record "KVSFCYCalculationPart"; var ColLayoutRec2: Record "KVSFCYCalcScheduleColumn"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCalcSchedManagemen", 'OnAfterSetCalcColumnFilter', '', false, false)]
local procedure DoSomethingOnAfterSetCalcColumnFilter(var CalcScheduleLine: Record "KVSFCYCalcScheduleLine"; var CalcPart: Record "KVSFCYCalculationPart"; var ColLayoutRec2: Record "KVSFCYCalcScheduleColumn")
begin
end;

Parameters:

  • CalcScheduleLine: The calculation schedule line record containing filter information
  • CalcPart: The calculation part record with applied column filters
  • ColLayoutRec2: The calculation schedule column layout record containing filter criteria