当前位置: 动力学知识库 > 问答 > 编程问答 >

java - Quickbooks Desktop: Billable status is not applicable for the specified Account type

问题描述:

I have attempted to submit the following request content to Quickbooks Desktop by using v3 QB REST API

<?xml version="1.0" encoding="UTF-8"?>

<ns0:Purchase xmlns:ns0="http://schema.intuit.com/finance/v3" domain="QB">

<ns0:TxnDate>2014-03-10</ns0:TxnDate>

<ns0:PrivateNote>Report to QBD</ns0:PrivateNote>

<ns0:Line>

<ns0:Description>60000 Advertising and Promotion</ns0:Description>

<ns0:Amount>10.00</ns0:Amount>

<ns0:DetailType>AccountBasedExpenseLineDetail</ns0:DetailType>

<ns0:AccountBasedExpenseLineDetail>

<ns0:CustomerRef name="TOEIC">QB:17</ns0:CustomerRef>

<ns0:AccountRef name="Advertising and Promotion">QB:7</ns0:AccountRef>

<ns0:BillableStatus>NotBillable</ns0:BillableStatus>

<ns0:TaxCodeRef>NON</ns0:TaxCodeRef>

</ns0:AccountBasedExpenseLineDetail>

</ns0:Line>

<ns0:Line>

<ns0:Description>12100 Inventory Asset</ns0:Description>

<ns0:Amount>4.00</ns0:Amount>

<ns0:DetailType>AccountBasedExpenseLineDetail</ns0:DetailType>

<ns0:AccountBasedExpenseLineDetail>

<ns0:CustomerRef name="Future Press">QB:14</ns0:CustomerRef>

<ns0:AccountRef name="Inventory Asset">QB:31</ns0:AccountRef>

<ns0:BillableStatus>NotBillable</ns0:BillableStatus>

<ns0:TaxCodeRef>NON</ns0:TaxCodeRef>

</ns0:AccountBasedExpenseLineDetail>

</ns0:Line>

<ns0:Line>

<ns0:Description>50000 Cost of Goods Sold</ns0:Description>

<ns0:Amount>5.00</ns0:Amount>

<ns0:DetailType>AccountBasedExpenseLineDetail</ns0:DetailType>

<ns0:AccountBasedExpenseLineDetail>

<ns0:CustomerRef name="Pawn Shop Chronicles">QB:19</ns0:CustomerRef>

<ns0:AccountRef name="Automobile Expense">QB:8</ns0:AccountRef>

<ns0:BillableStatus>NotBillable</ns0:BillableStatus>

<ns0:TaxCodeRef>NON</ns0:TaxCodeRef>

</ns0:AccountBasedExpenseLineDetail>

</ns0:Line>

<ns0:AccountRef name="My Bank Account">QB:30</ns0:AccountRef>

<ns0:PaymentType>Check</ns0:PaymentType>

<ns0:EntityRef name="ExpenseCloud">QB:5</ns0:EntityRef>

<ns0:TotalAmt>19.00</ns0:TotalAmt>

</ns0:Purchase>

There is an item with Account=Inventory Asset(Account Type is Other Current Asset) which is marked as NotBillable. Since i can submit this request content using Java API v2 to Quickbooks Desktop and it works well. But now, i always get this error Operation failed with errors: Billable status is not applicable for the specified Account type.

However, i can duplicate directly that transaction in Quickbooks Desktop Application without error. I'm trying to solve it but nothing help so i guess this is a problem of QB API.

Please advice.

Thanks

网友答案:

Please see the docs here- https://developer.intuit.com/docs/95_legacy/qbd_v3/qbd_v3_reference/030_entity_services_reference/purchase Billable status is applicable only when there is CustomerRef passed in the request and applicable to the specific account types: 1. Expense 2. Other Expense 3. Cost of Goods Sold

Please check if your Account types match the above.

分享给朋友:
您可能感兴趣的文章:
随机阅读: