|All requests||>||invoice live edit||>||Request new recommendation||>||Featured requests||>||No recommendations|
by waredy karim - 3 years ago (2014-12-01)
I need to calculate the grand total of invoices using PHP and jQuery and rounded to 2 decimals with comma, the thousands separated with space Ex: 12 850,00 Euros.
Rows must be added or removed dynamically with recalculating the sum, like the example
ITEM | PRICE | QTY | VAT% | VAT Value| Amount(Ex-VAT)
1 50,00 20 21% 210 1 000,00 x DELETE ROW
2 200,00 10 14% 280 2 000,00 x DELETE ROW
1. by Manuel Lemos - 3 years ago (2014-12-17) Reply
I am not sure if making computations from values displayed on HTML is the way to go. Maybe it makes more sense to make computations of values stored in arrays and then update the presentation of the values from the arrays.
2. by waredy karim - 3 years ago (2014-12-17) in reply to comment 1 by Manuel Lemos Comment
thank you Mr Lemos for your reply.
I compute input fields contained in table cells.
Hi Waredy, If you are still interested in got solution to your problem, maybe Xtemplate can help you in this purpose (see the Invoice example). You will pass the json object with all invoice data and it (XTemplate) will compute the total (total ammount, vat and grand total). Take a look to it and if it would be useful for you please rate me :)