KVSPSADistributionCalcMgt#
Procedures#
DistrActualEntries(Record KVSPSAJobPSPLine, Boolean, Integer, Decimal, Boolean) :#
Summary: This procedure updates the distribution suggestion
procedure DistrActualEntries(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; FirstCall: Boolean; BudgetLineNo: Integer; Precision: Decimal; IgnoreFilter: Boolean):
Parameters:
CurrJobPSPLine:FirstCall:BudgetLineNo:Precision:IgnoreFilter:
DistrActualEntries(Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line, Boolean, Integer, Decimal, Boolean) :#
Summary: This procedure updates the distribution suggestion
procedure DistrActualEntries(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; FirstCall: Boolean; BudgetLineNo: Integer; Precision: Decimal; IgnoreFilter: Boolean):
Parameters:
CurrJobPSPLine:CurrJobBudgetLine:FirstCall:BudgetLineNo:Precision:IgnoreFilter:
DistributeAllInvocing(Record KVSPSAJobPSPLine, Integer) :#
Summary: Use this procedure to redistribute the invoicing values.
procedure DistributeAllInvocing(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; BudgetLineNo: Integer):
Parameters:
CurrJobPSPLine: Current Job PSP LineBudgetLineNo: Current Budget Line No. If the Job PSP Line should be redistributed BudgetLineNo must be zero.
SyncJobBudgetEntries(Record KVSPSA Job Budget Line) :#
Summary: This procedure synchronizes the job budget entries. It will synchronize all job budget entries with the distribution calculation formula. It will also check the resource capacity if the job budget line is a resource and the "Use Resource Capacity" field is set to true. If the job budget line is a resource, it will check if there is enough capacity available for the planned distribution. If there is not enough capacity available, it will send a notification or raise an error depending on the setup. If the job budget line is a resource, it will also check the rounding precision for resources and items/GL accounts.
procedure SyncJobBudgetEntries(var JobBudgetLine: Record "KVSPSA Job Budget Line"):
Parameters:
JobBudgetLine: Current Job Budget Line
Events#
KVSPSAOnFindPaymentPlaningElse(Boolean, Record KVSPSAJobPSPLine, Integer, Record KVSPSADistributionEntry, Decimal, Record KVSPSA Job Budget Line) :#
Summary: Integration event raised when payment planning search finds an alternative path for planning distribution entries.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnFindPaymentPlaningElse(var PlaningExist: Boolean; CurrJobPSPLine: Record "KVSPSAJobPSPLine"; BudgetLineNo: Integer; var DistributionEntry: Record "KVSPSADistributionEntry"; var UnAssignedValue: Decimal; var JobBudgetLine: Record "KVSPSA Job Budget Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnFindPaymentPlaningElse', '', false, false)]
local procedure DoSomethingKVSPSAOnFindPaymentPlaningElse(var PlaningExist: Boolean; CurrJobPSPLine: Record "KVSPSAJobPSPLine"; BudgetLineNo: Integer; var DistributionEntry: Record "KVSPSADistributionEntry"; var UnAssignedValue: Decimal; var JobBudgetLine: Record "KVSPSA Job Budget Line")
begin
end;
Parameters:
PlaningExist: Indicates whether payment planning exists for the current contextCurrJobPSPLine: The current Job PSP Line being processedBudgetLineNo: The budget line number associated with the distributionDistributionEntry: The distribution entry record being processedUnAssignedValue: The value that has not been assigned in the distributionJobBudgetLine: The job budget line record related to the distribution
KVSPSAOnBeforeApplyInvoicingRatioOnDistrEntry(Record KVSPSADistributionEntry, Decimal, Decimal, Record KVSPSA Job Budget Line, Boolean) :#
Summary: Integration event raised before applying the invoicing ratio on a distribution entry. Subscribe to this event to override the default calculation of invoicing quantity from a quantity change.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeApplyInvoicingRatioOnDistrEntry(var DistributionEntry: Record "KVSPSADistributionEntry"; OldQuantity: Decimal; NewQuantity: Decimal; var JobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnBeforeApplyInvoicingRatioOnDistrEntry', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeApplyInvoicingRatioOnDistrEntry(var DistributionEntry: Record "KVSPSADistributionEntry"; OldQuantity: Decimal; NewQuantity: Decimal; var JobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean)
begin
end;
Parameters:
DistributionEntry: The distribution entry being modified.OldQuantity: The previous quantity value.NewQuantity: The new quantity value.JobBudgetLine: The related job budget line.IsHandled: Set to true to skip the default logic.
KVSPSAOnBeforeApplyQtyFromInvQtyChange(Record KVSPSADistributionEntry, Record KVSPSA Job Budget Line, Boolean) :#
Summary: Integration event raised before applying quantity from an invoicing quantity change on a distribution entry. Subscribe to this event to override the default calculation of quantity from an invoicing quantity change.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeApplyQtyFromInvQtyChange(var DistributionEntry: Record "KVSPSADistributionEntry"; var JobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnBeforeApplyQtyFromInvQtyChange', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeApplyQtyFromInvQtyChange(var DistributionEntry: Record "KVSPSADistributionEntry"; var JobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean)
begin
end;
Parameters:
DistributionEntry: The distribution entry being modified.JobBudgetLine: The related job budget line.IsHandled: Set to true to skip the default logic.
KVSPSAOnBeforeDistributeInvoicingPSPLine(Record KVSPSAJobPSPLine, Decimal, Decimal, Decimal, Boolean, Boolean, Date, Date, Integer, Decimal, Boolean) :#
Summary: Integration event raised before the invoicing values are distributed on PSP line level. Subscribe to this event to react before the distribution or to replace the default logic entirely by setting IsHandled to true.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeDistributeInvoicingPSPLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrQuantity: Decimal; var InvoiceAmount: Decimal; var InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnBeforeDistributeInvoicingPSPLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeDistributeInvoicingPSPLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrQuantity: Decimal; var InvoiceAmount: Decimal; var InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
CurrJobPSPLine: The current Job PSP Line being processed.CurrQuantity: The quantity to distribute.InvoiceAmount: The invoice amount to distribute.InvQty: The invoicing quantity to distribute.Initial: Indicates whether this is the initial distribution.Redistribute: Indicates whether the invoicing values are being redistributed.StartingDate: The starting date of the distribution period.EndingDate: The ending date of the distribution period.BudgetLineNo: The budget line number associated with the distribution.Precision: The rounding precision used for the distribution.IsHandled: Set to true to skip the default invoicing distribution logic.
KVSPSAOnAfterDistributeInvoicingPSPLine(Record KVSPSAJobPSPLine, Decimal, Decimal, Decimal, Boolean, Boolean, Date, Date, Integer, Decimal) :#
Summary: Integration event raised after the invoicing values have been distributed on PSP line level. Subscribe to this event to react after the invoicing distribution has completed.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterDistributeInvoicingPSPLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; CurrQuantity: Decimal; InvoiceAmount: Decimal; InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnAfterDistributeInvoicingPSPLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterDistributeInvoicingPSPLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; CurrQuantity: Decimal; InvoiceAmount: Decimal; InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal)
begin
end;
Parameters:
CurrJobPSPLine: The current Job PSP Line that was processed.CurrQuantity: The quantity that was distributed.InvoiceAmount: The invoice amount that was distributed.InvQty: The invoicing quantity that was distributed.Initial: Indicates whether this was the initial distribution.Redistribute: Indicates whether the invoicing values were redistributed.StartingDate: The starting date of the distribution period.EndingDate: The ending date of the distribution period.BudgetLineNo: The budget line number associated with the distribution.Precision: The rounding precision used for the distribution.
KVSPSAOnBeforeDistributeInvoicingBudgetLine(Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line, Decimal, Decimal, Decimal, Boolean, Boolean, Date, Date, Integer, Decimal, Boolean) :#
Summary: Integration event raised before the invoicing values are distributed on budget line level. Subscribe to this event to react before the distribution or to replace the default logic entirely by setting IsHandled to true.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeDistributeInvoicingBudgetLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; var CurrQuantity: Decimal; var InvoiceAmount: Decimal; var InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnBeforeDistributeInvoicingBudgetLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeDistributeInvoicingBudgetLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; var CurrQuantity: Decimal; var InvoiceAmount: Decimal; var InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
CurrJobPSPLine: The current Job PSP Line being processed.CurrJobBudgetLine: The current Job Budget Line being processed.CurrQuantity: The quantity to distribute.InvoiceAmount: The invoice amount to distribute.InvQty: The invoicing quantity to distribute.Initial: Indicates whether this is the initial distribution.Redistribute: Indicates whether the invoicing values are being redistributed.StartingDate: The starting date of the distribution period.EndingDate: The ending date of the distribution period.BudgetLineNo: The budget line number associated with the distribution.Precision: The rounding precision used for the distribution.IsHandled: Set to true to skip the default invoicing distribution logic.
KVSPSAOnAfterDistributeInvoicingBudgetLine(Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line, Decimal, Decimal, Decimal, Boolean, Boolean, Date, Date, Integer, Decimal) :#
Summary: Integration event raised after the invoicing values have been distributed on budget line level. Subscribe to this event to react after the invoicing distribution has completed.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterDistributeInvoicingBudgetLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; CurrQuantity: Decimal; InvoiceAmount: Decimal; InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnAfterDistributeInvoicingBudgetLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterDistributeInvoicingBudgetLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; CurrQuantity: Decimal; InvoiceAmount: Decimal; InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal)
begin
end;
Parameters:
CurrJobPSPLine: The current Job PSP Line that was processed.CurrJobBudgetLine: The current Job Budget Line that was processed.CurrQuantity: The quantity that was distributed.InvoiceAmount: The invoice amount that was distributed.InvQty: The invoicing quantity that was distributed.Initial: Indicates whether this was the initial distribution.Redistribute: Indicates whether the invoicing values were redistributed.StartingDate: The starting date of the distribution period.EndingDate: The ending date of the distribution period.BudgetLineNo: The budget line number associated with the distribution.Precision: The rounding precision used for the distribution.
KVSPSAOnBeforeCreateDistrLedgerEntriesPSPLine(Record KVSPSA Job Budget Line, Record KVSPSAJobPSPLine, Integer, Record KVSPSADistributionEntry, Boolean) :#
Summary: Integration event raised on PSP line level before the fallback distribution ledger entries are created when the differences could not be corrected. Subscribe to this event to create the planning and actual ledger entries yourself by setting IsHandled to true.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCreateDistrLedgerEntriesPSPLine(var DummyJobBudgetLine: Record "KVSPSA Job Budget Line"; var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; BudgetLineNo: Integer; var TempDistributionEntry: Record "KVSPSADistributionEntry" temporary; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnBeforeCreateDistrLedgerEntriesPSPLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCreateDistrLedgerEntriesPSPLine(var DummyJobBudgetLine: Record "KVSPSA Job Budget Line"; var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; BudgetLineNo: Integer; var TempDistributionEntry: Record "KVSPSADistributionEntry" temporary; var IsHandled: Boolean)
begin
end;
Parameters:
DummyJobBudgetLine: The empty job budget line used as placeholder on PSP line level.CurrJobPSPLine: The current Job PSP Line being processed.BudgetLineNo: The budget line number associated with the distribution.TempDistributionEntry: The temporary distribution entries used to create the ledger entries.IsHandled: Set to true to skip the default creation of the distribution ledger entries.
KVSPSAOnBeforeCreateDistrLedgerEntriesBudgetLine(Record KVSPSA Job Budget Line, Record KVSPSAJobPSPLine, Integer, Record KVSPSADistributionEntry, Boolean) :#
Summary: Integration event raised on budget line level before the fallback distribution ledger entries are created when the differences could not be corrected. Subscribe to this event to create the planning and actual ledger entries yourself by setting IsHandled to true.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCreateDistrLedgerEntriesBudgetLine(var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; BudgetLineNo: Integer; var TempDistributionEntry: Record "KVSPSADistributionEntry" temporary; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnBeforeCreateDistrLedgerEntriesBudgetLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCreateDistrLedgerEntriesBudgetLine(var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; BudgetLineNo: Integer; var TempDistributionEntry: Record "KVSPSADistributionEntry" temporary; var IsHandled: Boolean)
begin
end;
Parameters:
CurrJobBudgetLine: The current Job Budget Line being processed.CurrJobPSPLine: The current Job PSP Line being processed.BudgetLineNo: The budget line number associated with the distribution.TempDistributionEntry: The temporary distribution entries used to create the ledger entries.IsHandled: Set to true to skip the default creation of the distribution ledger entries.
KVSPSAOnBeforeCorrectInvoicingDiffPSPLine(Record KVSPSAJobPSPLine, Record KVSPSADistributionEntry, Decimal, Decimal, Boolean, Decimal, Boolean, Boolean) :#
Summary: Integration event raised on PSP line level before the invoicing differences are corrected. Subscribe to this event to correct the differences yourself by setting DifferenceCorrected and IsHandled to true.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCorrectInvoicingDiffPSPLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var DistributionEntry: Record "KVSPSADistributionEntry"; SumAssigned: Decimal; OpenInvQty: Decimal; Redistribute: Boolean; Precision: Decimal; var DifferenceCorrected: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnBeforeCorrectInvoicingDiffPSPLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCorrectInvoicingDiffPSPLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var DistributionEntry: Record "KVSPSADistributionEntry"; SumAssigned: Decimal; OpenInvQty: Decimal; Redistribute: Boolean; Precision: Decimal; var DifferenceCorrected: Boolean; var IsHandled: Boolean)
begin
end;
Parameters:
CurrJobPSPLine: The current Job PSP Line being processed.DistributionEntry: The distribution entries involved in the correction.SumAssigned: The sum of the invoicing quantity already assigned.OpenInvQty: The open invoicing quantity still to be assigned.Redistribute: Indicates whether the invoicing values are being redistributed.Precision: The rounding precision used for the correction.DifferenceCorrected: Set to indicate whether the difference could be corrected.IsHandled: Set to true to skip the default difference correction.
KVSPSAOnBeforeCorrectInvoicingDiffBudgetLine(Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line, Record KVSPSADistributionEntry, Decimal, Decimal, Boolean, Decimal, Boolean, Boolean) :#
Summary: Integration event raised on budget line level before the invoicing differences are corrected. Subscribe to this event to correct the differences yourself by setting DifferenceCorrected and IsHandled to true.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCorrectInvoicingDiffBudgetLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; var DistributionEntry: Record "KVSPSADistributionEntry"; SumAssigned: Decimal; OpenInvQty: Decimal; Redistribute: Boolean; Precision: Decimal; var DifferenceCorrected: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnBeforeCorrectInvoicingDiffBudgetLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCorrectInvoicingDiffBudgetLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; var DistributionEntry: Record "KVSPSADistributionEntry"; SumAssigned: Decimal; OpenInvQty: Decimal; Redistribute: Boolean; Precision: Decimal; var DifferenceCorrected: Boolean; var IsHandled: Boolean)
begin
end;
Parameters:
CurrJobPSPLine: The current Job PSP Line being processed.CurrJobBudgetLine: The current Job Budget Line being processed.DistributionEntry: The distribution entries involved in the correction.SumAssigned: The sum of the invoicing quantity already assigned.OpenInvQty: The open invoicing quantity still to be assigned.Redistribute: Indicates whether the invoicing values are being redistributed.Precision: The rounding precision used for the correction.DifferenceCorrected: Set to indicate whether the difference could be corrected.IsHandled: Set to true to skip the default difference correction.
KVSPSAOnBeforeInsertDifference(Record KVSPSADistributionEntry, Decimal, Record KVSPSADistributionDifference, Boolean) :#
Summary: Integration event raised before a distribution difference is inserted into the temporary difference buffer. Subscribe to this event to insert the difference yourself by setting IsHandled to true.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeInsertDifference(CurrDistributionEntry: Record "KVSPSADistributionEntry"; var Difference: Decimal; var TempDistributionDifference: Record "KVSPSADistributionDifference" temporary; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnBeforeInsertDifference', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeInsertDifference(CurrDistributionEntry: Record "KVSPSADistributionEntry"; var Difference: Decimal; var TempDistributionDifference: Record "KVSPSADistributionDifference" temporary; var IsHandled: Boolean)
begin
end;
Parameters:
CurrDistributionEntry: The distribution entry the difference belongs to.Difference: The difference value to insert.TempDistributionDifference: The temporary difference buffer being filled.IsHandled: Set to true to skip the default insertion of the difference.
KVSPSAOnBeforeCalcInvoicingDistrEntryPSPLine(Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line, Record KVSPSADistributionEntry, Record KVSPSADistributionDifference, Record KVSPSADistributionDifference, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Boolean, Boolean, Date, Date, Integer, Decimal, Boolean, Boolean) :#
Summary: Integration event raised on PSP line level for each distribution entry before its invoicing quantity and sales price are calculated. Subscribe to this event to adjust the input values or to calculate the invoicing values yourself by setting IsHandled to true.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCalcInvoicingDistrEntryPSPLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var DummyJobBudgetLine: Record "KVSPSA Job Budget Line"; var DistributionEntry: Record "KVSPSADistributionEntry"; var TempDistributionDifference2: Record "KVSPSADistributionDifference" temporary; var TempGlobalDistributionDifference: Record "KVSPSADistributionDifference" temporary; var DeltaInvQty: Decimal; var Difference: Decimal; var DifferenceInv: Decimal; var DiffInv: Decimal; var InvPerUnit: Decimal; var InvPerUnitGL: Decimal; var InvRatio: Decimal; var OpenInvQty: Decimal; var OpenQty: Decimal; var SalesTotalAssigned: Decimal; var SumAssigned: Decimal; CurrQuantity: Decimal; InvoiceAmount: Decimal; InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal; GlobalFoundPayment: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnBeforeCalcInvoicingDistrEntryPSPLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCalcInvoicingDistrEntryPSPLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var DummyJobBudgetLine: Record "KVSPSA Job Budget Line"; var DistributionEntry: Record "KVSPSADistributionEntry"; var TempDistributionDifference2: Record "KVSPSADistributionDifference" temporary; var TempGlobalDistributionDifference: Record "KVSPSADistributionDifference" temporary; var DeltaInvQty: Decimal; var Difference: Decimal; var DifferenceInv: Decimal; var DiffInv: Decimal; var InvPerUnit: Decimal; var InvPerUnitGL: Decimal; var InvRatio: Decimal; var OpenInvQty: Decimal; var OpenQty: Decimal; var SalesTotalAssigned: Decimal; var SumAssigned: Decimal; CurrQuantity: Decimal; InvoiceAmount: Decimal; InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal; GlobalFoundPayment: Boolean; var IsHandled: Boolean)
begin
end;
Parameters:
CurrJobPSPLine: The current Job PSP Line being processed.DummyJobBudgetLine: The (empty) Job Budget Line placeholder used on PSP line level.DistributionEntry: The current distribution entry being processed.TempDistributionDifference2: The temporary difference buffer used for the sales price differences.TempGlobalDistributionDifference: The global temporary difference buffer used for the invoicing quantity differences.DeltaInvQty: The invoicing quantity assigned to the current distribution entry.Difference: The running rounding difference of the sales price.DifferenceInv: The running rounding difference of the invoicing quantity.DiffInv: The rounding difference of the invoicing quantity for the current entry.InvPerUnit: The invoicing amount per unit.InvPerUnitGL: The invoicing amount per unit used for the ledger entries.InvRatio: The ratio of invoicing quantity to distributed quantity.OpenInvQty: The open invoicing quantity still to be assigned.OpenQty: The open quantity still to be assigned.SalesTotalAssigned: The sum of the sales prices already assigned.SumAssigned: The sum of the invoicing quantity already assigned.CurrQuantity: The total quantity being distributed.InvoiceAmount: The total invoice amount being distributed.InvQty: The total invoicing quantity being distributed.Initial: Indicates whether this is the initial distribution.Redistribute: Indicates whether the invoicing values are being redistributed.StartingDate: The starting date of the distribution.EndingDate: The ending date of the distribution.BudgetLineNo: The budget line number; zero on PSP line level.Precision: The rounding precision used for the calculation.GlobalFoundPayment: Indicates whether a payment planning was found.IsHandled: Set to true to skip the default invoicing calculation for the current entry.
KVSPSAOnAfterCalcInvoicingDistrEntryPSPLine(Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line, Record KVSPSADistributionEntry, Record KVSPSADistributionDifference, Record KVSPSADistributionDifference, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Boolean, Boolean, Date, Date, Integer, Decimal, Boolean) :#
Summary: Integration event raised on PSP line level for each distribution entry after its invoicing quantity and sales price have been calculated and the entry has been modified. Subscribe to this event to react to or post-process the calculated invoicing values.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCalcInvoicingDistrEntryPSPLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var DummyJobBudgetLine: Record "KVSPSA Job Budget Line"; var DistributionEntry: Record "KVSPSADistributionEntry"; var TempDistributionDifference2: Record "KVSPSADistributionDifference" temporary; var TempGlobalDistributionDifference: Record "KVSPSADistributionDifference" temporary; var DeltaInvQty: Decimal; var Difference: Decimal; var DifferenceInv: Decimal; var DiffInv: Decimal; var InvPerUnit: Decimal; var InvPerUnitGL: Decimal; var InvRatio: Decimal; var OpenInvQty: Decimal; var OpenQty: Decimal; var SalesTotalAssigned: Decimal; var SumAssigned: Decimal; CurrQuantity: Decimal; InvoiceAmount: Decimal; InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal; GlobalFoundPayment: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnAfterCalcInvoicingDistrEntryPSPLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCalcInvoicingDistrEntryPSPLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var DummyJobBudgetLine: Record "KVSPSA Job Budget Line"; var DistributionEntry: Record "KVSPSADistributionEntry"; var TempDistributionDifference2: Record "KVSPSADistributionDifference" temporary; var TempGlobalDistributionDifference: Record "KVSPSADistributionDifference" temporary; var DeltaInvQty: Decimal; var Difference: Decimal; var DifferenceInv: Decimal; var DiffInv: Decimal; var InvPerUnit: Decimal; var InvPerUnitGL: Decimal; var InvRatio: Decimal; var OpenInvQty: Decimal; var OpenQty: Decimal; var SalesTotalAssigned: Decimal; var SumAssigned: Decimal; CurrQuantity: Decimal; InvoiceAmount: Decimal; InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal; GlobalFoundPayment: Boolean)
begin
end;
Parameters:
CurrJobPSPLine: The current Job PSP Line being processed.DummyJobBudgetLine: The (empty) Job Budget Line placeholder used on PSP line level.DistributionEntry: The current distribution entry that was processed.TempDistributionDifference2: The temporary difference buffer used for the sales price differences.TempGlobalDistributionDifference: The global temporary difference buffer used for the invoicing quantity differences.DeltaInvQty: The invoicing quantity assigned to the current distribution entry.Difference: The running rounding difference of the sales price.DifferenceInv: The running rounding difference of the invoicing quantity.DiffInv: The rounding difference of the invoicing quantity for the current entry.InvPerUnit: The invoicing amount per unit.InvPerUnitGL: The invoicing amount per unit used for the ledger entries.InvRatio: The ratio of invoicing quantity to distributed quantity.OpenInvQty: The open invoicing quantity still to be assigned.OpenQty: The open quantity still to be assigned.SalesTotalAssigned: The sum of the sales prices already assigned.SumAssigned: The sum of the invoicing quantity already assigned.CurrQuantity: The total quantity being distributed.InvoiceAmount: The total invoice amount being distributed.InvQty: The total invoicing quantity being distributed.Initial: Indicates whether this is the initial distribution.Redistribute: Indicates whether the invoicing values are being redistributed.StartingDate: The starting date of the distribution.EndingDate: The ending date of the distribution.BudgetLineNo: The budget line number; zero on PSP line level.Precision: The rounding precision used for the calculation.GlobalFoundPayment: Indicates whether a payment planning was found.
KVSPSAOnBeforeCalcInvoicingDistrEntryBudgetLine(Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line, Record General Ledger Setup, Record KVSPSADistributionEntry, Record KVSPSADistributionDifference, Record KVSPSADistributionDifference, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Boolean, Boolean, Date, Date, Integer, Decimal, Boolean, Boolean) :#
Summary: Integration event raised on budget line level for each distribution entry before its invoicing quantity and sales price are calculated. Subscribe to this event to adjust the input values or to calculate the invoicing values yourself by setting IsHandled to true.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCalcInvoicingDistrEntryBudgetLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; var GeneralLedgerSetup: Record "General Ledger Setup"; var DistributionEntry: Record "KVSPSADistributionEntry"; var TempDistributionDifference2: Record "KVSPSADistributionDifference" temporary; var TempGlobalDistributionDifference: Record "KVSPSADistributionDifference" temporary; var DeltaInvQty: Decimal; var Difference: Decimal; var DifferenceInv: Decimal; var DiffInv: Decimal; var InvPerUnit: Decimal; var InvPerUnitGL: Decimal; var InvRatio: Decimal; var OpenInvQty: Decimal; var OpenQty: Decimal; var SalesTotalAssigned: Decimal; var SumAssigned: Decimal; CurrQuantity: Decimal; InvoiceAmount: Decimal; InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal; GlobalFoundPayment: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnBeforeCalcInvoicingDistrEntryBudgetLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCalcInvoicingDistrEntryBudgetLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; var GeneralLedgerSetup: Record "General Ledger Setup"; var DistributionEntry: Record "KVSPSADistributionEntry"; var TempDistributionDifference2: Record "KVSPSADistributionDifference" temporary; var TempGlobalDistributionDifference: Record "KVSPSADistributionDifference" temporary; var DeltaInvQty: Decimal; var Difference: Decimal; var DifferenceInv: Decimal; var DiffInv: Decimal; var InvPerUnit: Decimal; var InvPerUnitGL: Decimal; var InvRatio: Decimal; var OpenInvQty: Decimal; var OpenQty: Decimal; var SalesTotalAssigned: Decimal; var SumAssigned: Decimal; CurrQuantity: Decimal; InvoiceAmount: Decimal; InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal; GlobalFoundPayment: Boolean; var IsHandled: Boolean)
begin
end;
Parameters:
CurrJobPSPLine: The current Job PSP Line being processed.CurrJobBudgetLine: The current Job Budget Line being processed.GeneralLedgerSetup: The General Ledger Setup used for amount rounding.DistributionEntry: The current distribution entry being processed.TempDistributionDifference2: The temporary difference buffer used for the sales price differences.TempGlobalDistributionDifference: The global temporary difference buffer used for the invoicing quantity differences.DeltaInvQty: The invoicing quantity assigned to the current distribution entry.Difference: The running rounding difference of the sales price.DifferenceInv: The running rounding difference of the invoicing quantity.DiffInv: The rounding difference of the invoicing quantity for the current entry.InvPerUnit: The invoicing amount per unit.InvPerUnitGL: The invoicing amount per unit used for the ledger entries.InvRatio: The ratio of invoicing quantity to distributed quantity.OpenInvQty: The open invoicing quantity still to be assigned.OpenQty: The open quantity still to be assigned.SalesTotalAssigned: The sum of the sales prices already assigned.SumAssigned: The sum of the invoicing quantity already assigned.CurrQuantity: The total quantity being distributed.InvoiceAmount: The total invoice amount being distributed.InvQty: The total invoicing quantity being distributed.Initial: Indicates whether this is the initial distribution.Redistribute: Indicates whether the invoicing values are being redistributed.StartingDate: The starting date of the distribution.EndingDate: The ending date of the distribution.BudgetLineNo: The budget line number.Precision: The rounding precision used for the calculation.GlobalFoundPayment: Indicates whether a payment planning was found.IsHandled: Set to true to skip the default invoicing calculation for the current entry.
KVSPSAOnAfterCalcInvoicingDistrEntryBudgetLine(Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line, Record General Ledger Setup, Record KVSPSADistributionEntry, Record KVSPSADistributionDifference, Record KVSPSADistributionDifference, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Boolean, Boolean, Date, Date, Integer, Decimal, Boolean) :#
Summary: Integration event raised on budget line level for each distribution entry after its invoicing quantity and sales price have been calculated and the entry has been modified. Subscribe to this event to react to or post-process the calculated invoicing values.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCalcInvoicingDistrEntryBudgetLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; var GeneralLedgerSetup: Record "General Ledger Setup"; var DistributionEntry: Record "KVSPSADistributionEntry"; var TempDistributionDifference2: Record "KVSPSADistributionDifference" temporary; var TempGlobalDistributionDifference: Record "KVSPSADistributionDifference" temporary; var DeltaInvQty: Decimal; var Difference: Decimal; var DifferenceInv: Decimal; var DiffInv: Decimal; var InvPerUnit: Decimal; var InvPerUnitGL: Decimal; var InvRatio: Decimal; var OpenInvQty: Decimal; var OpenQty: Decimal; var SalesTotalAssigned: Decimal; var SumAssigned: Decimal; CurrQuantity: Decimal; InvoiceAmount: Decimal; InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal; GlobalFoundPayment: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSADistributionCalcMgt", 'KVSPSAOnAfterCalcInvoicingDistrEntryBudgetLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCalcInvoicingDistrEntryBudgetLine(var CurrJobPSPLine: Record "KVSPSAJobPSPLine"; var CurrJobBudgetLine: Record "KVSPSA Job Budget Line"; var GeneralLedgerSetup: Record "General Ledger Setup"; var DistributionEntry: Record "KVSPSADistributionEntry"; var TempDistributionDifference2: Record "KVSPSADistributionDifference" temporary; var TempGlobalDistributionDifference: Record "KVSPSADistributionDifference" temporary; var DeltaInvQty: Decimal; var Difference: Decimal; var DifferenceInv: Decimal; var DiffInv: Decimal; var InvPerUnit: Decimal; var InvPerUnitGL: Decimal; var InvRatio: Decimal; var OpenInvQty: Decimal; var OpenQty: Decimal; var SalesTotalAssigned: Decimal; var SumAssigned: Decimal; CurrQuantity: Decimal; InvoiceAmount: Decimal; InvQty: Decimal; Initial: Boolean; Redistribute: Boolean; StartingDate: Date; EndingDate: Date; BudgetLineNo: Integer; Precision: Decimal; GlobalFoundPayment: Boolean)
begin
end;
Parameters:
CurrJobPSPLine: The current Job PSP Line being processed.CurrJobBudgetLine: The current Job Budget Line being processed.GeneralLedgerSetup: The General Ledger Setup used for amount rounding.DistributionEntry: The current distribution entry that was processed.TempDistributionDifference2: The temporary difference buffer used for the sales price differences.TempGlobalDistributionDifference: The global temporary difference buffer used for the invoicing quantity differences.DeltaInvQty: The invoicing quantity assigned to the current distribution entry.Difference: The running rounding difference of the sales price.DifferenceInv: The running rounding difference of the invoicing quantity.DiffInv: The rounding difference of the invoicing quantity for the current entry.InvPerUnit: The invoicing amount per unit.InvPerUnitGL: The invoicing amount per unit used for the ledger entries.InvRatio: The ratio of invoicing quantity to distributed quantity.OpenInvQty: The open invoicing quantity still to be assigned.OpenQty: The open quantity still to be assigned.SalesTotalAssigned: The sum of the sales prices already assigned.SumAssigned: The sum of the invoicing quantity already assigned.CurrQuantity: The total quantity being distributed.InvoiceAmount: The total invoice amount being distributed.InvQty: The total invoicing quantity being distributed.Initial: Indicates whether this is the initial distribution.Redistribute: Indicates whether the invoicing values are being redistributed.StartingDate: The starting date of the distribution.EndingDate: The ending date of the distribution.BudgetLineNo: The budget line number.Precision: The rounding precision used for the calculation.GlobalFoundPayment: Indicates whether a payment planning was found.