From: Waldemar Toews Date: Wed, 8 Jan 2014 12:06:56 +0000 (+0100) Subject: SQL Fehler behoben. X-Git-Tag: release-3.1.0beta1~22^2~22^2~10^2~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=017cfd35c0acbeaaa02a97d39c5a5260dd5cbc32;p=kivitendo-erp.git SQL Fehler behoben. --- diff --git a/SL/CP.pm b/SL/CP.pm index 451cc7b30..21e74de3c 100644 --- a/SL/CP.pm +++ b/SL/CP.pm @@ -147,8 +147,11 @@ sub get_openinvoices { my $buysell = $form->{vc} eq 'customer' ? "buy" : "sell"; my $arap = $form->{arap} eq "ar" ? "ar" : "ap"; + my $invnumber = $form->{invnumber}; + $invnumber =~ s/^\s+//m; + $invnumber =~ s/\s+$//m; - my $whereinvoice = $form->{invnumber} ? qq| AND a.invnumber = '| . $form->{invnumber} . qq|' | : undef; + my $whereinvoice = $invnumber ? qq| AND a.invnumber LIKE '| . $invnumber . qq|' | : undef; my $query = qq|SELECT a.id, a.invnumber, a.transdate, a.amount, a.paid, cu.name AS curr | .