Using ZIP codes to discover tax names greatly simplifies the process of determining which taxes to apply. However, ZIP codes often don’t align with tax jurisdictions such as cities and counties (or even states). If a ZIP code falls within multiple tax jurisdictions, the TaxNamesForZip method will return all the taxes for each jurisdiction. This gives the user a reduced set of taxes to consider, but it may still be too many.
The TaxControls components provide the TaxQuery
method to look up taxes using the workplace and residence addresses, which will further reduce the number of taxes to consider. Using this method requires additional configuration, as it requires a connection to the TaxQuery Docker container.
The TaxQuery container can be run locally or in a cloud setting and is available free of charge. The TaxQuery
method in the component will connect to the TaxQuery container, which will then return the taxes for the given addresses.
- Enter Code
Enter the following code in a file named ‘Addresses.cs’:
Enter the following code in a file named ‘Addresses.java’:
- Compile
Compile the code at the command prompt by executing the following:
- Start TaxQuery
Start up the TaxQuery container if it’s not already running:
The -p 8443:8443
argument tells the image to listen for an https connection on port 8443.
- Run
Run the code by typing: