Lines 23-30
Link Here
|
23 |
# with Koha; if not, write to the Free Software Foundation, Inc., |
23 |
# with Koha; if not, write to the Free Software Foundation, Inc., |
24 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
24 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
25 |
|
25 |
|
26 |
use strict; |
26 |
use Modern::Perl; |
27 |
#use warnings; FIXME - Bug 2505 |
|
|
28 |
use C4::Auth; |
27 |
use C4::Auth; |
29 |
use C4::Output; |
28 |
use C4::Output; |
30 |
use CGI; |
29 |
use CGI; |
Lines 35-43
use Koha::DateUtils;
Link Here
|
35 |
use File::Basename; |
34 |
use File::Basename; |
36 |
|
35 |
|
37 |
my $input = new CGI; |
36 |
my $input = new CGI; |
38 |
my $quicksearch = $input->param('quicksearch'); |
37 |
my $quicksearch = $input->param('quicksearch') || ''; |
39 |
my $startfrom = $input->param('startfrom')||1; |
38 |
my $startfrom = $input->param('startfrom') || 1; |
40 |
my $resultsperpage = $input->param('resultsperpage')||C4::Context->preference("PatronsPerPage")||20; |
39 |
my $resultsperpage = $input->param('resultsperpage') || C4::Context->preference("PatronsPerPage") || 20; |
41 |
|
40 |
|
42 |
my ($template, $loggedinuser, $cookie) |
41 |
my ($template, $loggedinuser, $cookie) |
43 |
= get_template_and_user({template_name => "members/member.tmpl", |
42 |
= get_template_and_user({template_name => "members/member.tmpl", |
Lines 60-66
my @branchloop;
Link Here
|
60 |
|
59 |
|
61 |
foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { |
60 |
foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { |
62 |
my $selected; |
61 |
my $selected; |
63 |
$selected = 1 if $branches->{$_}->{branchcode} eq $$patron{branchcode}; |
62 |
$selected = 1 if $patron->{branchcode} && $branches->{$_}->{branchcode} eq $patron->{branchcode}; |
64 |
my %row = ( value => $_, |
63 |
my %row = ( value => $_, |
65 |
selected => $selected, |
64 |
selected => $selected, |
66 |
branchname => $branches->{$_}->{branchname}, |
65 |
branchname => $branches->{$_}->{branchname}, |
Lines 85-92
if ($AddPatronLists=~/code/){
Link Here
|
85 |
$categories[0]->{'first'}=1; |
84 |
$categories[0]->{'first'}=1; |
86 |
} |
85 |
} |
87 |
|
86 |
|
88 |
my $member=$input->param('member'); |
87 |
my $member=$input->param('member') || ''; |
89 |
my $orderbyparams=$input->param('orderby'); |
88 |
my $orderbyparams=$input->param('orderby') || ''; |
90 |
my @orderby; |
89 |
my @orderby; |
91 |
if ($orderbyparams){ |
90 |
if ($orderbyparams){ |
92 |
my @orderbyelt=split(/,/,$orderbyparams); |
91 |
my @orderbyelt=split(/,/,$orderbyparams); |
Lines 104-110
my $to = $from + $resultsperpage;
Link Here
|
104 |
|
103 |
|
105 |
my ($count,$results); |
104 |
my ($count,$results); |
106 |
if ($member || keys %$patron) { |
105 |
if ($member || keys %$patron) { |
107 |
my $searchfields = $input->param('searchfields'); |
106 |
my $searchfields = $input->param('searchfields') || ''; |
108 |
my @searchfields = $searchfields ? split( ',', $searchfields ) : ( "firstname", "surname", "othernames", "cardnumber", "userid", "email" ); |
107 |
my @searchfields = $searchfields ? split( ',', $searchfields ) : ( "firstname", "surname", "othernames", "cardnumber", "userid", "email" ); |
109 |
|
108 |
|
110 |
if ( $searchfields eq "dateofbirth" ) { |
109 |
if ( $searchfields eq "dateofbirth" ) { |
Lines 139-145
my $index=$from;
Link Here
|
139 |
foreach my $borrower(@$results[$from..$to-1]){ |
138 |
foreach my $borrower(@$results[$from..$to-1]){ |
140 |
#find out stats |
139 |
#find out stats |
141 |
my ($od,$issue,$fines)=GetMemberIssuesAndFines($$borrower{'borrowernumber'}); |
140 |
my ($od,$issue,$fines)=GetMemberIssuesAndFines($$borrower{'borrowernumber'}); |
142 |
|
141 |
$fines ||= 0; |
143 |
$$borrower{'dateexpiry'}= C4::Dates->new($$borrower{'dateexpiry'},'iso')->output('syspref'); |
142 |
$$borrower{'dateexpiry'}= C4::Dates->new($$borrower{'dateexpiry'},'iso')->output('syspref'); |
144 |
|
143 |
|
145 |
my %row = ( |
144 |
my %row = ( |
146 |
- |
|
|