Quickbooks: Adding a negative value to an invoice using the QBDSK

10,793

Can you show the complete code you're using to modify the invoice? Can you also show the exact error message you're getting?

It is possible, though to do you need to make sure that you're using a Discount Item as your ItemRef type (a Service Item will not work), and you need to make sure that the transaction as a whole is for a positive amount.

Share:
10,793
Invalid Character
Author by

Invalid Character

Updated on June 28, 2022

Comments

  • Invalid Character
    Invalid Character almost 2 years

    Is there any way to add a line item containing a negative amount to an existing invoice?

    I'm using QBSDK7 and QB Enterprise. (and if it matters .Net 3.5)

    What we're attempting to do is automate the way we're creating invoices. We're already pulling in employee's time and applying it to the correct invoices, but when we go to add credits (just a negative amount on a line item on the invoice) using

    InvoiceLineMod.Amount.SetValue(-1234)
    

    it fails with the error "Transaction must be positive"

    I've also tried adding a Service Item with a negative amount and giving it a positive quantity and I get the same result.

    This seems like such a no-brainer as we have been doing this manually for the last 10 years. I'm guessing there is artificial restriction on this.

    Some things to consider: Credit Memos are no good as we need to display exact details of the reduction on the same page.

    We don't have payments to apply yet in most cases.

    This need to be done before any retainers are applied.

    Any help would be greatly appreciated.