Hi everyone,
My customer made me aware of the fact that the structured message for Belgian banktransfers wasn’t working correctly. Normally this should look like this: +++123/1234/12345+++
However, on my invoices, the message is +++123/1234/1234+++
The structured message is created with the modulo 97 calculation:
The first 10 digits are usually compiled from customer ID and invoice ID.
Example:
Invoice 325 for customer 1459 will be +++000/1459/325XY+++
XY is the checksum calculated from the other digits.
- Devide the first 10 digits by 97 (0001459325:97=15044,5876)
- Multiply the decimal digits by 97 (0,5876x97=56,99)
- make the result a round number (56,99 =~ 57)
- 57 is the checksum, so the message is +++000/1459/32557+++
Be Careful!
When the result hasn’t got a decimal value, the checksum always equals 97
Example of how it looks on my invoices:
Invoice number: FAC25-0001
Customer ID: CU2503-12033
I don’t know why Dolibarr selected these digits:
+++200/0250/0013+++ (should be +++200/0250/00103+++)
What it should look like:
using the correct interpretation of my ID’s;
Invoice number: FAC25-0001
Customer ID: CU2503-12033
+++012/0330/001XX+++
- 120330001:97=1240515,4742
- 0,4742x97=45,9974
- Result: +++012/0330/00146+++