From 9c7c96a8658c8a5f1144f11e619b9e5b0bdb854a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 21 Jul 2010 14:47:18 +0200 Subject: [PATCH] IS->retrieve_invoice und IS->get_customer brauchen keine eigenen Datenbankhandle (ich glaube ich sehe ein Muster hier...) --- SL/IS.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/SL/IS.pm b/SL/IS.pm index 15a26769e..e5b403675 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -717,7 +717,7 @@ sub post_invoice { $form->{"serialnumber_$i"}, conv_i($pricegroup_id), $form->{"ordnumber_$i"}, conv_date($form->{"transdate_$i"}), $form->{"cusordnumber_$i"}, $baseqty, $form->{"subtotal_$i"} ? 't' : 'f', - $form->{"marge_percent_$i"}, $form->{"marge_absolut_$i"}, + $form->{"marge_percent_$i"}, $form->{"marge_absolut_$i"}, $form->{"lastcost_$i"}, conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"marge_price_factor_$i"})); @@ -1400,7 +1400,7 @@ sub retrieve_invoice { my ($self, $myconfig, $form) = @_; # connect to database - my $dbh = $form->dbconnect_noauto($myconfig); + my $dbh = $form->get_standard_dbh; my ($sth, $ref, $query); @@ -1575,7 +1575,6 @@ sub retrieve_invoice { } my $rc = $dbh->commit; - $dbh->disconnect; $main::lxdebug->leave_sub(); @@ -1588,7 +1587,7 @@ sub get_customer { my ($self, $myconfig, $form) = @_; # connect to database - my $dbh = $form->dbconnect($myconfig); + my $dbh = $form->get_standard_dbh; my $dateformat = $myconfig->{dateformat}; $dateformat .= "yy" if $myconfig->{dateformat} !~ /^y/; @@ -1724,8 +1723,6 @@ sub get_customer { $form->{rowcount} = $i if ($i && !$form->{type}); } - $dbh->disconnect; - $main::lxdebug->leave_sub(); } -- 2.20.1