Did you apply the fix for this bug: sql/fixes/transactions_pkey_repost.sql
On Fri, Feb 13, 2009 at 7:18 AM, David F. Skoll <[email protected]> wrote: > Hi, > > Sometimes, when re-posting an existing invoice, LedgerSMB > crashes with a primary-key constraint violation and > the invoice is lost! This is very bad. > > To replicate the problem: > > 1) Create an invoice and post it. > > 2) Go into the invoice and change something (for example, a description) > and repost. Confirm that you want to post to an existing transaction. > > 3) If step (2) succeeded, try doing it again. The second time, it should > blow up. > > Here is a patch against LedgerSMB/IS.pm that fixes it. > > Regards, > > David. > > > --- IS.pm.ORIG 2009-02-12 10:52:17.000000000 -0500 > +++ IS.pm 2009-02-12 10:50:32.000000000 -0500 > @@ -1837,6 +1837,11 @@ > $sth->execute( $form->{id} ) || $form->dberror($query); > $sth->finish; > > + $query = qq|DELETE FROM transactions WHERE id = ?|; > + $sth = $dbh->prepare($query); > + $sth->execute( $form->{id} ) || $form->dberror($query); > + $sth->finish; > + > # delete spool files > $query = qq| > SELECT spoolfile FROM status > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Ledger-smb-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel > ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Ledger-smb-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
