Answer the question
In order to leave comments, you need to log in
Why does QuickBooks desktop give the "Invalid amount field value" error?
The task is to pay invoices from deposites automatically for all customers. To do this, I create an application that, when the button is clicked, will do everything. I decided that it would be right to create a customer payment, which will pay for all open invoices. I work through qbXML and C# sdk. The XML request looks like this:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<ReceivePaymentAddRq>
<ReceivePaymentAdd>
<CustomerRef>
<FullName>#1 ASAP Transport Inc</FullName>
</CustomerRef>
<RefNumber>LS-2-39</RefNumber>
<TotalAmount>1000.00</TotalAmount>
<AppliedToTxnAdd>
<TxnID>399DB-1582033551</TxnID>
<SetCredit>
<CreditTxnID>39A01-1582087066</CreditTxnID>
<AppliedAmount>0.00</AppliedAmount>
</SetCredit>
</AppliedToTxnAdd>
</ReceivePaymentAdd>
</ReceivePaymentAddRq>
</QBXMLMsgsRq>
</QBXML>
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<ReceivePaymentAddRs statusCode="3210" statusSeverity="Error" statusMessage="The
"receive payment total amount" field has an invalid value "1000.00".
QuickBooks error message: This field contains an invalid character." />
</QBXMLMsgsRs>
</QBXML>
Answer the question
In order to leave comments, you need to log in
Problem solved. The point was that quickbooks itself adapted to the local locale and accepted numbers with a comma as a separator. And sdk and everything related to qbxml have clear number format requirements that do not change depending on the region. Thus, when passing a number with a dot, sdk normally accepted it and sent it further to quickbooks, which did not understand this format and returned an error. And the sdk itself did not understand the number with a comma. The solution is to change the region to USA in the windows settings
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question