This following code for get back to vat value from percentage value and amount value using java script but its not accuracy.
var vat=((25*100)/447);
vat=vat.toFixed(1);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
OK, to help, you need to specify the details you are working with. What is the VAT rate? Are you working from the gross value (includes the VAT), or the nett value (excludes the VAT).
So, change the VAT rate to match yours, which I am guessing is 25% (0.25).
Using “toFixed(1)” will ensure the value is fixed to 1 decimal place – usually you need two decimal places for VAT. You will also have rounding issues if you are summing values, and these cannot be helped.