From: Moritz Bunkus Date: Mon, 17 Jan 2011 09:41:54 +0000 (+0100) Subject: Mit $form->get_standard_dbh() geöffnete Datenbankhandle nicht schließen X-Git-Tag: release-2.6.3~61^2~9^2~3^2~15^2~6 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/864a32446609b4d442e42702e44323f3accebb76?ds=inline;hp=-c Mit $form->get_standard_dbh() geöffnete Datenbankhandle nicht schließen --- 864a32446609b4d442e42702e44323f3accebb76 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: