@@ -, +, @@ checkout search results Reintroduce $termsearchfieldstype for resetting search type for non-date terms --- C4/Utils/DataTables/Members.pm | 7 +++++-- .../intranet-tmpl/prog/en/includes/circ-patron-search-results.inc | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) --- a/C4/Utils/DataTables/Members.pm +++ a/C4/Utils/DataTables/Members.pm @@ -88,12 +88,15 @@ sub search { foreach my $term (@terms) { next unless $term; + my $termsearchfieldstype; + my $term_dt = eval { local $SIG{__WARN__} = {}; output_pref( { str => $term, dateonly => 1, dateformat => 'sql' } ); }; if ($term_dt) { - $searchfieldstype = 'dateofbirth'; + $termsearchfieldstype = 'dateofbirth'; $term = $term_dt; } else { + $termsearchfieldstype = $searchfieldstype; $term .= '%' # end with anything if $term !~ /%$/; $term = "%$term" # begin with anythin unless start_with @@ -101,7 +104,7 @@ sub search { } my @where_strs_or; - for my $searchfield ( split /,/, $searchfields->{$searchfieldstype} ) { + for my $searchfield ( split /,/, $searchfields->{$termsearchfieldstype} ) { push @where_strs_or, "borrowers." . $dbh->quote_identifier($searchfield) . " LIKE ?"; push @where_args, $term; } --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc @@ -16,6 +16,7 @@ Name Card number + Date of birth Category Library Address @@ -31,6 +32,7 @@ [% borrower.surname %], [% borrower.firstname %] [% END %] [% borrower.cardnumber %] + [% borrower.dateofbirth %] [% Categories.GetName( borrower.categorycode ) %] [% Branches.GetName( borrower.branchcode ) %] [% borrower.address %] --