我正在 SalesOrderQuery 获取在 Quickbooks Desktop Enterprise版本18.0 中创建的销售订单。
我已在QB Desk创建了一些销售订单并查询了它们,但我找不到我在创建订单时添加的销售订单项。
OSR显示我,SalesOrderQueryRs将包含 SalesOrderLineRet ,我假设是该订单的项目列表。
OSR(https://developer-static.intuit.com/qbsdk-current/common/newosr/index.html)
这是我的示例查询:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="7.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<SalesOrderQueryRq requestID="2">
</SalesOrderQueryRq>
</QBXMLMsgsRq>
</QBXML>
这是我得到的没有包含物品清单的分配:
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<SalesOrderQueryRs requestID="3" statusCode="0" statusMessage="Status OK" statusSeverity="Info">
<SalesOrderRet>
<TxnID>2672D-1671085403</TxnID>
<TimeCreated>2022-12-15T06:23:23+00:00</TimeCreated>
<TimeModified>2022-12-15T06:23:23+00:00</TimeModified>
<EditSequence>1671085403</EditSequence>
<TxnNumber>1778</TxnNumber>
<CustomerRef>
<ListID>800000D0-1182061376</ListID>
<FullName>Allard, Robert</FullName>
</CustomerRef>
<TemplateRef>
<ListID>120000-1071512690</ListID>
<FullName>Custom Sales Order</FullName>
</TemplateRef>
<TxnDate>2022-12-15</TxnDate>
<RefNumber>7005</RefNumber>
<BillAddress>
<Addr1>Robert Allard</Addr1>
<Addr2>92834 Chandler St.</Addr2>
<City>Millbrae</City>
<State>CA</State>
<PostalCode>94030</PostalCode>
</BillAddress>
<BillAddressBlock>
<Addr1>Robert Allard</Addr1>
<Addr2>92834 Chandler St.</Addr2>
<Addr3>Millbrae, CA 94030</Addr3>
</BillAddressBlock>
<ShipAddress>
<Addr1>Robert Allard</Addr1>
<Addr2>92834 Chandler St.</Addr2>
<City>Millbrae</City>
<State>CA</State>
<PostalCode>94030</PostalCode>
</ShipAddress>
<ShipAddressBlock>
<Addr1>Robert Allard</Addr1>
<Addr2>92834 Chandler St.</Addr2>
<Addr3>Millbrae, CA 94030</Addr3>
</ShipAddressBlock>
<PONumber>123456</PONumber>
<DueDate>2022-12-15</DueDate>
<ShipDate>2022-12-15</ShipDate>
<Subtotal>192.00</Subtotal>
<ItemSalesTaxRef>
<ListID>2E0000-933272656</ListID>
<FullName>San Tomas</FullName>
</ItemSalesTaxRef>
<SalesTaxPercentage>7.75</SalesTaxPercentage>
<SalesTaxTotal>14.88</SalesTaxTotal>
<TotalAmount>206.88</TotalAmount>
<IsManuallyClosed>false</IsManuallyClosed>
<IsFullyInvoiced>false</IsFullyInvoiced>
<CustomerMsgRef>
<ListID>8000000A-1671085397</ListID>
<FullName>Test Order 2 having Wood Doors in order.</FullName>
</CustomerMsgRef>
<IsToBePrinted>true</IsToBePrinted>
<IsToBeEmailed>false</IsToBeEmailed>
<CustomerSalesTaxCodeRef>
<ListID>10000-999022286</ListID>
<FullName>Tax</FullName>
</CustomerSalesTaxCodeRef>
</SalesOrderRet>
</SalesOrderQueryRs>
</QBXMLMsgsRs>
</QBXML>
我的QBXML请求中是否有任何错误或其他任何需要?
答案 0 :(得分:1)
SalesOrderQuery
请求类型支持一些可选标记,您可以传入这些标记以调整您在响应中返回的内容。
具体来说:
<IncludeLineItems >BOOLTYPE</IncludeLineItems> <!-- optional -->
<IncludeLinkedTxns >BOOLTYPE</IncludeLinkedTxns> <!-- optional -->
在您的情况下,如果您想要订单项,则应将其添加到您的查询中:
<IncludeLineItems>true</IncludeLineItems>
然后,您将获得您期望的<SalesOrderLineRet>
个节点。