Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
Applying short Payment as Discount to an Invoice |
Author |
Message |
|
Posted : 2006-09-30 07:55:45 |
I wanted to apply an underpayment of an Invoice as a Discount using following SQL:
INSERT INTO ReceivePaymentLine
(CustomerRefListID, DepositToAccountRefListID, TotalAmount, AppliedToTxnTxnID, AppliedToTxnPaymentAmount, TxnDate, Memo, AppliedToTxnDiscountAmount, AppliedToTxnDiscountAccountRefListID)
Values ('21B0001-1158798729', 'BA0002-1137436059', 2050 , '1291-1159565337', 2030 ,{d'2006-09-29'}, 'Payment for Invoice #INV-3352', 20, 'BA0002-1137436059')
I received the following error message:
20060929.143256 E 1864 ReceivePaymentStorage::DoAdd Failed to save ReceivePayment QuickBooks error message: The Applied discount flag belongs on the income or expense line item that represents the discount. If this Accounts Payable line item is the A/P representation of the discount use SetIsDiscount(). HRESULT=0x80041507
I don't want to apply the underpayment as Credit as suggested by Quick Books software.
How do I correct the error please?
Thank you,
Piyush |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-10-02 10:47:50 |
This is how I would go about it. First, using the QuickBooks User Interface, locate your discount income account:
For the company file I'm working with it's: 'Construction:Discounts given'. So a payment of $180 with a $20 discount against a $200 invoice would look like this:
INSERT INTO ReceivePaymentLine (CustomerRefListID, DepositToAccountRefListID, TotalAmount, AppliedToTxnTxnID, AppliedToTxnPaymentAmount, TxnDate, Memo, AppliedToTxnDiscountAmount, AppliedToTxnDiscountAccountRefFullName) Values ('AC0000-1197757899', '80000-933270541', 180.00, '5D3A-1197764466', 200.00, {d'2007-12-15'}, 'Payment for Invoice #Discount1', 20.00, 'Construction:Discounts given')
|
|
|
|
|