Jump to content

formatting Invoice Numbering


Blesta Addons

Recommended Posts

Blesta support the tag {num} in invoice, it would be nice to add a numbering format like (0001) or (001) .

for example if i set the fallowing {year}{num}, the output will be like this (20191, 20192,...... 2019251 .....ect ), we need to add some zeros leading to get a nice numbering like (20190001, 20190002,...... 20190251 .....ect ) . hope we can be gin the new year invoice numbering with this feature. i simple str_pad() or sprintf() functions can do the trick .

 

 

 

 

Link to comment
Share on other sites

So you want to pad the invoice to have a certain number of characters? For example, a padding value of 8 would cause the number portion of the invoice to contain 8 characters, e.g.

00000001
00000002
...
00001234

Then if you prepend the date year in the front you might have:

201900001234

Is that what you are looking for? This could potentially be a setting under Settings > Company > Billing/Payment > Invoice Customization.. but what happens if your invoice number exceed the padding length? For example you have 99999999 what's the  next number? Does it expand to 9 characters?

Link to comment
Share on other sites

18 hours ago, Paul said:

Is that what you are looking for?

yes.

18 hours ago, Paul said:

but what happens if your invoice number exceed the padding length? For example you have 99999999 what's the  next number? Does it expand to 9 characters?

the answer :

17 hours ago, Tyson said:

It would have to expand to the next digit.

 

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.

Loading...
×
×
  • Create New...