KVSMEDBillingCallLib
Procedures
CreateSalesInvoices(Text, Text, Text, Record KVSMEDCallfromSchedFilter) : Integer
Summary: Creates sales invoices for customers based on the provided filters and billing schedule configuration.
procedure CreateSalesInvoices(CustomerFilter: Text; ProcessPeriodFilter: Text; BillSchedCallFilter: Text; KVSMEDCallfromSchedFilter: Record "KVSMEDCallfromSchedFilter"): Integer
Parameters:
CustomerFilter: A text filter (table view) to restrict which customers are processed.ProcessPeriodFilter: A text filter (table view) to restrict which process periods are included.BillSchedCallFilter: A text filter (table view) to restrict which billing schedule calls are considered.KVSMEDCallfromSchedFilter: The billing schedule filter record containing posting date, document date, split document settings and further billing parameters.
Returns: The total number of sales invoices created.
Events
OnBeforeReleaseAndPostCreateSalesOrder(Record Sales Header, Record KVSMEDBillingScheduleCall) :
Summary: This event is fired in CreateSalesOrder embedded in CreateSalesInvoiceByCalls
[IntegrationEvent(false, false)]
local procedure OnBeforeReleaseAndPostCreateSalesOrder(var SalesHeader: Record "Sales Header"; var KVSMEDBillingScheduleCall: Record "KVSMEDBillingScheduleCall"):
Parameters:
Sales HeaderHeader:KVSMEDBillingScheduleCall:
OnBeforeRunBillingCallLib(Record Customer, Text, Text, Record KVSMEDCallfromSchedFilter) :
Summary: This event is fired in CreateSalesInvoices
[IntegrationEvent(false, false)]
local procedure OnBeforeRunBillingCallLib(var Customer: Record "Customer"; ProcessPeriodFilter: Text; BillSchedCallFilter: Text; var KVSMEDCallfromSchedFilter: Record "KVSMEDCallfromSchedFilter"):
Parameters:
Customer:ProcessPeriodFilter:BillSchedCallFilter:KVSMEDCallfromSchedFilter:
OnBeforeRunBillingCallLib2(Record Customer, Text, Text, Record KVSMEDCallfromSchedFilter) :
Summary: This event is fired in CreateSalesInvoices2
[IntegrationEvent(false, false)]
local procedure OnBeforeRunBillingCallLib2(var Customer: Record "Customer"; ProcessPeriodFilter: Text; BillSchedCallFilter: Text; var KVSMEDCallfromSchedFilter: Record "KVSMEDCallfromSchedFilter"):
Parameters:
Customer:ProcessPeriodFilter:BillSchedCallFilter:KVSMEDCallfromSchedFilter:
OnBeforeCreateSalesInvoices(Text, Text, Text, Record KVSMEDCallfromSchedFilter, Boolean, Integer) :
Summary: Raised before sales invoices are created in . Subscribe to this event to run custom logic or to skip the standard invoice creation by setting to true.
[IntegrationEvent(false, false)]
local procedure OnBeforeCreateSalesInvoices(CustomerFilter: Text; ProcessPeriodFilter: Text; BillSchedCallFilter: Text; KVSMEDCallfromSchedFilter: Record "KVSMEDCallfromSchedFilter"; var IsHandled: Boolean; var TotalCount: Integer):
Parameters:
CustomerFilter: A text filter (table view) restricting which customers are processed.ProcessPeriodFilter: A text filter (table view) restricting which process periods are included.BillSchedCallFilter: A text filter (table view) restricting which billing schedule calls are considered.KVSMEDCallfromSchedFilter: The billing schedule filter record containing posting date, document date, split document settings and further billing parameters.IsHandled: System.Object[]TotalCount: System.Object[]
OnAfterCreateOneSalesInvoiceOnBeforeContinueCustomerLoop(Record Customer, Text, Text, Record KVSMEDCallfromSchedFilter, Integer, Boolean) :
Summary: Raised in after processing one customer's sales invoice and before continuing with the next customer in the loop. Subscribe to this event to run custom logic after each customer iteration or to break the customer loop by setting to true.
[IntegrationEvent(false, false)]
local procedure OnAfterCreateOneSalesInvoiceOnBeforeContinueCustomerLoop(var Customer: Record "Customer"; ProcessPeriodFilter: Text; BillSchedCallFilter: Text; KVSMEDCallfromSchedFilter: Record "KVSMEDCallfromSchedFilter"; TotalCount: Integer; var BreakCustomerLoop: Boolean):
Parameters:
Customer: The customer record that has just been processed.ProcessPeriodFilter: A text filter (table view) restricting which process periods are included.BillSchedCallFilter: A text filter (table view) restricting which billing schedule calls are considered.KVSMEDCallfromSchedFilter: The billing schedule filter record containing posting date, document date, split document settings and further billing parameters.TotalCount: The running total of sales invoices created so far.BreakCustomerLoop: Set to true to exit the customer loop early and stop processing further customers.
OnBeforeModifyCreatedSalesHeader(Record Sales Header, Record KVSMEDBillingScheduleLine, Record KVSMEDCallfromSchedFilter, Record KVSMEDCallFilter, Code[10]) :
Summary: Raised in before the newly created sales header is modified and persisted. Subscribe to this event to adjust the sales header or inspect the billing context before SalesHeader.Modify(true) is executed.
[IntegrationEvent(false, false)]
local procedure OnBeforeModifyCreatedSalesHeader(var SalesHeader: Record "Sales Header"; var TempKVSMEDBillingScheduleLine: Record "KVSMEDBillingScheduleLine" temporary; KVSMEDCallfromSchedFilter: Record "KVSMEDCallfromSchedFilter"; var TempKVSMEDCallFilter: Record "KVSMEDCallFilter" temporary; SalesOrderType: Code[10]):
Parameters:
SalesHeader: The sales header that has been created and initialized and will be modified afterwards.TempKVSMEDBillingScheduleLine: The current temporary billing schedule line that provides the billing context for the sales header.KVSMEDCallfromSchedFilter: The billing schedule filter record containing posting date, document date, split document settings and further billing parameters.TempKVSMEDCallFilter: The temporary call filter record used to group billing schedule lines into the sales header.SalesOrderType: The sales order type assigned to the created sales header.