Avalara Developer Network Developer avaTax

10.2 - Putting It All Together

In this section we will look at three of the most common use tax transactions:

  • How to calculate Use Tax on a PurchaseOrder
  • How to calculate Use Tax for a PurchaseInvoice sent to a vendor where no tax was calculated
  • How to calculate/verify Use Tax for a PurchaseInvoice sent to a vendor with a tax calculation

Creating a Purchase Order

In this first example, we are working in the procurement department and we need to purchase some widgets for our business to use in the office. We will provide our vendor with a purchase order, which will include an estimated tax calculation. You’ll notice that the structure of the request looks very similar to the Sales Tax requests from the previous chapters. That’s because when providing a Purchase Order to a vendor we want to simulate the sales order that your vendor would send to you. There are some key differences that you should take into consideration:

  • The Origin Address on the transaction should represent the address of your Vendor.
  • The Destination Address on the transaction should represent the location where the goods will be consumed.
  • The Document Type should be set to SalesOrder
Test Case - 10.2.1

Setup

  • In your connector, create the following transaction:
    • Document Type: SalesOrder
    • Document Code: Chapter-10-Test-1
    • Company Code: DEVGUIDE
    • Document Date: 2017-06-15
    • Customer Code: ACME
    • Commit: False
    • Addresses:
      • ShipFrom - (Vendor Address)
        • 18300 Von Karman Ave, Irvine, CA 92612 US
      • ShipTo - (Location where product will be consumed)
        • 100 Ravine, Bainbridge Island, WA 98110 US
    • Line #1:
      • Amount 100
      • TaxCode P0000000
    • Calculate tax for your transaction using AvaTax.

Assertions

  • The totalTaxCalculated amount should be $9.00. This is the amount that AvaTax determined is correct.
  • {
      "type": "SalesOrder",
      "code": "Chapter-10-Test-1",
      "companyCode": "DEVGUIDE",
      "date": "2017-06-15",
      "customerCode": "ACME",
      "commit": "false",
      "addresses": {
        "shipFrom": {
          "line1": "18300 Von Karman Ave",
          "city": "Irvine",
          "region": "CA",
          "country": "US",
          "postalCode": "92612"
        },
        "shipTo": {
          "line1": "100 Ravine",
          "city": "Bainbridge Island",
          "region": "WA",
          "country": "US",
          "postalCode": "98110"
        }
      },
      "lines": [
        {
          "number": "1",
          "quantity": 10,
          "amount": 100,
          "taxCode": "P0000000",
          "itemCode": "Widget",
          "description": "Test Widget"
        }
      ]
    }
                    

With the calculated tax amount, you can send your vendor a complete purchase, including the expected sales tax. When sales tax is properly charged by vendor/supplier on its invoice, the buying company fulfills its statutory obligation to local and state taxing authorities.

Purchase Invoice - No Vendor Assessed Tax

Ok, so let’s jump ahead to when you’ve received your widgets along with the invoice from your vendor. Looking at the invoice, you note that tax was not assessed on the order and this item is to be consumed at your location so UseTax is applicable. So, let’s take a look at how to calculate Use Tax on this transaction. Again, here are some key differences that you should take into account:

  • The Origin Address on the transaction should represent the address of your Vendor.
  • The Destination Address on the transaction should represent the location where the goods will be consumed.
  • The Document Type should be set to PurchaseInvoice
Test Case - 10.2.2

Setup

  • In your connector, create the following transaction:
    • Document Type: PurchaseInvoice
    • Document Code: Chapter-10-Test-2
    • Company Code: DEVGUIDE
    • Document Date: 2017-06-15
    • Customer Code: ACME
    • Commit: False
    • Addresses:
      • ShipFrom - (Vendor Address)
        • 18300 Von Karman Ave, Irvine, CA 92612 US
      • ShipTo - (Location where product will be consumed)
        • 100 Ravine, Bainbridge Island, WA 98110 US
    • Line #1:
      • Amount 100
      • TaxCode P0000000
    • Calculate tax for your transaction using AvaTax.

Assertions

  • The totalTaxCalculated amount should be $9.00. This is the amount that AvaTax determined is correct.
  • {
      "type": "PurchaseInvoice",
      "code": "Chapter-10-Test-2",
      "companyCode": "DEVGUIDE",
      "date": "2017-06-15",
      "customerCode": "ACME",
      "commit": "false",
      "addresses": {
        "ShipFrom": {
          "line1": "18300 Von Karman Ave",
          "city": "Irvine",
          "region": "CA",
          "country": "US",
          "postalCode": "92612"
        },
        "ShipTo": {
          "line1": "100 Ravine",
          "city": "Bainbridge Island",
          "region": "WA",
          "country": "US",
          "postalCode": "98110"
        }
      },
      "lines": [
        {
          "number": "1",
          "quantity": 10,
          "amount": 100,
          "taxCode": "P0000000",
          "itemCode": "Widget",
          "description": "Test Widget"
    	}
      ]
    }
                    

Payment of sales/use tax is the responsibility of the company making any taxable purchase. When the buying company makes a purchase and the supplier/vendor does not charge sales tax on a taxable purchase, it becomes the buying company’s responsibility to assess/calculate, verify, accrue, and file/remit the tax due in the form of use tax.

Purchase Invoice - With Vendor Assessed Tax

This time, let’s imagine that your widget vendors invoice did note some sales tax. However, it may not be the value you are expecting, let’s take a look at how you can check the calculation to determine if it is correct. Like the previous example, here are the key differences that you should take into account:

  • The Origin Address on the transaction should represent the address of your Vendor.
  • The Destination Address on the transaction should represent the location where the goods will be consumed.
  • The Document Type should be initially set to PurchaseOrder
  • The Vendor Assessed Tax should be noted as a TaxOverride/TaxAmount.
Test Case - 10.2.3

Setup

  • In your connector, create the following transaction:
    • Document Type: PurchaseInvoice
    • Document Code: Chapter-10-Test-3
    • Company Code: DEVGUIDE
    • Document Date: 2017-06-15
    • Customer Code: ACME
    • Commit: False
    • Addresses:
      • ShipFrom - (Vendor Address)
        • 18300 Von Karman Ave, Irvine, CA 92312 US
      • ShipTo - (Location where product will be consumed)
        • 100 Ravine, Bainbridge Island, WA 98110 US
    • Line #1:
      • Amount 100
      • TaxCode P0000000
      • TaxOverride/TaxAmount - $8
    • Calculate tax for your transaction using AvaTax.

Assertions

  • The totalTax returned is $8
    • This is the tax charged by the vendor on the Invoice
  • The totalTaxCalculated is $9
    • This is the tax amount calculated by AvaTax for this transaction.
  • The documentType is set to PurchaseOrder, meaning this is a temporary document and not recorded to AvaTax
  • {
      "type": "PurchaseOrder",
      "code": "Chapter-10-Test-3",
      "companyCode": "DEVGUIDE",
      "date": "2017-06-15",
      "customerCode": "ACME",
      "commit": "false",
      "addresses": {
        "ShipFrom": {
          "line1": "18300 Von Karman Ave",
          "city": "Irvine",
          "region": "CA",
          "country": "US",
          "postalCode": "92612"
        },
        "ShipTo": {
          "line1": "100 Ravine",
          "city": "Bainbridge Island",
          "region": "WA",
          "country": "US",
          "postalCode": "98110"
        }
      },
      "lines": [
        {
          "number": "1",
          "quantity": 10,
          "amount": 100,
          "taxCode": "P0000000",
          "itemCode": "Widget",
          "description": "Test Widget",
    	  "taxOverride":{
            "type": "taxAmount",
            "taxAmount": 8,
            "reason": "Vendor assessed tax"
    	  }
        }
      ]
    }
                    

Now, let’s take a closer look at the returned results, here we can get a good look at the accuracy of your vendor’s tax calculation:

There are two key fields that we need to look at in the returned results, totalTax and totalTaxCalculated. The totalTax field will display the tax that was assessed by the vendor, in our case this was $8. The totalTaxCalculated will display the tax amount calculated by AvaTax, in our case AvaTax returned $9 in tax.

Now, with this information the user can make an informed decision. They can either accept the AvaTax calculated Use Tax in total, accept the difference between AvaTax calculated Use Tax and the vendor charged tax (only if the AvaTax Calculated amount is larger than the vendor charged tax) or edit the Use Tax amount to a desired amount, including $0.00.

Once the user has determined the correct Use Tax to be applied to this order, the transaction can be recorded to AvaTax. Similar to the sales document workflow, you will need to update the Type field from PurchaseOrder to PurchaseInvoice for the transaction to be recorded to AvaTax.

Once again, payment of sales/use tax is the responsibility of the company making any taxable purchase. When the buying company makes a purchase and the supplier/vendor does not charge the appropriate sales tax on a taxable purchase, it becomes the buying company’s responsibility to assess/calculate, verify, accrue, and file/remit the tax due in the form of use tax.