Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
The current page describes (technically) the elements which are part of the process of closing *running* invoices.

{gliffy:name=invoice_close_process|version=1516}

Class diagram:
{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].

Invoice batch state machine diagram:

!invoice_batch.png|border=1,align=none,width=1000pxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpxpx!



Notes:
* The diagram above describes the process for *running* invoices (invoice_type_id = 0).
* The [Customers:Invoice Batch Engine] (class com.CDRator.billing.engine.InvoiceBatchEngine) takes care of most of the transitions described above.
* The *Invoice Export Engine* (class com.CDRator.billing.engine.InvoiceExportEngine) should be set up too.
* 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).
* 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}}.