[New Feature?] Reset invoice number with the new year

Hello,

are there any way to reset the invoice number with the change of year?

Just like this:

Invoice Number Invoice Date

0123		12-15-2015
0124		12-18-2015
0125		12-22-2015</code>
<strong><code>0001		01-04-2016</code></strong>



I think that the principal problem will come with the "invoices_account_id_invoice_number_unique" index. And may be, the best way to solve is adding the "invoice_date" field to this index

You should be able to do this manually by setting the counter back to 1 on /settings/invoice_settings

We’ll look into adding this as a setting in a future release.

Yes, I thought about doing it that way, but does not work well. When I set the counter to 1, the system searches the last counter for the account and puts that plus one.

I think the search for the last counter should be for the account per year, but need to see how and where to do it.

Are you using a prefix or a pattern. From reviewing the code I believe if you use a pattern the system won’t automatically increment the counter. For example: {$year}-{$counter}

I have to revise it, but I swear I tried using prefix