KVSPSAAdvancePaymentPlanMgt#
Procedures#
CalcBaseSalesAmountPSP(Record KVSPSAJobPSPLine) : Decimal#
Summary: Calculate the base sales amount for a PSP line. Depend on the type of plan, it either calculates the amount for PSP Line or for the entire job.
procedure CalcBaseSalesAmountPSP(SourceJobPSPLine: Record "KVSPSAJobPSPLine"): Decimal
Parameters:
SourceJobPSPLine
: The PSP Line which is the source of the calculation
Returns: Return the sales amount based on the Field "Total Price (ICY)"
CreatePlanningEntriesForSinglePSPLine(Record KVSPSAJobPSPLine, Boolean) :#
Summary: Create planning entries for a single PSP line. This procedure is used to create planning entries for a single PSP line, either for an advance payment or for a regular payment plan.
procedure CreatePlanningEntriesForSinglePSPLine(JobPSPLine: Record "KVSPSAJobPSPLine"; ForAdvance: Boolean):
Parameters:
JobPSPLine
: PSP Line for the planning EntriesForAdvance
: Indicates whether the planning entries are for an advance payment (true) or a regular payment plan (false)
Events#
KVSPSAOnAfterDialogCloseInCreateInvoiceFromJobPaymentPlanningEntry(Record KVSPSAJobPaymentPlanningEntry, Record Sales Header) :#
Summary: Integration event raised after dialog closes in the create invoice process. This event allows subscribers to perform additional actions after invoice creation dialog is closed.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterDialogCloseInCreateInvoiceFromJobPaymentPlanningEntry(var JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry"; var SalesHeader: Record "Sales Header"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAAdvancePaymentPlanMgt", 'KVSPSAOnAfterDialogCloseInCreateInvoiceFromJobPaymentPlanningEntry', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterDialogCloseInCreateInvoiceFromJobPaymentPlanningEntry(var JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry"; var SalesHeader: Record "Sales Header")
begin
end;
Parameters:
JobPaymentPlanningEntry
: The job payment planning entries that were processedSalesHeader
: The sales header that was created or modified
KVSPSAOnAfterGetJobPSPLineForSalesLine(Record Sales Line, Record KVSPSAJobPSPLine, Record KVSPSAJobPaymentPlanningEntry) :#
Summary: This event is raised after the Job PSP Line is retrieved for the Sales Line. It can be used to assign additonial values to the Sales Line.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterGetJobPSPLineForSalesLine(var SalesLine: Record "Sales Line"; KVSPSAJobPSPLine: Record "KVSPSAJobPSPLine"; JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAAdvancePaymentPlanMgt", 'KVSPSAOnAfterGetJobPSPLineForSalesLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterGetJobPSPLineForSalesLine(var SalesLine: Record "Sales Line"; KVSPSAJobPSPLine: Record "KVSPSAJobPSPLine"; JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry")
begin
end;
Parameters:
SalesLine
:KVSPSAJobPSPLine
:JobPaymentPlanningEntry
:
KVSPSAOnBeforeConfirmNoMilestonesFoundContinue(Boolean, Record KVSPSAJobPSPLine, Boolean) :#
Summary: Integration event raised before confirming to continue when no sales total for milestones was found. This event allows subscribers to handle the confirmation dialog or override the default behavior.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeConfirmNoMilestonesFoundContinue(var IsHandled: Boolean; var JobPSPLine: Record "KVSPSAJobPSPLine"; ForAdvance: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAAdvancePaymentPlanMgt", 'KVSPSAOnBeforeConfirmNoMilestonesFoundContinue', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeConfirmNoMilestonesFoundContinue(var IsHandled: Boolean; var JobPSPLine: Record "KVSPSAJobPSPLine"; ForAdvance: Boolean)
begin
end;
Parameters:
IsHandled
: Set to true to indicate the event has been handled and skip default behaviorJobPSPLine
: The PSP line being processedForAdvance
: Indicates whether this is for advance payment processing
KVSPSAOnBeforeConfirmUpdateDescriptionInJobPaymentPlanning(Boolean, Record KVSPSAJobPSPLine, Record KVSPSAJobPaymentPlanningEntry, Decimal) :#
Summary: Integration event raised before confirming to update description in job payment planning entries. This event allows subscribers to handle the confirmation dialog or override the default behavior.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeConfirmUpdateDescriptionInJobPaymentPlanning(var IsHandled: Boolean; var JobPSPLine: Record "KVSPSAJobPSPLine"; JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry"; BaseAmt: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAAdvancePaymentPlanMgt", 'KVSPSAOnBeforeConfirmUpdateDescriptionInJobPaymentPlanning', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeConfirmUpdateDescriptionInJobPaymentPlanning(var IsHandled: Boolean; var JobPSPLine: Record "KVSPSAJobPSPLine"; JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry"; BaseAmt: Decimal)
begin
end;
Parameters:
IsHandled
: Set to true to indicate the event has been handled and skip default behaviorJobPSPLine
: The PSP line being processedJobPaymentPlanningEntry
: The job payment planning entry being updatedBaseAmt
: The base amount for the calculation
KVSPSAOnBeforeFindJobPaymentPlanningEntry(Record KVSPSAJobPaymentPlanningEntry) :#
Summary: Integration event raised before finding job payment planning entries. This event allows subscribers to modify the record filters or perform additional setup before the search.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeFindJobPaymentPlanningEntry(var JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAAdvancePaymentPlanMgt", 'KVSPSAOnBeforeFindJobPaymentPlanningEntry', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeFindJobPaymentPlanningEntry(var JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry")
begin
end;
Parameters:
JobPaymentPlanningEntry
: The job payment planning entry record with filters that can be modified
KVSPSAOnBeforeModifySalesHeader(Record KVSPSAJobPaymentPlanningEntry, Record Sales Header) :#
Summary: This event is raised before the modification of the Sales Header record. The Sales Header is modified when creating an invoice from the Job Payment Planning Entry. It can be used to assign additonial values to the Sales Header.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeModifySalesHeader(JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry"; var SalesHeader: Record "Sales Header"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAAdvancePaymentPlanMgt", 'KVSPSAOnBeforeModifySalesHeader', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeModifySalesHeader(JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry"; var SalesHeader: Record "Sales Header")
begin
end;
Parameters:
JobPaymentPlanningEntry
:SalesHeader
:
KVSPSAOnBeforeModifySalesLine(Record KVSPSAJobPaymentPlanningEntry, Record Sales Line) :#
Summary: This event is raised before the modification of the Sales Line record. The Sales Line is modified when creating an invoice from the Job Payment Planning Entry. It can be used to assign additonial values to the Sales Line.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeModifySalesLine(JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry"; var SalesLine: Record "Sales Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAAdvancePaymentPlanMgt", 'KVSPSAOnBeforeModifySalesLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeModifySalesLine(JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry"; var SalesLine: Record "Sales Line")
begin
end;
Parameters:
JobPaymentPlanningEntry
:SalesLine
:
KVSPSAOnBeforeResponseAfterInvoiceCreated(Record Sales Header, Decimal, Boolean) :#
Summary: This event is raised before the response after the invoice is created from the Job Payment Planning Entry. It can be to supress the existing Response.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeResponseAfterInvoiceCreated(SalesHeader: Record "Sales Header"; Counter: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAAdvancePaymentPlanMgt", 'KVSPSAOnBeforeResponseAfterInvoiceCreated', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeResponseAfterInvoiceCreated(SalesHeader: Record "Sales Header"; Counter: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
SalesHeader
:Counter
:IsHandled
: