Different invoice number for different markets in EU ecommerce

Hello.

I was reading and didnt find possible solution to our situation and need.

In Bulgaria numbering of the invoices is 10 digit format like 0000000001 etc… which is ok and can be done in dolibarr.

But:

Also the numbering of this new document INVOICE must have separate numbering for each country from which the customer is. This is to be linked with clients country and predefined.

For example for invoices sold locally (in Bulgaria) numbering is like 0000000001 (we will resume from the last number we reached at the moment of start using it).

For invoices to clients in Country 1 (Romania) invoices should start with 1, like 1000000001….

For invoice to clients in Country 2 (Greece) invoices should start with 2, like 2000000001…

For invoices to clients in country 3 (Cypress) invoices should start with 3, like 3000000001

Etc when adding new country.

This is not for all coutnries in EU, but only for those in which we sell via own eshop and B2C. This is apply the EU one stop shop VAT rules for ecommerce.

Any insights how it can be done?

I found the solution with a third party change, but maybe this will enter in conflict (because we need to specify the third party type) with the variable MAIN_SERVICES_ARE_ECOMMERCE_200238EC

and

MAIN_USE_VAT_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID_ARE_INDIVIDUAL