Troubleshooting - How to give refund to existing CreditMemo using QODBC
Problem Description:
How can I apply a refund check to an existing credit memo using QODBC?
In QuickBooks, I can refund by opening the Create Credit Memos/Refunds dialogue box using the QuickBooks UI and finding the credit memo for that customer. In the dialogue box icon bar, click on "Use the credit to give a refund."
![](//support.flexquarters.com/esupport/newimages/CMR/step1.png)
Solutions:
You can use the CheckApplyCheckToTxn table and the Insert Only table to create a check to pay off a credit memo. You can give refunds to an existing credit memo by using the below queries:
INSERT INTO CheckExpenseLine (AccountRefListID, ExpenseLineAccountRefListID, ExpenseLineAmount, ExpenseLineMemo, ExpenseLineCustomerRefListID, ExpenseLineBillableStatus, FQSaveToCache) Values ('20000-933270541', '40000-933270541',80, 'Test Memo,' '800000E2-1513333899', null,1)
![](//support.flexquarters.com/esupport/newimages/CMR/step2.png)
Insert into CheckApplyCheckToTxn ( AccountRefListID, PayeeEntityRefListID, TxnDate, ApplyCheckToTxnTxnID, ApplyCheckToTxnAmount) values ('20000-933270541', '800000E2-1513333899',{d'2017-12-18'},'1B3C0-1513338090',80)
![](//support.flexquarters.com/esupport/newimages/CMR/step3.png)
After executing the above queries, you can see CreditMemo as Refunded in QuickBooks.
![](//support.flexquarters.com/esupport/newimages/CMR/step5.png)
You can get ApplyCheckToTxnTxnID from the TxnID field of the CreditMemo table for that particular Transaction by using the below query.
SELECT TxnID, RefNumber FROM CreditMemo where RefNumber='1268'
![](//support.flexquarters.com/esupport/newimages/CMR/step4.png)
|