Dear members,
I am working with an invoice model which has several items on a look-up table, but when I get them together into a single document I don't know how to show a TOTAL Invoice taking the partial values of each item....
I have twisted the original invoice template to show the fields in a different way, but no idea how to see a total invoice....
Any hint or trick on how to do it!! via hooks¿???
Thank you
Nicolas
How can I sum the artivle values on invoice?
How can I sum the artivle values on invoice?
- Attachments
-
- invoice-template.GIF (40.71 KiB) Viewed 6626 times
-
- AppGini Intern
- Posts: 19
- Joined: 2016-02-07 13:24
Re: How can I sum the artivle values on invoice?
to calculate total invoice
here are the general steps, but it needs some PHP and JavaScript knowledge
1- you should add field to table and call it total.
2- create js file call "tablename-dv.js" inside the hooks folder (where tablename is the name of your table) and use ajax request to call php script which calculates total of invoice call this script as ajax-yourtablename-total.php to be more readable.
3- use the previous file to select element and calculate the total then set return value of total as value of total invoice using js.
4- use AppGini to make total filed as readonly field.
here are the general steps, but it needs some PHP and JavaScript knowledge
1- you should add field to table and call it total.
2- create js file call "tablename-dv.js" inside the hooks folder (where tablename is the name of your table) and use ajax request to call php script which calculates total of invoice call this script as ajax-yourtablename-total.php to be more readable.
3- use the previous file to select element and calculate the total then set return value of total as value of total invoice using js.
4- use AppGini to make total filed as readonly field.
Re: How can I sum the artivle values on invoice?
Thanks for the reply and late thanks from my side... I'll got it done and working!!!
Best regards
Best regards