You are attempting to remove the tax codes or set ups to not occur as you want to override the sales tax and use what comes down from the app using the SDK. That causes the following error:
<ErrorMessage>Cannot specify Tax Amount, if Tax calculation type is set to Automatic or Special tax rule override</ErrorMessage>
The problem is with the tax calculation method being used. Within the request, there's a parameter named TaxCalculationType with the default value is 1, which is an automatic method.
In order to create a sales order with a customized tax amount, please use the eoSalesDocument.Create method.
Below you can find a sample of the XML being passed to the above method:
<SalesDocument> <CustomerCode>100100</CustomerCode> <SalesRepCode>SUP-ASC</SalesRepCode> <PayTermsCode>N30</PayTermsCode> <OverRideDueDate>F</OverRideDueDate> <DueDate>2006-06-20</DueDate> <JurisdictionCode>VA</JurisdictionCode> <ShipViaCode>UPSG</ShipViaCode> <DeliveryDate>2006-04-20</DeliveryDate> <TaxCalculationType>3</TaxCalculationType> <LocationSubLocation>MAIN</LocationSubLocation> <DocumentAlias>SALES ORDER</DocumentAlias> <LineItems> <LineItem> <Sequence>1</Sequence> <ItemCode>101FGTIPS</ItemCode> <Description /> <Quantity>5</Quantity> <ItemPrice>11.600000</ItemPrice> <UOMCode>EA</UOMCode> <Cost>19.000000</Cost> <VendorCode>NEWPAGE</VendorCode> <DiscountValue>.000000</DiscountValue> <TaxAmount>1</TaxAmount> <TaxCode>Exempt</TaxCode> </LineItem> </LineItems> </SalesDocument>
Depending on your solution, you may also need to set the document type as:
- 8 for Sales Order
- 9 for Sales Invoice
Using the XML above, the SDK should create a new Sales Order with the Tax Calculation method set to manual. Notice that the TaxCalculationType has a value of 3, and the line item TaxAmount is set to 1, and the TaxCode set to Exempt.
As a reference please find the screenshot for the Sales Order created using the above XML:
You will need to pass the correct TaxCode and TaxAmount from your external application, in order to prevent inconsistencies or future errors.
For example, you can determine which is the correct tax code, by inspecting the shipping address. If the shipping address is in the state of New York, you may pass
NYSTAX as the tax code, to allow Everest to pick the configured account code for the tax.