avadev / AvaTax-REST-V2-PHP-SDK

Sales Tax API SDK for PHP and AvaTax REST
https://developer.avalara.com/sdk/
Apache License 2.0
48 stars 95 forks source link

How to omit tax codes in transactions #174

Closed support-anniesannnauls closed 1 year ago

support-anniesannnauls commented 2 years ago

We are mapping items to tax codes within AvaTax portal only. Therefore, in our API it is necessary to omit tax codes and supply item codes ONLY, according to our Avalara sr. project consultant. However, the the SDK documentation indicates that setting $taxCode in 'withLine' method of the transaction builder to blank will cause a default tax code of P000000 to be applied (https://github.com/avadev/AvaTax-REST-V2-PHP-SDK/blob/267e4f975953b64a669b3028793167db26b10510/src/TransactionBuilder.php#L455).

How are we supposed to omit tax codes from being sent in transactions?

Thanks

support-anniesannnauls commented 2 years ago

It turns out that leaving the tax code blank does not necessarily mean 'the default item (P0000000) is assumed' - you may want to change the comment here as it is misleading... https://github.com/avadev/AvaTax-REST-V2-PHP-SDK/blob/master/src/TransactionBuilder.php#L455

P0000000 is not assumed if the API provides an item code that has been mapped to a tax code on the AvaTax management portal.

svc-developer commented 1 year ago

We have verified the following:

Also updated the comment in the code to reflect the same. Please update to the latest code and verify the same.