通过IPP向Quickbooks添加发票会导致同步错误

时间:2013-02-24 23:20:02

标签: quickbooks intuit-partner-platform ipp-qbd-sync

当我尝试通过.net IPP SDK添加发票时,发票添加请求成功运行,但是一旦从Quickbooks中的同步管理器启动同步,我就会收到错误消息。只有在使用GetSyncActivity()

检索状态时才会显示错误

我看到的错误是:

  

QBXML验证错误:   [severity = FATAL_ERROR,message = cvc-complex-type.2.4.a:内容无效   被发现从元素'TxnDate'开始。 '{CustomerRef}'之一是   预期,定位器= [URL =无效,线= -1,柱= -1,节点= NULL,对象= com.intuit.sb.datasync.writeback.qbxml.schema.InvoiceAdd @ 4538d9d1,字段=空]] < / p>

我启用了请求日志记录,在查看生成和发送的发票XML时,如果我将其与在线文档中的示例请求进行比较,则看起来没有任何错误。我已经尝试指定其他客户ID可能存在的问题,指定帐单邮寄地址/送货地址,并指定ARAccountRef,但这些更改都不会对错误产生任何影响。

我有什么遗漏,或者你能想到的任何我可以尝试解决的问题吗?

请求:

<Add xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.intuit.com/sb/cdm/v2" RequestId="fd0822d7666248119d8ee482f264bd84" FullResponse="true">
<ExternalRealmId>Realm ID removed</ExternalRealmId>
<Object xsi:type="Invoice">
<SyncToken>0</SyncToken>
<MetaData>
<CreateTime>2013-02-24T18:05:21.1706511-05:00</CreateTime>
<LastUpdatedTime>2013-02-24T18:05:21.1706511-05:00</LastUpdatedTime>
</MetaData>
<Header>
<DocNumber>232751</DocNumber>
<CustomerId>11505739</CustomerId>
<CustomerName/>
<TotalAmt>900.00</TotalAmt>
<SalesTermId idDomain="QB">3</SalesTermId>
<DueDate>2013-02-24T00:00:00-05:00</DueDate>
<BillAddr/>
<ShipAddr/>
<ShipMethodId/>
<DiscountAmt>0</DiscountAmt>
</Header>
<Line>
<Desc>Test</Desc>
<Amount>900.00</Amount>
<ItemId>3377682</ItemId>
<UnitPrice>180.00</UnitPrice>
<Qty>5</Qty>
<ServiceDate>2013-02-24T18:05:21.1956543-05:00</ServiceDate>
</Line>
</Object>
</Add>

响应:

<RestResponse xmlns="http://www.intuit.com/sb/cdm/v2">
<Success RequestId="fd0822d7666248119d8ee482f264bd84">
<Invoice>
<Id idDomain="NG">12313656</Id>
<SyncToken>1</SyncToken>
<MetaData>
<CreatedBy>app</CreatedBy>
<CreateTime>2013-02-24T23:05:25Z</CreateTime>
<LastModifiedBy>app</LastModifiedBy>
<LastUpdatedTime>2013-02-24T23:05:25Z</LastUpdatedTime>
</MetaData>
<Synchronized>false</Synchronized>
<Header>
<DocNumber>232751</DocNumber>
<TxnDate>2013-02-24T00:00:00Z</TxnDate>
<CustomerId idDomain="NG">11505739</CustomerId>
<SubTotalAmt>900</SubTotalAmt>
<TaxRate>0</TaxRate>
<TaxAmt>0</TaxAmt>
<TotalAmt>900</TotalAmt>
<SalesTermId idDomain="QB">3</SalesTermId>
<DueDate>2013-02-24T00:00:00Z</DueDate>
<BillAddr>
<Tag>Billing</Tag>
</BillAddr>
<ShipAddr>
<Tag>Shipping</Tag>
</ShipAddr>
<Balance>900</Balance>
</Header>
<Line>
<Id idDomain="NG">37505805</Id>
<Desc>Test</Desc>
<Amount>900</Amount>
<Taxable>false</Taxable>
<ItemId idDomain="NG">3377682</ItemId>
<UnitPrice>180</UnitPrice>
<Qty>5</Qty>
<ServiceDate>2013-02-24T00:00:00Z</ServiceDate>
</Line>
</Invoice>
<RequestName>InvoiceAdd</RequestName>
<ProcessedTime>2013-02-24T23:05:25Z</ProcessedTime>
</Success>
</RestResponse>

通过调用GetSyncStatus(...)检索的信息,ErroredObjectsOnly = True指定

requestId: "fd0822d7666248119d8ee482f264bd84",
stateCode: "9",
stateDesc: "Record has fatal error",
messageCode: "100",
messageDesc: "QBXML validation error: [severity=FATAL_ERROR,message=cvc-complex-type.2.4.a: Invalid content was found starting with element 'TxnDate'. One of '{CustomerRef}' is expected.,locator=[url=null,line=-1,column=-1,node=null,object=com.intuit.sb.datasync.writeback.qbxml.schema.InvoiceAdd@4538d9d1,field=null]] ",
responseLogTMS: "2013-02-24T23:06:22Z",
idsType: "Intuit.Ipp.Data.Qbd"

0 个答案:

没有答案