Wiki Markup |
---|
The current page describes (technically) the elements which are part of the process of closing _running_ invoices. *[Customers:Invoice Batch Engine]* controls the closing of invoices and making invoices ready for being exporting to third party, PDF generation etc. *Invoice Export Engine* process requests for exporting invoices, and also have the responsibility of making invoices ready for being published. *Invoice Close GUI* is responsible for marking invoices as being published. The state of invoice batches are described below. {gliffy:name=invoice_close_process|version=17} h4. Process description {table-plus:heading=01|border=0|multiple=false|enableSorting=false|enableHeadingAttributes=false} ||State||Who||Description|| |Pending Close|Invoice Batch Engine [Invoice Close/Invoice Management Tab|Invoice Management] GUI |If a batch is requested to be closed immediately the state change is done immediately, otherwise the process is handled by the Invoice Batch Engine | |Closing|Invoice Batch Engine|Invoices schedules are closed as long as they end before 'now' (i.e. the execution time). Invoices are closed but not locked, meaning it is possible to adjust the balance, if needed (adding minimum invoice usage, fees, etc.).| |Closed|Invoice Batch Engine|Per billing cycle it is possible to define a hookpoint key that will allow a hookpoint to be called. If this hookpoint does not exist or does not return FAILURE, any not unclosedclosed invoices within a closed invoice schedule is moved to the next invoice schedule.| {table-plus} Notes: * It can happen that not all invoices on the invoice schedule are closed. The reason is usually that they did not fulfill the minimum usage requirement. Those invoices are then moved to the next schedule. * A workflow with hookpoint INVOICE_EXPORT_QUEUE has to be implemented that moves the invoice batches from status "in order queue" to "ready for publish" when the invoice export queue is exported and set to status completed. When no export of invoices is needed, this workflow is still needed but then only should change the status of the invoice export queue and of the invoice batch. A component is that only does this, is already present in core: INVOICE.EXPORT.QUEUE.NO.EXPORT (class com.CDRator.billing.workflow2.components.WfCInvoiceExportQueueNoExport). Invoices may not be closed due to minimum invoice usage requirements not being fulfilled.| |Aggregating|Invoice Batch Engine|The actual aggregation of invoice detail lines are handled by an external process, located in the database. Hence this process only checks if all invoices are aggregated before processing continues. This is done by counting the non-aggregated invoices by SQL located in the resource file "{{/com/CDRator/billing/financial/invoiceBatch/countUnaggregatedInvoices}}". When all invoices are aggregated, the invoices are locked so that no invoice detail lines may be created for the invoices.| |Ready for sending|If there are no invoices in the batch, the batch goes into error. A hookpoint is called as well as a pending record for the exporting process is created.| |Ordered|Invoice Export Engine|A workflow is invoked which have the responsibility of processing the export queue, as well as change the state of the corresponding invoice batch.| |Ready for publish|If invoices are exported they might not be ready for being published. This is controlled within the Invoice Close GUI which allows the batch to be marked as 'Published'.| {table-plus} Notes: * The transition from pending to closed over closing is done: ** immediately by selecting "Close now" when closing an invoice schedule ([Invoice Close/Invoice Management Tab|Invoice Management]), or ** by the Invoice Batch Engine when "Schedule close for" is selected at the close of an invoice schedule. * In step Aggregating(4), all invoices in the batch that is not aggregated, is counted. This is done by SQL, located in the resource file {{/com/CDRator/billing/financial/invoiceBatch/countUnaggregatedInvoices}}. h4. Object model {gliffy:name=invoice_close_classes|align=left|size=L|version=7} Billing cycles, invoice schedules and invoice batch are maintained in the [Invoice Close/Invoice Management Tab|Invoice Management]. |
Page Comparison
General
Content
Integrations