Reflect formula change in invoice to PDF

I have made some formula changes in invoice. For eg. the actual formula of invoice is Linetotal = (unit price x quantity) - discount. I have changed it to Linetotal = Price + Quantity + Discount. It is working fine when editing and saving the invoice. But when I check the live pdf and printout, both shows the actual formula and not the modified one. I assume that pdf is not taking any value from the invoice files but calculating by its own. How could I impliment the same to pdf? Please help… which must be the file to edit or which line…

It’s likely this file: resources/assets/js/pdf.pdfmake.js

Note: changes to this file require the code to be rebuilt.

I am running the instance in a shared hosting account… How could I rebuild the code once it is edited… :o Please help

It’s explained in the docs linked above

to be frank… :slight_smile: I failed to find anything related to the rebuild in case of a shared hosting in the above link. I made some changes in the pdf.pdfmake.js file, which must do the job… however it is not reflecting in the real scenario may be due to the lack of rebuild… could you help me… is there a simple step that could help the instance reflect the changes in the file “pdf.pdfmake.js” in shared hosting accounts… I am using cpanel

If you change pdf.pdfmake.js you need to use bower to install the JS files and then run gulp to recompile them.

You will need SSH/command line access to run the commands.

Thank you! Oh… okey … but as it is a shared environment, I dont have access to that… May be I could do the same in dedicated server and migrate it to here later…?

That should work