X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/9ebaa094105fc893633f2dca829424d33500f90c..bc40bcabc425b99f3b79a5544684a6fe8674adfe:/SL/DN.pm diff --git a/SL/DN.pm b/SL/DN.pm index e7959e0f1..1804959f9 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -492,7 +492,7 @@ sub get_invoices { } elsif ($form->{customer}) { $where .= qq| AND (ct.name ILIKE ?)|; - push(@values, '%' . trim($form->{customer}) . '%'); + push(@values, like($form->{customer})); } my %columns = ( @@ -504,7 +504,7 @@ sub get_invoices { foreach my $key (keys(%columns)) { next unless ($form->{$key}); $where .= qq| AND $columns{$key} ILIKE ?|; - push(@values, '%' . trim($form->{$key}) . '%'); + push(@values, like($form->{$key})); } if ($form->{dunning_level}) { @@ -619,7 +619,7 @@ sub get_dunning { } elsif ($form->{customer}) { $where .= qq| AND (ct.name ILIKE ?)|; - push(@values, '%' . $form->{customer} . '%'); + push(@values, like($form->{customer})); } my %columns = ( @@ -630,7 +630,7 @@ sub get_dunning { foreach my $key (keys(%columns)) { next unless ($form->{$key}); $where .= qq| AND $columns{$key} ILIKE ?|; - push(@values, '%' . $form->{$key} . '%'); + push(@values, like($form->{$key})); } if ($form->{dunning_level}) {