Alfonso Posted April 8, 2019 Share Posted April 8, 2019 Hello to all, this is my first post. I have a problem with invoices number, after some tests they are generated any invoices with sequential number, to be precise 20 invoices. Now, after tests, i need to start with hosting and i must start with invoice number 1, not 21. When i try to change "Invoice Starting #" to "1" in "Setup > General Settings > Invoices tab" it give me this error: "The next invoice number must be greater than the highest existing invoice number" but i deleted all test invoices, now there aren't invoices in WHMCS. How can i solve the problem? Thank you. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 9, 2019 Share Posted April 9, 2019 23 hours ago, Alfonso said: Now, after tests, i need to start with hosting and i must start with invoice number 1, not 21. When i try to change "Invoice Starting #" to "1" in "Setup > General Settings > Invoices tab" it give me this error: "The next invoice number must be greater than the highest existing invoice number" but i deleted all test invoices, now there aren't invoices in WHMCS. but there will be references to those invoices in other database tables, and if you start trying to reuse them by resetting to 1, you're going to get errors down the road. On 08/04/2019 at 10:44, Alfonso said: How can i solve the problem? https://docs.whmcs.com/Maintenance Quote After you successfully install your billing system you should run through a series of tests. This includes creating client accounts and placing test orders with your particular setup. Often, once you have finished your testing you will no longer want any of these clients or orders in your system. All you need to do is reset your system and all your test accounts will be removed. You can empty all the tables that contain clients data by running the following SQL code on your database. Note: Resetting your database only deletes client accounts and information. You will not lose any configuration or product settings you have setup. 0 Quote Link to comment Share on other sites More sharing options...
Alfonso Posted April 9, 2019 Author Share Posted April 9, 2019 Hello Brian, thank you for response. I would like to delete only the generated invoices tables, not tables with clients informations. Can i delete only these? : TRUNCATE `mod_invoicedata` ; TRUNCATE `tblinvoiceitems` ; TRUNCATE `tblinvoices` ; Is it correct? Thank you. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 10, 2019 Share Posted April 10, 2019 On 09/04/2019 at 11:46, Alfonso said: Is it correct? tblaccounts would be another one, but I really wouldn't advise a partial deletion like this - it only needs one relevant table to be missed and errors can still occur. for example, if tblhosting isn't wiped (either via above or manually), and you have active recurring products in there with automated invoicing activated, then sooner or later, it will generate new invoices - same goes for domains too. possibly you could exclude tblclients from that truncate list (as that stores the client information), but wipe the rest of the listed tables... that should preserve the client contact details, but wipe everything else - so the clients would have no invoices/orders/hosting/domains etc assigned to them. 0 Quote Link to comment Share on other sites More sharing options...
Alfonso Posted April 16, 2019 Author Share Posted April 16, 2019 Hi brian, ok i understand, the fact is that i have now 3 active users, and i can't delete all user informations. I thought one thing: In "payments-tax configurations-tax settings and general settings, if i set "Auto Reset Numbering" to "monthly", invoices generated from 1 May will have number 1, right? And then i can set again the option on "annually". Can this help me to solve? Another thing, once the invoices will start from 1, i need this situation, every invoice must have format "A{NUMBER}" and only paid invoices must be sequentials, for example: if are generated invoices A1, A2, A2 but is paid only A2, A2 will be A1, because is the first invoice paid. I attach screen of my configuration, is ok to work in the exposed mode? Thank you 0 Quote Link to comment Share on other sites More sharing options...
Alfonso Posted April 29, 2019 Author Share Posted April 29, 2019 Hello, can anyone help me? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted April 30, 2019 Share Posted April 30, 2019 I could be wrong since I don't know how your system has been configured but if you are talking about Invoice Number why don't you just update the this number from database? UPDATE tblconfiguration SET value = '123' WHERE setting = 'SequentialInvoiceNumberValue' LIMIT 1 Replace 123 with your number. 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.