Remitur Posted March 17, 2016 Share Posted March 17, 2016 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? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 21, 2016 Share Posted March 21, 2016 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. 0 Quote Link to comment Share on other sites More sharing options...
Remitur Posted March 22, 2016 Author Share Posted March 22, 2016 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. Great trick! Thank you! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.