KVSTRDCombineShipments
Procedures
GetNoOfNotPostedInvoices() : Integer
Summary: Gets the number of not posted invoices.
procedure GetNoOfNotPostedInvoices(): Integer
Returns: The number of not posted invoices as integer.
GetNoOfNotReleasedInvoices() : Integer
Summary: Gets the number of not released invoices.
procedure GetNoOfNotReleasedInvoices(): Integer
Returns: The number of not released invoices as integer.
GetNoOfPostedInvoices() : Integer
Summary: Gets the number of posted invoices.
procedure GetNoOfPostedInvoices(): Integer
Returns: The number of posted invoices as integer.
SetIsRentalPeriodicInvoicing(Boolean) :
Summary: Sets a global variable to indicate that the current periodic invoicing is a rental invoicing.
procedure SetIsRentalPeriodicInvoicing(IsRentalPeriodicInvoicing: Boolean):
Parameters:
IsRentalPeriodicInvoicing: A boolean parameter to set if is a rental periodic invoicing.
SetPostInvoice(Boolean) :
Summary: Sets a global variable to directly post created invoices.
procedure SetPostInvoice(PostInvoice: Boolean):
Parameters:
PostInvoice: A boolean parameter to set if created invoices are posted directly.
SetPrintPostedDocument(Boolean) :
Summary: Sets a global variable to directly print posted invoices.
procedure SetPrintPostedDocument(PrintPostedDocument: Boolean):
Parameters:
PrintPostedDocument: A boolean parameter to set if posted invoices are printed.
SetProcessNo(Integer) :
Summary: Sets a the process no. to a global variable that ist stored in the periodic invoicing log.
procedure SetProcessNo(ProcessNo: Integer):
Parameters:
ProcessNo: A integer value to set the process no.
SetReqFormFromPeriodicInvoicing(Date, Boolean, Boolean, Boolean) :
Summary: Allows to set parameters for the periodic invoicing report without opening the request page.
procedure SetReqFormFromPeriodicInvoicing(PostingDate: Date; ReplacePostingDate: Boolean; ReplaceDocumentDate: Boolean; CalculateInvoiceDiscount: Boolean):
Parameters:
PostingDate: The posting date to use.ReplacePostingDate: Set to True to replace the posting date.ReplaceDocumentDate: Set to True to replace the document date.CalculateInvoiceDiscount: Set to True to recalculate the invoice discount.
SetShipmentAddress(Record Sales Header, Record Sales Header) :
Summary: Allows to set/replace the shipment address fields in the posted invoice to those from the sales order.
procedure SetShipmentAddress(var SalesHeaderInvoice: Record "Sales Header"; SalesHeaderOrder: Record "Sales Header"):
Parameters:
SalesHeaderInvoice: The created "Sales Invoice Header" record.SalesHeaderOrder: The "Sales Header" record from which the invoce was created.
SetShipmentDateFilter(Text) :
Summary: Set a filter on the posting date field of the sales shipments.
procedure SetShipmentDateFilter(ShipmentDateFilter: Text):
Parameters:
ShipmentDateFilter: The date filter expression as text.
SetShipmentNoFilter(Code[20]) :
Summary: Set a filter on the "No." field of the sales shipments.
procedure SetShipmentNoFilter(ShipmentNoFilter: Code[20]):
Parameters:
ShipmentNoFilter: The number of the sales shipment document.
Events
KVSTRDOnAfterDocumentGroupChangePeriodicInvoicing(Record Sales Header, Record Sales Header, Record Customer, Boolean) :
Summary: This event is raised after the document group changed in dataitem "Sales Shipment Line".
[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterDocumentGroupChangePeriodicInvoicing(SalesHeader: Record "Sales Header"; SalesHeader2: Record "Sales Header"; Customer: Record "Customer"; var DocumentGroupChanged: Boolean):
Parameters:
SalesHeader: The Global Sales Header record.SalesHeader2: The Sales Header record for the current order.Customer: The record for the current Customer.DocumentGroupChanged: Specifies if the document group has changed. If True, the current Invoice Header will be finalized and inserted.
KVSTRDOnAfterGetRecordSalesOrderHeader(Record Sales Header, Boolean) :
Summary: This event is raised after the Sales Order Header record has been retrieved.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterGetRecordSalesOrderHeader(var SalesHeader: Record "Sales Header"; var isHandled: Boolean):
Parameters:
SalesHeader: The Sales Header record for the current order.isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed and the record will be skipped.
KVSTRDOnAfterInsertSalesInvHeader(Record Sales Header, Record Sales Shipment Header) :
Summary: This event is raised after the Sales Invoice Header has been inserted.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterInsertSalesInvHeader(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"):
Parameters:
SalesHeader: The Sales Header record of type Invoice that has been inserted.SalesShipmentHeader: The last Sales Shipment Header record that has been processed.
KVSTRDOnAfterSetCurrentKeyPeriodicInvoicing(Record Sales Header, Record Customer) :
Summary: This event is raised after the current key for periodic invoicing has been set. It is triggeres in the OnPreDataItem-Trigger of the "Sales Shipment Header" dataitem.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterSetCurrentKeyPeriodicInvoicing(var SalesHeader: Record "Sales Header"; Customer: Record "Customer"):
Parameters:
SalesHeader: The current Sales Header record.Customer: The record for the current Customer.
KVSTRDOnBeforeFinalizeSalesInvHeader(Record Sales Header, Boolean, Boolean) :
Summary: This event is raised before the Sales Invoice Header is finalized. It is used to check if the Sales Invoice Header has an amount and to handle errors.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeFinalizeSalesInvHeader(var SalesHeader: Record "Sales Header"; var HasAmount: Boolean; var HasError: Boolean):
Parameters:
SalesHeader: The Sales Header record of type Invoice that is being finalized.HasAmount: Indicates if the Sales Invoice Header has an amount. If false then the record will be deleted.HasError: Indicates if there was an error during the finalization process. If true then the record will be deleted.
KVSTRDOnBeforeInsertSalesInvHeaderDifPaymentModify(Record Sales Header, Record Sales Header) :
Summary: This event is raised before the Sales Invoice Header is inserted with different payment terms than the sales order. It allows modification of the Sales Header record before it is inserted.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeInsertSalesInvHeaderDifPaymentModify(var SalesHeader: Record "Sales Header"; SalesHeader2: Record "Sales Header"):
Parameters:
SalesHeader: The global Sales Header record of type Invoice that is being inserted.SalesHeader2: The Sales Header record of type Order.
KVSTRDOnBeforeInsertSalesInvoiceHeaderFromSalesOrderHeader(Record Sales Header, Record Sales Header) :
Summary: This event is raised before the Sales Invoice Header is inserted from the Sales Order Header. It allows modification of the Sales Header record before it is inserted.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeInsertSalesInvoiceHeaderFromSalesOrderHeader(var SalesHeader: Record "Sales Header"; SalesHeader2: Record "Sales Header"):
Parameters:
SalesHeader: The global Sales Header record of type Invoice that is being inserted.SalesHeader2: The Sales Header record of type Order.
KVSTRDOnBeforePostReport() :
Summary: This event is raised on the OnPostReport-Trigger. It is executed after the report has processed and the alloy surcharges have been updated and before the buffer tables are being deleted.
[IntegrationEvent(true, false)]
local procedure KVSTRDOnBeforePostReport():
KVSTRDOnBeforePreReport() :
Summary: This event is raised on the OnPreReport-Trigger. It is executed before the report has starts processing after the temporary Reservation Entries for alloy surcharges have been deleted and before the processing time is set.
[IntegrationEvent(true, false)]
local procedure KVSTRDOnBeforePreReport():
KVSTRDOnBeforePrintPostedDocumentInFinalizeSalesInvHeader(Record Sales Header, Boolean, Boolean) :
Summary: This event is raised before the posted document is printed in the FinalizeSalesInvHeader procedure. It allows modification of the Sales Header record and the PostedDocumentPrinted flag before printing.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforePrintPostedDocumentInFinalizeSalesInvHeader(var SalesHeader: Record "Sales Header"; var PostedDocumentPrinted: Boolean; var isHandled: Boolean):
Parameters:
SalesHeader: The Sales Header record of type Invoice that is being finalized.PostedDocumentPrinted: Indicates if the posted document has been printed.isHandled: Specifies if the event has been handled. If set to true, the default printing logic will not be executed.
KVSTRDOnBeforePrintPostedDocumentInFinalizeSalesInvHeaderDifPayment(Record Sales Header, Boolean, Boolean) :
Summary: This event is raised before the posted document is printed in the FinalizeSalesInvoiceHeaderWithDifferentPaymentTerms procedure. It allows modification of the Sales Header record and the PostedDocumentPrinted flag before printing.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforePrintPostedDocumentInFinalizeSalesInvHeaderDifPayment(var SalesHeader: Record "Sales Header"; var PostedDocumentPrinted: Boolean; var isHandled: Boolean):
Parameters:
SalesHeader: The Sales Header record that has been posted.PostedDocumentPrinted: Specifies if the posted document has been printed.isHandled: Specifies if the event has been handled. If set to true, the default printing logic will not be executed.
Remarks: If you handle the printing logic in your custom code, it is recommended to set the "isHandled" and "PostedDocumentPrinted" parameter to true.
KVSTRDOnBeforeSalesInvHeaderInsert(Record Sales Header, Record Sales Header) :
Summary: This event is raised before the Sales Invoice Header is inserted. It allows modification of the Sales Header record before it is inserted.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeSalesInvHeaderInsert(var SalesHeader: Record "Sales Header"; SalesHeader2: Record "Sales Header"):
Parameters:
SalesHeader: The global Sales Header record of type Invoice that is being inserted.SalesHeader2: The Sales Header record of type Order.
KVSTRDOnBeforeSalesInvHeaderModifyPeriodicInvoicing(Record Sales Header, Record Sales Header) :
Summary: This event is raised before the Sales Invoice Header is modified for periodic invoicing. It allows modification of the Sales Header record before it is modified.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeSalesInvHeaderModifyPeriodicInvoicing(var SalesHeader: Record "Sales Header"; SalesHeader2: Record "Sales Header"):
Parameters:
SalesHeader: The global Sales Header record of type Invoice that is being modified.SalesHeader2: The Sales Header record of type Order.
KVSTRDOnFinalizeSalesInvHeader(Record Sales Header) :
Summary: This event is raised when the Sales Invoice Header is finalized.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnFinalizeSalesInvHeader(var SalesHeader: Record "Sales Header"):
Parameters:
SalesHeader: The Sales Header record of type Invoice that is being finalized.
KVSTRDOnFinalizeSalesInvHeaderOnAfterDelete(Record Sales Header) :
Summary: This event is raised after the Sales Invoice Header is deleted in the FinalizeSalesInvHeader procedure. The Sales Header is deleted if the document amount is zero or an error has occured before. It allows additional logic to be executed after the deletion.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnFinalizeSalesInvHeaderOnAfterDelete(var SalesHeader: Record "Sales Header"):
Parameters:
SalesHeader: The Sales Header record of type Invoice that has been deleted.
KVSTRDOnFinalizeSalesInvHeaderOnBeforeDelete(Record Sales Header) :
Summary: This event is raised before the Sales Invoice Header is deleted in the FinalizeSalesInvHeader procedure. The Sales Header is deleted if the document amount is zero or an error has occurred before. It allows additional logic to be executed before the deletion.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnFinalizeSalesInvHeaderOnBeforeDelete(var SalesHeader: Record "Sales Header"):
Parameters:
SalesHeader: The Sales Header record of type Invoice that is being deleted.
KVSTRDOnSalesOrderHeaderOnPreDataItem(Record Sales Header) :
Summary: This event is raised on the OnPreDataItem-Trigger of the "Sales Order Header" dataitem. It allows modification of the Sales Header record before it is processed.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnSalesOrderHeaderOnPreDataItem(var SalesHeader: Record "Sales Header"):
Parameters:
SalesHeader: The Sales Header record for the current order.
KVSTRDOnSalesShipmentHeaderOnPreDataItem(Record Sales Header, Record Sales Shipment Header, Code[20], Text) :
Summary: This event is raised on the OnPreDataItem-Trigger of the "Sales Shipment Header" dataitem. It allows modification or filter adjustments of the Sales Header / Sales Shipment record before it is processed.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnSalesShipmentHeaderOnPreDataItem(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ShipmentNoFilter: Code[20]; var ShipmentDateFilter: Text):
Parameters:
SalesHeader: The Sales Header record for the current order.SalesShipmentHeader: The Sales Header record for the current shipment.ShipmentNoFilter: The shipment number filter from the request page.ShipmentDateFilter: The shipping date filter from the request page.
KVSTRDOnBeforeCheckSalesShipmentLine(Record Sales Shipment Line, Boolean) :
Summary: This event is raised before checking the Sales Shipment Line in the Combine Shipments process.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeCheckSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var DoNotSkipLine: Boolean):
Parameters:
SalesShipmentLine: The Sales Shipment Line record that is being checked.DoNotSkipLine: A boolean flag that determines whether the line should be skipped or not.