From: Jan Büren Date: Thu, 30 Jan 2014 09:28:09 +0000 (+0100) Subject: Bugfix 2443: Löschen von neu angelegten Konten, aufgrund von Constraint taxkeys nicht... X-Git-Tag: release-3.1.0beta1~12 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6dd6719d91cf5a48acb6fb3731f9e143d7a7d83b;p=kivitendo-erp.git Bugfix 2443: Löschen von neu angelegten Konten, aufgrund von Constraint taxkeys nicht möglich fixt #2443 --- diff --git a/SL/AM.pm b/SL/AM.pm index ed896e1ad..29be070a6 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -482,16 +482,18 @@ sub delete_account { WHERE chart_id = ?|; do_query($form, $dbh, $query, $form->{id}); - # delete chart of account record - $query = qq|DELETE FROM chart - WHERE id = ?|; - do_query($form, $dbh, $query, $form->{id}); - # delete account taxkeys $query = qq|DELETE FROM taxkeys WHERE chart_id = ?|; do_query($form, $dbh, $query, $form->{id}); + # delete chart of account record + # last step delete chart, because we have a constraint + # to taxkeys + $query = qq|DELETE FROM chart + WHERE id = ?|; + do_query($form, $dbh, $query, $form->{id}); + # commit and redirect my $rc = $dbh->commit; $dbh->disconnect;