Odt template invoice - wrong number formats

Hello, new to doli I’m struggeling with odt template invoices.
After some success, now I have these problems:

  • I defined invoice numbers as RE {yy}-{0000} - but always get just the figure - “4” (instead of "RE 20-0004
  • my invoice sums show up without decimal digits - “20” instead of “20,00”
  • decimal separator is . instead of , - as it’s in the German localisation

This looks like a problem which may be interconnected… -

Thanks lot in advance,
Wolf

HI,

Normally, to solve point 2 & 3, you need to use the tag xxx_local, instead of the normal one.
For exemple the total invoice, instead of using

{object_total_ttc}

use

{object_total_ttc_locale}

Yesss, this works. Great!
But some explanation in the wiki page… - just to have mention it and to be a little more verbose.

Cheers,
Wolf

Hello

The locale {object_total_ttc_locale} tag works, but if over 999,99 the number printed is in the format N(space)NNN,NN, so as an example, the number is printed as 1 000,00 instead of 1000,00

This is not a problem until one need that number as simple text, but if one want to have that number printed in a table cell to be used for further calculations in the ODT template that becomes a odd problem.

In writer in both libreoffice or openoffice the amount of oprations that can be done in a cell ina table are limite, I could not find a way to automatically tell libreoffice to read that cell and removethe space between the number digits.

Best solution for this problem is to have dolibarr output the number without spaces in it, so 1945,50 and not 1(space)945,50

I searched for a switch or other configuration option to change this behaviour, but so far I could not find it.

Is there a way to tell to Dolibarr to print numbers without paces in ODT templates?

Of course I could dig and find where to change something to have printed without spaces, but each time that I update dolibarr then I should go to modify that file(s) all over again, that is not a good idea.

Thank you
Best regards

Hi,

if you want only digital use {object_total_ttc}

Hi Ksar

Thank you
That solves the problem of the space, but introduces another problem which is the dot insted of the comma.

So I do get e.g. 1000.00 instead of 1000,00 , this solution thus is OK only in countries where they use the dot for the decimals (or for documents created for those countries/languages)

I tried to overcome this in libreoffice writer, but seems that therei sno way to circumvent the problem.

Is in Dolibarr available any way to precisely define the desired format for locale number format or maybe have the comma instread of the dot for the {object_total_ttc} output?
Thank you
J

Hello
I solved it changing the translation of the string SeparatorThousands, by default in my locale was set to “space”, I changed it to . and that allowed me to get the datum in a form that is readable as number by libreoffice writer.
Thank you
Bye