From 017cfd35c0acbeaaa02a97d39c5a5260dd5cbc32 Mon Sep 17 00:00:00 2001 From: Waldemar Toews Date: Wed, 8 Jan 2014 13:06:56 +0100 Subject: [PATCH] SQL Fehler behoben. --- SL/CP.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 | . -- 2.20.1