Invoice number / mercure - problem with mask?

Hi,

In invoice module config I have selected mercure

My mask for invoices is FV/{000@0}/{mm}/{yyyy}
I want the counter to reset every month.

however When I create first invoice - for example first invoice in Ferbruary it get (PRO_something)
When I confirm the invoice it get number:
FV/001/02/2023 - that is what I expect.

When I create a next invoice.
When I try to accept it it tries to get the same number FV/001/02/2023

I got error: DB_ERROR_RECORD_ALREADY_EXISTS
Duplicate entry ‘FV/001/02/2023-1’ for key ‘uk_facture_ref’

is my mask correct? What am I missing?

Regards

The example says you need {yy}{mm}, not {mm}{yy}. Not sure if this is critical but you can try this way.

@99 is for resetting every month. Polish translation is totally wrong for this.

Anyway new problem will arise. Dolibarr insists on having exactly “{yy}{mm}” or “{yyyy}{mm}” in mask if you use @X with X > 0 (like our @99).

Dear developers, can this check be relaxed to only look if “{yy}” / “{yyyy}” and “{mm}” exists in mask, without forcing specific order?

In my case I wanted “FV {000@99}/{mm}/{yyyy}” format but such one is not accepted. Is there any reason for that?

“Error, can’t use option @ if sequence {yy}{mm} or {yyyy}{mm} is not in mask.”

(or even better without leading zeros but that’s also not supported)