We are building an application using IPP v3 that will sync invoices from our SaaS app to QBOE (and hopefully QBD). The problem are are encountering is with replicating the sales on our invoices with the invoices created in quickbooks.
Specifically, our invoices can have line items which are not taxable (each state is different in terms of which items are taxed and at what rate). Also there are many times both state, city and county taxes, some of which apply to some line items and not to others.
It appears for the IPP v3 US version, taxes must be global to the invoice?
I think that all of this could be solved if we could just override the total tax amount for the invoice. Documentations seems to indicate that API supports that. However, all my attempts were ignored. It's either no Tax or default tax rate (in percentage). That means that we can't override totals or enter fixed taxes.
Another option would be to add an extra line to the invoice named "Tax Name" and the value. The invoice total would be correct but Tax Reports on quickbooks wouldn't?
I would really like a straight answer like "tax amount cannot be overridden through the API" just to be sure.
I would also like to know if Intuit plans to support that feature in a near future?
There are fields in the API like "PercentBased" (which can be set to true or false) that seem to indicate that fixed amounts can be set. But these fields are completely ignored when I try to use them.
Any help or future guidance on this would be greatly appreciate as it pertains to IPP v3 for QBOE / QBD.
Here's our XML request
<?xml version='1.0' encoding='utf-8'?>
<IntuitBatchRequest xmlns:ns2="http://www.intuit.com/sb/cdm/qbo"
xmlns="http://schema.intuit.com/finance/v3">
<BatchItemRequest bId="bid1" operation="create">
<Invoice>
<DocNumber>2459999</DocNumber>
<TxnDate>2012-12-10</TxnDate>
<GlobalTaxCalculation>TaxIncluded</GlobalTaxCalculation>
<Line>
<DetailType>SalesItemLineDetail</DetailType>
<Amount>200</Amount>
<SalesItemLineDetail>
<TaxCodeRef>TAX</TaxCodeRef>
<ServiceDate>2012-12-10</ServiceDate>
</SalesItemLineDetail>
<Description>Test</Description>
<ItemRef>1</ItemRef>
</Line>
<CustomerRef>66</CustomerRef>
<TxnTaxDetail>
<TaxLine>
<DetailType>TaxLineDetail</DetailType>
<Amount>13.00</Amount>
<TaxLineDetail>
<NetAmountTaxable>200.00</NetAmountTaxable>
<TaxPercent>6.50</TaxPercent>
<TaxRateRef>1</TaxRateRef>
<PercentBased>true</PercentBased>
</TaxLineDetail>
</TaxLine>
</TxnTaxDetail>
</Invoice>
</BatchItemRequest>
</IntuitBatchRequest>
You can override the tax amount in the Taxline in TxnTaxDetail-
Eg:
Includes tax @ 20% on 16.67 = 3.33. we would expect the request to include following tax details
"TxnTaxDetail":{"TotalTax":3.33,"TaxLine":[{"Amount":3.33,"DetailType":"TaxLineDetail","TaxLineDetail":{"TaxRateRef":{"value":"4"},"PercentBased":true,"TaxPercent":20,"NetAmountTaxable":16.67
"GlobalTaxCalculation":"TaxIncludes",...
Please refer-
https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v3/020_key_concepts/0700_other_topics#TxnTaxDetail
EDIT:
Adding the sample request and response xml. Just set the following tags.
<TxnTaxDetail>
<TxnTaxCodeRef>
<TotalTax>
</TxnTaxDetail>
Do not set the Taxline as QBO recalculates the tax based on the details sent in the request. So in response you’ll get the recalculated amount based in the TaxPercent specified.
Request sample-
<?xml version="1.0"?>
<Invoice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schema.intuit.com/finance/v3">
<TxnDate>2013-10-11+05:30</TxnDate>
<PrivateNote>This is a private note</PrivateNote>
<Line>
<Description>Invoice line description.</Description>
<Amount>900</Amount>
<DetailType>SalesItemLineDetail</DetailType>
<SalesItemLineDetail>
<ItemRef name="Bat">2</ItemRef>
<UnitPrice>90</UnitPrice>
<Qty>10</Qty>
<TaxCodeRef>TAX</TaxCodeRef>
<ServiceDate>2013-10-11+05:30</ServiceDate>
</SalesItemLineDetail>
</Line>
<TxnTaxDetail>
<TxnTaxCodeRef name="StateSalesTax">8</TxnTaxCodeRef>
<TotalTax>450</TotalTax>
</TxnTaxDetail>
<AutoDocNumber>true</AutoDocNumber>
<CustomerRef name="5748584cc7d64bb18a0e">23</CustomerRef>
<BillAddr>
<Line1>123 Main St.</Line1>
<Line2>Unit 506</Line2>
<City>Brockton</City>
<Country>United States</Country>
<CountrySubDivisionCode>MA</CountrySubDivisionCode>
<PostalCode>02301</PostalCode>
<Note>Billing Address Note</Note>
</BillAddr>
<ShipAddr>
<Line1>100 Fifth Ave.</Line1>
<City>Waltham</City>
<Country>United States</Country>
<CountrySubDivisionCode>MA</CountrySubDivisionCode>
<PostalCode>02452</PostalCode>
<Note>Shipping Address Note</Note>
</ShipAddr>
<SalesTermRef name="Due on receipt">1</SalesTermRef>
<DueDate>2013-11-10+05:30</DueDate>
<GlobalTaxCalculation>TaxInclusive</GlobalTaxCalculation>
<ARAccountRef name="Accounts Receivable (A/R)">32</ARAccountRef>
</Invoice>
Response sample-
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2013-10-18T01:50:19.576-07:00">
<Invoice domain="QBO" sparse="false">
<Id>50</Id>
<SyncToken>0</SyncToken>
<MetaData>
<CreateTime>2013-10-18T01:50:20-07:00</CreateTime>
<LastUpdatedTime>2013-10-18T01:50:20-07:00</LastUpdatedTime>
</MetaData>
<DocNumber>1037</DocNumber>
<TxnDate>2013-10-11</TxnDate>
<PrivateNote>This is a private note</PrivateNote>
<Line>
<Id>1</Id>
<LineNum>1</LineNum>
<Description>Invoice line test</Description>
<Amount>900.00</Amount>
<DetailType>SalesItemLineDetail</DetailType>
<SalesItemLineDetail>
<ItemRef name="Bat">2</ItemRef>
<UnitPrice>90</UnitPrice>
<Qty>10</Qty>
<TaxCodeRef>TAX</TaxCodeRef>
<ServiceDate>2013-10-11</ServiceDate>
</SalesItemLineDetail>
</Line>
<Line>
<Amount>900.00</Amount>
<DetailType>SubTotalLineDetail</DetailType>
<SubTotalLineDetail />
</Line>
<TxnTaxDetail>
<TxnTaxCodeRef>8</TxnTaxCodeRef>
<TotalTax>450.00</TotalTax>
<TaxLine>
<Amount>450.00</Amount>
<DetailType>TaxLineDetail</DetailType>
<TaxLineDetail>
<TaxRateRef>18</TaxRateRef>
<PercentBased>true</PercentBased>
<TaxPercent>2.5</TaxPercent>
<NetAmountTaxable>900.00</NetAmountTaxable>
</TaxLineDetail>
</TaxLine>
</TxnTaxDetail>
<CustomerRef name="5748584cc7d64bb18a0e">23</CustomerRef>
<BillAddr>
<Id>78</Id>
<Line1>123 Main St.</Line1>
<Line2>Unit 506</Line2>
<City>Brockton</City>
<Country>United States</Country>
<CountrySubDivisionCode>MA</CountrySubDivisionCode>
<PostalCode>02301</PostalCode>
<Lat>42.0829092</Lat>
<Long>-71.01995200000002</Long>
</BillAddr>
<ShipAddr>
<Id>79</Id>
<Line1>100 Fifth Ave.</Line1>
<City>Waltham</City>
<Country>United States</Country>
<CountrySubDivisionCode>MA</CountrySubDivisionCode>
<PostalCode>02452</PostalCode>
<Lat>42.3933303</Lat>
<Long>-71.256777</Long>
</ShipAddr>
<SalesTermRef>1</SalesTermRef>
<DueDate>2013-11-10</DueDate>
<TotalAmt>1350.00</TotalAmt>
<ApplyTaxAfterDiscount>false</ApplyTaxAfterDiscount>
<PrintStatus>NeedToPrint</PrintStatus>
<EmailStatus>NotSet</EmailStatus>
<Balance>1350.00</Balance>
<Deposit>0</Deposit>
<AllowIPNPayment>false</AllowIPNPayment>
<AllowOnlinePayment>false</AllowOnlinePayment>
</Invoice>
</IntuitResponse>
EDIT for Global-
Ok, I retested this fr Global.
I can override amounts for individual taxlines and then final taxamount-
here is an invoice update request -
I changed the following tags-
<TxnTaxDetail>
<TotalTax>2.90</TotalTax>
and then in one of the taxlines
<TaxLine>
<Amount>0.70</Amount>
and then in the final invoice amounts
<TotalAmt>79.90</TotalAmt>
<Balance>79.90</Balance>
<Invoice xmlns="http://schema.intuit.com/finance/v3" domain="QBO" sparse="false">
<Id>1</Id>
<SyncToken>0</SyncToken>
<MetaData>
<CreateTime>2015-01-30T09:32:06-08:00</CreateTime>
<LastUpdatedTime>2015-01-30T09:32:06-08:00</LastUpdatedTime>
</MetaData>
<DocNumber>1001</DocNumber>
<TxnDate>2015-01-30</TxnDate>
<CurrencyRef name="Canadian Dollar">CAD</CurrencyRef>
<Line>
<Id>1</Id>
<LineNum>1</LineNum>
<Amount>33.00</Amount>
<DetailType>SalesItemLineDetail</DetailType>
<SalesItemLineDetail>
<ItemRef name="Hours">2</ItemRef>
<UnitPrice>33</UnitPrice>
<Qty>1</Qty>
<TaxCodeRef>7</TaxCodeRef>
</SalesItemLineDetail>
</Line>
<Line>
<Id>2</Id>
<LineNum>2</LineNum>
<Amount>44.00</Amount>
<DetailType>SalesItemLineDetail</DetailType>
<SalesItemLineDetail>
<ItemRef name="Sales">1</ItemRef>
<UnitPrice>44</UnitPrice>
<Qty>1</Qty>
<TaxCodeRef>5</TaxCodeRef>
</SalesItemLineDetail>
</Line>
<Line>
<Amount>77.00</Amount>
<DetailType>SubTotalLineDetail</DetailType>
<SubTotalLineDetail />
</Line>
<TxnTaxDetail>
<TotalTax>2.90</TotalTax>
<TaxLine>
<Amount>2.20</Amount>
<DetailType>TaxLineDetail</DetailType>
<TaxLineDetail>
<TaxRateRef>6</TaxRateRef>
<PercentBased>true</PercentBased>
<TaxPercent>5</TaxPercent>
<NetAmountTaxable>44.00</NetAmountTaxable>
</TaxLineDetail>
</TaxLine>
<TaxLine>
<Amount>0.70</Amount>
<DetailType>TaxLineDetail</DetailType>
<TaxLineDetail>
<TaxRateRef>15</TaxRateRef>
<PercentBased>true</PercentBased>
<TaxPercent>2</TaxPercent>
<NetAmountTaxable>33.00</NetAmountTaxable>
</TaxLineDetail>
</TaxLine>
</TxnTaxDetail>
<CustomerRef name="dd">1</CustomerRef>
<SalesTermRef>3</SalesTermRef>
<DueDate>2015-03-01</DueDate>
<GlobalTaxCalculation>TaxExcluded</GlobalTaxCalculation>
<TotalAmt>79.90</TotalAmt>
<PrintStatus>NotSet</PrintStatus>
<EmailStatus>NotSet</EmailStatus>
<Balance>79.90</Balance>
<Deposit>0</Deposit>
<AllowIPNPayment>false</AllowIPNPayment>
<AllowOnlinePayment>false</AllowOnlinePayment>
<AllowOnlineCreditCardPayment>false</AllowOnlineCreditCardPayment>
<AllowOnlineACHPayment>false</AllowOnlineACHPayment>