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

(-)a/Koha/Patron.pm (+11 lines)
Lines 1404-1409 The following error message codes may be returned: Link Here
1404
1404
1405
=item * C<hold_limit> - Patron has reached the maximum number of allowed holds
1405
=item * C<hold_limit> - Patron has reached the maximum number of allowed holds
1406
1406
1407
=item * C<overdues> - Patron has overdue items
1408
1407
=back
1409
=back
1408
1410
1409
Error messages may include additional payload data with relevant details
1411
Error messages may include additional payload data with relevant details
Lines 1494-1499 sub can_place_holds { Link Here
1494
        }
1496
        }
1495
    }
1497
    }
1496
1498
1499
    # check overdues
1500
    unless ( $overrides->{overdues} ) {
1501
        if ( C4::Context->preference("OverduesBlockHolds") eq 'block' && $self->has_overdues ) {
1502
            $result->set_value(0);
1503
            $result->add_message( { message => 'overdues', type => 'error' } );
1504
            return $result unless $no_short_circuit;
1505
        }
1506
    }
1507
1497
    return $result;
1508
    return $result;
1498
}
1509
}
1499
1510
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt (+4 lines)
Lines 67-72 Link Here
67
                            <li id="too_many_reserves"> Sorry, you cannot place more than [% too_many_reserves | html %] holds. </li>
67
                            <li id="too_many_reserves"> Sorry, you cannot place more than [% too_many_reserves | html %] holds. </li>
68
                        [% END %]
68
                        [% END %]
69
69
70
                        [% IF ( overdues ) %]
71
                            <li id="overdues"> You are not permitted to place holds while you have overdue items on your account. </li>
72
                        [% END %]
73
70
                        [% IF ( bad_biblionumber ) %]
74
                        [% IF ( bad_biblionumber ) %]
71
                            <li id="bad_biblionumber"> ERROR: No record found for record ID [% bad_biblionumber | html %]. </li>
75
                            <li id="bad_biblionumber"> ERROR: No record found for record ID [% bad_biblionumber | html %]. </li>
72
                        [% END %]
76
                        [% END %]
(-)a/opac/opac-reserve.pl (-1 / +2 lines)
Lines 138-143 if ( !$can_place_holds ) { Link Here
138
            );
138
            );
139
        } elsif ( $msg->message eq 'hold_limit' ) {
139
        } elsif ( $msg->message eq 'hold_limit' ) {
140
            $template->param( too_many_reserves => $msg->{payload}->{total_holds} );
140
            $template->param( too_many_reserves => $msg->{payload}->{total_holds} );
141
        } elsif ( $msg->message eq 'overdues' ) {
142
            $template->param( overdues => 1 );
141
        } else {
143
        } else {
142
            Koha::Logger->get->warn( sprintf( "Unhandled 'can_place_holds' error code: %s", $msg->message ) );
144
            Koha::Logger->get->warn( sprintf( "Unhandled 'can_place_holds' error code: %s", $msg->message ) );
143
        }
145
        }
144
- 

Return to bug 41960