From 864a32446609b4d442e42702e44323f3accebb76 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 17 Jan 2011 10:41:54 +0100 Subject: [PATCH] =?utf8?q?Mit=20$form->get=5Fstandard=5Fdbh()=20ge=C3=B6ff?= =?utf8?q?nete=20Datenbankhandle=20nicht=20schlie=C3=9Fen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/IS.pm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/SL/IS.pm b/SL/IS.pm index 3b031bd96..3556d4bb7 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -963,10 +963,7 @@ sub post_invoice { $query = qq|UPDATE ar SET paid = ? WHERE id = ?|; do_query($form, $dbh, $query, $form->{paid}, conv_i($form->{id})); - if (!$provided_dbh) { - $dbh->commit(); - $dbh->disconnect(); - } + $dbh->commit if !$provided_dbh; $main::lxdebug->leave_sub(); return; @@ -1081,10 +1078,7 @@ sub post_invoice { 'table' => 'ar',); my $rc = 1; - if (!$provided_dbh) { - $dbh->commit(); - $dbh->disconnect(); - } + $dbh->commit if !$provided_dbh; $main::lxdebug->leave_sub(); @@ -1379,7 +1373,7 @@ sub delete_invoice { # Falls wir ein Storno haben, müssen zwei Felder in der stornierten Rechnung wieder # zurückgesetzt werden. Vgl: - # id | storno | storno_id | paid | amount + # id | storno | storno_id | paid | amount #----+--------+-----------+---------+----------- # 18 | f | | 0.00000 | 119.00000 # ZU: -- 2.20.1