[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Amending invoice makes it vanish



On Mon, Aug 11, 2008 at 6:51 AM, TD <..hidden..> wrote:
> I don't know when this bug came in, but it's easy to reproduce.  Post an AR
> Sales Invoice.  Call the invoice back up, make a change, and re-post it.  Upon
> clicking Continue to the warning, it fails with error:
> 2008-08-11 12:46:34 BST ERROR:  duplicate key value violates unique constraint
> "transactions_pkey"
> 2008-08-11 12:46:34 BST STATEMENT:  INSERT INTO ar (id, customer_id) VALUES
> ($1, $2)

Normally you can't or shouldn't modify an invoice.  However, if you
want to be able to do this you need to ensure you have "enforce
reversals" (system/audit controls) turned off.  That will allow you to
modify an invoice.

With enforce transaction reversal turned off, you should get buttons
that allow you to delete and modify.  The modify will change the
INSERT INTO to an UPDATE ar SET.

You can't repost a posted transaction.

>
> There might have been more in the web browser but I lost it - the above comes
> from the postgresql log.
>
> The invoice then disappears from the system totally.  Hopefully someone can
> look at this - it's not exactly ideal!

The behavior w/ enforce transaction reversals on is exactly what needs
to happen, ideal or not.  In most countries (mine included) changing a
posted invoice (if caught by the revenoors) would result in a big
fine.

Ciao,

David A. Bandel
-- 
Focus on the dream, not the competition.
 - Nemesis Air Racing Team motto