Billing Preferences

Invoicing Mode

Billing Extension offers you 2 new and alternative ways to invoice your clients which are named OneInvoice and OnePayment. If you are not interested in using any of these new invoicing mode, you can leave Legacy mode selected that corresponds to the standard mode of WHMCS. Please notice that this setting applies globally to all clients. Soon it will be possible to use all modes simultaneously on different clients or groups of clients. Stay tuned!

Snapshots

In line with tax regulations, clients details and custom field data (for example VAT Numbers) will all be recorded and saved at the time an invoice or a proforma in generated. WHMCS already has a similar feature that serves this purpose but it's not ideal to use. First off WHMCS doesn't store all information and doesn't allow you to edit them. On the contrary Billing Extension stores everything relevant:
  • Clients details
  • Custom fields
  • Current credit balance
  • Tax exempt status
  • VIES details
  • Related documents (eg. refunds, credit notes, overpayments)
  • Your Company Details
We also give you an interface from which administrators can easily edit snapshots and compare them with live values. This interface is integrated directly on every proforma, invoice or credit note and can also be used to manually take a snapshot.
 
Now that you know all the aspects covered by the module, we can describe you the difference between the options On Invoice Creation and On Proforma Creation. The first one takes snapshots when an invoice is issued while the latter as soon as a proforma is generated. Ideally you should use the first option so that a customer can update his personal details if he notices that there's a problem with them. His changes will have effects on all open proformas and there's no need to submit a ticket.

Invoice Suppression

This feature can help reducing the number of invoices, saving your company paperwork, manpower and money. Occasionally WHMCS creates zero balance invoices (No amount). This event occurs also when customers order free services, use 100% discount coupon codes and fully pay invoices with their credit balance. All these invoices most of the countries can be suppressed since there are no payments involved. Before enabling any of these features please consult your own accounting advisor.

Suppression Notification

When an invoice is suppressed, Billing Extension suppresses also the sending of any related email notification. This to avoid any possible confusion with clients that otherwise receive emails referring to invoices that no longer exist.

If you still want to send a notification, the module gives you the possibility to choose from Email Templates. You can even create a custom notification (category must be General). In both cases you can make use of the new variables in templates.

{$suppress_reason} contains the reason why the invoice has been suppressed. At the time of writing, it can assume the following values:

  • FullDiscount when 100% discount is applied on invoice and you choose to suppress it
  • NoAmount when invoice has no amount and you choose to suppress it
  • FullCredit when invoice is fully paid by credit and you choose to suppress it
  • AddFunds when invoice is for adding funds and you choose to suppress it
  • OneInvoice when OneInvoice is in use

The other variable you can use is {$suppress_invoice} that assumes the following values:

  • Skip when depending on your settings the generation of invoice is unnecessary
  • No when the generation of invoice has been delayed to a later stage (e.g. OneInvoice)
Use the provided variables to display custom messages in your emails using simple "if" conditions of Smarty.

Overpayments

It may seem that overpayments are rare to happen but actually they occur pretty much frequently. Sometime clients forget that they have already paid for their services or that they had an automatic subscription with PayPal. When overpayments occur, WHMCS handles them incorrectly.

First it adds the overpayment to the original invoice. That means, for example, that invoices from last year can be "moved" to current year causing invoicing errors (this process repeats on every overpayment).

Secondly it "converts" the overpayment into credit balance which on paper is correct but sadly it doesn't leave any trace and it can also apply tax rates and amounts wrongly. Let's see how this feature of Billing Extension can help you.

Let's assume that there's a proforma of 10 euro. The most common scenario is that initially a customer sends the correct amount and at a later stage a new one arrives causing the overpayment. The first payment pays the proforma in full that is turned into an invoice. The second (including subsequent ones) is added on a new and separate invoice leaving the original invoice unchanged. Below you can see a preview of the newly generated invoice. Notice that inside round brackets there's a reference to the original invoice.



The other possible scenario is that a customer overpays the invoice with the first payment. In this case there's no need to create a new invoice. The module updates the overpaid proforma before it turns into an invoice adding a new line.



It's worth to mention that overpayments can be taxed depending on tax rules. Moreover if you are applying taxes to add funds invoices, Billing Extension also makes sure that the customer receives the correct amount in his credit balance (net of tax).

Tax Displaying

WHMCS shows tax line on invoice only when tax value is greater than zero. In some countries the law requires that tax line is always visible on invoices even when there's no amount. If you are in one of those countries enable this option.

Reference Numbers

For a number of reasons (eg. OneInvoice) Billing Extension temporarily removes specific proformas before they turn into invoices. When that happens we say that the document has been suppressed. The actual invoicing will be issued later on.

Even though this is a perfectly normal process, customers may find confusing that they no longer have any reference of the original proformas. That's where this feature comes to help. When enabled the newly generated invoices will report, line by line, the ID and Number of the original proforma like you can see in the example below.



Reference number is available also on standard invoices and credit notes using the following variables:
  • For viewinvoice.tpl {$reference_proformanum}
  • For invoicepdf.tpl $reference_proformanum
This way customers can see it directly on invoices. In the example below you can see how it looks on PDF (left) and HTML version of invoice (right).



Notice that reference number shows up only on invoices and credit notes since it would be pointless on proformas. It supports multilanguage and can be customized overriding the following language variable.

$_ADDONLANG['hook']['clientsdetails']['invoice']['referencenum'] = '(Proforma #%proformanum)';

We do understand that editing invoicepdf.tpl is difficult since it uses TCPDF syntax therefore let us show you how you can get the following result.



This is the complete snippet to use right after Invoice Header section.

$pdf->SetFont($pdfFont, 'B', 15);
$pdf->SetFillColor(239);
$pdf->Cell(0, 8, $pagetitle, 0, 0, 'L', '1');
$pdf->SetFont($pdfFont, '', 8);
$pdf->Cell(0, 6, $reference_proformanum, 0, 0, 'R', '1');
$pdf->Ln(8);

Reset Invoice Numbers

Let's face it. Many of us frequently forget to reset invoice number at the beginning of financial year. For many consecutive years WHMCS always tried to help us by releasing small scripts and modules that sadly have worked very rarely. Our feature works without any issue. Not only it resets invoice number but also credit note one when in use. That said, our tool requires that your daily cron runs on daily basis exactly at midnight (00:00 o'clock).