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

(-)a/C4/Reserves.pm (-9 / +6 lines)
Lines 442-451 sub CanItemBeReserved { Link Here
442
        return { status => 'tooManyReserves', limit => $rule->rule_value} if $total_holds_count >= $rule->rule_value;
442
        return { status => 'tooManyReserves', limit => $rule->rule_value} if $total_holds_count >= $rule->rule_value;
443
    }
443
    }
444
444
445
    my $circ_control_branch =
445
    my $reserves_control_branch =
446
      C4::Circulation::_GetCircControlBranch( $item->unblessed(), $borrower );
446
      GetReservesControlBranch( $item->unblessed(), $borrower );
447
    my $branchitemrule =
447
    my $branchitemrule =
448
      C4::Circulation::GetBranchItemRule( $circ_control_branch, $item->itype ); # FIXME Should not be item->effective_itemtype?
448
      C4::Circulation::GetBranchItemRule( $reserves_control_branch, $item->itype ); # FIXME Should not be item->effective_itemtype?
449
449
450
    if ( $branchitemrule->{holdallowed} == 0 ) {
450
    if ( $branchitemrule->{holdallowed} == 0 ) {
451
        return { status => 'notReservable' };
451
        return { status => 'notReservable' };
Lines 1173-1181 sub IsAvailableForItemLevelRequest { Link Here
1173
    my $patron = Koha::Patrons->find( $borrower->{borrowernumber} );
1173
    my $patron = Koha::Patrons->find( $borrower->{borrowernumber} );
1174
    my $item_object = Koha::Items->find( $item->{itemnumber } );
1174
    my $item_object = Koha::Items->find( $item->{itemnumber } );
1175
    my $itemtype = $item_object->effective_itemtype;
1175
    my $itemtype = $item_object->effective_itemtype;
1176
    my $notforloan_per_itemtype
1176
    my $notforloan_per_itemtype = Koha::ItemTypes->find($itemtype)->notforloan;
1177
      = $dbh->selectrow_array("SELECT notforloan FROM itemtypes WHERE itemtype = ?",
1178
                              undef, $itemtype);
1179
1177
1180
    return 0 if
1178
    return 0 if
1181
        $notforloan_per_itemtype ||
1179
        $notforloan_per_itemtype ||
Lines 1202-1210 sub IsAvailableForItemLevelRequest { Link Here
1202
        my $any_available = 0;
1200
        my $any_available = 0;
1203
1201
1204
        foreach my $i (@items) {
1202
        foreach my $i (@items) {
1205
1203
            my $reserves_control_branch = GetReservesControlBranch( $i->unblessed(), $borrower );
1206
            my $circ_control_branch = C4::Circulation::_GetCircControlBranch( $i->unblessed(), $borrower );
1204
            my $branchitemrule = C4::Circulation::GetBranchItemRule( $reserves_control_branch, $i->itype );
1207
            my $branchitemrule = C4::Circulation::GetBranchItemRule( $circ_control_branch, $i->itype );
1208
1205
1209
            $any_available = 1
1206
            $any_available = 1
1210
              unless $i->itemlost
1207
              unless $i->itemlost
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-2 / +2 lines)
Lines 1-5 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Branches %]
4
[% USE Branches %]
4
[% USE Categories %]
5
[% USE Categories %]
5
[% USE CirculationRules %]
6
[% USE CirculationRules %]
Lines 687-693 Link Here
687
            <li><strong>No holds allowed:</strong> No patron may put this book on hold.</li>
688
            <li><strong>No holds allowed:</strong> No patron may put this book on hold.</li>
688
        </ul>
689
        </ul>
689
        <p><strong>Note: </strong>If the system preference 'AllowHoldPolicyOverride' is enabled, these policies can be overridden by your circulation staff.</br />
690
        <p><strong>Note: </strong>If the system preference 'AllowHoldPolicyOverride' is enabled, these policies can be overridden by your circulation staff.</br />
690
            <strong>Important: </strong>The policies are based on the patron's home library, not the library where the hold is being placed.
691
            <strong>Important: </strong>The policies are applied based on the ReservesControlBranch system preference which is set to <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReservesControlBranch">[% Koha.Preference('ReservesControlBranch') %]</a>.
691
        </p>
692
        </p>
692
693
693
        <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
694
        <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
694
- 

Return to bug 20837