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"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreatePurchaseDocFromJob", 'KVSPSAOnAfterFilterJobBudgetLinesForPurchaseDocument', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterFilterJobBudgetLinesForPurchaseDocument(var JobBudgetLine: Record "KVSPSA Job Budget Line")
begin
end;
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"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreatePurchaseDocFromJob", 'KVSPSAOnAfterJobbudgetLineFilterInFilterJobBudgetLinesForPurchaseDocument', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterJobbudgetLineFilterInFilterJobBudgetLinesForPurchaseDocument(JobPSPHeader: Record "KVSPSAJobPSPHeader"; var JobBudgetLine: Record "KVSPSA Job Budget Line")
begin
end;
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):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreatePurchaseDocFromJob", 'KVSPSAOnBeforeCalcOrderQuantityInFilterJobBudgetLinesForPurchaseDocument', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCalcOrderQuantityInFilterJobBudgetLinesForPurchaseDocument(var JobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean)
begin
end;
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):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreatePurchaseDocFromJob", 'KVSPSAOnBeforeFilterJobBudgetLinesForPurchaseDocument', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeFilterJobBudgetLinesForPurchaseDocument(JobPSPHeader: Record "KVSPSAJobPSPHeader"; var JobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean)
begin
end;
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):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreatePurchaseDocFromJob", 'KVSPSAOnBeforeStartPurchaseDocumentProcess', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeStartPurchaseDocumentProcess(var JobPSPHeader: Record "KVSPSAJobPSPHeader"; var IsHandled: Boolean)
begin
end;
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"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreatePurchaseDocFromJob", 'KVSPSAOnCasePurchaseDocumentTypeInCreatePurchaseDocumentFromSettings', '', false, false)]
local procedure DoSomethingKVSPSAOnCasePurchaseDocumentTypeInCreatePurchaseDocumentFromSettings(JobPSPHeader: Record "KVSPSAJobPSPHeader"; var CreateJobPurchParameters: Record "KVSPSACreateJobPurchParameters")
begin
end;
Parameters:
JobPSPHeader
: The job PSP header recordCreateJobPurchParameters
: The parameters for creating job purchase documents
KVSPSAOnCasePurchDocTypeInCreatePurchaseDocumentFromSettings(Record KVSPSAJobPSPHeader, Enum KVSPSAPurchDocTypeCreatePSP, Code[20], Boolean, Boolean, Code[10], Code[10]) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised to handle custom purchase document types during document creation (obsolete version use KVSPSAOnCasePurchaseDocumentTypeInCreatePurchaseDocumentFromSettings instead)
[IntegrationEvent(false, false)]
[Obsolete('Use KVSPSAOnCasePurchDocTypeInCreatePurchaseDocumentFromSettings with JobPSPHeader, CreateJobPurchParameters - Parameters', '23.2')]
local procedure KVSPSAOnCasePurchDocTypeInCreatePurchaseDocumentFromSettings(JobPSPHeader: Record "KVSPSAJobPSPHeader"; PurchDocTypeCreatePSP: Enum "KVSPSAPurchDocTypeCreatePSP"; JobNo: Code[20]; UseJobAdress: Boolean; UseLocationAdress: Boolean; RequisitionTemplate: Code[10]; RequisitionName: Code[10]):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreatePurchaseDocFromJob", 'KVSPSAOnCasePurchDocTypeInCreatePurchaseDocumentFromSettings', '', false, false)]
local procedure DoSomethingKVSPSAOnCasePurchDocTypeInCreatePurchaseDocumentFromSettings(JobPSPHeader: Record "KVSPSAJobPSPHeader"; PurchDocTypeCreatePSP: Enum "KVSPSAPurchDocTypeCreatePSP"; JobNo: Code[20]; UseJobAdress: Boolean; UseLocationAdress: Boolean; RequisitionTemplate: Code[10]; RequisitionName: Code[10])
begin
end;
Parameters:
JobPSPHeader
: The job PSP header recordPurchDocTypeCreatePSP
: The purchase document type to createJobNo
: The job numberUseJobAdress
: Whether to use job addressUseLocationAdress
: Whether to use location addressRequisitionTemplate
: The requisition template codeRequisitionName
: The requisition name