Invoice/Quote number patern +1 now always working

Many times I need to adjust Settings/Invoice Settings/Counter to +1 as I got doubled Quote/Invoice numbers. I don’t actually know what causes it. Maybe leaving the invoice without saving, cloning, converting Quote to Invoice. Don’t know, but it happens. It’s a bit annoying having to check if correct number every time.

Anyone else?

Thank you
Br,
Dali

If you can provide steps to replicate the problem it’d help us fix it.

I will do my best to catch it. Topic is wrong now = not.

Hi.

It just happened again.

I have converted a quote to invoice and I got number 401. After it, I created new client and Invoice and again I got 401.

I don’t wan’t to play with live database too much as Invoices can not be deleted unless deleting the database entry. I hope it’s enough for you to locate the problem.

Thank you
Br,
Dali

Have you manually deleted records from the database?

Please don’t do that, it will most likely cause all sorts of problems. It’s very possible it explains why you’re seeing the problem with the counter.

Thank you for reply Hilel.

No, I’m not deleting records manually. That’s why I don’t want to create dummy invoices to track the issue. I would assume if I set the Invoice Number Counter once, then is should always add +1 to the next invoices.

Br,
Dali

This may be related to your invoice/quote number settings. If ‘Share invoice number counter’ is enabled on /settings/invoice_settings#quote_number the quote would take the next number.

You may want to try either disabling this setting or setting a quote or invoice prefix to prevent invoice numbers from conflicting.

Hi Hillel.

I have Share invoice counter disabled. I don’t want the Invoice and Quotes numbers sharing.

Thank you
Br,
Dali

In that case try setting a prefix for both invoices and quotes to see if it helps.

Hi Hillel.

With prefix I loose pattern features that I need. {$year}-{$counter} Invoice

Br,
Dali

Any chance you’re using the same pattern for invoices and quotes?

I use this patterns.

{$year}-{$counter} Quote

{$year}-{$counter} Invoice

That looks good, I’m not sure… If you can provide me with steps to replicate the problem in an empty account it’d be very helpful. Until we can replicate the problem it will be very hard to fix.

What I did you can already see above

I have converted a quote to invoice and I got number 2016-0401 Invoice After it, I created new client and Invoice and again I got 2016-0401 Invoice.

I hope this helps any.

Thank you

Br,
Dali

What version are you using?

2.8.0 now.

the problem was there on previous versions as well.

Br,
Dali

Can you check that the invoice and quote number settings on /settings/invoice_settings show the correct next numbers in the preview, maybe you need to adjust the counter?

Sure. Every time this happens I need to go there and correct it.

Br,
Dali

Can you make sure it’s set to the next invoice number, if you’re last invoice was 0001 the counter should be set to 2.

I got it.

I manually change the Invoice line to get correct filename on downloaded PDF.

Example
2016-0134 Invoice
to
2016-0134 Invoice BMW - TV Commercial

I add BMW - TV Commercial

That is what prevents the system to count +1