Koala7
Koala7

Reputation: 1414

Calculate total amount with VAT percentage inclusive

I have built an editable table. There are two rows, one editable with Textarea and the other one editable with Input number. If you click on the column number, you can change the amount and you get automatically the Total sum.

There is also the possibility to clone new rows editable.

I am looking now on how to calculate the percentage (vat 21%) that automatically gives the TOTAl in my last row. I was looking for some examples but i have not found any.

As you can see in my example there is a function which provide to calculate the total summing my ID="sum" in the rows.

My problem is which function i need to use to calculate the 21% VAT that then automatically gives me the new TOTAL in the last row with this percentage inclusive?

Hope the explanation is clear. This is only one example suitable i have found but i can not apply in my case.

Upvotes: 1

Views: 3534

Answers (2)

Ed Heal
Ed Heal

Reputation: 60037

Just sum the column and multiply by 1.21.

Upvotes: 0

RAM
RAM

Reputation: 2419

The code is now updated. Check it now.

http://jsfiddle.net/CBk5a/6/

Upvotes: 1

Related Questions