我正在制作SalesOrderQuery以获取在Quickbooks Desktop中创建的销售订单。
我已经在QB Desktop中创建了一些销售订单,并像拣选,打包和运输一样处理它们。因此,现在我想查询以获取所有订单信息,如状态被拣选,包装所有物品。我是这样的:-
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="7.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<SalesOrderQueryRq requestID="2">
<IncludeLineItems>true</IncludeLineItems>
</SalesOrderQueryRq>
</QBXMLMsgsRq>
</QBXML>
因此,现在我收到的响应中没有任何当前的订单状态和商品状态,例如它的拣选,包装或运输状态。
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<SalesOrderQueryRs requestID="3" statusCode="0">
<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>
<SalesOrderLineRet>
<TxnLineID>1D2122-1551440932</TxnLineID>
<ItemRef>
<ListID>8000051F-1549043481</ListID>
<FullName>1022</FullName>
</ItemRef>
<Desc>Asher Dark Chocolate Marzipan 6lbs</Desc>
<Quantity>1</Quantity>
<Rate>49.86</Rate>
<Amount>49.86</Amount>
<InventorySiteRef>
<ListID>80000001-1552335210</ListID>
<FullName>717 Fellowship Rd</FullName>
</InventorySiteRef>
<InventorySiteLocationRef>
<ListID>80000009-1552500146</ListID>
<FullName>717 Fellowship Rd:F19C4</FullName>
</InventorySiteLocationRef>
<SalesTaxCodeRef>
<ListID>80000002-1548687341</ListID>
<FullName>Non</FullName>
</SalesTaxCodeRef>
<Invoiced>0</Invoiced>
<IsManuallyClosed>false</IsManuallyClosed>
</SalesOrderLineRet>
</SalesOrderRet>
</SalesOrderQueryRs>
</QBXMLMsgsRs>
答案 0 :(得分:0)
Quickbooks通过将交易链接到发票来跟踪已发货/已开票的订单项。
如果在请求XML中包括以下内容,您将获得一个链接的发票列表,然后可以遍历这些发票,以求出已发货/已开票的数量总和,并将其从订购数量中扣除以推断剩余数量。
<IncludeLinkedTxns>true</IncludeLinkedTxns>