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

Re: bug? Vendor Invoice update



On Thu, Oct 16, 2008 at 11:02 PM, david <..hidden..> wrote:
> I'm doing something very naughty...  I've made some mistakes in vendor invoices
> and want to correct them (specifically, I entered purchases for incorrect service).
>
> If I modify the service, then update, then post, I get a warning that I'm
> changing a record. If I proceed after the warning I get an error message thus:
>
> DBD::Pg::st execute failed: ERROR: duplicate key value violates unique
> constraint "transactions_pkey"
> Error!
>
> INSERT INTO ap (id, vendor_id) VALUES (?, ?)
> ERROR: duplicate key value violates unique constraint "transactions_pkey"

This is a known issue for which an optional fix is provided.

Take a look at sql/fixes/transactions_pkey_repost.sql

You can run that against your db to prevent this problem as documented
in the release notes.

Disclaimer:
Once again, unless you turn off transaction reversal enforcement this
is not going to happen.  Furthermore, reposting invoices causes
mathematics problems in accounting which, since the process is frowned
upon, have no accepted solutions.  We highly recommend using normal
reversal procedures when correcting invoices.

Best Wishes,
Chris Travers