AR: single-dbh disconnects
[kivitendo-erp.git] / SL / AR.pm
index 3b795d4..b4b6867 100644 (file)
--- a/SL/AR.pm
+++ b/SL/AR.pm
@@ -657,7 +657,7 @@ sub get_transdate {
   my ($self, $myconfig, $form) = @_;
 
   # connect to database
-  my $dbh = $form->dbconnect($myconfig);
+  my $dbh = SL::DB->client->dbh;
 
   my $query =
     "SELECT COALESCE(" .
@@ -666,8 +666,6 @@ sub get_transdate {
     "  current_date)";
   ($form->{transdate}) = $dbh->selectrow_array($query);
 
-  $dbh->disconnect;
-
   $main::lxdebug->leave_sub();
 }