How to force Accounting Codes to match Customer/Vendor Codes (DATEV requirements) without prefixes?

Hi all,

First post here, so please be gentle :slight_smile: I’m using Dolibarr 23.1 for the German market and I am struggling with the accounting code generation for a proper DATEV export.

I use the Elephant model for Third Parties:

  • Customers**:** {00000+70000} (Range 70000+)

  • Vendors**:** {00000+90000} (Range 90000+) This works perfectly for the code_client and code_fournisseur fields.

For DATEV, the accounting codes (auxiliary accounts) must be identical to the customer/vendor codes. No prefixes, no extra digits.

What I’ve tried:

  1. Aquarium module: It insistently prepends 411 (customers) and 401 (vendors). I cannot find a way to leave the prefix empty in the UI. Also tried to overrule this with empty set (‘‘) from the database, but it seems not to accept this and puts 411/401 back afterwards.

  2. Panicum module: It leaves the field empty, requiring manual entry (which is prone to errors).

  3. Hidden Constants: I added the following in Other Setup, but they don’t seem to trigger:

    • MAIN_COMPANY_CODE_ALWAYS_REQUIRED = 1

    • SOCIETE_SYNAUX_WITH_CLIENTCODE = 1

    • ACCOUNTING_FORCE_AUTO_ACCOUNTANCY_CODE = 1 (Also tried this one).

My Question Is there a “standard” way to force the accounting code to simply copy the Elephant-generated code without prefixes?

I am considering a cron job with a PHP script as a workaround, but I’d prefer a native solution or a specific module.

Any help from fellow German users or DATEV-experts would be much appreciated!

Kind regards,

Hi Robert,

unfortunately I can’t help a lot with the DATEV issues myself.
But there is a German part of the forum:Dolibarr Forum in deutscher Sprache - Dolibarr ERP/CRM Forum Nutzung und Entwicklung

I believe there you can find more information about DATEV.

The constants you are mentioning don’t exist in Dolibarr. An overview about them you can find:

hope this information will help you.
Regards,
Kim