Created
July 9, 2014 13:01
-
-
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
This file contains hidden or 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
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