Completing the Installation

Automatic Importer

Before reading this article make sure you completed the preliminary steps described here.

When you install Billing Extension, it respects your existing configuration for WHMCS and EU VAT Addon (if in use). Moreover the module creates the first Company Profile based on your current details (Company Name, Pay To Text, Country). That being said, we recommend to double-check all settings to make sure that everything has been properly configured.

Customizations

Now that you have successfully installed Billing Extension, take your time to deepen your understanding of its features and options. All settings can be found in Addons > Billing Extension > Settings divided in multiple tabs:
  • Company Profile
  • Tax Rules
  • Late Fees
  • Settings
The content of the first 3 tabs is self-explanatory. In the last one, Settings, you find a huge amount of options that allows you to customize the module to match your specific needs. All options are complete with descriptions and when needed fully documented. If there's something unclear about a particular option, just click on the information icon. You'll be redirected on the relative article of our documentation.

Incorrect Invoice Detection

WHMCS doesn't distinguish between proforma and invoices and doesn't even support credit notes. On the contrary Billing Extension marks every document as Proforma, Invoice or Credit Note. This difference might raise a problem. In fact there's no intelligibile way to detect document type when you install Billing Extension for the first time.

Of course on your system can easily say the difference between a proforma and an invoice by simply looking at invoice numbers. Probably you're using an "F", "I" or "INV" to mark an invoice but the module cannot know what prefix or suffix every company is using therefore it will try to guess this information based on various criteria.

That being said, Billing Extension could incorrectly mistake an invoice for a proforma. It happens especially with Unpaid documents. For this reason when you complete the installation we enable a feature that allows you to manually fix such mistakes. To correct an invoice open Client Details tab from Invoice View. Here you'll find the orange button Snapshot as Invoice that will automatically fix the document type.



This feature can also be used massively from Addons > Billing Extension > Invoices (preview). If you think there are no documents to correct, you can disable it from Addons > Billing Extension > Settings > Utilities > Incorrect Invoice Detection.

Integration Code

Most parts of the integration with WHMCS are handled by Billing Extension automatically. However there few small changes that need to be performed manually by adding some snippets of code in templates/{YOUR_TEMPLATE}/invoicepdf.tpl. Open this file with a text editor and place the following code right after the php opening tag:

# Billing Extension - Integration Code
if(file_exists(ROOTDIR . '/modules/addons/BillingExtension/core/autoload.php'))
{
    require_once(ROOTDIR . '/modules/addons/BillingExtension/core/autoload.php');
    $hook = new BillingExtension\BillingExtension_Admin\Hook;
    $hook = $hook->Integration($tplvars, 'pdf');
    foreach($hook as $k=>$v) $$k = $v;
}


Now look for the following section:

$pdf->Image(ROOTDIR . '/assets/img/' . $logoFilename, 15, 25, 75);

Replace it with this code:

if ($companylogo) {
    $pdf->Image($companylogo, 15, 25, 75); # Billing Extension - Company Logo
}
else {
    $pdf->Image(ROOTDIR . '/assets/img/' . $logoFilename, 15, 25, 75);
}


Lastly copy this snippet right before # Notes section:

# Billing Extension - Footer Text
if ($footertext) {
    $pdf->Ln(5);
    $pdf->SetFont($pdfFont, '', 6);
    $pdf->Cell(170, 5, $footertext, '', '', 'C');
}


Once finished save changes and upload it into your WHMCS. Don't forget to deactivate EU VAT Addon if in use.