Invoice counter not reset after new year

My invoice number pattern is {$counter}/Z1/1
I need the counter to be reset back to 1 after new years so I set the Reset Counter to Annually.
When I was creating a new invoice this year, the invoice number didn’t reset and it continued to increment into this year.

After manually setting it to 1 it still created a new invoice with the last incremented counter, although the counter value in the setting was correct (value was 2).

When I tried to manually change the invoice number from X/Z1/1 to 1/Z1/1 it complained that 422: The given data was invalid. The number has already been taken. Which is true, the invoice with number 1/Z1/1 does exist but not in this year.

What are my options?


One option would be to include the year in the invoice number pattern, this would ensure the values are always unique.

Unfortunately in my country invoice number can’t contain a year. It must contain 3 parts:

  1. sequential number that resets every calendar year
  2. designation of business premises
  3. billing device number

So I guess I have to use custom fields. I’m already using 3 custom fields and this would be the forth one. Is it in the works to have unlimited number of custom field and not limited to just 4?

We don’t have immediate plans to increase the number of custom fields but it’s possible in the future.