During the billing process of a customer, 2 types of object are generated :
Receipt or/and Invoice

Those objects are very important for the invoice module. It can be confusing as those 2 objects are very similar, see details below :


What's a RECEIPT?

A receipt summarize what the customer had already paid since the last billing process (eg. Sum of calls or charges )


What's an INVOICE ?

An invoice summarize what the customer didn't pay yet since the last billing process (eg. negative balance, charge)


Why do we have those 2 objects ?

First of all, it s important to keep the "balance" in the money situation report.

The main rule to keep in mind is :  Sum of payments = sum of invoices.

By respecting this rule, it s more easy for the admin to see, if the customers paid all his due.

In the past, the money situation of the A2billing system was false, mainly because it was calculate as an equality between the payments and refills. This was working only if the VAT was equal zero. So we decided change it in order to provide a better reporting for postpaid and prepaid.

Receipt is just a complementary of information for the customer. The customer doesn't have to paid the receipts, as it has already ve been done. For instance, when a DID billing or recurring service is performed, credit from the customer's balance will be deduced and a receipt will be created to keep a trace, not an invoice cause no payment is related to it.


How works the Billing Process.

When the billing process ran (daily) through cront batch, the application will check for each customer the invoice day. If the invoice day correspond to the current date the following process will be applied :

  • 1. It search the last date of billing
  • 2. It creates an receipt for all charges already paid since the last billing
  • 3. it creates a receipt for the calls since the last billings.
  • 4. if the customer is postpaid and his balance is negative then the application will create an invoice to equalize his balance to zero.
  • 5. It creates an invoice for all charges created and not invoiced since the last billing (it's possible that a charge is not paid but invoiced by an other process)