[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 isProblem Description:I am trying to create a sales receipt. I have a sales item that is 550. The customer paid 3 dollars, so that leaves 547 in their account. "SalesReceiptItemPrice," = 550 "TenderAccount01TenderAmount", = 547 "TenderCreditCard01TenderAmount", = 3 I am getting a receipt, not a balanced error. Should I remove the "SalesReceiptItemPrice" field and leave the other two areas since QBs already know how much the item costs? Am I missing something? 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 "The receipt is not balanced" error is because 50 dollars from the first query is not 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) | |
|