]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/AP.pm
GDPDU: Typo
[kivitendo-erp.git] / SL / AP.pm
index ae75dc909d1137d0578379f2a15abcd74be4785a..5839fb5632ca518e2e6d6d95e7d809a83222e3ad 100644 (file)
--- a/SL/AP.pm
+++ b/SL/AP.pm
@@ -403,7 +403,8 @@ sub delete_transaction {
   SL::DB->client->with_transaction(sub {
     my $query = qq|DELETE FROM ap WHERE id = ?|;
     do_query($form, SL::DB->client->dbh, $query, $form->{id});
-  });
+    1;
+  }) or do { die SL::DB->client->error };
 
   $main::lxdebug->leave_sub();
 
@@ -564,7 +565,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(" .
@@ -573,8 +574,6 @@ sub get_transdate {
     "  current_date)";
   ($form->{transdate}) = $dbh->selectrow_array($query);
 
-  $dbh->disconnect;
-
   $main::lxdebug->leave_sub();
 }