Trying to get a journal entry to save in QBO UK using TaxCodeRef but keep getting the same error message back. I have set the TaxApplicableOn correctly. I did a query of a manually entered journal entry and it shows the element TaxAmount however I don't know this value at runtime. How can I get a journal entry to save when setting a TaxCodeRef?
Here's my XML request and response.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<outgoing><?xml version="1.0" encoding="UTF-8"?>
<JournalEntry xmlns:ns2="http://www.intuit.com/sb/cdm/qbo" xmlns="http://schema.intuit.com/finance/v3">
<TxnDate>2014-03-05</TxnDate>
<PrivateNote>Invoice</PrivateNote>
<DocNumber>102</DocNumber>
<Adjustment>false</Adjustment>
<Line>
<Desc>Credit Sales</Desc>
<Amount>150</Amount>
<DetailType>JournalEntryLineDetail</DetailType>
<JournalEntryLineDetail>
<PostingType>Credit</PostingType>
<AccountRef>1</AccountRef>
<ClassRef></ClassRef>
<DepartmentRef></DepartmentRef>
<BillableStatus></BillableStatus>
<TaxCodeRef>3</TaxCodeRef>
<TaxApplicableOn>Credit</TaxApplicableOn>
</JournalEntryLineDetail>
</Line>
<Line>
<Desc>Debit Accounts Receivable</Desc>
<Amount>150.00</Amount>
<DetailType>JournalEntryLineDetail</DetailType>
<JournalEntryLineDetail>
<PostingType>Debit</PostingType>
<Entity>
<Type>Customer</Type>
<EntityRef>21</EntityRef>
</Entity>
<AccountRef>52</AccountRef>
<ClassRef></ClassRef>
<DepartmentRef></DepartmentRef>
<BillableStatus></BillableStatus>
<TaxCodeRef>3</TaxCodeRef>
<TaxApplicableOn>Debit</TaxApplicableOn>
</JournalEntryLineDetail>
</Line>
</JournalEntry>
</outgoing>
<returns><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2014-03-17T07:21:39.545-07:00">
<Fault type="ValidationFault">
<Error code="2270" element="TaxApplicableOn">
<Message>TaxApplicableon missing or invalid</Message>
<Detail>TaxApplicableOn null is required and valid values are Credit or Debit</Detail>
</Error>
<Error code="2270" element="TaxApplicableOn">
<Message>TaxApplicableon missing or invalid</Message>
<Detail>TaxApplicableOn null is required and valid values are Credit or Debit</Detail>
</Error>
</Fault>
</IntuitResponse>
</returns>