Skip to content

Instantly share code, notes, and snippets.

@CHH
Created July 9, 2014 13:01
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 CHH/7437a9d57a0b4d14cb84 to your computer and use it in GitHub Desktop.
Save CHH/7437a9d57a0b4d14cb84 to your computer and use it in GitHub Desktop.
Google Apps Script for adding a Sheets function for estimating the austrian income tax
function atincometax(income) {
var url = "http://chh-at-tax.herokuapp.com/income-tax";
income = parseInt(income, 10);
var response = UrlFetchApp.fetch(url, {
method: "post",
payload: JSON.stringify({income: income})
});
var data = JSON.parse(response.getContentText());
return data.tax;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment