QuickBooks error message: Transaction not in balance - quickbooks

QB desktop shows the below error while Modifting ReceiveCustomerPayment
"There was an error when modifying a ReceivePayment. QuickBooks error
message: Transaction not in balance.""
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<ReceivePaymentModRq requestID="2">
<ReceivePaymentMod>
<TxnID>E4C-1673793968</TxnID>
<EditSequence>1673793968</EditSequence>
<CustomerRef>
<FullName>D.R.H:Sawgrass Lakes:4257 Broomsedge Circle</FullName>
</CustomerRef>
<TxnDate>2023-01-11</TxnDate>
<RefNumber>6866666</RefNumber>
<TotalAmount>0.00</TotalAmount>
<PaymentMethodRef>
<FullName>Check</FullName>
</PaymentMethodRef>
<AppliedToTxnMod>
<TxnID>E45-1673793562</TxnID>
<PaymentAmount>76.50</PaymentAmount>
</AppliedToTxnMod>
</ReceivePaymentMod>
</ReceivePaymentModRq>
</QBXMLMsgsRq>
</QBXML>
Any help is appreciable..

You are saving a payment of:
<TotalAmount>0.00</TotalAmount>
And of that 0.00, you are applying 76.50 to an invoice:
<AppliedToTxnMod>
<TxnID>E45-1673793562</TxnID>
<PaymentAmount>76.50</PaymentAmount>
</AppliedToTxnMod>
How are you applying 76.50 to an invoice, when the payment is only for 0.00? That is what QuickBooks is trying to tell you.
The TotalAmount should equal the sum of all of your PaymentAmount tags.

Related

Import data from two sources into one company in quickbooks

I have two web portals (different domains) but i want to import clients, vendors and invoices from both web portals to my quickbooks using webconnector. What i have tried is creating two qwc files and and configured in the webconnector but whenever i try to import invoice from second company i am getting error of invalid reference.... not found (but the name of client matches exactly like i have on quickbooks with the xml i am creating to run import for invoices ). Below is the error i get when i run import
3140: There is an invalid reference to QuickBooks Term "Client, Test" in the Invoice. QuickBooks error message: Invalid argument. The specified record does not exist in the list.
Below is the xml i use to import invoice
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="continueOnError">
<InvoiceAddRq requestID="39">
<InvoiceAdd>
<CustomerRef>
<FullName>Client, Test</FullName>
</CustomerRef>
<TxnDate>0000-00-00</TxnDate>
<RefNumber>Zaztest</RefNumber>
<ShipAddress>
<Addr1>6050 Hellyer Ave #100C</Addr1>
<Addr2></Addr2>
<City>San Jose</City>
<State>California</State>
<PostalCode>95136</PostalCode>
<Country></Country>
</ShipAddress>
<PONumber>Client</PONumber>
<TermsRef>
<FullName>Client, Test</FullName>
</TermsRef>
<DueDate>0000-00-00</DueDate>
<InvoiceLineAdd>
<ItemRef>
<FullName>Bill:ZigSig Fee</FullName>
</ItemRef>
<Rate>141</Rate>
</InvoiceLineAdd>
</InvoiceAdd>
</InvoiceAddRq>
</QBXMLMsgsRq>
</QBXML>
You say that the client (customer) exists...
" not found (but the name of client matches exactly like i have on quickbooks with the xml"
However, that's not what the error message is telling you. The error message has nothing to do with the customer name. It's about the terms name. The error:
invalid reference to QuickBooks ****Term**** "Client, Test"
(Emphasis on Term mine). The error message isn't about how the customer is named, it's about how the terms are named.
Terms are usually something like Net 30 or Due on Receipt. They should not be the same as the customer name.
TLDR: Fix your qbXML to send a valid TermRef/FullName value:
<TermsRef>
<FullName>Client, Test</FullName>
</TermsRef>

Adding an unapplied payment in Quickbooks Web Connector

My client takes pre-payments for work done before an invoice is created, and has a need to create a payment with no applied transactions.
We can do this just fine in Quickbooks itself, however, I cannot figure out how to get the web connector to do this.
I can't seem to get a payment to go over without including some kind of transaction to apply it to. How can I get this to work?
<ReceivePaymentAddRq requestID="38b00162-339c-4fb8-b8f7-5f3d08042eaf">
<ReceivePaymentAdd>
<CustomerRef>
<ListID>800013CF-1516038502</ListID>
<FullName>John Doe</FullName>
</CustomerRef>
<TxnDate>2018-02-12</TxnDate>
<RefNumber>TEST PAYMENT</RefNumber>
<TotalAmount>123.45</TotalAmount>
<PaymentMethodRef>
<FullName>Check</FullName>
</PaymentMethodRef>
<DepositToAccountRef>
<FullName>Undeposited Funds</FullName>
</DepositToAccountRef>
</ReceivePaymentAdd>
</ReceivePaymentAddRq>
The answer is that the IsAutoApply needs to be set to false.
This works:
<ReceivePaymentAddRq requestID="38b00162-339c-4fb8-b8f7-5f3d08042eaf">
<ReceivePaymentAdd>
<CustomerRef>
<ListID>800013CF-1516038502</ListID>
<FullName>John Doe</FullName>
</CustomerRef>
<TxnDate>2018-02-12</TxnDate>
<RefNumber>TEST PAYMENT</RefNumber>
<TotalAmount>123.45</TotalAmount>
<PaymentMethodRef>
<FullName>Check</FullName>
</PaymentMethodRef>
<DepositToAccountRef>
<FullName>Undeposited Funds</FullName>
</DepositToAccountRef>
<IsAutoApply>false</IsAutoApply>
</ReceivePaymentAdd>
</ReceivePaymentAddRq>

Quickbooks API and detecting deleted items

I'm using the Quickbooks XML API to import salesorders, items, and customers. Everything works great, however I haven't figured out how to handle things that are deleted in Quickbooks. Querying the imported data in my system is not an option because I have 20,000+ salesorders. My question is, does Quickbooks have a query for deleted items?
QuickBooks for Windows:
If you're using QuickBooks for Windows, then you can do a TxnDeletedQueryRq request to get a list of recently deleted transactions.
Example:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="9.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<TxnDeletedQueryRq>
<!-- TxnDelType may have one of the following values: ARRefundCreditCard, Bill, BillPaymentCheck, BillPaymentCreditCard, BuildAssembly, Charge, Check, CreditCardCharge, CreditCardCredit, CreditMemo, Deposit, Estimate, InventoryAdjustment, Invoice, ItemReceipt, JournalEntry, PayrollLiabilityAdjustment [PRIVATE], PayrollPriorPayment [PRIVATE], PayrollYearToDateAdjustment [PRIVATE], PurchaseOrder, ReceivePayment, SalesOrder, SalesReceipt, SalesTaxPaymentCheck, TimeTracking, TransferInventory, VehicleMileage, VendorCredit -->
<TxnDelType>Invoice</TxnDelType>
<TxnDelType>ReceivePayment</TxnDelType>
</TxnDeletedQueryRq>
</QBXMLMsgsRq>
</QBXML>
Example from here:
http://www.consolibyte.com/docs/index.php/QbXML_for_Querying_for_Deleted_Objects
http://www.consolibyte.com/docs/index.php/Example_qbXML_Requests
The full syntax with all options/flags you can set can be found in the QuickBooks OSR:
https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html
QuickBooks Online:
If you're using QuickBooks Online, then you can use the CDC requests to poll for recently changed data, including things that have been deleted.
https://quickbooks.api.intuit.com/v3/company/1234/cdc?entities=Class,Item,Invoice&changedSince=2012-07-20T22:25:51-07:00
Will return something like:
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2013-04-03T10:36:19.393Z">
<CDCResponse>
<QueryResponse>
<Customer>...
</Customer>
...
Some of which may have a status="Deleted" attribute to let you know it's been deleted.

Enterprise 2014 Bill Payment Query cannot find bill when bill is present in company file

Bill payment add cannot find matching bill in Enteprise 14 and the bill does exist for the customer. Could it have something to do with the length of the bill number? Please see XML below.
<OUTGOING>
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE QBXML PUBLIC '-//INTUIT//DTD QBXML QBD 12.0//EN' ><QBXML><QBXMLMsgsRq onError = "continueOnError"><BillQueryRq><RefNumberRangeFilter><FromRefNumber>February Publisher P</FromRefNumber><ToRefNumber>February Publisher P</ToRefNumber></RefNumberRangeFilter><PaidStatus>NotPaidOnly</PaidStatus></BillQueryRq></QBXMLMsgsRq></QBXML>
</OUTGOING>
<RETURNS>
<QBXML>
<QBXMLMsgsRs>
<BillQueryRs statusCode="1" statusSeverity="Info" statusMessage="A query request did not find a matching object in QuickBooks" />
</QBXMLMsgsRs>
</QBXML>
</RETURNS>
I can't get this to work either. It appears to be a bug in the Bill Query ref number range filter. The query works OK if the ref number range filter is removed.
The filter also works if you use (SOF cuts of part of the answer)
StartsWithFebruary Publisher P

How to add other data to Quickbook with qbXML

I try this code it's work.(now, I can add Name : TestCustomer3)
And I want to add other data to Quickbook.
Can you Help me about qbXML Language.
Example : I want to add "Company Name", "Full Name", "Bill To"
Example Code
string input = #"<?xml version=""1.0"" encoding=""utf-8""?>
<?qbxml version=""2.0""?>
<QBXML>
<QBXMLMsgsRq onError=""stopOnError"">
<CustomerAddRq requestID=""15"">
<CustomerAdd>
<Name>TestCustomer3</Name> <!-- required -->
</CustomerAdd>
</CustomerAddRq>
</QBXMLMsgsRq>
</QBXML>";
The appropriate place to find this information is in the QuickBooks OSR:
https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html
To use the un-Intuit-ive QuickBooks OSR (pun intended) you should:
Use the "Select Message" drop-down box from the top of the screen to choose a command/request type
Click the "XML Ops" tab to view the XML request and response
Note that the XML request/response will be jumbled together a little, so make sure you look at the XML carefully to determine where the request ends, and the response starts.
We also have some other QuickBooks qbXML examples on our QuickBooks integration wiki.
The info can be found by reviewing the on screen reference for QBXML
https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html
thanks

Resources