View | Details | Raw Unified | Return to bug 14874
Collapse All | Expand All

(-)a/C4/Utils/DataTables/Members.pm (-2 / +5 lines)
Lines 88-99 sub search { Link Here
88
    foreach my $term (@terms) {
88
    foreach my $term (@terms) {
89
        next unless $term;
89
        next unless $term;
90
90
91
        my $termsearchfieldstype;
92
91
        my $term_dt = eval { local $SIG{__WARN__} = {}; output_pref( { str => $term, dateonly => 1, dateformat => 'sql' } ); };
93
        my $term_dt = eval { local $SIG{__WARN__} = {}; output_pref( { str => $term, dateonly => 1, dateformat => 'sql' } ); };
92
94
93
        if ($term_dt) {
95
        if ($term_dt) {
94
            $searchfieldstype = 'dateofbirth';
96
            $termsearchfieldstype = 'dateofbirth';
95
            $term                 = $term_dt;
97
            $term                 = $term_dt;
96
        } else {
98
        } else {
99
            $termsearchfieldstype = $searchfieldstype;
97
            $term .= '%'    # end with anything
100
            $term .= '%'    # end with anything
98
              if $term !~ /%$/;
101
              if $term !~ /%$/;
99
            $term = "%$term"    # begin with anythin unless start_with
102
            $term = "%$term"    # begin with anythin unless start_with
Lines 101-107 sub search { Link Here
101
        }
104
        }
102
105
103
        my @where_strs_or;
106
        my @where_strs_or;
104
        for my $searchfield ( split /,/, $searchfields->{$searchfieldstype} ) {
107
        for my $searchfield ( split /,/, $searchfields->{$termsearchfieldstype} ) {
105
            push @where_strs_or, "borrowers." . $dbh->quote_identifier($searchfield) . " LIKE ?";
108
            push @where_strs_or, "borrowers." . $dbh->quote_identifier($searchfield) . " LIKE ?";
106
            push @where_args, $term;
109
            push @where_args, $term;
107
        }
110
        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc (-1 / +2 lines)
Lines 16-21 Link Here
16
        <tr>
16
        <tr>
17
            <th>Name</th>
17
            <th>Name</th>
18
            <th>Card number</th>
18
            <th>Card number</th>
19
            <th>Date of birth</th>
19
            <th>Category</th>
20
            <th>Category</th>
20
            <th>Library</th>
21
            <th>Library</th>
21
            <th>Address</th>
22
            <th>Address</th>
Lines 31-36 Link Here
31
                    <td><a href="/cgi-bin/koha/reserve/request.pl?borrowernumber=[% borrower.borrowernumber %]&amp;biblionumber=[% biblionumber %]">[% borrower.surname %], [% borrower.firstname %]</a></td>
32
                    <td><a href="/cgi-bin/koha/reserve/request.pl?borrowernumber=[% borrower.borrowernumber %]&amp;biblionumber=[% biblionumber %]">[% borrower.surname %], [% borrower.firstname %]</a></td>
32
            [% END %]
33
            [% END %]
33
                <td>[% borrower.cardnumber %]</td>
34
                <td>[% borrower.cardnumber %]</td>
35
                <td>[% borrower.dateofbirth %]</td>
34
                <td>[% Categories.GetName( borrower.categorycode ) %]</td>
36
                <td>[% Categories.GetName( borrower.categorycode ) %]</td>
35
                <td>[% Branches.GetName( borrower.branchcode ) %]</td>
37
                <td>[% Branches.GetName( borrower.branchcode ) %]</td>
36
                <td>[% borrower.address %]</td>
38
                <td>[% borrower.address %]</td>
37
- 

Return to bug 14874