RomanovM wrote:I've edited the Customer so that "Is tax exempt?" is true.
I have also assigned "Entity Use Code" to several options that would be tax-exempt.
I have also assigned the Customer Role to include "Tax Exemption".
Any of these points should have resulted in tax exemption.
Could you enable logging in plugin settings, place a test order, and then post the request and response text from the logs (on the plugin configuration page)? Don't forget to remove sensitive data in messages.
Sure, here you go. Here's an example where the entity use code is type "A - Federal Government". But most of our customers do not have an entity use code set (it is usually null).
Request:
{
"lines": [
{
"quantity": 2.0,
"amount": 118.14,
"itemCode": "11521",
"exemptionCode": "",
"discounted": false,
"description": "Test T-Shirt"
}
],
"type": "SalesOrder",
"companyCode": "GFC",
"date": "2023-09-13T18:42:52.3590787Z",
"customerCode": "10182079",
"customerUsageType": "A",
"discount": 0.0,
"exemptionNo": "Exempt-customer-#10182079",
"addresses": {
"shipFrom": {
"line1": "PO Box 123",
"city": "Mequon",
"region": "WI",
"country": "US",
"postalCode": "53097"
},
"shipTo": {
"line1": "123 Main St",
"city": "BUFFALO",
"region": "WY",
"country": "US",
"postalCode": "82831-1234"
}
},
"email": "<REDACTED>"
}
Response:
{
"id": 0,
"code": "2f2c9adb-b6fa-4328-b6ec-564ed8d2e01a",
"companyId": 132398,
"date": "2023-09-13",
"paymentDate": "2023-09-13",
"status": "Temporary",
"type": "SalesOrder",
"batchCode": "",
"currencyCode": "USD",
"exchangeRateCurrencyCode": "USD",
"customerUsageType": "A",
"entityUseCode": "A",
"customerVendorCode": "10182079",
"customerCode": "10182079",
"exemptNo": "Exempt-customer-#10182079",
"reconciled": false,
"locationCode": "",
"reportingLocationCode": "",
"purchaseOrderNo": "",
"referenceCode": "",
"salespersonCode": "",
"totalAmount": 118.14,
"totalExempt": 0.0,
"totalDiscount": 0.0,
"totalTax": 5.91,
"totalTaxable": 118.14,
"totalTaxCalculated": 5.91,
"adjustmentReason": "NotAdjusted",
"locked": false,
"version": 1,
"exchangeRateEffectiveDate": "2023-09-13",
"exchangeRate": 1.0,
"email": "<REDACTED>",
"modifiedDate": "2023-09-13T18:42:52.7851689Z",
"modifiedUserId": 117753,
"taxDate": "2023-09-13",
"lines": [
{
"id": 0,
"transactionId": 0,
"lineNumber": "1",
"customerUsageType": "",
"entityUseCode": "",
"description": "Test T-Shirt",
"discountAmount": 0.0,
"exemptAmount": 0.0,
"exemptCertId": 0,
"exemptNo": "",
"isItemTaxable": true,
"itemCode": "11521",
"lineAmount": 118.14,
"quantity": 2.0,
"ref1": "",
"ref2": "",
"reportingDate": "2023-09-13",
"tax": 5.91,
"taxableAmount": 118.14,
"taxCalculated": 5.91,
"taxCode": "PP051161",
"taxCodeId": 5654167,
"taxDate": "2023-09-13",
"taxIncluded": false,
"details": [
{
"id": 0,
"transactionLineId": 0,
"transactionId": 0,
"country": "US",
"region": "WY",
"exemptAmount": 0.0,
"jurisCode": "56",
"jurisName": "WYOMING",
"stateAssignedNo": "",
"jurisType": "STA",
"jurisdictionType": "State",
"nonTaxableAmount": 0.0,
"rate": 0.04,
"tax": 4.73,
"taxableAmount": 118.14,
"taxType": "Sales",
"taxSubTypeId": "S",
"taxName": "WY STATE TAX",
"taxAuthorityTypeId": 45,
"taxCalculated": 4.73,
"rateType": "General",
"rateTypeCode": "G",
"unitOfBasis": "PerCurrencyUnit",
"isNonPassThru": false,
"isFee": false,
"reportingTaxableUnits": 118.14,
"reportingNonTaxableUnits": 0.0,
"reportingExemptUnits": 0.0,
"reportingTax": 4.73,
"reportingTaxCalculated": 4.73,
"liabilityType": "Seller",
"chargedTo": "Buyer"
},
{
"id": 0,
"transactionLineId": 0,
"transactionId": 0,
"country": "US",
"region": "WY",
"exemptAmount": 0.0,
"jurisCode": "019",
"jurisName": "JOHNSON",
"stateAssignedNo": "16",
"jurisType": "CTY",
"jurisdictionType": "County",
"nonTaxableAmount": 0.0,
"rate": 0.01,
"tax": 1.18,
"taxableAmount": 118.14,
"taxType": "Sales",
"taxSubTypeId": "S",
"taxName": "WY COUNTY TAX",
"taxAuthorityTypeId": 45,
"taxCalculated": 1.18,
"rateType": "General",
"rateTypeCode": "G",
"unitOfBasis": "PerCurrencyUnit",
"isNonPassThru": false,
"isFee": false,
"reportingTaxableUnits": 118.14,
"reportingNonTaxableUnits": 0.0,
"reportingExemptUnits": 0.0,
"reportingTax": 1.18,
"reportingTaxCalculated": 1.18,
"liabilityType": "Seller",
"chargedTo": "Buyer"
}
],
"nonPassthroughDetails": [],
"hsCode": "",
"costInsuranceFreight": 0.0,
"vatCode": "",
"vatNumberTypeId": 0
}
],
"addresses": [
{
"id": 0,
"transactionId": 0,
"boundaryLevel": "Zip9",
"line1": "123 Main St",
"line2": "",
"line3": "",
"city": "BUFFALO",
"region": "WY",
"postalCode": "82831-1234",
"country": "US",
"taxRegionId": 31517,
"latitude": "",
"longitude": ""
},
{
"id": 0,
"transactionId": 0,
"boundaryLevel": "Zip5",
"line1": "PO Box 123",
"line2": "",
"line3": "",
"city": "Mequon",
"region": "WI",
"postalCode": "53097",
"country": "US",
"taxRegionId": 4006722,
"latitude": "43.221791",
"longitude": "-87.951726"
}
],
"summary": [
{
"country": "US",
"region": "WY",
"jurisType": "State",
"jurisCode": "56",
"jurisName": "WYOMING",
"taxAuthorityType": 45,
"stateAssignedNo": "",
"taxType": "Sales",
"taxSubType": "S",
"taxName": "WY STATE TAX",
"rateType": "General",
"taxable": 118.14,
"rate": 0.04,
"tax": 4.73,
"taxCalculated": 4.73,
"nonTaxable": 0.0,
"exemption": 0.0
},
{
"country": "US",
"region": "WY",
"jurisType": "County",
"jurisCode": "019",
"jurisName": "JOHNSON",
"taxAuthorityType": 45,
"stateAssignedNo": "16",
"taxType": "Sales",
"taxSubType": "S",
"taxName": "WY COUNTY TAX",
"rateType": "General",
"taxable": 118.14,
"rate": 0.01,
"tax": 1.18,
"taxCalculated": 1.18,
"nonTaxable": 0.0,
"exemption": 0.0
}
]
}
I tried removing as much sensitive info as I could, including modifying slightly the addresses/zip-codes.