Jump to content

Formatted Custom Invoice Number Format


Remitur

Recommended Posts

I can setup sequential invoice number format so, for example, specifyng following format rule:

 

{YEAR}.{NUMBER}

 

the invoice n. 17 will be 2016.17 , invoice n. 194 will be 2016.194 , invoice n. 3689 will be 2016.3689

 

That's right.

 

But if I want the number formatted in a fixed number of characters, with leading zeroes?

 

So previous examples would be:

 

2016.00000017

2016.00000194

2016.00003689

 

Does exist any way to do so?

Link to comment
Share on other sites

There is no way to achieve this result in WHMCS, unfortunately.

there's no way to do it from the settings, but unless i'm missing something, I would have thought you could easily tweak the output in the client area, email and invoice templates to show the requested output ? :?:

 

e.g, if the invoice number was '2016.3689', you can certainly use Smarty in the templates to split that back into {year} and {number}, then format the number to x leading zeros and either display both variables together, or create a new variable using {year} and the formatted {number}... then do something similar in php for the invoicepdf.tpl template.

 

as far as the client is concerned, they'll see '2016.00003689' in the client area, emails and invoices - but internally to WHMCS, and in the admin area, it will still be '2016.3689'.

 

so there's no quick and simple way to do it, but if you really want to add leading zeros to your invoice numbers, it could probably be achieved by editing a few templates and tweaking the output. :idea:

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.

Guest
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