X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8c1d5d7530f3a1c923ee470b7ff31616800a8574..d814a525b9f2fbc0bfae5591201d9185d6b1e8f4:/SL/AP.pm diff --git a/SL/AP.pm b/SL/AP.pm index 7db5649f6..e3dc7b31d 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -39,6 +39,7 @@ use SL::DBUtils; use SL::IO; use SL::MoreCommon; use SL::DB::Default; +use SL::Util qw(trim); use Data::Dumper; use strict; @@ -457,7 +458,7 @@ sub ap_transactions { } if ($form->{"cp_name"}) { $where .= " AND (cp.cp_name ILIKE ? OR cp.cp_givenname ILIKE ?)"; - push(@values, ('%' . $form->{"cp_name"} . '%')x2); + push(@values, ('%' . trim($form->{"cp_name"}) . '%')x2); } if ($form->{department}) { # ähnlich wie commit 0bbfb33b6aa8e38bb6c81d1684ab7d08e5b5c5af abteilung @@ -493,11 +494,11 @@ sub ap_transactions { if ($form->{transdatefrom}) { $where .= " AND a.transdate >= ?"; - push(@values, $form->{transdatefrom}); + push(@values, trim($form->{transdatefrom})); } if ($form->{transdateto}) { $where .= " AND a.transdate <= ?"; - push(@values, $form->{transdateto}); + push(@values, trim($form->{transdateto})); } if ($form->{open} || $form->{closed}) { unless ($form->{open} && $form->{closed}) { @@ -832,8 +833,6 @@ sub storno { map { IO->set_datepaid(table => 'ap', id => $_, dbh => $dbh) } ($id, $new_id); - $form->new_lastmtime('ap') if $storno_id == $form->{id}; - $dbh->commit; $main::lxdebug->leave_sub();