KVSPSADistributionChangeMgt#
Procedures#
RecalcDistribution(Record KVSPSAJobPSPLine, Boolean, Integer) :#
Summary: Recalculate the distribution of a Job PSP Line. This procedure recalculates the distribution of a Job PSP Line based on the provided parameters. It checks if the distribution is active, if the line is not empty or temporary, and if the distribution level type is appropriate. If the conditions are met, it prompts the user for confirmation to carry out the recalculation. If the user confirms, it deletes old distribution entries, creates new distribution entries, and updates the Job PSP Line with the recalculated values. If the user chooses not to carry out the recalculation, it may update the distribution combined based on the selected option. If the Job PSP Line is empty or temporary, or if the distribution level type is not appropriate, the procedure exits without making any changes. If the distribution is not active, it exits without making any changes.
procedure RecalcDistribution(var JobPSPLine: Record "KVSPSAJobPSPLine"; IsQuantity: Boolean; BudgetLineNo: Integer):
Parameters:
JobPSPLine
: The Job PSP Line record to recalculate the distribution for.IsQuantity
: Indicates whether the recalculation is based on quantity.BudgetLineNo
: The budget line number to consider for the recalculation.
RecalcDistribution(Record KVSPSA Job Budget Line, Record KVSPSA Job Budget Line, Boolean, Integer) :#
Summary: Recalculate the distribution of a Job Budget Line. This procedure recalculates the distribution of a Job Budget Line based on the provided parameters. It checks if the distribution is active, if the line is not empty or temporary, and if the distribution level type is appropriate. If the conditions are met, it prompts the user for confirmation to carry out the recalculation. If the user confirms, it deletes old distribution entries, creates new distribution entries, and updates the Job Budget Line with the recalculated values. If the user chooses not to carry out the recalculation, it may update the distribution combined based on the selected option. If the Job Budget Line is empty or temporary, or if the distribution level type is not appropriate, the procedure exits without making any changes. If the distribution is not active, it exits without making any changes.
procedure RecalcDistribution(var JobBudgetLine: Record "KVSPSA Job Budget Line"; xJobBudgetLine: Record "KVSPSA Job Budget Line"; IsQuantity: Boolean; BudgetLineNo: Integer):
Parameters:
JobBudgetLine
: The Job Budget Line record to recalculate the distribution for.xJobBudgetLine
: The Job PSP Line record to compare with.IsQuantity
: Indicates whether the recalculation is based on quantity.BudgetLineNo
: The budget line number to consider for the recalculation.
SetCalledByResetPlanning(Boolean) :#
Summary: Use this function if the distribution is reset
procedure SetCalledByResetPlanning(CalledByResetPlanningValue: Boolean):
Parameters:
CalledByResetPlanningValue
:
SetSuppressMessage(Boolean) :#
Summary: Set this Value to true to supress recalc message
procedure SetSuppressMessage(SupressMessageValue: Boolean):
Parameters:
SupressMessageValue
: Supress Message
Events#
KVSPSAOnBeforeCarryOutRecalc(Boolean, Integer, Record KVSPSAJobPSPLine, Boolean, Integer) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCarryOutRecalc(var CarryOutRecalc: Boolean; var SelectedCarryOutDistribution: Integer; var JobPSPLine: Record "KVSPSAJobPSPLine"; IsQuantity: Boolean; BudgetLineNo: Integer):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionChangeMgt", 'KVSPSAOnBeforeCarryOutRecalc', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCarryOutRecalc(var CarryOutRecalc: Boolean; var SelectedCarryOutDistribution: Integer; var JobPSPLine: Record "KVSPSAJobPSPLine"; IsQuantity: Boolean; BudgetLineNo: Integer)
begin
end;
KVSPSAOnBeforeCarryOutRecalcBudget(Boolean, Integer, Record KVSPSA Job Budget Line, Boolean, Integer) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCarryOutRecalcBudget(var CarryOutRecalc: Boolean; var SelectedCarryOutDistribution: Integer; var JobBudgetLine: Record "KVSPSA Job Budget Line"; IsQuantity: Boolean; BudgetLineNo: Integer):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionChangeMgt", 'KVSPSAOnBeforeCarryOutRecalcBudget', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCarryOutRecalcBudget(var CarryOutRecalc: Boolean; var SelectedCarryOutDistribution: Integer; var JobBudgetLine: Record "KVSPSA Job Budget Line"; IsQuantity: Boolean; BudgetLineNo: Integer)
begin
end;
KVSPSAOnBeforeRecalcDistributionBudget(Record KVSPSA Job Budget Line, Record KVSPSA Job Budget Line, Boolean, Integer, Boolean, Boolean) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeRecalcDistributionBudget(var JobBudgetLine: Record "KVSPSA Job Budget Line"; xJobBudgetLine: Record "KVSPSA Job Budget Line"; IsQuantity: Boolean; BudgetLineNo: Integer; var SuppressMessage: Boolean; var SkipRecalc: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionChangeMgt", 'KVSPSAOnBeforeRecalcDistributionBudget', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeRecalcDistributionBudget(var JobBudgetLine: Record "KVSPSA Job Budget Line"; xJobBudgetLine: Record "KVSPSA Job Budget Line"; IsQuantity: Boolean; BudgetLineNo: Integer; var SuppressMessage: Boolean; var SkipRecalc: Boolean)
begin
end;
KVSPSAOnBeforeRecalcDistributionPSP(Record KVSPSAJobPSPLine, Boolean, Integer, Boolean) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeRecalcDistributionPSP(var JobPSPLine: Record "KVSPSAJobPSPLine"; IsQuantity: Boolean; BudgetLineNo: Integer; var SuppressMessage: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionChangeMgt", 'KVSPSAOnBeforeRecalcDistributionPSP', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeRecalcDistributionPSP(var JobPSPLine: Record "KVSPSAJobPSPLine"; IsQuantity: Boolean; BudgetLineNo: Integer; var SuppressMessage: Boolean)
begin
end;