Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

The current page describes (technically) the elements which are part of the process of closing running invoices.

The state of invoice batches is described below, where the number in parenthesis indicates the internal state identifier (statusId for InvoiceBatch).

Process

Drawio
zoom1
simple0
inComment0
custContentId653525991
pageId113410117
lbox1
diagramDisplayNameinvoice_close_process.drawio
contentVer1
revision2
baseUrlhttps://enghouseglobal.atlassian.net/wiki
diagramNameinvoice_close_process.drawio
pCenter0
width1037.5
links
tbstyle
height1146

Process Description

...

 

Object Model

...

State

Who

Description

Pending Close

/wiki/spaces/NWRARSDEPRECATED/pages/113422458
/wiki/spaces/NWRARSDEPRECATED/pages/113422141

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

/wiki/spaces/NWRARSDEPRECATED/pages/113422458

Invoice schedules are closed as long as they end before 'now' (i.e. the execution time).
Invoices are closed but not locked, i.e. it is possible to adjust the balance, if needed (adding minimum invoice usage, fees, etc.).
The actual SQL used to close the invoices are stored in resource file "/com/CDRator/billing/financial/invoiceBatch/closeInvoicesInBatch"

Closed

/wiki/spaces/NWRARSDEPRECATED/pages/113422458

It is possible per billing cycle to define a hookpoint key that will allow calling a hookpoint. If this hookpoint does not exist or does not return FAILURE, any non-closed invoice within a closed invoice schedule is moved to the next invoice schedule. Invoices may not be closed because they fail to fulfill the minimum usage requirements.

Aggregating

/wiki/spaces/NWRARSDEPRECATED/pages/113422458

The actual aggregation of invoice detail lines is handled by an external process, located in the database. Hence this process only checks that all invoices are aggregated before processing continues. This is done by counting the non-aggregated invoices by an 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

/wiki/spaces/NWRARSDEPRECATED/pages/113422458

If there are no invoices in the batch, the batch goes into error.
A hookpoint is called, and a pending record for the exporting process is created.

Ordered

/wiki/spaces/NWRARSDEPRECATED/pages/113422417

A workflow is invoked which processes the export queue and changes the state of the corresponding invoice batch.

Ready for publish

/wiki/spaces/NWRARSDEPRECATED/pages/113422141

The export of invoices does not indicate that they are ready for publishing. This is controlled in the Invoice Close GUI which allows the batch to be marked as 'Published'.

Object Model

Drawio
zoom1
simple0
inComment0
custContentId653460413
pageId113410117
lbox1
diagramDisplayNameinvoice_close_classes.drawio
contentVer1
revision2
baseUrlhttps://enghouseglobal.atlassian.net/wiki
diagramNameinvoice_close_classes.drawio
pCenter0
width1038.5
links
tbstyle
height460.8120002746582