tags:

views:

605

answers:

4

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.

A: 

Sometimes our app has to adjust an invoice down with a negative number. I have been able to add negative line items using the following code. I have to set a quantity and a rate, instead of setting the amount.

IInvoiceLineAdd ila = ia.ORInvoiceLineAddList.Append().InvoiceLineAdd;
ila.ItemRef.ListID.SetValue(GetQBID(JobKey));
ila.Desc.SetValue("Adjustment");
ila.Quantity.SetValue(1);
ila.ORRatePriceLevel.Rate.SetValue(-1.00);
Jack B Nimble
Thanks, it didn't work, but I'm starting to believe it's our implementation.
RaySir
A: 

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.

Keith Palmer
A: 

Quickbooks doesn't allow you to post an invoice with a negative balance. If you try to do it through the UI, it prompts you to create a credit memo instead. (And vice-versa if you try it with a credit memo.)

You can enter negative quantities and/or prices into the line items, but the total of the invoice has to be >= 0 or it won't post (i.e., add other line items that offset the negative amounts).

The solution is to use credit memos. Your client-side processing will be more complicated, but it's the only choice with Quickbooks.

Jon Seigel
A: 

could you please tell me what is credit memos?

I don't have any experience with quickboks or accounting issues , I'm just a developer trying to connect to quickbooks to add invoice...my client want to add an invoice with negative total amount

looking for your reply and thanks in advance

Maisara
you can't have a negative invoice... it's just not possible with QB. That being said, look through the QBSDK documentation. It's bad, but it's more specific than what I can put in this space.
RaySir