KVSPSACreatePurchaseDocFromJob
Procedures
StartPurchaseDocumentProcess(Record KVSPSAJobPSPHeader) :
Summary: The procedure starts the process of creating a purchase document from a job's PSP header. It filters the job budget lines for the purchase document, commits the changes, and opens a page to create the purchase document. It uses the parameters defined in the KVSPSACreateJobPurchParameters record to determine the type of purchase document to create. If the user selects to create a requisition, it opens the requisition worksheet after creating the document. If the user selects to create a quote or order, it runs the corresponding report to create the document. If the user selects an unsupported document type, it raises an integration event to handle the case.
procedure StartPurchaseDocumentProcess(var ActualJobPSPHeader: Record "KVSPSAJobPSPHeader"):
Parameters:
ActualJobPSPHeader: The job PSP header record that contains the job information. Call by Reference
Events
KVSPSAOnAfterFilterJobBudgetLinesForPurchaseDocument(Record KVSPSA Job Budget Line) :
Summary: Integration event raised after filtering job budget lines for purchase document creation
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterFilterJobBudgetLinesForPurchaseDocument(var JobBudgetLine: Record "KVSPSA Job Budget Line"):
Parameters:
JobBudgetLine: The filtered job budget line records
KVSPSAOnAfterJobbudgetLineFilterInFilterJobBudgetLinesForPurchaseDocument(Record KVSPSAJobPSPHeader, Record KVSPSA Job Budget Line) :
Summary: Integration event raised after applying job budget line filter during purchase document creation
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterJobbudgetLineFilterInFilterJobBudgetLinesForPurchaseDocument(JobPSPHeader: Record "KVSPSAJobPSPHeader"; var JobBudgetLine: Record "KVSPSA Job Budget Line"):
Parameters:
JobPSPHeader: The job PSP header recordJobBudgetLine: The job budget line with applied filters
KVSPSAOnBeforeCalcOrderQuantityInFilterJobBudgetLinesForPurchaseDocument(Record KVSPSA Job Budget Line, Boolean) :
Summary: Integration event raised before calculating order quantity during job budget line filtering
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCalcOrderQuantityInFilterJobBudgetLinesForPurchaseDocument(var JobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean):
Parameters:
JobBudgetLine: The job budget line for which order quantity will be calculatedIsHandled: Set to true if the operation is handled by subscriber
KVSPSAOnBeforeFilterJobBudgetLinesForPurchaseDocument(Record KVSPSAJobPSPHeader, Record KVSPSA Job Budget Line, Boolean) :
Summary: Integration event raised before filtering job budget lines for purchase document creation
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeFilterJobBudgetLinesForPurchaseDocument(JobPSPHeader: Record "KVSPSAJobPSPHeader"; var JobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean):
Parameters:
JobPSPHeader: The job PSP header recordJobBudgetLine: The job budget line to be filteredIsHandled: Set to true if the operation is handled by subscriber
KVSPSAOnBeforeStartPurchaseDocumentProcess(Record KVSPSAJobPSPHeader, Boolean) :
Summary: Integration event raised before starting the purchase document process
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeStartPurchaseDocumentProcess(var JobPSPHeader: Record "KVSPSAJobPSPHeader"; var IsHandled: Boolean):
Parameters:
JobPSPHeader: The job PSP header recordIsHandled: Set to true if the operation is handled by subscriber
KVSPSAOnCasePurchaseDocumentTypeInCreatePurchaseDocumentFromSettings(Record KVSPSAJobPSPHeader, Record KVSPSACreateJobPurchParameters) :
Summary: Integration event raised to handle custom purchase document types during document creation
[IntegrationEvent(false, false)]
local procedure KVSPSAOnCasePurchaseDocumentTypeInCreatePurchaseDocumentFromSettings(JobPSPHeader: Record "KVSPSAJobPSPHeader"; var CreateJobPurchParameters: Record "KVSPSACreateJobPurchParameters"):
Parameters:
JobPSPHeader: The job PSP header recordCreateJobPurchParameters: The parameters for creating job purchase documents