altexpro Posted February 20, 2018 Share Posted February 20, 2018 Hello guys! was hoping someone here to help me out... I setup WHMCS and configured the invoice numbers to be in the following format XXX-1, XXX-2, XXX-3 and so on. The first Client order went through fine and invoice with ref XXX-1 was generated. I was then moving some existing Clients over from another server and in one of their accounts clicked on "create invoice" which generated a draft. I then cancelled and deleted that draft However the invoice numbering sequence got messed up. Now every invoice I generate starts with just a number like 3, 4, 5. I tried specifying the next invoice number in general settings by stating XXX-3 but it wont work. Now every invoice generated continues just with a single number increment without the XXX and I must manually go in and adjust. Is there a way to fix this? Big thanks in advance for your assistance Link to comment Share on other sites More sharing options...
twhiting9275 Posted February 21, 2018 Share Posted February 21, 2018 Make sure you're not confusing invoice numbers and invoice ID's. ID's can't be changed, but numbers can. When you generate the invoice, you'll be taken to the ID, which will automatically increment. Can't change that. Additionally, you can't specify an auto increment number which is less than the last number generated. So, in your case, you're stuck with 3. Can't re-use 2, it's already used. You can (kind of) tweak the autoincrement number in the database, but that's going to take a bit of 'hacking' as it were, and not really appropriate here Link to comment Share on other sites More sharing options...
sentq Posted February 21, 2018 Share Posted February 21, 2018 12 hours ago, altexpro said: Hello guys! was hoping someone here to help me out... I setup WHMCS and configured the invoice numbers to be in the following format XXX-1, XXX-2, XXX-3 and so on. The first Client order went through fine and invoice with ref XXX-1 was generated. I was then moving some existing Clients over from another server and in one of their accounts clicked on "create invoice" which generated a draft. I then cancelled and deleted that draft However the invoice numbering sequence got messed up. Now every invoice I generate starts with just a number like 3, 4, 5. I tried specifying the next invoice number in general settings by stating XXX-3 but it wont work. Now every invoice generated continues just with a single number increment without the XXX and I must manually go in and adjust. Is there a way to fix this? Big thanks in advance for your assistance wasn't able to reproduce the issue in WHMCS v7.4.1, in what version you experience the issue? you need to specify the "Next Paid Invoice Number" as integer, and be careful as it may generate multiple invoices with the same number Link to comment Share on other sites More sharing options...
altexpro Posted February 21, 2018 Author Share Posted February 21, 2018 Hi Guys, Thanks for your replies. Twhiting9275: I am not sure I quite understand what you mean. See below snapshot of issued invoices: WHM-1 was generated automatically and was the first invoice. WHM-2 and 3 i had to adjust manually in invoice options. 4 and 6 are the invoice numbers that were attached by the system to subsequently issued invoices of WHM-4 and WHM-6. Below also a screenshot of my current invoice settings. It says the next invoice number is going to be #7 but why doesn't it attached "WHM" to it automatically? It seems that manual created invoice screwed up the whole thing...but then again isn't the system supposed to generate all invoice manual or auto under the same invoice number format? Link to comment Share on other sites More sharing options...
altexpro Posted February 21, 2018 Author Share Posted February 21, 2018 I have also turned off sequential paid invoice number so as to keep the same invoice number as unpaid...read this on another post here Link to comment Share on other sites More sharing options...
altexpro Posted February 21, 2018 Author Share Posted February 21, 2018 waaaait....maybe I have misunderstood this...are all unpaid invoices generated with a digit i.e. #1 and incremented by 1 each time and then assigned the formatting that i define as WHM-1 only once it is paid? Link to comment Share on other sites More sharing options...
sentq Posted February 22, 2018 Share Posted February 22, 2018 17 hours ago, altexpro said: waaaait....maybe I have misunderstood this...are all unpaid invoices generated with a digit i.e. #1 and incremented by 1 each time and then assigned the formatting that i define as WHM-1 only once it is paid? exactly Link to comment Share on other sites More sharing options...
brian! Posted February 22, 2018 Share Posted February 22, 2018 21 hours ago, altexpro said: waaaait....maybe I have misunderstood this...are all unpaid invoices generated with a digit i.e. #1 and incremented by 1 each time and then assigned the formatting that i define as WHM-1 only once it is paid? you can use a hook to change the invoice number used and it will be the same whether unpaid or not. Link to comment Share on other sites More sharing options...
Recommended Posts