From: Moritz Bunkus Date: Mon, 11 Mar 2013 14:17:37 +0000 (+0100) Subject: Aufträge etc: Beleg nach Zeilen löschen X-Git-Tag: release-3.1.0beta1~529^2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ddf1c00a9f355e635b2fd63f8053134d0321af7d;p=kivitendo-erp.git Aufträge etc: Beleg nach Zeilen löschen Behebt #2207. --- diff --git a/SL/OE.pm b/SL/OE.pm index 93848b9fc..94b97e998 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -691,11 +691,6 @@ sub delete { qq|WHERE trans_id = ?|; do_query($form, $dbh, $query, @values); - # delete OE record - $query = qq|DELETE FROM oe | . - qq|WHERE id = ?|; - do_query($form, $dbh, $query, @values); - # delete individual entries $query = qq|DELETE FROM orderitems | . qq|WHERE trans_id = ?|; @@ -705,6 +700,11 @@ sub delete { qq|WHERE trans_id = ? AND module = 'OE'|; do_query($form, $dbh, $query, @values); + # delete OE record + $query = qq|DELETE FROM oe | . + qq|WHERE id = ?|; + do_query($form, $dbh, $query, @values); + my $rc = $dbh->commit; if ($rc) {