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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-2 / +2 lines)
Lines 237-249 function checkMultiHold() { Link Here
237
    </form>
237
    </form>
238
  [% ELSE %]
238
  [% ELSE %]
239
239
240
[% IF ( maxreserves || alreadyreserved || none_available || alreadypossession ) %]
240
[% IF ( exceeded_maxreserves || alreadyreserved || none_available || alreadypossession ) %]
241
    <div class="dialog alert">
241
    <div class="dialog alert">
242
242
243
    [% UNLESS ( multi_hold ) %]
243
    [% UNLESS ( multi_hold ) %]
244
      <h3>Cannot place hold</h3>
244
      <h3>Cannot place hold</h3>
245
  	  <ul>
245
  	  <ul>
246
        [% IF ( maxreserves ) %]
246
        [% IF ( exceeded_maxreserves ) %]
247
          <li><strong>Too many holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %] </a> has too many holds.</li>
247
          <li><strong>Too many holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %] </a> has too many holds.</li>
248
        [% END %]
248
        [% END %]
249
        [% IF ( alreadyreserved ) %]
249
        [% IF ( alreadyreserved ) %]
(-)a/reserve/request.pl (-6 / +7 lines)
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
- 

Return to bug 12197