quickbooks桌面Web连接器qbxml:使用CLASS字段添加发票

时间:2015-01-24 11:42:41

标签: quickbooks qbxml

我尝试添加发票并使用值填充其CLASS字段(我无法发布发票的屏幕截图" CLASS"字段,因为我不是有声誉,它的领域就在" PRICE EACH"领域的权利,我不知道如何在qbxml中添加CLASS值。 这是我使用的xml,它可以工作:

$xml = '<?xml version="1.0" encoding="utf-8"?>
            <?qbxml version="2.0"?>
            <QBXML>
              <QBXMLMsgsRq onError="stopOnError">
                <InvoiceAddRq requestID="xxxxxxxx">
                  <InvoiceAdd>
                    <CustomerRef>
                      <FullName>Some company:12 street gotham</FullName>
                    </CustomerRef>
                    <TxnDate>2015-01-23</TxnDate>
                    <RefNumber>TPY125</RefNumber>
                    <BillAddress>
                      <Addr1>some bill address</Addr1>
                      <City>some bill city</City>
                      <State>some bill state</State>
                      <PostalCode>some bill zip</PostalCode>
                      <Country>United States</Country>
                    </BillAddress>
                    <ShipAddress>
                        <Addr1>some ship address</Addr1>
                        <City>some ship address</City>
                        <State>some ship state</State>
                        <PostalCode>some ship zip</PostalCode>
                        <Country>United States</Country>
                    </ShipAddress>
                    <PONumber></PONumber>
                    <TermsRef>
            <FullName>Net 120</FullName>
                    </TermsRef>
                    <Memo></Memo>

                    <InvoiceLineAdd>
                      <ItemRef>
                        <FullName>16 Electrical and Lighting</FullName>
                      </ItemRef>
                      <Desc>Item 1 Description Goes Here</Desc>
                      <Quantity>1</Quantity>
                      <Rate>33.00</Rate>                      
                    </InvoiceLineAdd>

                  </InvoiceAdd>
                </InvoiceAddRq>
              </QBXMLMsgsRq>
            </QBXML>';

我正在使用QuickBooks Enterprise,Web连接器版本:2.1.0.30。那么我需要在xml中为&#34; CLASS&#34;添加什么?领域? 提前谢谢。

1 个答案:

答案 0 :(得分:1)

您可以随时参考QuickBooks OSR for QuickBooks桌面的XML参考:

在这种特定情况下,您可以在每个订单项的基础上设置Class,如下所示:

                ...
                <InvoiceLineAdd>
                  <ItemRef>
                    <FullName>16 Electrical and Lighting</FullName>
                  </ItemRef>
                  <Desc>Item 1 Description Goes Here</Desc>
                  <Quantity>1</Quantity>
                  <Rate>33.00</Rate>   

                  <ClassRef>
                    <ListID> ... specify a ListID here ...</ListID
                     <!-- Or, instead of ListID you can specify: -->
                    <FullName> ... specify Class FullName here ...</FullName>

                </InvoiceLineAdd>
                ...