KVSPSADistributionEntryMgt#
Procedures#
UpdateJobBudgetEntries(Record KVSPSA Job Budget Line) :#
Summary: Updates the job budget entries based on the provided job budget line. This procedure recalculates the unit cost, updates the invoicing quantity, and creates or modifies job budget entries as necessary. It also handles the distribution of costs and sales budgets, ensuring that all entries are correctly aligned with the job budget line's specifications. It checks for sales budget blocking and ensures that invoicing quantities are consistent with distributed quantities. If the sales budget is blocked, it verifies that the invoicing quantity matches the distributed quantity. If there are discrepancies, it raises an error with a detailed message.
procedure UpdateJobBudgetEntries(JobBudgetLine: Record "KVSPSA Job Budget Line"):
Parameters:
JobBudgetLine
: The job budget line record that contains the details for updating job budget entries.
Events#
KVSPSAOnAfterTransferValuesFromBudgetLine(Record KVSPSA Job Budget Line) :#
Summary: Integration event raised after transferring values from a budget line to update related entities. This event allows subscribers to perform additional processing or validation after the transfer operation is completed.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterTransferValuesFromBudgetLine(var JobBudgetLine: Record "KVSPSA Job Budget Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionEntryMgt", 'KVSPSAOnAfterTransferValuesFromBudgetLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterTransferValuesFromBudgetLine(var JobBudgetLine: Record "KVSPSA Job Budget Line")
begin
end;
Parameters:
JobBudgetLine
: The job budget line record that was updated during the transfer process.
KVSPSAOnBeforeUpdateTotalCostInDistrEntries(Record KVSPSAJobPSPLine, Integer, Boolean, Enum KVSPSAPeriodUnitType, Enum KVSPSADistributionBaseType, Boolean) :#
Summary: Integration event raised before updating total cost in distribution entries. This event allows subscribers to handle the update operation or skip the default processing. It provides parameters to control the recalculation. It can be used to implement custom logic for specific scenarios. Or for example to implement a confirm dialog before proceeding with the update.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeUpdateTotalCostInDistrEntries(CurrJobPSPLine: Record "KVSPSAJobPSPLine"; BudgetLineNo: Integer; var SkipRecalc: Boolean; PeriodUnit: Enum "KVSPSAPeriodUnitType"; DistributionBase: Enum "KVSPSADistributionBaseType"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionEntryMgt", 'KVSPSAOnBeforeUpdateTotalCostInDistrEntries', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeUpdateTotalCostInDistrEntries(CurrJobPSPLine: Record "KVSPSAJobPSPLine"; BudgetLineNo: Integer; var SkipRecalc: Boolean; PeriodUnit: Enum "KVSPSAPeriodUnitType"; DistributionBase: Enum "KVSPSADistributionBaseType"; var IsHandled: Boolean)
begin
end;
Parameters:
CurrJobPSPLine
: The current Job PSP Line record.BudgetLineNo
: The budget line number.SkipRecalc
: Boolean indicating whether to skip recalculation.PeriodUnit
: The period unit type.DistributionBase
: The distribution base type.IsHandled
: Boolean parameter to indicate if the event subscriber has handled the operation.