Jump to content

Help for changing WHMCS invoice enumeration


Recommended Posts

Hello, we are looking for a way to reset the invoice number since we created a new company and the invoices should contain the new company information but since there is a change in the bulgarian law for invoices our first invoice has to start with number: 0000000001 (9 zeros and 1).
I contacted WHMCS about this and here's their reply:  



Thanks for getting in touch with WHMCS.

To reset and deliver invoices to clients that start from "1", you should leverage the Custom Invoice Numbering Format feature: https://docs.whmcs.com/Tax_Configuration#Custom_Invoice_Numbering_Format

You can set the "Next Invoice Number" value to "1". It is possible to set a custom invoice number format. However, that would not allow you to automatically set a prefix of variable length based on the invoice number (so adding 9 zeros for invoices 1-9, then 8 zeros from invoice 10-99, etc.).

You could potentially use the InvoiceCreation hook point to execute custom code to add a new custom invoice number (with leading zeros) via the UpdateInvoice API command:

I trust that gives you a good starting point for your customisations/development. For further assistance customising WHMCS I’d recommend posting on our Developer Corner community where our friendly and knowledgeable community will I’m sure be pleased to assist in this matter: https://whmcs.community/community/41-developer-corner/ .

Regrettably we are unable to assist with customisations/development here as part of product technical support.

Has anyone developed this or created something similar ? Can you guys help ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated