7. Taxes Rates

7. Taxes Rates

Introduction:

Tax rates are varying at different regions, it is important that default tax rates are used to record taxes on sales, bills and other transactions in Xero. So, we are getting the Tax rates from xero.

We can set a default Tax rate in the configuration layout by clicking the button “Chart of Taxes”.

Script:

For Tax rates we have a scripts for accessing the information from the xero.

  • Pull Accounts from xero:

We are using this script to accessing the tax rates information from the xero. We are sending the request API URL using the MBS curl functions with parameters like API key, Method as items. Then we got a response which consists of all taxt rates information from the Xero in a json formate. By using that information we are creating the records in FM.

Example JSON :

Parameters JSON:
{
“api_key”: “fde07d0f60458ce429aae638bbcb4b496d444115”,
“method”: “taxrates”
}
Response JSON:
{
“TaxRates”: [{
“Name”: “15% GST on Expenses”,
“TaxType”: “INPUT2”,
“CanApplyToAssets”: “true”,
“CanApplyToEquity”: “true”,
“CanApplyToExpenses”: “true”,
“CanApplyToLiabilities”: “true”,
“CanApplyToRevenue”: “false”,
“DisplayTaxRate”: “15.0000”,
“EffectiveRate”: “15.0000”,
“Status”: “ACTIVE”,
“TaxComponents”: [
{
“Name”: “GST”,
“Rate”: “15.0000”,
“IsCompound”: “false”,
“IsNonRecoverable”: “false”
}
],
}]
}
  • Create_Taxrates_from_xero:

We are using this script to create or update the records in FileMaker by using Base Elements functions and FileMaker functions.