Knowledgebase
[QODBC-POS] Troubleshooting - Getting error The receipt is not balanced. Undefined amount is
Posted by Jack - QODBC Support on 09 February 2018 12:58 PM

Troubleshooting - Getting error The receipt is not balanced. Undefined amount is

Problem Description:

I am trying to create sales receipt. I have a sales item that is 550, the customer paid 3 dollars so that leaves 547 on their account.

"SalesReceiptItemPrice", = 550

"TenderAccount01TenderAmount", = 547

"TenderCreditCard01TenderAmount", = 3

Getting a receipt not balanced error. Am I missing something? Should I just remove the "SalesReceiptItemPrice" field and leave the other two fields, since QBs already know how much the item cost?

Below is my sql statement:

INSERT INTO SalesReceiptItem ( CustomerListId, Comments, PriceLevelNumber, SalesReceiptType, TaxCategory, TxnState, SalesReceiptItemListID, SalesReceiptItemDesc1, SalesReceiptItemDesc2, SalesReceiptItemQty, SalesReceiptItemTaxCode, SalesReceiptItemPrice, TenderCreditCard01CardName, TenderCreditCard01TenderAmount, FQSaveToCache ) VALUES ( '1831695813156176129', 'CC Transaction #: 260118B38-5E6CA366-5005-4DD3-90B8-2AC9E000B829 ', '2', 'Sales', 'Local Sales Tax', 'Normal', '1363624405422211329', 'Registration Fee - Shimano Di2', 'Shimano Di2 Seminar', 1, 'Non', 50, 'Credit Card', 50, 1 )

INSERT INTO SalesReceiptItem ( CustomerListId, Comments, PriceLevelNumber, SalesReceiptType, TaxCategory, TxnState, SalesReceiptItemListID, SalesReceiptItemDesc1, SalesReceiptItemDesc2, SalesReceiptItemTaxCode, SalesReceiptItemQty, SalesReceiptItemPrice, TenderCreditCard01CardName, TenderCreditCard01TenderAmount, TenderAccount01TenderAmount, FQSaveToCache ) VALUES ( '1831695813156176129', 'CC Transaction #: 260118B38-5E6CA366-5005-4DD3-90B8-2AC9E000B829 ', '2', 'Sales', 'Local Sales Tax', 'Normal', '1363619418940014849', 'Tuition - Shimano Di2 Seminar', 'Shimano Di2 Seminar', 'Non', 1, 150, 'Credit Card', 3, 147, 1 )

INSERT INTO SalesReceipt ( CustomerListID, StoreNumber, Comments, TxnDate, ShipDate, FQSaveToCache ) VALUES ( '1831695813156176129', 2, 'CC Transaction #: 260118B38-5E6CA366-5005-4DD3-90B8-2AC9E000B829 ', {d'2018-01-26'}, {d'2018-01-26'}, 0 )

Solution:

"The receipt is not balanced" error is because $50 dollars from the first query is not being added to the overall receipt. To overcome this you need to remove payment details in 1st query & add it to 2nd query as below:

INSERT INTO SalesReceiptItem (CustomerListId,Comments,PriceLevelNumber,SalesReceiptType,TaxCategory,TxnState,SalesReceiptItemListID,SalesReceiptItemDesc1,SalesReceiptItemDesc2,SalesReceiptItemQty,SalesReceiptItemTaxCode,SalesReceiptItemPrice, FQSaveToCache) VALUES ('1831695813156176129','CC Transaction #: 260118B38-5E6CA366-5005-4DD3-90B8-2AC9E000B829 ','2','Sales','Local Sales Tax','Normal','1363624405422211329','Registration Fee - Shimano Di2','Shimano Di2 Seminar',1,'Tax',50,1)

INSERT INTO SalesReceiptItem (CustomerListId,Comments,PriceLevelNumber,SalesReceiptType,TaxCategory,TxnState,SalesReceiptItemListID,SalesReceiptItemDesc1,SalesReceiptItemDesc2,SalesReceiptItemTaxCode,SalesReceiptItemQty,SalesReceiptItemPrice,TenderCreditCard01CardName,TenderCreditCard01TenderAmount, TenderAccount01TenderAmount,FQSaveToCache) VALUES('1831695813156176129','CC Transaction #: 260118B38-5E6CA366-5005-4DD3-90B8-2AC9E000B829 ','2','Sales','Local Sales Tax','Normal','1363619418940014849','Tuition - Shimano Di2 Seminar','Shimano Di2 Seminar','Tax',1,150,'Credit Card',53,147,1)

INSERT INTO SalesReceipt (CustomerListID,StoreNumber,Comments,TxnDate,ShipDate,FQSaveToCache) VALUES ('1831695813156176129',1,'CC Transaction #: 260118B38-5E6CA366-5005-4DD3-90B8-2AC9E000B829 ',{d'2018-01-26'},{d'2018-01-26'},0)

Also, You can add payment details in the SalesReceipt table query.

INSERT INTO SalesReceipt (CustomerListID,StoreNumber,Comments,TxnDate,ShipDate,TenderCreditCard01CardName,TenderCreditCard01TenderAmount,TenderAccount01TenderAmount) VALUES ('1831695813156176129',1,'CC Transaction #: 260118B38-5E6CA366-5005-4DD3-90B8-2AC9E000B829 ',{d'2018-01-26'},{d'2018-01-26'},'Credit Card',53,147)

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).