X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/bed19453fb654f69ad972911a4533ca89f8ae0c9..24f6b9ed716e385fa26ca68b1d78bd1969b22fcd:/SL/AR.pm diff --git a/SL/AR.pm b/SL/AR.pm index dba6b5b80..67a43d004 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -511,7 +511,7 @@ sub ar_transactions { } if ($form->{"cp_name"}) { $where .= " AND (cp.cp_name ILIKE ? OR cp.cp_givenname ILIKE ?)"; - push(@values, ('%' . trim($form->{"cp_name"}) . '%')x2); + push(@values, (like($form->{"cp_name"}))x2); } if ($form->{business_id}) { my $business_id = $form->{business_id}; @@ -524,7 +524,7 @@ sub ar_transactions { push(@values, $department_id); } if ($form->{department}) { - my $department = "%" . trim($form->{department}) . "%"; + my $department = like($form->{department}); $where .= " AND d.description ILIKE ?"; push(@values, $department); } @@ -584,6 +584,33 @@ sub ar_transactions { } }; + if ($form->{parts_partnumber}) { + $where .= <{parts_partnumber}); + } + + if ($form->{parts_description}) { + $where .= <{parts_description}); + } + my ($cvar_where, @cvar_values) = CVar->build_filter_query('module' => 'CT', 'trans_id_field' => 'c.id', 'filter' => $form,