Avalara Developer Network Developer avaTax

6.1 - Tax Overrides

There are two types of overrides supported in AvaTax: TaxAmount and TaxDate. The TaxAmount Override, will do just that, override the tax amount on the transaction. This is particularly helpful if you need to record transactions to AvaTax which had the tax calculated in another system. The TaxDate override, allows you to specify what tax date to use in the calculation. By default, the AvaTax engine will use the document date as the TaxDate. The common use-case for this override is processing refunds, as you want to calculate the refund tax credit using the same information that the original sale used. Let’s take a closer look at each method.

Overriding the Tax Amount

A tax amount override is when you override the tax amount of a transaction rather than having AvaTax calculate it.

This feature is available so that you can import transactions where you’ve already calculated the tax amount prior to using AvaTax. An example would be when you are importing data from an older system so that you can keep all your data in AvaTax. Other customers may choose to use this feature to import data from partner sales - for example, if you were selling via a merchant platform and you want to import your data into AvaTax.

Tax amount overrides can also be used to determine the difference between tax paid to a vendor and consumer use tax due to an authority. This is covered in more detail in Chapter 10 - Consumer Use Tax.

Test Case - 6.1.1

Setup

  • You calculated tax for a transaction using your old tax software, and you are importing this transaction into AvaTax.
  • The tax calculated by your old tax software was $5.67.
  • In your connector, create the following transaction:
    • Document Type: SalesInvoice
    • Document Code: Chapter-6-Test-1
    • Company Code: DEVGUIDE
    • Document Date: 2017-06-15
    • Customer Code: TESTCUSTOMER
  • Addresses:
    • SingleLocation
    • 100 Ravine Lane NE, Bainbridge Island, WA, 98110
  • Line #1:
    • Amount 100
    • TaxCode P0000000
  • Add a TaxOverride to set the TaxAmount to $5.67, and specify the reason as "Importing tax calculated by previous tax software"
  • Calculate tax for your transaction using AvaTax.

Assertions

  • The totalTax amount for the transaction should be $5.67. This is the amount you calculated in your previous tax software.
  • The totalTaxCalculated amount should be $9.00. This is the amount that AvaTax determined is correct.
  • {
      "type": "SalesInvoice",
      "code": "Chapter-6-Test-1",
      "companyCode": "DEVGUIDE",
      "date": "2017-06-15",
      "customerCode": "TESTCUSTOMER",
      "addresses": {
        "singleLocation": {
          "line1": "100 Ravine Lane NE",
          "city": "Bainbridge Island",
          "region": "WA",
          "country": "US",
          "postalCode": "98110"
        }
      },
      "lines": [
        {
          "number": "1",
          "amount": 100,
          "taxCode": "P0000000"
        }
      ],
      "taxOverride": {
        "type": "taxAmount",
        "taxAmount": 5.67,
        "reason": "Importing tax calculated by previous tax software"
      }
    }
                    

Overriding the Tax Date

TaxDate overrides are used when you want to calculate tax on a date different than the date of a document. For example, if you are returning a product, the tax date of the transaction would be the date of the original transaction, rather than the date of the refund.

Let’s say Alice purchases a new chair from the store on May 1st. She discovers that the chair doesn’t fit in her home office, and she decides to return the chair on June 1st. If you calculate tax on the June 1st date, you might refund a different amount of tax to Alice than she paid on May 1st. So you use a TaxDate override to ensure that the tax rates are calculated as of May 1st.

Test Case - 6.1.2

Setup

  • In your connector, create the following transaction:
    • Document Type: SalesInvoice
    • Document Code: Chapter-6-Test-2
    • Document Date: 2017-06-15
    • Company Code: TESTCUSTOMER
  • Addresses:
    • SingleLocation
    • 100 Ravine Lane NE, Bainbridge Island, WA, 98110
  • Line #1:
    • Amount 100
    • TaxCode P0000000
  • Add a TaxOverride to set the TaxAmount to $5.67, and specify the reason as "Importing tax calculated by previous tax software"
  • Calculate tax for your transaction using AvaTax.

Assertions

  • The document level TaxDate should now show 5/01/2017
  • The totalTaxCalculated amount should be $9.00. This is the amount that AvaTax determined is correct.
  • {
      "type": "ReturnInvoice",
      "code": "Chapter-6-Test-2",
      "companyCode": "DEVGUIDE",
      "date": "2017-06-15",
      "customerCode": "TESTCUSTOMER",
      "addresses": {
        "singleLocation": {
          "line1": "100 Ravine Lane NE",
          "city": "Bainbridge Island",
          "region": "WA",
          "country": "US",
          "postalCode": "98110"
        }
      },
      "lines": [
        {
          "number": "1",
          "amount": 100,
          "taxCode": "P0000000"
        }
      ],
      "taxOverride": {
        "type": "taxDate",
        "taxDate": "2017-05-01",
        "reason": "Refund for purchase of chair"
      }
    }
                    

Line Level Overrides

The examples we have used so far have all shown the TaxAmount/TaxDate overrides at the document level. It is also important to note that these overrides can also be applied at the line level.

Test Case - 6.1.3

Setup

  • In your connector, create the following transaction:
    • Document Type: SalesInvoice
    • Document Code: Chapter-6-Test-3
    • Company Code: DEVGUIDE
    • Document Date: 2017-06-15
    • Customer Code: TESTCUSTOMER
  • Addresses:
    • SingleLocation
    • 100 Ravine Lane NE, Bainbridge Island, WA, 98110
  • Line #1:
    • Amount 100
    • TaxCode P0000000
  • Add a TaxOverride to the line object and set the TaxDate to 2017-05-01 and specify the reason as "Refund for purchase of chair"
  • Calculate tax for your transaction using AvaTax.

Assertions

  • The Line 1 TaxDate should now show 5/01/2017.
  • The totalTaxCalculated amount should be $9.00. This is the amount that AvaTax determined is correct.
  • {
      "type": "ReturnInvoice",
      "code": "Chapter-6-Test-3",
      "companyCode": "DEVGUIDE",
      "date": "2017-06-15",
      "customerCode": "TESTCUSTOMER",
      "addresses": {
        "singleLocation": {
          "line1": "100 Ravine Lane NE",
          "city": "Bainbridge Island",
          "region": "WA",
          "country": "US",
          "postalCode": "98110"
        }
      },
      "lines": [
        {
          "number": "1",
          "amount": 100,
          "taxCode": "P0000000",
          "taxOverride": {
            "type": "taxDate",
            "taxDate": "2017-05-01",
            "reason": "Refund for purchase of chair"
          }
        }
      ]
    }
                    

Consumer Use Tax Overrides

The Tax Override function is also used for verification of merchant charged tax in a Use Tax scenario. This will be explained in more detail in Chapter 10 - Consumer Use Tax.