Prevent using same sequence on earlier customer invoice: which date to use?

No it doesn’t as we have posted invoices with accounting date greater than 1 January.

Retrieving the origin of this thread … the accounting date of invoice taxes must be the moment the goods are delivered (this is called “momento del devengo” o “devengo del impuesto”). But invoice can be issued until 15th of next month.
This is described in section " Cómo se devenga el IVA según el artículo 75 de LIVA" of this article.

So if we limit the invoice sequence by accounting date, users cannot post an invoice with invoice_date 10Feb (assume this is today) and accounting_date 20Jan because they have post another invoices with accounting date greater than 20Jan.

I understand the usual thing in B2C is invoice_date=accounting_date but in certain B2B sectors this is not the case.