Home Forums Support Reflect formula change in invoice to PDF

This topic contains 8 replies, has 2 voices, and was last updated by  Hillel Coren 2 months, 2 weeks ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #20614

    softranet
    Participant

    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…

    #20618

    Hillel Coren
    Keymaster

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

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

    https://invoice-ninja.readthedocs.io/en/latest/developer_guide.html#code

    #20622

    softranet
    Participant

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

    #20623

    Hillel Coren
    Keymaster

    It’s explained in the docs linked above

    #20647

    softranet
    Participant

    to be frank… 🙂 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

    #20649

    Hillel Coren
    Keymaster

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

    #20650

    Hillel Coren
    Keymaster

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

    #20651

    softranet
    Participant

    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..?

    #20652

    Hillel Coren
    Keymaster

    That should work

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

Posted in: