Skip to content

Instantly share code, notes, and snippets.

@stewartduffy
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stewartduffy/6bd7fad208bf98043966 to your computer and use it in GitHub Desktop.
Save stewartduffy/6bd7fad208bf98043966 to your computer and use it in GitHub Desktop.
JS get calculate GST
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);
};
@stewartduffy
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment