QuickBooks发票修改与创建相比具有不同的地址行为,该如何补偿? [英] QuickBooks invoice modify has different address behavior than create, how to compensate?

查看:87
本文介绍了QuickBooks发票修改与创建相比具有不同的地址行为,该如何补偿?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个函数,以定义的格式提取发票文件,并通过qbXML将其导入QuickBooks.要求之一是,可以重新导入与修改现有发票相同的发票编号,而不用创建具有相同编号的新发票.

I'm writting a function to take an invoice file in a defined format and import it into QuickBooks via qbXML. One of the requrements is that it be possible to reimport the same invoice number than that the existing invoice be modified rather than create a new one with the same number.

我遇到的问题是QuickBooks如何处理地址.我要获取的地址可以是任何格式(6种不同内容),而不能保证一定要遵守该语言环境的正确地址格式.

The problem I have is with how QuickBooks handles addresses. The addresses I'm getting can be in any format (In 6 different contenents), without any guarantee of adherence to a proper address format for that locale.

因此创建发票非常简单,我在xml标签中指定了帐单地址addr1到addr5,而QuickBooks则毫无问题. 但是,它不会将地址存储为原始文本,而是尝试解析城市,州邮政编码和国家/地区.

So creating the invoice is simple enough, I specify in the xml tag the billing address addr1 through addr5, and QuickBooks takes it no problem. HOWEVER it doesn't store the address as raw text, it attempts to parse out the city, state postal code and country.

在给定相同地址信息的情况下,发票修改不会解析出城市所在州和邮政编码,而是保留地址行不变,并保留城市所在州和邮政编码不变,从而在发票上创建一条重复的行,其中之一是免费的表格文字,由城市,州和邮政编码组成的另一种文字.解决方法是明确设置城市国家的邮递区号,并在发票修改时将其备注留空.但是,这并不能完全解决问题.

Invoice modify, given the same address information, will not parse out the city state and zip, but rather leave the address line intact, and leave the city state and zip untouched, creating a duplicate line on the invoice, one of free form text, the other of the composite of city, state and postal code. The workaround for that was to explicity set city state zip country and note to blank on invoice modify. However, that hasn't fully solved the problem.

有时QuickBooks会正确解析地址,并在下一行添加一个随机数(内部显示在注释"选项卡上).

Sometimes QuickBooks will correctly parse the address and add a random number on the next line (internally represented on the note tab).

有时QuickBooks会拒绝该地址,甚至认为它在创建时就接受了该地址.我认为是因为它试图解析5行地址,并且由于城市状态和邮政编码无处可去,因此没有修改的地方,因此无法对其进行修改.

And sometimes QuickBooks will reject the address, even thought it accepted it on create. I assume because it is trying to parse a 5 line address and on modify since the city state and postal code have no where to go, it has no place to store them.

现在,我唯一的解决方案是简单地保持地址不变,并告诉用户由于QuickBooks的限制,无法重新导入发票时修改地址,只能更改发票行.

Right now my only solution is to simply leave the address untouched, and tell the user that due to QuickBooks limitations there is no way to modify the address on reimport of the invoice, only invoice lines.

以前有人遇到过这种情况吗?如果是,您有更好的解决方法吗?您是否知道一个地址解析器可以合理地近似快速书的功能,因此我可以在创建时以一致的方式向其发送城市州和邮政编码?

Has anyone run into this before, and if so, do you have a better work around? Do you know of an address parser that can reasonably approximate what quickbooks does so I can send it city state and postal code on create in a consistent manner?

现在,在某种程度上(除了最后一个),QuickBooks给了我一个响应,告诉我它在create时解析的内容,因此我可以从理论上存储它来知道我要处理的内容,但是花了一些时间消耗地址解析例程的方法是否有解决方案,可以使快速手册从新地址解析地址.

Now, to some degree (except for that last one) QuickBooks is giving me a response that tells me what it parsed on create, so I could theoretically store that to know what I am dealing with, but short of writing some time consuming address parsing routines is there any solution to get quickbooks to re parse the address from new.

这是请求和响应.请注意,发票的创建是相同的,并且我删除了一些识别信息,但字段的长度保持不变.

Here is the request and the response. Note that the invoice create was identical, and that I removed some identifying information, but kept the field lengths the same.

请求:

<?xml version="1.0" encoding="UTF-8"?>  <?qbxml version="7.0"?>
<QBXML>
<QBXMLMsgsRq newMessageSetID="243f42acf4011139b7a" onError="stopOnError">
    <InvoiceModRq>
        <InvoiceMod>
            <TxnID>4E64-1242411202</TxnID>
            <EditSequence>1242411202</EditSequence>
            <CustomerRef>
                <ListID>80000012-1242156814</ListID>
            </CustomerRef>
            <ARAccountRef>
                <FullName>Accounts Receivable</FullName>
            </ARAccountRef>
            <TxnDate>2009-04-01</TxnDate>
            <RefNumber>M-053491</RefNumber>
            <BillAddress>
                <Addr1>S &amp; S ACME CO., INC.</Addr1>
                <Addr2>MR. ABC ABCDEF</Addr2>
                <Addr3>981 ABCD 761 ST</Addr3>
                <Addr4>ABABC, AA 99999-3584</Addr4>
                <Addr5>USA</Addr5>
                <City/>
                <State/>
                <PostalCode/>
                <Country/>
                <Note/>
            </BillAddress>
            <TermsRef>
                <FullName>NET 30</FullName>
            </TermsRef>
            <DueDate>2009-05-01</DueDate>
            <InvoiceLineMod>
                <TxnLineID>-1</TxnLineID>
                <Desc/>
            </InvoiceLineMod>
            <InvoiceLineMod>
                <TxnLineID>-1</TxnLineID>
                <Desc>ABCDEFG ABC $3,000.00 *</Desc>
            </InvoiceLineMod>
            <InvoiceLineMod>
                <TxnLineID>-1</TxnLineID>
                <Desc/>
            </InvoiceLineMod>
            <InvoiceLineMod>
                <TxnLineID>-1</TxnLineID>
                <Desc>FOR:</Desc>
            </InvoiceLineMod>
            <InvoiceLineMod>
                <TxnLineID>-1</TxnLineID>
                <ItemRef>
                    <FullName>ANFEE</FullName>
                </ItemRef>
                <Desc>1 . #9999 S &amp; S ABCD CO., INC., ABCDE, AA *</Desc>
                <Amount>123456.72</Amount>
            </InvoiceLineMod>
            <InvoiceLineMod>
                <TxnLineID>-1</TxnLineID>
                <Desc/>
            </InvoiceLineMod>
            <InvoiceLineMod>
                <TxnLineID>-1</TxnLineID>
                <Desc>PLEASE NOTE: Blahh Someone sellificant repeats on July 31st, 2009.</Desc>
            </InvoiceLineMod>
            <InvoiceLineMod>
                <TxnLineID>-1</TxnLineID>
                <Desc>Sellifcan of your Someone Ssellificant to Jan. 31st, 2011 is contingent upon</Desc>
            </InvoiceLineMod>
            <InvoiceLineMod>
                <TxnLineID>-1</TxnLineID>
                <Desc>your satisfying all open invoices and all other/different issues.</Desc>
            </InvoiceLineMod>
            <InvoiceLineMod>
                <TxnLineID>-1</TxnLineID>
                <Desc/>
            </InvoiceLineMod>
            <InvoiceLineMod>
                <TxnLineID>-1</TxnLineID>
                <Desc/>
            </InvoiceLineMod>
            <InvoiceLineMod>
                <TxnLineID>-1</TxnLineID>
                <Desc>* PLUS expenses for some amount of service described here.</Desc>
            </InvoiceLineMod>
        </InvoiceMod>
    </InvoiceModRq>
</QBXMLMsgsRq>
</QBXML>

响应:

    <?xml version="1.0" ?> <QBXML>
<QBXMLMsgsRs newMessageSetID="243f42acf4011139b7a">
<InvoiceModRs statusCode="3210" statusSeverity="Error"
              statusMessage="The &quot;address&quot; field has an invalid value &quot;&quot;.  QuickBooks error message: The parameter is incorrect. "/>
</QBXMLMsgsRs>
</QBXML> 

推荐答案

此处的另一种可能的解决方法是对发票进行两次更新.首先将地址空白.其次是发送五行代码,而无需提及城市国家的zip等,就像创建时一样.

Another potential workaround here is to double-update the invoice. First blank out the address. Second is send the five lines without any mention of the city state zip, etc., as was done on create.

我没有对此进行测试(用户接受了地址不会更改,因此我不会尝试),但是我将其作为一种想法,因此,如果有人遇到类似的问题,他们会可以尝试一下,如果可行的话,可以在这里发表评论.

I didn't test this (the users accepted that the address won't change, so I'm not going to try it), but I'm putting this here as an idea so if someone has a similar problem they can try it and perhaps comment here if it works.

这篇关于QuickBooks发票修改与创建相比具有不同的地址行为,该如何补偿?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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