Invoice Number Already Been Taken After Delete

I created an invoice and manually added an invoice number (to match my previous system).

I then deleted the invoice, but cannot create a new invoice with the same invoice number.

I may have accidentally pressed ‘mark as sent’ on the deleted invoice (can’t remember).

Is there a way I can use that invoice number again?

You’d need to restore the invoice, change the invoice number to a value you won’t use and then delete it.

We don’t permanently delete data in order to ensure referential integrity, we don’t allow duplicating deleted invoice numbers as it could cause a problem if the deleted invoice is later restored.

Is there a way to permanently delete all my invoices? Deleting them does not remove the DB entry so I can’t re-import again.

You can purge your data on Settings > Account Mgmt

How about a sql command to just delete the invoice table? I have my clients in and I had to do a bit of manual entry.

Dropping the Invoices table would likely do “Very Bad Things” to the overall system. There’s a lot of functionality that relies on the table to exist, even if empty.

Maybe you can export your clients to CSV, purge your data and then reimport the clients?