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

Re: bug? Vendor Invoice update





Chris Travers wrote:
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.

comments, which I hope are constructive ;-)

* "enforce transaction reversal" is set to "NO" by default. Surely "Yes" would be better? I didn't actually realise the implications until I fell foul of them. Luckily I had a backup to go to.

* having a function which causes a database failure is the real problem. If that button corrupts the system (which I can confirm that it does) then the user shouldn't be able to get past the warning.

* I thought I had read ALL the docs, but I missed the release notes. Perhaps all the docs including various readme's install notes release notes etc could be gathered into the one place, in one directory at one level. Right now they are scattered around a bit and confusion can result (I'm prone to confusion.. I understand these things!). Maybe even README.d

* I've looked at transactions_pkey_repost.sql... unfortunately my knowledge of SQL is poor .... does that prevent future repostings from crashing or does it correct corruption caused by past reposting? (aside from the COGS problem etc)

* I have been reposting invoices with changes to the "notes" field.... I still get a warning not to repost but it doesn't crash when I proceed. Should I assume that changing non-financial fields such as notes and memos does not cause a problem with the database?

* am I right to assume that the problems do not apply to "Post AS New"?

thanks.. and sorry for being so pedantic... I hope it helps others too :)


regards,

David.



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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users