我有一个有效的 QBXML 界面,但我似乎无法将几个数据项添加到发票上传(到 QB)中。我正在尝试添加发票日期和采购订单号。
QB 返回的错误是:
QuickBooks 在解析提供的 XML 文本流时发现错误。
为了确保我使用正确的 XML 格式,我在相反的方向(从 QB)进行了传输,以查看它发送的内容。
向 QB 发送发票时,我添加了以下两个 XML 元素(导致问题):
<TxnDate>2013-04-02</TxnDate>
和
<PONumber>ABC123</PONumber>
一个或两个都会产生错误。如果我省略两者,它会起作用。
例如,以下工作:
<?xml version="1.0" ?><?qbxml version="10.0"?><QBXML><QBXMLMsgsRq onError = "stopOnError"><InvoiceAddRq requestID = "1"><InvoiceAdd><CustomerRef><ListID>800000D1-1371755142</ListID></CustomerRef><RefNumber>0071010001P</RefNumber><Memo></Memo><InvoiceLineAdd><ItemRef><ListID>80000001-1288815007</ListID></ItemRef><Desc>Software License Fee as per 6/19/07 Licensing Agreement</Desc><Quantity>1.00</Quantity><Rate>4000.0000</Rate></InvoiceLineAdd><InvoiceLineAdd><ItemRef><ListID>80000001-1288815007</ListID></ItemRef><Desc>Consulting hours as per 7/16/07 Large Contract for Consulting Services</Desc><Quantity>50.00</Quantity><Rate>100.0000</Rate></InvoiceLineAdd></InvoiceAdd></InvoiceAddRq> </QBXMLMsgsRq></QBXML>
但以下不起作用:
<?xml version="1.0" ?><?qbxml version="10.0"?><QBXML><QBXMLMsgsRq onError = "stopOnError"><InvoiceAddRq requestID = "1"><InvoiceAdd><CustomerRef><ListID>800000D1-1371755142</ListID></CustomerRef><RefNumber>0071010001P</RefNumber><Memo></Memo><TxnDate>2013-04-02</TxnDate><InvoiceLineAdd><ItemRef><ListID>80000001-1288815007</ListID></ItemRef><Desc>Software License Fee as per 6/19/07 Licensing Agreement</Desc><Quantity>1.00</Quantity><Rate>4000.0000</Rate></InvoiceLineAdd><InvoiceLineAdd><ItemRef><ListID>80000001-1288815007</ListID></ItemRef><Desc>Consulting hours as per 7/16/07 Large Contract for Consulting Services</Desc><Quantity>50.00</Quantity><Rate>100.0000</Rate></InvoiceLineAdd></InvoiceAdd></InvoiceAddRq> </QBXMLMsgsRq></QBXML>
以下不起作用:
<?xml version="1.0" ?><?qbxml version="10.0"?><QBXML><QBXMLMsgsRq onError = "stopOnError"><InvoiceAddRq requestID = "1"><InvoiceAdd><CustomerRef><ListID>800000D1-1371755142</ListID></CustomerRef><RefNumber>0071010001P</RefNumber><Memo></Memo><PONumber >ABC123</PONumber><InvoiceLineAdd><ItemRef><ListID>80000001-1288815007</ListID></ItemRef><Desc>Software License Fee as per 6/19/07 Licensing Agreement</Desc><Quantity>1.00</Quantity><Rate>4000.0000</Rate></InvoiceLineAdd><InvoiceLineAdd><ItemRef><ListID>80000001-1288815007</ListID></ItemRef><Desc>Consulting hours as per 7/16/07 Large Contract for Consulting Services</Desc><Quantity>50.00</Quantity><Rate>100.0000</Rate></InvoiceLineAdd></InvoiceAdd></InvoiceAddRq> </QBXMLMsgsRq></QBXML>
我在这上面至少花了 30 个小时。我完全失去了更多的想法。任何帮助,将不胜感激。
布莱克麦克布莱德