Formatting 'unit price'


after installing a self hosted system and being able to connect to the system
with the api, I found one minor issue.

In the invoices (pdf) the field ‘unit cost’ is displayed with 4 decimal places, the field ‘line total’ with 2 decimal places.

how can i please get the field ‘unit cost’ displayed with 2 decimal places in the pdf version, too?

Thanks in advance!

What value are you using for the unit cost? The PDF should match the input.

Thanks! The value is a php-float with 5 decimal places handed over with an api call:

The (partial) json-string is

The PDF shows Unit Cost QTY Line Total 44.5378 1 44.54 2.479 1 2,48

To show it as 2 decimals on the PDF you’d need to round the values before sending the API request or change the source code.

Thanks, ‘rounding on sender-side’ is something that i had already tried resulting in rounding errors in the total of the invoice.
Do you have any pointer where to look at the source-code exactly?

BTW: great piece of software anyway :wink:

Good luck!!