本文介绍了不支持的操作:具有 BillableStatus 的费用应该在购买中具有 AccountBasedExpenseLineDetail 行的 CustomerRef的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已尝试使用 PHP SDK 和以下 XML 请求内容将购买作为支票提交给 QBD:

I have attempted to submit a Purchase as Check to QBD using PHP SDK with the below XML request content:

<?xml version="1.0" encoding="UTF-8"?>
<ns0:Purchase xmlns:ns0="http://schema.intuit.com/finance/v3" domain="QB">
  <ns0:TxnDate>2014-02-21</ns0:TxnDate>
  <ns0:PrivateNote>Test for QBD Purchase Check</ns0:PrivateNote>
  <ns0:Line>
    <ns0:Description>E1</ns0:Description>
    <ns0:Amount>10.00</ns0:Amount>
    <ns0:DetailType>AccountBasedExpenseLineDetail</ns0:DetailType>
    <ns0:AccountBasedExpenseLineDetail>
      <ns0:ClassRef name="Coffee and tea">QB:8</ns0:ClassRef>
      <ns0:AccountRef name="Computer and Internet Expenses">QB:10</ns0:AccountRef>
      <ns0:BillableStatus>NotBillable</ns0:BillableStatus>
      <ns0:TaxCodeRef>NON</ns0:TaxCodeRef>
    </ns0:AccountBasedExpenseLineDetail>
  </ns0:Line>
  <ns0:Line>
    <ns0:Description>E2</ns0:Description>
    <ns0:Amount>15.00</ns0:Amount>
    <ns0:DetailType>AccountBasedExpenseLineDetail</ns0:DetailType>
    <ns0:AccountBasedExpenseLineDetail>
      <ns0:CustomerRef name="Arnold Schwarzenegger">QB:3</ns0:CustomerRef>
      <ns0:ClassRef name="Alcoholic beverages">QB:2</ns0:ClassRef>
      <ns0:AccountRef name="Computer and Internet Expenses">QB:10</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="Herry Pilor">QB:9</ns0:EntityRef>
  <ns0:TotalAmt>25.00</ns0:TotalAmt>
</ns0:Purchase>

因为这两行都被标记为 BillableStatus=NotBillable,所以第一行没有 CustomerRef.

Since both lines have been marked BillableStatus=NotBillable, however, the first line comes without CustomerRef.

提交该内容应获得此响应消息:

Submit that content should get this response message:

http://schema.intuit.com/finance/v3" time="2014-02-21T09:04:42.972Z">Operation failed with errors:
Operation not supported: Expense with BillableStatus should have CustomerRef for AccountBasedExpenseLineDetail Line in Purchase </Message></Error></Fault></IntuitResponse>

那么问题是为什么在 BillableStatus=NotBillable 时需要 Customer?

So the question is that why it requires Customer when BillableStatus=NotBillable?

但是在之前的 Java API 版本中,NotBillable 时没有 Customer 预期

But in the previous Java API version, there was no Customer expected when NotBillable

请指教.谢谢

推荐答案

如果未指定 CustomerRef,则必须从请求中排除 BillableStatus.这是一个已知问题.

BillableStatus must be excluded from the request if CustomerRef is not specified. This is a known issue.

这篇关于不支持的操作:具有 BillableStatus 的费用应该在购买中具有 AccountBasedExpenseLineDetail 行的 CustomerRef的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 23:56