} elsif ($form->{customer}) {
$where .= qq| AND (ct.name ILIKE ?)|;
- push(@values, '%' . trim($form->{customer}) . '%');
+ push(@values, like($form->{customer}));
}
my %columns = (
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}) {
} elsif ($form->{customer}) {
$where .= qq| AND (ct.name ILIKE ?)|;
- push(@values, '%' . $form->{customer} . '%');
+ push(@values, like($form->{customer}));
}
my %columns = (
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}) {