Join our Discord 😁

Credit Invoice

This addon aims to generate credit note invoices in accordance
with European law and includes many features.

About “Credit Invoice”

During the work to build the foundations of Lyd Hosting, we noticed that WHMCS was facing some legal gaps regarding billing. Indeed, we discovered that the services being reimbursed did not generate new invoices, but only modified the previously issued invoice.

A situation that does not comply with European law which prohibits the modification of previously issued invoices. Forcing contractors and businesses to create a "credit note" in the event that an issued invoice needs to be changed, which is the case when issuing a refund.

Why did you choose to develop an addon ?

We have carried out research to try to find a solution to overcome this problem. This work led us to realize that the WHMCS team had known about the problem for over seven years and that there was no solution. had been made so far.

Complaints about this are many and some solutions exist to try to fill this gap. One of the first possibilities that presented itself to us was to use an addon which allows credit note generation by creating an invoice with negative values.

However, the extension in question has not been updated since 2018, which has made it obsolete with recent versions of WHMCS. And this did not take into account one thing: credit note invoices must include legal notices. For example, they must include the number of the invoice concerned by the credit note.

The last solution was to use a paid extension to fill this gap. However, it was necessary to pay a certain amount of money each month to continue to benefit from a valid license. Hardly possible in our case, we needed to reduce costs as much as possible. Even if programming is necessary.

What motivates you to make it available for public ?

Our primary goal in choosing to develop this addon is to meet this specific need for us and for others. Many people are affected by the problem and they cannot necessarily afford to acquire addons under subscription, or even with a very high purchase price in the case of an unencrypted version.

Our choice is clear: the addon we have developed can be acquired with a single payment. Sixty euros in the case of an encrypted version and one hundred and eighty euros in the case of an unencrypted version. As for updates, everyone will be able to benefit from them as long as Lyd Hosting services continue to be powered by WHMCS.

What will happen if Lyd Hosting closes ?

It is expected that the source code of the project will be made public in the event that this scenario occurs. Everyone will be able to create a fork of our addon to continue to maintain it over time. The only condition will be not to make commercial use of it, all this will be well framed by a free license.

What are the features of your addon ?

Our addon does not just generate a credit note, many things had to be worked on to ensure the most complete integration within WHMCS. And we have also worked on certain practical aspects such as the possibility of sending credit note invoices to an FTP(s) to keep them systematically in a safe place.

Credit note creation form

A "Refund invoice" button is present on the page of each invoice and leads to a simplified form. Although all work can be improved, we have tried to make things easier for you by retrieving and carrying out most of the actions necessary to create an invoice automatically.

In this case, the "Credit" refund method is selected. This means that the user will benefit from a credit on the balance of his customer account. No need for you to credit the account manually, our script takes care of it independently.

If the refund was made on another payment platform, you will have to perform the transaction manually by entering, where possible, the ID of the transaction made. This will provide you with better follow-up in the event of a dispute with the customer concerned.

It is possible to select between a partial or total refund as well as the currency in which the transaction was made. In the case of a full refund, you can choose to cancel the associated services or not. This is not possible in case of partial refund.

Example of generated invoice

Here is an example of a credit note generated for a French customer. Multi-language support is one of the features of our addon, so the invoice is generated in French in this case. This feature can be disabled and the default language can be set in our addon settings.

It is possible (including with the encrypted version) to integrate new languages into our addon. All you have to do is copy one of our files present in the /lang/invoice/ folder and rename it by entering the code ISO 3166-1 Lower case Alpha-2 corresponding to the desired language.

An email is also sent to the customer concerned by the credit note to indicate that his invoice can be downloaded from his personal space. Again, the invoice is automatically added to the customer account. No handling is necessary on your side, which allows you to benefit from significant time savings.

We have not been able to faithfully copy the invoices generated by WHMCS, which means that the credit invoices of our addon look different. However, an "invoicepdf.tpl" is provided with our addon. All you have to do is use it on your theme to keep a certain consistency between the different invoices.

Addon configuration

Most of the features of our addon can be adjusted through its configuration. Make sure during the first installation that you have filled in the form correctly and that you have saved it for the first time. The script may not work properly if the default configuration is left without first saving.

You should also ensure that the appropriate permissions are checked. Otherwise, it will not be possible to access the administration page of the invoices to have within it. Your users can also go to a page allowing them to view their credit note invoices.

In the case of your users, the link to access the page is in the invoices tab on the main navbar and in one of the submenus present on the page listing all the invoices generated by WHMCS. If there is no link in the navbar, it means you need to add it to your theme.

If needed, add "index.php?m=creditinvoice" to your client area URL.

Addon Features

  • Invoice generator to have in full respect of the mandatory legal notices in France and in most European countries.
    • You can show negative values on your invoice by selecting the corresponding checkbox in the addon settings.
    • Some modifications to the code may be necessary depending on your country of activity.
  • Simplified addon configuration via WHMCS "Addons" page.
  • Both full refund and partial refund are supported by the addon.
    • In the case of a total refund, the services concerned by it can be canceled automatically after the creation of the invoice to have.
    • In the event that the refund is made in another currency, it is possible to select it from a drop-down menu on the credit note submission form.
  • Support for the VAT exemption and the possibility of adding a mention about it.
    • In France, it is mandatory to add the words "* TVA non applicable - article 293 B du CGI" on all invoices concerned by the deductible.
  • The VAT is clearly mentioned on the generated invoices. "Level 2" taxes are also indicated..
  • The language of the invoice adapts according to the customer's country of origin.
    • You can create your own language file in the "/lang/" folder: it must respect the international standard ISO 3166-1 using lowercase Alpha-2 code to work.
    • It is possible to disable this feature in the addon settings and choose the default language.
  • The customer concerned by the credit note invoice can find the generated invoice in the customer area.
    • An e-mail is also sent to your customer to inform him when the credit note is created. This can be disabled in the addon configuration.
  • The transactions made on the refunded invoice are modified to indicate the existence of a refund and to indicate the amounts of the outgoing sums.
  • A systematic backup of credit note invoices on an FTP is possible.
    • The option must be activated in the settings. This will allow you to keep your credit note invoices in a safe place to meet your legal obligations.
Payments :
  • Reimbursement on the balance of the customer account concerned by the credit note is automated.

Changelog :

VERSION 1.3.19 | Publish date : 21/04/2024
  • Added: Two additional options have been added in the addon parameters to manage the display of the "Credit Invoices" page in the sidebar or on the dedicated "My Invoices" page in the customer area.
  • Added: An icon can be associated with the redirection to the "Credit Invoices" page in the primary menu and sidebar.
  • Fixed: Invoice creation date and transaction date changed each time a credit note invoice was retrieved.
  • Fixed: Multilingual disabling was not taken into account when an invoice was downloaded from the administration interface.
VERSION 1.3.15 | Publish date : 28/03/2024
  • Fixed: Bug fix present with versions higher than PHP 8.
  • Fixed: Correction of an error when creating a credit invoice with multilanguage disabled.
VERSION 1.3.13 | Publish date : 08/10/2023
  • Added: Addition of a cancellation function for unpaid invoices. (Useful if there is no numerology separation)
  • Fixed: Correction of multiple errors on recent versions of PHP 8.X.
  • Fixed: Correction of an error that prevented the list of products from appearing on credit note invoices for total refunds and/or cancellations.
  • Fixed: An error prevented the VAT rate (or other taxes) from being recorded in the database.
  • Fixed: The description of a transaction modified by Credit Invoice is now much more explicit.
  • Fixed: Transaction fees are now waived for full refunds.
VERSION 1.3.6 | Publish date : 15/03/2023
  • Added: Credit note invoices are now stored in the database. (table created: "ci_invoices") (The table is kept in case of uninstallation. Its deletion must be manual)
  • Added: Customers can now retrieve credit note invoices on a dedicated page. The same goes for administration.
  • Added: Mutlilanguage has been extended and the credit note creation form is available in French and English.
  • Added: It is now possible to choose the status that the invoice concerned by the credit note will have. (Request from a user)
  • Added: The saving of credit note invoices to an FTP server for retention purposes has been reworked.
  • Fixed: Fixed many bugs within the addon. (It is for this reason that sales have been disabled)
  • Fixed: Deep cleaning of the addon's source code to remove elements that have become useless.

N.B. : The page for retrieving credit note invoices in the administration is in the "Addons" tab. If it is not present, make sure you have checked the appropriate permissions in the Credit Invoice configuration.

VERSION 1.2.33 | Publish date : 22/01/2023
  • Added: It is possible to choose the language in which the invoice is kept. (This generates an English invoice for the customer and a French invoice to keep for your company)
  • Fixed: In some cases, dates were in English on invoices generated in French. This should no longer be the case.
  • Other: Temporary deactivation of sending emails to notify the customer of the creation of a credit note. This feature needs to be rewritten.
  • Other: Simplification of the code in the "create.php" file.
VERSION 1.2.30 | Publish date : 17/12/2022
  • Fixed: When an invoice with a custom sequential number was refunded, only its ID was specified. This is no longer the case. (Example: the invoice with the sequential number F2022-2 whose ID 24 will display the sequential number in priority. In case the WHMCS configuration does not use a sequential number, the invoice ID is used)
  • Fixed: A bug that caused some accents to be broken on the generated invoice has been fixed.
VERSION 1.2.28 | Publish date : 13/12/2022
  • Fixed: Fixed a variable error that resulted in invoices not being saved on FTP.
VERSION 1.2.26 | Publish date : 02/11/2022
  • Added: Invoice number can now include day, year and month in addition to invoice number.
  • Fixed: The elements (CSS & JS) added to the header to make the addon front-end work prevented the simplified text editor from working.

Unencrypted version

This version allows you to have full access to the source code of our addon.

60 / one time
Add to Cart