Lines 77-83
$findborrower = '' unless defined $findborrower;
Link Here
|
77 |
$findborrower =~ s|,| |g; |
77 |
$findborrower =~ s|,| |g; |
78 |
my $borrowernumber_hold = $input->param('borrowernumber') || ''; |
78 |
my $borrowernumber_hold = $input->param('borrowernumber') || ''; |
79 |
my $messageborrower; |
79 |
my $messageborrower; |
80 |
my $maxreserves; |
80 |
my $exceeded_maxreserves; |
81 |
|
81 |
|
82 |
my $date = C4::Dates->today('iso'); |
82 |
my $date = C4::Dates->today('iso'); |
83 |
my $action = $input->param('action'); |
83 |
my $action = $input->param('action'); |
Lines 129-135
if ($borrowernumber_hold && !$action) {
Link Here
|
129 |
GetReserveCount( $borrowerinfo->{'borrowernumber'} ); |
129 |
GetReserveCount( $borrowerinfo->{'borrowernumber'} ); |
130 |
|
130 |
|
131 |
if ( C4::Context->preference('maxreserves') && ($number_reserves >= C4::Context->preference('maxreserves')) ) { |
131 |
if ( C4::Context->preference('maxreserves') && ($number_reserves >= C4::Context->preference('maxreserves')) ) { |
132 |
$maxreserves = 1; |
132 |
$exceeded_maxreserves = 1; |
133 |
} |
133 |
} |
134 |
|
134 |
|
135 |
# we check the date expiry of the borrower (only if there is an expiry date, otherwise, set to 1 (warn) |
135 |
# we check the date expiry of the borrower (only if there is an expiry date, otherwise, set to 1 (warn) |
Lines 187-193
foreach my $biblionumber (@biblionumbers) {
Link Here
|
187 |
my $dat = GetBiblioData($biblionumber); |
187 |
my $dat = GetBiblioData($biblionumber); |
188 |
|
188 |
|
189 |
unless ( CanBookBeReserved($borrowerinfo->{borrowernumber}, $biblionumber) ) { |
189 |
unless ( CanBookBeReserved($borrowerinfo->{borrowernumber}, $biblionumber) ) { |
190 |
$maxreserves = 1; |
190 |
$exceeded_maxreserves = 1; # note that exceeding the circ policy's hold |
|
|
191 |
# limit is not the only reason CanBookBeReserved() |
192 |
# can return false |
191 |
} |
193 |
} |
192 |
|
194 |
|
193 |
my $alreadypossession; |
195 |
my $alreadypossession; |
Lines 406-412
foreach my $biblionumber (@biblionumbers) {
Link Here
|
406 |
|
408 |
|
407 |
if ( |
409 |
if ( |
408 |
$policy_holdallowed |
410 |
$policy_holdallowed |
409 |
&& !$maxreserves |
411 |
&& !$exceeded_maxreserves |
410 |
&& !$item->{cantreserve} |
412 |
&& !$item->{cantreserve} |
411 |
&& IsAvailableForItemLevelRequest($itemnumber) |
413 |
&& IsAvailableForItemLevelRequest($itemnumber) |
412 |
&& CanItemBeReserved( |
414 |
&& CanItemBeReserved( |
Lines 572-578
foreach my $biblionumber (@biblionumbers) {
Link Here
|
572 |
|
574 |
|
573 |
$template->param( biblioloop => \@biblioloop ); |
575 |
$template->param( biblioloop => \@biblioloop ); |
574 |
$template->param( biblionumbers => $biblionumbers ); |
576 |
$template->param( biblionumbers => $biblionumbers ); |
575 |
$template->param( maxreserves => $maxreserves ); |
577 |
$template->param( exceeded_maxreserves => $exceeded_maxreserves ); |
576 |
|
578 |
|
577 |
if ($multihold) { |
579 |
if ($multihold) { |
578 |
$template->param( multi_hold => 1 ); |
580 |
$template->param( multi_hold => 1 ); |
579 |
- |
|
|