我正在尝试添加发票并用值填充其 CLASS 字段(我无法发布发票"CLASS"字段的屏幕截图,因为我没有声誉,它是"价格每个"字段右侧的字段),我不知道如何在 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 中添加什么来为"CLASS"字段添加什么呢?提前谢谢。
您可以随时参考 QuickBooks OSR for XML for QuickBooks 桌面参考:
- https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html
在此特定情况下,您可以按订单项设置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>
...