How does invoicing work in PortaBilling?

Link copied to clipboard

PortaBilling provides a ready-to-use invoice function. You can design how your invoices will look. Internal invoices are created automatically based on calls the customer has made. To generate and store invoices as .pdf files, the administrator must enable this functionality. The invoices can be automatically emailed to the customer (if this option is enabled and the customer has an email address set up in his properties). The invoices can be viewed online or printed via the administrator and customer self-care web interfaces.

Who is invoiced?

Link copied to clipboard

Only customers (both resellers and retail customers) are invoiced, since only they have all the information required for invoicing, such as address, taxpayer ID, and so forth. Individual accounts are not invoiced.

How often?

Link copied to clipboard

Each customer has his own billing period, which could be:

  • Daily
  • Weekly
  • Semimonthly
  • Monthly (anniversary or on the first day of every month)
  • 30 calendar days.

When the current billing period is over (for example, on the first day of the month) a summary of all the calls made by the customer is calculated. Customer call statistics are generated and stored on the server (optionally, they can also be mailed to the customer automatically) and an invoice is created.

Note that the billing period is based on the customer’s time zone. For example, if the customer has a weekly billing period and his time zone is Australia/Melbourne, his statistics would cover the period from 24-Mar-2009 00:00 Melbourne time (23-Mar-2009 14:00 GMT) until 31-Mar-2009 00:00 Melbourne time (30-Mar-2009 14:00 GMT). For another customer, who also has a weekly billing period but is in the New York time zone, this billing period will cover calls made from 24-Mar-2009 00:00 New York time (24-Mar-2009 05:00 GMT) to 31-Mar-2009 00:00 New York time (30-Mar-2009 14:00 GMT).

When are PortaBilling invoices generated?

Link copied to clipboard

Statistics are generated with a sufficient delay to make sure that the billing period for a particular customer (according to that customer’s time zone) has ended. Also, statistics calculation takes place only at a certain time of day (usually during night hours, when there is the least amount of activity in the system). Weekly invoices cover Monday through Sunday. Assuming that your system does statistical calculation from 2am until 8am Central European Time every day, then statistics for those customers whose time zone is in Asia or Europe should be available each Monday morning. For customers with a time zone in the US, the billing period will not have ended yet when statistics are calculated on Monday morning; thus they are created on Monday night and made available Tuesday morning.

It might occur that in the middle of a billing period, a customer wants to pay for services consumed and does not want to wait until the end to receive an invoice. For such customers, administrators may generate a midterm invoice. For example, a customer with a monthly billing period wishes to pay for services consumed up to the 13th of May. On the 14th of May, the administrator generates a midterm invoice for this customer, which covers the period from the 1st of May until the 13th of May. The midterm invoice is generated within the hour.

Sometimes invoices for extra services such as a technician visit or an equipment purchase need to be provided at the time when such service is rendered so the customer can immediately proceed with payment. The administrator can generate an out-of-turn invoice (to cover only a few specific items) on demand. The out-of-turn invoice is generated immediately.

More detailed information about midterm and out-of-term invoices can be found in the PortaBilling Administrator Guide.

Invoice total

There are two methods available for calculating the invoice total:

All charges during the period

This is the simpler method – the invoice contains all of the call charges for the specified period, with the invoice total equaling the sum of these charges. Balance adjustments, refunds, and payments made by a customer via the online payment system are not included, since these refer to transactions that have already been made and will not occur again. So, for example, if during August a customer makes calls for $120 and pays $100 for his services in July on August 10, his invoice will show $120. Of course, the customer’s payment will be recorded in the system and will affect his balance.

Including the previous balance

The invoice total will be calculated as:

  • Previous invoice total
  • + Sum of all charges during the period (call-related or manual charges)
  • – Sum of all payments or refunds made during the period.

So, taking our previous example: if the customer’s invoice for July was $110, and he paid $100 and made calls for $120 during August, his total on the August invoice will be $110 + $120 – $100 = $130

Invoicing modes are controlled by the New_Style_Invoice_Calculation configuration option.

Basis of invoices

Link copied to clipboard

For a reseller, the call charges on the invoice are based on the sum total of all his xDRs in a given period.

For a retail customer, the call charges on the invoice are the sum total of all xDRs (call charges and maintenance fees) for this customer’s credit accounts. Debit accounts are prepaid, and so since they have been already paid in full there is no need to invoice these calls.

On this page