KVSFCYJobSalesManagement#
Procedures#
UpdateJobPlanningInvoiceLine(Record Sales Line, Record Sales Header, Record Sales Line, Record Sales Header, Option, Option) :#
Summary: Updates job planning invoice line tracking when sales lines are modified or transferred between documents. This procedure handles the synchronization between sales document changes and job planning invoice line records, ensuring accurate tracking of job planning line quantities and their association with sales documents. When sales lines are moved, copied, or modified, this procedure updates the corresponding job planning line invoice entries to reflect the new document references, quantities, and document types. It maintains the relationship between job planning lines and sales documents by deleting old invoice line tracking records and creating new ones with updated information from the target sales document. The procedure handles various document types including quotes, orders, invoices, credit memos, and return orders, ensuring proper document type mapping and quantity tracking for accurate job billing and invoice management workflows.
procedure UpdateJobPlanningInvoiceLine(OldSalesLinePar: Record "Sales Line"; OldSalesHeaderPar: Record "Sales Header"; NewSalesLinePar: Record "Sales Line"; NewSalesHeaderPar: Record "Sales Header"; DocumentTypePar: Option; DetaildDocumentTypePar: Option):
Parameters:
OldSalesLinePar: Original sales line record before the change, used to identify the job planning line through contract entry number.OldSalesHeaderPar: Original sales header record associated with the old sales line for reference and validation purposes.NewSalesLinePar: New or modified sales line record containing updated information including quantities, line number, and position number.NewSalesHeaderPar: New sales header record containing updated document information, posting dates, and document number for tracking.DocumentTypePar: Document type option indicating the type of sales document (invoice, credit memo, posted invoice, posted credit memo, return order, order).DetaildDocumentTypePar: Detailed document type option providing specific document classification (quote, order, invoice, credit memo, blanket order, return order).
UpdateJobPlanningUsageLink(Record Sales Header) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('This procedure "UpdateJobPlanningUsageLink" is obsolete, will be removed!', '25.3')]
procedure UpdateJobPlanningUsageLink(SalesHeaderPar: Record "Sales Header"):
Events#
OnAfterTestSalesHeader(Record Sales Header, Record Job) :#
Summary: Integration event raised after testing sales header compatibility with job requirements.
[IntegrationEvent(false, false)]
local procedure OnAfterTestSalesHeader(var SalesHeader: Record "Sales Header"; Job: Record "Job"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYJobSalesManagement", 'OnAfterTestSalesHeader', '', false, false)]
local procedure DoSomethingOnAfterTestSalesHeader(var SalesHeader: Record "Sales Header"; Job: Record "Job")
begin
end;
Parameters:
SalesHeader: Variable parameter containing the sales header being tested.Job: Parameter containing the job record for comparison.
OnAfterUpdateSalesHeader(Record Sales Header, Record Job, Record Location) :#
Summary: Integration event raised after updating sales header with job information.
[IntegrationEvent(false, false)]
local procedure OnAfterUpdateSalesHeader(var SalesHeader: Record "Sales Header"; var Job: Record "Job"; var Location: Record "Location"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYJobSalesManagement", 'OnAfterUpdateSalesHeader', '', false, false)]
local procedure DoSomethingOnAfterUpdateSalesHeader(var SalesHeader: Record "Sales Header"; var Job: Record "Job"; var Location: Record "Location")
begin
end;
Parameters:
SalesHeader: Variable parameter containing the updated sales header.Job: Variable parameter containing the job record used for updates.Location: Variable parameter containing the location record if applicable.
OnBeforeTestSalesHeader(Record Sales Header, Record Job, Boolean) :#
Summary: Integration event raised before testing sales header compatibility with job requirements.
[IntegrationEvent(false, false)]
local procedure OnBeforeTestSalesHeader(var SalesHeader: Record "Sales Header"; Job: Record "Job"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYJobSalesManagement", 'OnBeforeTestSalesHeader', '', false, false)]
local procedure DoSomethingOnBeforeTestSalesHeader(var SalesHeader: Record "Sales Header"; Job: Record "Job"; var IsHandled: Boolean)
begin
end;
Parameters:
SalesHeader: Variable parameter containing the sales header to be tested.Job: Parameter containing the job record for comparison.IsHandled: Variable parameter to indicate if the test has been handled by subscriber.
OnBeforeUpdateSalesHeader(Record Sales Header, Record Job, Boolean) :#
Summary: Integration event raised before updating sales header with job information.
[IntegrationEvent(false, false)]
local procedure OnBeforeUpdateSalesHeader(var SalesHeader: Record "Sales Header"; Job: Record "Job"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYJobSalesManagement", 'OnBeforeUpdateSalesHeader', '', false, false)]
local procedure DoSomethingOnBeforeUpdateSalesHeader(var SalesHeader: Record "Sales Header"; Job: Record "Job"; var IsHandled: Boolean)
begin
end;
Parameters:
SalesHeader: Variable parameter containing the sales header to be updated.Job: Parameter containing the job record for updates.IsHandled: Variable parameter to indicate if the update has been handled by subscriber.
OnBeforeInsertOrModifySalesDocTextFromProjectText(Record KVSFCYProjectDocumentText, Record Sales Line, Integer, Boolean, Boolean) :#
Summary: Integration event raised before inserting or modifying sales document text from project text.
[IntegrationEvent(false, false)]
local procedure OnBeforeInsertOrModifySalesDocTextFromProjectText(var KVSFCYProjectDocumentText: Record "KVSFCYProjectDocumentText"; SalesLine: Record "Sales Line"; var CurrentLineNo: Integer; var IsModification: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYJobSalesManagement", 'OnBeforeInsertOrModifySalesDocTextFromProjectText', '', false, false)]
local procedure DoSomethingOnBeforeInsertOrModifySalesDocTextFromProjectText(var KVSFCYProjectDocumentText: Record "KVSFCYProjectDocumentText"; SalesLine: Record "Sales Line"; var CurrentLineNo: Integer; var IsModification: Boolean; var IsHandled: Boolean)
begin
end;
Parameters:
KVSFCYProjectDocumentText: Variable parameter containing the project document text to transfer.SalesLine: Parameter containing the sales line for text association.CurrentLineNo: Variable parameter containing the current line number being processed.IsModification: Variable parameter indicating whether this is a modification operation.IsHandled: Variable parameter to indicate if the operation has been handled by subscriber.
OnInsertOrModifySalesDocTextFromProjectTextAfterInsertSalesDocText(Record KVSKBASalesDocumentText) :#
Summary: Integration event raised after inserting sales document text during project text transfer.
[IntegrationEvent(false, false)]
local procedure OnInsertOrModifySalesDocTextFromProjectTextAfterInsertSalesDocText(var SalesDocumentText: Record "KVSKBASalesDocumentText"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYJobSalesManagement", 'OnInsertOrModifySalesDocTextFromProjectTextAfterInsertSalesDocText', '', false, false)]
local procedure DoSomethingOnInsertOrModifySalesDocTextFromProjectTextAfterInsertSalesDocText(var SalesDocumentText: Record "KVSKBASalesDocumentText")
begin
end;
Parameters:
SalesDocumentText: Variable parameter containing the inserted sales document text.
OnBeforeTestAlternativeJobContractEntryNo(Record Sales Line, Integer, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('Event will be removed, use OnBeforeTestAlternativeJobContractEntryNoInSalesLine instead', '25.3')]
[IntegrationEvent(false, false)]
local procedure OnBeforeTestAlternativeJobContractEntryNo(SalesLine: Record "Sales Line"; CausedByFieldNo: Integer; IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYJobSalesManagement", 'OnBeforeTestAlternativeJobContractEntryNo', '', false, false)]
local procedure DoSomethingOnBeforeTestAlternativeJobContractEntryNo(SalesLine: Record "Sales Line"; CausedByFieldNo: Integer; IsHandled: Boolean)
begin
end;
OnBeforeTestAlternativeJobContractEntryNoInSalesLine(Record Sales Line, Integer, Boolean) :#
Summary: Integration event raised before testing alternative job contract entry number in sales line.
[IntegrationEvent(false, false)]
local procedure OnBeforeTestAlternativeJobContractEntryNoInSalesLine(SalesLine: Record "Sales Line"; CausedByFieldNo: Integer; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYJobSalesManagement", 'OnBeforeTestAlternativeJobContractEntryNoInSalesLine', '', false, false)]
local procedure DoSomethingOnBeforeTestAlternativeJobContractEntryNoInSalesLine(SalesLine: Record "Sales Line"; CausedByFieldNo: Integer; var IsHandled: Boolean)
begin
end;
Parameters:
SalesLine: Parameter containing the sales line being tested.CausedByFieldNo: Parameter containing the field number that triggered the test.IsHandled: Variable parameter to indicate if the test has been handled by subscriber.
OnAfterFilterDeleteSalesDocText(Record Sales Line, Record KVSKBASalesDocumentText) :#
Summary: Integration event raised after filtering and deleting sales document text.
[IntegrationEvent(false, false)]
local procedure OnAfterFilterDeleteSalesDocText(SalesLine: Record "Sales Line"; var KVSKBASalesDocumentText: Record "KVSKBASalesDocumentText"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYJobSalesManagement", 'OnAfterFilterDeleteSalesDocText', '', false, false)]
local procedure DoSomethingOnAfterFilterDeleteSalesDocText(SalesLine: Record "Sales Line"; var KVSKBASalesDocumentText: Record "KVSKBASalesDocumentText")
begin
end;
Parameters:
SalesLine: Parameter containing the sales line associated with the text.KVSKBASalesDocumentText: Variable parameter containing the sales document text being deleted.