I have changed calculations of item amount and total in sales invoice , it works good but when trying to print it shows default total value not value calculated in my custom script
here it works
facing the same issue, am using custom print format though,
used a script inside print format to convert some numbers to arabic, conversion works fine in print preview , but when a pdf is generated or doc is actually printed, it goes back to what it was before conversion
no i do not think so
because you will replace your custom script with calculations in print format and it will work
i tried it before in salary register to make totals and show totals of specific columns
try it
print preview is generated in client side, and actual pdf is rendered on server,
wkhtmltopdf renders with data available on the server, client scripts in print formats are not run
your issue, is mostly you are not saving the data to doc but rather just assigning it to be visible on client side, if you save it to a field and call it in print format, it will be resolved (i think)
Solved this issue by moving the conversion from js script in print format to a server side python function and calling it in print format. Works fine now.