Custom print format pdf and website is different

hi
I ve created a custom print format with jinja2.
In the doctype is a child table, I ve calculated some values in this table with client script.
In the webinterface the document is display as expected, in the PDF the values are not correct
Doctype

Print format
grafik
PDF

why it is 0,00?

thanks

Might be because your client script will not run when using wkhtmltopdf to generate a pdf file.

Modify your client script to store the results in some hidden field then modify your print format to fetch that field.

Also research virtual fields, might be useful for your case.

1 Like

you pointed me to the right direction.
I change the column Anteilig and after clicking the save button the script is executed.
It saves the column Anteilig but does not save the calculated column.

thanks

1 Like