xTuple.com xTupleU Blog & News Customer Support

To delete an Invoice in 4.11?

How do I delete a posted invoice in PostBooks 4.11?

I have read where it was allowed/not allowed etc over different releases/years

What is the status of the invoice? has it been posted?

Hi Tom

Sorry - yes it is posted

From the work Bench, just right click and void.

Thanks Tom

It will not allow me to delete - Error showing Null or -1

As an aside … why is the delete “hidden” in a right click [in my case ctrl click] operation? Seems rather over complicating things a tad!

There are very good accounting reasons for not allowing the outright deletion of a posted invoice. If your user has the VoidPostedInvoices privilege, though, you can do as Tom said, and the transaction will be reversed.

Hi Ned

Thanks

Yes I do appreciate the reasons from a strict accounting point of view but, you know, the double entry accounting was created in the era of pen and paper which needed the credit entry as there was no other way, and, although not advocating the abandonment of that principle perhaps there might be a way of recording the transactions whilst avoiding the need.

Just a thought!

Whether it’s pen and paper or electronic, there needs to be an audit trail and accountability. Believe me, we do take the “strict accounting point of view” around here - our customers expect it!

Hi Ned

I fully understand.

On the deleting Invoice right click - this is what I get

ERROR: Cannot find Invoice to void [xtuple: voidInvoice, -1, -1]
CONTEXT: PL/pgSQL function voidinvoice(integer) line 45 at RAISE
(P0001) QPSQL: Unable to create query

The Query:
SELECT voidInvoice(:invchead_id) AS result;

Bound Values:
:invchead_id: -1

But I am still showing the Posted Invoice ?

I tested this in a demo of 4.11 ( just to be sure it was not a new issue or possible bug, you can’t never tell). In the Dist version of my demo it voided without issue. The error you are getting says it cannot find the invoice you are trying to void, not that it cannot be voided.

As Ned said the bread crumb trail is critical, anyone who has undergone an audit will tell you it’s a beautiful wonderful thing, and will save your rear if that ever happens.

That being said the manual process, provided you have a customer who’s open AR for any reason needs an adjustment. You can issue a credit to customer manually and ref the invoice. The fact the system cannot find that invoice would give me pause. The first thing I would do is backup my live, post an invoice( in the pilot) and make sure you can void as intended. If that is the case then the problem is in that invoice, and something may have changed trying to delete it? Maybe check the System/Utilities/Serial Columns as well. Never hurts.

From there it gets kinda deep in the weeds, I would want to look at your database and the function voidInvoice to see why it’s not finding the invoice.