X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/1cb6c0853c9aa7f2632a1d5d632605c9359bde93..ab96e204a2beec2302b1850df50f45a6e67a13c4:/SL/IC.pm diff --git a/SL/IC.pm b/SL/IC.pm index e7f1327e4..f69e98ce2 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -1538,7 +1538,7 @@ sub retrieve_accounts { $form->{"taxzone_id"} *= 1; - $dbh = $form->dbconnect($myconfig); + $dbh = $form->get_standard_dbh($myconfig); my $transdate = ""; if ($form->{type} eq "invoice") { @@ -1576,10 +1576,7 @@ sub retrieve_accounts { qq|WHERE p.id = ?|; my $ref = selectfirst_hashref_query($form, $dbh, $query, $parts_id); - if (!$ref) { - $dbh->disconnect(); - return $main::lxdebug->leave_sub(2); - } + return $main::lxdebug->leave_sub(2) if (!$ref); $ref->{"inventory_accno_id"} = undef unless ($ref->{"is_part"});