我们有 QuickBooks 加拿大版。当我们获取采购订单的记录时,它确实会返回所有记录,并且会返回由 QuickBooks CA 添加的税行。
<?xml version="1.0" encoding="ISO-8859-1"?>
<?qbxml version="12.0"?>
<QBXML>
<QBXMLMsgsRq onError="continueOnError">
<PurchaseOrderQueryRq requestID="1">
<TxnID>2304-1229340744</TxnID>
<IncludeLineItems>1</IncludeLineItems>
<IncludeLinkedTxns>0</IncludeLinkedTxns>
<IncludeRetElement>TxnID</IncludeRetElement>
<IncludeRetElement>EditSequence</IncludeRetElement>
<IncludeRetElement>PurchaseOrderLineGroupRet</IncludeRetElement>
<IncludeRetElement>PurchaseOrderLineRet</IncludeRetElement>
<OwnerID>0</OwnerID>
</PurchaseOrderQueryRq>
</QBXMLMsgsRq>
</QBXML>
额外的行响应是
<PurchaseOrderLineRet>
<TxnLineID>2311-1229340744</TxnLineID>
<ItemRef>
<ListID>490000-1195038595</ListID>
<FullName>Summary GST for purchases</FullName>
</ItemRef>
<Desc>Total GST</Desc>
<Rate>5.0%</Rate>
<ClassRef>
<ListID>40001-1199213409</ListID>
<FullName>Pro Shop:Special orders</FullName>
</ClassRef>
<Amount>798.00</Amount>
<CustomerRef>
<ListID>10000-1193777303</ListID>
<FullName>Receiver General</FullName>
</CustomerRef>
<ReceivedQuantity>0</ReceivedQuantity>
<IsBilled>false</IsBilled>
<IsManuallyClosed>false</IsManuallyClosed>
</PurchaseOrderLineRet>
有没有办法识别这一行。问题是,如果我们要更新此订单,我们需要发送所有订单行。如果我们发送最后一行是 Tax(由 QB 生成),QuickBooks SDK 会抛出错误。MLMsgsRs>
<PurchaseOrderModRs requestID="1" statusCode="3120" statusSeverity="Error" statusMessage="Object "2311-1229340744" specified in the request cannot be found. " />
所以我们需要在 PurchaseOrderModRq 上排除这一行
注意:并非所有采购订单的最后一行都有此税行。