title: Quickbooks qbxml appears to be ignoring SalesTaxCodeRef tag
body: <p>I'm using QuickBooks 2013 pro, Canadian edition.  The following XML message is successfully processed by quickbooks.  Except that the XML specifies that the item use the standard tax code 'E'.  Unfortunately the credit is created with the default tax code 'S' instead.  In other words taxes are applied to this item when I don't want them to be.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;?qbxml version="12.0"?&gt;
  &lt;QBXML&gt;
    &lt;QBXMLMsgsRq onError="stopOnError"&gt;
      &lt;VendorCreditAddRq requestID="37"&gt;
        &lt;VendorCreditAdd&gt;
          &lt;VendorRef&gt;
            &lt;FullName&gt;APT&lt;/FullName&gt;
          &lt;/VendorRef&gt;
          &lt;TxnDate&gt;2014-02-09&lt;/TxnDate&gt;
          &lt;RefNumber&gt;552535C3&lt;/RefNumber&gt;
          &lt;ItemLineAdd&gt;
            &lt;ItemRef&gt;
              &lt;FullName&gt;PARTS_ECON_AP&lt;/FullName&gt;
            &lt;/ItemRef&gt;
            &lt;Desc&gt;Grille Assembly&lt;/Desc&gt;
            &lt;Amount&gt;138.78&lt;/Amount&gt;
            &lt;CustomerRef&gt;
              &lt;FullName&gt;Retail:20001&lt;/FullName&gt;
            &lt;/CustomerRef&gt;
            &lt;SalesTaxCodeRef&gt;
              &lt;FullName&gt;E&lt;/FullName&gt;
            &lt;/SalesTaxCodeRef&gt;
            &lt;BillableStatus&gt;Billable&lt;/BillableStatus&gt;
          &lt;/ItemLineAdd&gt;
        &lt;/VendorCreditAdd&gt;
      &lt;/VendorCreditAddRq&gt;
    &lt;/QBXMLMsgsRq&gt;
  &lt;/QBXML&gt;
  </code></pre>
  
  <p>I'm sure that my tax codes are ok because: (1) I'm only using the standard built-in tax codes, and (2) if I transform the "ItemLineAdd" into an "ExpenseLineAdd" than the tax code appears to function as expected.  That is an acceptable work around in some cases, but not all.  I've also discovered that I can successfully apply "SalesTaxCodeRef" to the credit (as opposed to the line item).  But of course that applies to all line items and thus is not an acceptable work around in all cases.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Below is the response to the above "VendorCreditAddRq":</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;QBXML&gt;
  &lt;QBXMLMsgsRs&gt;
  &lt;VendorCreditAddRs requestID="37" statusCode="0" statusSeverity="Info" statusMessage="Status OK"&gt;
  &lt;VendorCreditRet&gt;
  &lt;TxnID&gt;B2-1392092538&lt;/TxnID&gt;
  &lt;TimeCreated&gt;2014-02-10T20:22:18-08:00&lt;/TimeCreated&gt;
  &lt;TimeModified&gt;2014-02-10T20:22:18-08:00&lt;/TimeModified&gt;
  &lt;EditSequence&gt;1392092538&lt;/EditSequence&gt;
  &lt;TxnNumber&gt;25&lt;/TxnNumber&gt;
  &lt;VendorRef&gt;
  &lt;ListID&gt;80000015-1391709881&lt;/ListID&gt;
  &lt;FullName&gt;APT&lt;/FullName&gt;
  &lt;/VendorRef&gt;
  &lt;APAccountRef&gt;
  &lt;ListID&gt;80000008-1371745385&lt;/ListID&gt;
  &lt;FullName&gt;Accounts Payable&lt;/FullName&gt;
  &lt;/APAccountRef&gt;
  &lt;TxnDate&gt;2014-02-09&lt;/TxnDate&gt;
  &lt;CreditAmount&gt;155.43&lt;/CreditAmount&gt;
  &lt;RefNumber&gt;552535C3&lt;/RefNumber&gt;
  &lt;IsTaxIncluded&gt;false&lt;/IsTaxIncluded&gt;
  &lt;ItemLineRet&gt;
  &lt;TxnLineID&gt;B4-1392092538&lt;/TxnLineID&gt;
  &lt;ItemRef&gt;
  &lt;ListID&gt;80000026-1391704222&lt;/ListID&gt;
  &lt;FullName&gt;PARTS_ECON_AP&lt;/FullName&gt;
  &lt;/ItemRef&gt;
  &lt;Desc&gt;Grille Assembly&lt;/Desc&gt;
  &lt;Cost&gt;138.78&lt;/Cost&gt;
  &lt;Amount&gt;138.78&lt;/Amount&gt;
  &lt;CustomerRef&gt;
  &lt;ListID&gt;8000001B-1391790805&lt;/ListID&gt;
  &lt;FullName&gt;Retail:20001&lt;/FullName&gt;
  &lt;/CustomerRef&gt;
  &lt;SalesTaxCodeRef&gt;
  &lt;ListID&gt;80000004-1371745439&lt;/ListID&gt;
  &lt;FullName&gt;S&lt;/FullName&gt;
  &lt;/SalesTaxCodeRef&gt;
  &lt;BillableStatus&gt;Billable&lt;/BillableStatus&gt;
  &lt;/ItemLineRet&gt;
  &lt;OpenAmount&gt;688.16&lt;/OpenAmount&gt;
  &lt;/VendorCreditRet&gt;
  &lt;/VendorCreditAddRs&gt;
  &lt;/QBXMLMsgsRs&gt;
  &lt;/QBXML&gt;
  </code></pre>
  
  <p>I see that the tax code I get back is "S".  I double checked to make sure -- the one I sent was "E".</p>
  
  <p>I then manually changed the credit in the UI and did a "VendorCreditQueryRq" to see if it would tell us anything interesting.  Not much.  Results are below:</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;QBXML&gt;
  &lt;QBXMLMsgsRs&gt;
  &lt;VendorCreditQueryRs requestID="101" statusCode="0" statusSeverity="Info" statusMessage="Status OK"&gt;
  &lt;VendorCreditRet&gt;
  &lt;TxnID&gt;B2-1392092538&lt;/TxnID&gt;
  &lt;TimeCreated&gt;2014-02-10T20:22:18-08:00&lt;/TimeCreated&gt;
  &lt;TimeModified&gt;2014-02-10T20:34:10-08:00&lt;/TimeModified&gt;
  &lt;EditSequence&gt;1392093250&lt;/EditSequence&gt;
  &lt;TxnNumber&gt;25&lt;/TxnNumber&gt;
  &lt;VendorRef&gt;
  &lt;ListID&gt;80000015-1391709881&lt;/ListID&gt;
  &lt;FullName&gt;APT&lt;/FullName&gt;
  &lt;/VendorRef&gt;
  &lt;APAccountRef&gt;
  &lt;ListID&gt;80000008-1371745385&lt;/ListID&gt;
  &lt;FullName&gt;Accounts Payable&lt;/FullName&gt;
  &lt;/APAccountRef&gt;
  &lt;TxnDate&gt;2014-02-09&lt;/TxnDate&gt;
  &lt;CreditAmount&gt;138.78&lt;/CreditAmount&gt;
  &lt;RefNumber&gt;552535C3&lt;/RefNumber&gt;
  &lt;IsTaxIncluded&gt;false&lt;/IsTaxIncluded&gt;
  &lt;OpenAmount&gt;850.24&lt;/OpenAmount&gt;
  &lt;/VendorCreditRet&gt;
  &lt;/VendorCreditQueryRs&gt;
  &lt;/QBXMLMsgsRs&gt;
  &lt;/QBXML&gt;
  </code></pre>