In the main.lang, I have set the SeparatorThousand=’ (=Aphostrophe).
Dolibarr convert it to the Ampersand character. This looks very ugly on my invoices and creates prices like 1&234.56 instead of 1’234.56
Is there any possibility to enquote this ’ sign?
Other special characters, like the similar ` (Grave accent) sign, would work, but are not a real solution.
How can I use the familiar Apostrophe as separator for numbers bigger then 999?
Unfortunately, none of this suggestions works.
You can easily check it:
a) Change this line in your main.lang to
SeparatorThousand='
b) Call
http://IP-of-your-Server/dolibarr/admin/system/dolibarr.php?mainmenu=home&leftmenu=admintools_info
I don’t know any other software that has a problem with an apostroph. EVERY sign should be possible using some similar command to the php htmlspecialchars internally
What I found so far:
I can calculate my single products correctly if I use the mentioned ` (Grave accent) sign as SeparatorThousand.
If I change the SeparatorThousand to the desired ’ (Apostrophe) and then patch the function price in the function.lib.php with something like this around line 2972
if ($thousand === " & # 0 3 9 ; ") $output=number_format($amount, $nbdecimal, $dec, "'");I get the numbers correctly, even in a new calculated PDF invoice.
BUT
As soon as I recalculate a single product, the calculation goes wrong…
There must be an error with this special character ’ (Apostrophe, ASCII 39). The function price seems to get a html encoded entity & # 0 3 9 ; instead of the single character ’