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

(-)a/C4/Reserves.pm (-2 / +2 lines)
Lines 1290-1296 sub IsAvailableForItemLevelRequest { Link Here
1290
1290
1291
        return !$items_any_available;
1291
        return !$items_any_available;
1292
    } else { # on_shelf_holds == 0 "If any unavailable" (the description is rather cryptic and could still be improved)
1292
    } else { # on_shelf_holds == 0 "If any unavailable" (the description is rather cryptic and could still be improved)
1293
        return $item->notforloan < 0 || $item->onloan || IsItemOnHoldAndFound( $item->itemnumber );
1293
        return ( C4::Context->preference('AllowOnOrderOnShelfHolds') ? $item->notforloan < 0 : 0 ) || $item->onloan || IsItemOnHoldAndFound( $item->itemnumber );
1294
    }
1294
    }
1295
}
1295
}
1296
1296
Lines 1320-1326 sub ItemsAnyAvailableForHold { Link Here
1320
1320
1321
        $any_available = 1
1321
        $any_available = 1
1322
            unless $i->itemlost
1322
            unless $i->itemlost
1323
            || $i->notforloan != 0
1323
            || C4::Context->preference('AllowOnOrderOnShelfHolds') ? $i->notforloan != 0 : $i->notforloan > 0
1324
            || $i->withdrawn
1324
            || $i->withdrawn
1325
            || $i->onloan
1325
            || $i->onloan
1326
            || IsItemOnHoldAndFound( $i->id )
1326
            || IsItemOnHoldAndFound( $i->id )
(-)a/installer/data/mysql/atomicupdate/bug_6918.perl (+10 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
5
        ('AllowOnOrderOnShelfHolds', '0', NULL, 'Allow on order items to be placed on hold even if on shelf holds are not allowed', 'YesNo');
6
    });
7
8
    # Always end with this (adjust the bug info)
9
    NewVersion( $DBversion, 6918, "Can't place holds on 'on order' items with AllowOnShelfHolds off");
10
}
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 34-39 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
34
('AllowMultipleIssuesOnABiblio',1,'Allow/Don\'t allow patrons to check out multiple items from one biblio','','YesNo'),
34
('AllowMultipleIssuesOnABiblio',1,'Allow/Don\'t allow patrons to check out multiple items from one biblio','','YesNo'),
35
('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'),
35
('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'),
36
('AllowOfflineCirculation','0','','If on, enables HTML5 offline circulation functionality.','YesNo'),
36
('AllowOfflineCirculation','0','','If on, enables HTML5 offline circulation functionality.','YesNo'),
37
('AllowOnOrderOnShelfHolds', '0', NULL, 'Allow on order items to be placed on hold even if on shelf holds are not allowed', 'YesNo'),
37
('AllowPatronToControlAutorenewal','0',NULL,'If enabled, patrons will have a field in their account to choose whether their checkouts are auto renewed or not','YesNo'),
38
('AllowPatronToControlAutorenewal','0',NULL,'If enabled, patrons will have a field in their account to choose whether their checkouts are auto renewed or not','YesNo'),
38
('AllowPatronToSetCheckoutsVisibilityForGuarantor',  '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor',  'YesNo'),
39
('AllowPatronToSetCheckoutsVisibilityForGuarantor',  '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor',  'YesNo'),
39
('AllowPatronToSetFinesVisibilityForGuarantor',  '0', NULL, 'If enabled, the patron can set fines to be visible to his or her guarantor',  'YesNo'),
40
('AllowPatronToSetFinesVisibilityForGuarantor',  '0', NULL, 'If enabled, the patron can set fines to be visible to his or her guarantor',  'YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +6 lines)
Lines 635-640 Circulation: Link Here
635
                  yes: Allow
635
                  yes: Allow
636
                  no: "Don't allow"
636
                  no: "Don't allow"
637
            - hold fulfillment to be limited by itemtype.
637
            - hold fulfillment to be limited by itemtype.
638
        -
639
            - pref: AllowOnOrderOnShelfHolds
640
              choices:
641
                  yes: Allow
642
                  no: "Don't allow"
643
            - on order items ( not for loan < 0 ) to be holdable when on-shelf holds are otherwise not allowed.
638
        -
644
        -
639
            - pref: AllowRenewalIfOtherItemsAvailable
645
            - pref: AllowRenewalIfOtherItemsAvailable
640
              choices:
646
              choices:
641
- 

Return to bug 6918