如何使用qbxml和qbsdk13修改快速书中的发票? [英] How to modify an invoice in quickbooks using qbxml and qbsdk13?

查看:64
本文介绍了如何使用qbxml和qbsdk13修改快速书中的发票?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的QBXML请求

This is my QBXML request

<?xml version="1.0" ?>
<?qbxml version="6.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <InvoiceModRq requestID="1">
            <InvoiceMod>
                <TxnID>85-1442639879</TxnID>
                <EditSequence>1442639879</EditSequence>
                <CustomerRef>
                    <ListID>80000005-1442639850</ListID>
                    <FullName>Bruce Banner</FullName>
                </CustomerRef>
                <TxnDate>2015-09-19</TxnDate>
                <RefNumber>5462</RefNumber>
                <InvoiceLineMod>
                    <ItemRef>
                        <ListID>8000000A-1442469770</ListID>
                        <FullName>Item 1</FullName>
                    </ItemRef>
                    <Quantity>1</Quantity>
                    <Rate>1100.00</Rate>
                </InvoiceLineMod>
            </InvoiceMod>
        </InvoiceModRq>
    </QBXMLMsgsRq>
</QBXML>

我遇到一个错误 在解析提供的XML文本流时,QuickBooks发现错误.

I am getting an error QuickBooks found an error when parsing the provided XML text stream.

请帮助

推荐答案

如果您引用QuickBooks OSR:

If you refer to the QuickBooks OSR:

您会注意到,在<InvoiceLineMod>元素内,该节点是 required :

You'll notice that within the <InvoiceLineMod> element, this node is required:

  • <TxnLineID>

OSR也为您提供了更多信息:

The OSR gives you a bit more information too:

TxnLineID

交易行的标识号. (TxnLineID 从SDK v2.0开始受支持.使用qbXML v1.0和v1.1, TxnLineID始终返回零.)

Identification number of the transaction line. (TxnLineID is supported as of v2.0 of the SDK. With qbXML v1.0 and v1.1, TxnLineID is always returned as zero.)

如果您需要在交易模块中添加新的交易行 请求,您可以通过将TxnLineID设置为-1来实现.

If you need to add a new transaction line in a transaction Mod request, you can do so by setting the TxnLineID to -1.

因此,您需要添加一个<TxnLineID>节点.如果是新订单项,请在节点内输入-1作为内容.如果这是您要更新的现有行,请在其中放置现有行的TxnLineID值.

So, you'll need to add in a <TxnLineID> node. If it's a new line item, put -1 for the content within the node. If it's an existing line you're trying to update, put the TxnLineID value of the existing line in there.

示例:

...
<InvoiceLineMod>
    <TxnLineID>-1</TxnLineID>
    <ItemRef>
        <ListID>8000000A-1442469770</ListID>
        <FullName>Item 1</FullName>
    </ItemRef>
    <Quantity>1</Quantity>
    <Rate>1100.00</Rate>
</InvoiceLineMod>
...

这篇关于如何使用qbxml和qbsdk13修改快速书中的发票?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆