avatar aleksdj Nov 29. 2009. 3:46 pm
Hello, I'm figuring out how to reset Invoice counter to 0. I tried deleting all rows of "acx_invoices" and "acx_invoice_items" tables, but unexpectedly the counter still is 3 so the Invoice number that appears in PDF is 3. As I was doing some invoice test I must turn back invoice counter to 0 to fulfill with legality.

Thanks in advance,
Alex F
avatar Blaise Laflamme Pro Nov 29. 2009. 4:23 pm
Not already an AC owner but according to your statement the problem seems to be related to the AUTO_INCREMENT column. You probably need to reset it to what you want executing an SQL statement like this:

ALTER TABLE acx_invoices AUTO_INCREMENT=0;
ALTER TABLE acx_invoice_items AUTO_INCREMENT=0;

But having no access to the table structure I can't be sure AC uses AUTO_INCREMENT but it looks like.
avatar Ilija Studen Staff Nov 29. 2009. 4:48 pm
activeCollab does use auto-increment column for invoice ID-s, but these ID-s are not used for invoice number. Instead, all counters are cached in invoicing_number_date_counters configuration option (check acx_config_options table).

If you wish to reset all the counters, set the value of this column to "N;" (without quotes) and clear all cch_ files from /cache folder.
avatar jared.verdi Pro Sep 1. 2010. 2:35 pm
How would I change this field so that the invoice number starts at a different point? I would like my invoices to begin at 1000...
avatar Ilija Studen Staff Sep 1. 2010. 4:46 pm
Hello Jared,

The answer is in comment #3 - check invoice number related configuration options in acx_config_options table. Note that you should clear cache (remove all cch_ files from /cache folder) if you make the changes to the raw data stored in that database table.