0

我正在制作SalesOrderQuery以获取在Quickbooks Desktop Enterprise Version 18.0中创建的销售订单。

我在 QB Desk 中创建了一些销售订单并进行了查询,但是我找不到在创建订单时添加的销售订单 item 。

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 请求中是否有任何错误或其他任何需要的内容?

4

1 回答 1

1

请求类型支持一些可选标志,SalesOrderQuery您可以传入以调整您在响应中返回的内容。

具体来说:

<IncludeLineItems >BOOLTYPE</IncludeLineItems> <!-- optional -->
<IncludeLinkedTxns >BOOLTYPE</IncludeLinkedTxns> <!-- optional -->

在您的情况下,如果您想要订单项,那么您应该将其添加到您的查询中:

<IncludeLineItems>true</IncludeLineItems>

然后你会得到<SalesOrderLineRet>你期望的节点。

于 2018-03-05T18:58:04.760 回答