Topic: How to change DepotiToAccount before selecting Customer?

So I've encountered a very strange error today. We are trying to import a bunch of transactions into QB using web connector. About 2/3rd of them in GBP and remaining in EUR. We have all accounts set up properly and I'm passing the exchange rate with my requests.

Now, if I log in to quickbooks and try to manually enter a sales receipt I need to select deposit to account for different currency before I can select a matching customer, otherwise I'll get an error that currencies do not match (see screenshot 1)

Here is where things get interesting - as long as I try to add new sales receipts with web connector that match the currency of that last manually selected deposit to account everything works. But the moment I try to enter a sales receipt for different currency I get:

"There is an invalid reference to QuickBooks Customer "Retail, Customer GBP" in the SalesReceipt.  QuickBooks error message: The currency of the account must be either in home currency or the transaction currency."

Here is the juicy part - if I log into QB manually and open 'create sales receipt' form and change deposit to account to GBP, now all transactions send by web connector in GBP will go through directly and those in EUR will cause the same error above.

My XML request contains proper account info, but it seems like it's out of order - the customer account triggers error before quickbooks has a chance to get to the DepositToAccount part.

The question is - how to change that deposit account in my request automatically?

Last edited by Tomasz (2014-12-18 10:48:01)

Post's attachments

Screen Shot 2014-12-18 at 11.13.45 AM.png 162.18 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: How to change DepotiToAccount before selecting Customer?

Can you post the qbXML request and response showing the error?

Re: How to change DepotiToAccount before selecting Customer?

Here is full request:

<?xml version="1.0" encoding="utf-8"?>
            <?qbxml version="8.0"?>
            <QBXML>
                <QBXMLMsgsRq onError="continueOnError"><SalesReceiptAddRq>
    <SalesReceiptAdd>
        <CustomerRef>
            <FullName>Retail, Customer GBP</FullName>
        </CustomerRef>
        <TxnDate>2014-01-03</TxnDate>
        <RefNumber>xxxxxx</RefNumber>
        <BillAddress>
            <Addr1>xxxxxx</Addr1>
            <Addr2>xxxxxx</Addr2>
            <Addr3>xxxxxx</Addr3>
            <Addr4>xxxxxx</Addr4>
        </BillAddress>
        <ShipAddress>
            <Addr1>xxxxxx</Addr1>
            <Addr2>xxxxxx</Addr2>
            <Addr3>xxxxxx</Addr3>
            <Addr4>xxxxxx</Addr4>
        </ShipAddress>
        <CheckNumber>xxxxxx</CheckNumber>
        <PaymentMethodRef>
            <FullName>Visa-MC</FullName>
        </PaymentMethodRef>
        <ItemSalesTaxRef>
            <FullName>GBP VAT 21%</FullName>
        </ItemSalesTaxRef>
        <Memo>xxxxxx</Memo>
        <IsToBePrinted>false</IsToBePrinted>
        <IsToBeEmailed>false</IsToBeEmailed>
        <DepositToAccountRef>
            <FullName>Account - GBP</FullName>
        </DepositToAccountRef>
        <ExchangeRate>1.64479</ExchangeRate>
        <SalesReceiptLineAdd>
            <ItemRef>
                <FullName>859952000015</FullName>
            </ItemRef>
            <Quantity>1</Quantity>
            <Amount>99.50</Amount>
            <SalesTaxCodeRef>
                <FullName>TAX</FullName>
            </SalesTaxCodeRef>
        </SalesReceiptLineAdd>
        <SalesReceiptLineAdd>
            <ItemRef>
                <FullName>Shipping</FullName>
            </ItemRef>
            <Amount>6.65</Amount>
            <SalesTaxCodeRef>
                <FullName>TAX</FullName>
            </SalesTaxCodeRef>
        </SalesReceiptLineAdd>
    </SalesReceiptAdd>
</SalesReceiptAddRq>
                </QBXMLMsgsRq>
            </QBXML>


The response:

Handled error: 3140: There is an invalid reference to QuickBooks Customer "Retail, Customer GBP" in the SalesReceipt.  QuickBooks error message: The currency of the account must be either in home currency or the transaction currency. (handler returned: )

I have no xml response, my addSalesReceiptResponse() handler is not triggered by php dev kit.

Re: How to change DepotiToAccount before selecting Customer?

The XML response is in the logs, and it's also received by any error handler you have set up.

You're positive that the currency of the customer is the same as the currency for your deposit to account?

What version of QuickBooks? Did you try the highest qbXML version your version supports?

Re: How to change DepotiToAccount before selecting Customer?

Interestingly quickbooks_log table does not contain any xml for those transactions (it does for other errors, but not for this). I'll try to write something down in my error handler to log it.

Yes, ale the accounts are in perfect order. I discovered the mechanism of the error:

1. When you open Create Sales Receipt it prepopulates Deposit To Account with last used account.
2. When you try to select customer that has different currency set than this prepopulated account Quickbooks will trigger currency mismatch error
3. Then you need to delete the customer to have empty field again, change the Deposit To Account to correct one and then you can select correct Customer, all other details and record transaction.

So my thinking is that qbXML works exactly the same way:
1. Quickbooks gets request, "opens a form" with prepopulated Deposit To Account from last transaction.
2. The it parses XML and tries to set the Customer, triggering currency mismatch error.
3. The error stops further processing, so it never gets to the XML part setting correct Deposit To Account.

I was able to import over 300 Sales Receipt yesterday in all three currencies being used in our Quickbooks. I did it by manually entering a dummy Sales Receipt in one currency, then deleting it and letting web connector import all transactions for that currency. Then I repeated the process for all remaining currencies - create dummy receipt, delete it (and let the quickbooks remember last selected deposit to account) and run web connector for that currency.

That works when you need to do history import, but isn't really a viable option for on the fly synchronization of systems.

Re: How to change DepotiToAccount before selecting Customer?

You probably have your logging set incorrectly so that that isn't logged.

Still waiting on other answers to my other questions.

This is definitely do-able -- I've done the same thing you're trying to do before without issues. So it's either a bug with your QuickBooks, or something you're doing that's causing the problem.

Re: How to change DepotiToAccount before selecting Customer?

Answers to remaining questions:
a) yes all accounts are set up properly, I'm able to enter all transactions manually and as I've said - once one transaction is entered manually for selected currency all following for that currency will go through
b) Quickbooks Premier 2012
c) I've just saw that I'm sending version 8 (the oldest that supported exchange rate), my quickbooks accepts 11. I've scheduled few transactions with version set to 11, will know in few minutes.

Re: How to change DepotiToAccount before selecting Customer?

Vente De Cialis  generic cialis canada Order Plavix Online Canada Priligy Hilft Zithromax 250 Mg Dosage

Cyproheptadine Baclofene Temoignage  cialis vs viagra Cialis 33 Anos Prezzo Viagra Italia Was Ist Viagra Wikipedia

Re: How to change DepotiToAccount before selecting Customer?

Amoxicillin Clindamycin Safe Together Precio Levitra buy accutane no rx  propecia diccionario Viagra Besoin Ordonnance

Re: How to change DepotiToAccount before selecting Customer?

Quien Vende Cialis Vendo Cialis Bologna  india 4  pharmacy levitra cheap Abc Online Pharmacy Action De Clomid Viagra Frau Bericht

Tipos A Propecia Priligy In Johor Tadalafil Overnight Delivery  cialis overnight shipping from usa Claritin Dapoxetina E Tadalafil

Re: How to change DepotiToAccount before selecting Customer?

Viagra Generikum Preis Is Keflex A Type Of Penicillin  canadian cialis Propecia E Infertilidad Venta Prix Du Cialis 20

Cyproheptadine Baclofene Temoignage  cialis vs viagra Cialis 33 Anos Prezzo Viagra Italia Was Ist Viagra Wikipedia

Re: How to change DepotiToAccount before selecting Customer?

Buy Lasix 100mg  cialis without prescription Cheapest Viagra Prices Licensed Pharmaciesmail Order Doryx Saturday Delivery Chelmsford Cialis Para Se Utiliza Viagra Prix Au Maroc

Tipos A Propecia Priligy In Johor Tadalafil Overnight Delivery  cialis overnight shipping from usa Claritin Dapoxetina E Tadalafil

Re: How to change DepotiToAccount before selecting Customer?

Prix Du Tadalis Sx Pfizer  cialis cheapest online prices Acheter Du Cialis Online Amoxicillin Dosage Infection Sinus Cialis Verkauf

Re: How to change DepotiToAccount before selecting Customer?

Prix Du Tadalis Sx Pfizer  cialis cheapest online prices Acheter Du Cialis Online Amoxicillin Dosage Infection Sinus Cialis Verkauf

Re: How to change DepotiToAccount before selecting Customer?

Nolvadex Pct For Sale  cialis 20mg price at walmart Azithreomycin Canadian Pharmacy

Re: How to change DepotiToAccount before selecting Customer?

Nolvadex Pct For Sale  cialis 20mg price at walmart Azithreomycin Canadian Pharmacy

Re: How to change DepotiToAccount before selecting Customer?

Shipped Ups Isotretinoin  Buy Cialis Kamagra Vente  &lt;a href=http://abuycialisb.com&gt;cialis&lt;/a&gt; Buy Proscar Brand

Re: How to change DepotiToAccount before selecting Customer?

Shipped Ups Isotretinoin  Buy Cialis Kamagra Vente  <a href=http://abuycialisb.com>cialis</a> Buy Proscar Brand

Re: How to change DepotiToAccount before selecting Customer?

This suggests a weak genotoxicity of this anti-estrogen. where sells genuine clomid in the uk If you re seeking to preserve your fertility or just prefer a more natural approach to testosterone replacement, we also offer endogenous replacement therapy a technique that employs agents such as Clomid and human chorionic gonadotropin to impressive effect.

Re: How to change DepotiToAccount before selecting Customer?

nolvadex for sale amazon

Re: How to change DepotiToAccount before selecting Customer?

Subsequently, we applied insertional mutagenesis with defective retroviruses to these ZR 75 1 breast cancer cells stromectol 12mg tablets