Last active
August 29, 2015 14:16
-
-
Save stewartduffy/6bd7fad208bf98043966 to your computer and use it in GitHub Desktop.
JS get calculate GST
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var calculateGst = function(price, taxRate) { | |
return (price * (taxRate * 100) / 100).toFixed(2); | |
}; | |
var addGst = function(price, taxRate) { | |
return (price * 1 + ( price * (taxRate * 100) / 100 )).toFixed(2); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This page helped http://www.newzealandfinance.co.nz/calculators/gst-calculator/