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

(-)a/C4/Items.pm (-2 / +2 lines)
Lines 944-950 sub GetItemsInfo { Link Here
944
           holding.opac_info as holding_branch_opac_info,
944
           holding.opac_info as holding_branch_opac_info,
945
           home.opac_info as home_branch_opac_info
945
           home.opac_info as home_branch_opac_info
946
    ";
946
    ";
947
    $query .= ",IF(tmp_holdsqueue.itemnumber,1,0) AS has_pending_hold" if !C4::Context->preference('AllowItemsOnHoldCheckout');
947
    $query .= ",IF(tmp_holdsqueue.itemnumber,1,0) AS has_pending_hold" if !C4::Context->preference('AllowItemsOnHoldCheckoutSIP');
948
    $query .= "
948
    $query .= "
949
     FROM items
949
     FROM items
950
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
950
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
Lines 958-964 sub GetItemsInfo { Link Here
958
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
958
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
959
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
959
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
960
    $query .= "
960
    $query .= "
961
    LEFT JOIN tmp_holdsqueue USING (itemnumber)" if !C4::Context->preference('AllowItemsOnHoldCheckout');
961
    LEFT JOIN tmp_holdsqueue USING (itemnumber)" if !C4::Context->preference('AllowItemsOnHoldCheckoutSIP');
962
    $query .= q|
962
    $query .= q|
963
    LEFT JOIN localization ON itemtypes.itemtype = localization.code
963
    LEFT JOIN localization ON itemtypes.itemtype = localization.code
964
        AND localization.entity = 'itemtypes'
964
        AND localization.entity = 'itemtypes'
(-)a/C4/SIP/ILS/Transaction/Checkout.pm (-1 / +1 lines)
Lines 57-63 sub do_checkout { Link Here
57
    my $borrower = $patron->unblessed;
57
    my $borrower = $patron->unblessed;
58
	$debug and warn "do_checkout borrower: . " . Dumper $borrower;
58
	$debug and warn "do_checkout borrower: . " . Dumper $borrower;
59
    my ($issuingimpossible, $needsconfirmation) = _can_we_issue($patron, $barcode,
59
    my ($issuingimpossible, $needsconfirmation) = _can_we_issue($patron, $barcode,
60
        C4::Context->preference("AllowItemsOnHoldCheckout")
60
        C4::Context->preference("AllowItemsOnHoldCheckoutSIP")
61
    );
61
    );
62
62
63
    my $noerror=1;  # If set to zero we block the issue
63
    my $noerror=1;  # If set to zero we block the issue
(-)a/C4/UsageStats.pm (-1 / +1 lines)
Lines 134-140 sub BuildReport { Link Here
134
        AgeRestrictionOverride
134
        AgeRestrictionOverride
135
        AllFinesNeedOverride
135
        AllFinesNeedOverride
136
        AllowFineOverride
136
        AllowFineOverride
137
        AllowItemsOnHoldCheckout
137
        AllowItemsOnHoldCheckoutSIP
138
        AllowItemsOnHoldCheckoutSCO
138
        AllowItemsOnHoldCheckoutSCO
139
        AllowNotForLoanOverride
139
        AllowNotForLoanOverride
140
        AllowRenewalLimitOverride
140
        AllowRenewalLimitOverride
(-)a/Koha/Item.pm (-1 / +1 lines)
Lines 365-371 This method checks the tmp_holdsqueue to see if this item has been selected for Link Here
365
sub has_pending_hold {
365
sub has_pending_hold {
366
    my ( $self ) = @_;
366
    my ( $self ) = @_;
367
    my $pending_hold = $self->_result->tmp_holdsqueues;
367
    my $pending_hold = $self->_result->tmp_holdsqueues;
368
    return !C4::Context->preference('AllowItemsOnHoldCheckout') && $pending_hold->count ? 1: 0;
368
    return !C4::Context->preference('AllowItemsOnHoldCheckoutSIP') && $pending_hold->count ? 1: 0;
369
}
369
}
370
370
371
=head2 Internal methods
371
=head2 Internal methods
(-)a/installer/data/mysql/atomicupdate/bug_23233.perl (+12 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        UPDATE systempreferences SET
5
        variable = 'AllowItemsOnHoldCheckoutSIP',
6
        explanation = 'Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else via SIP. This allows self checkouts for those items.'
7
        WHERE variable = 'AllowItemsOnHoldCheckout'
8
    });
9
10
    SetVersion( $DBversion );
11
    print "Upgrade to $DBversion done (Bug XXXXX - description)\n";
12
}
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 27-33 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
27
('AllowHoldsOnDamagedItems','1','','Allow hold requests to be placed on damaged items','YesNo'),
27
('AllowHoldsOnDamagedItems','1','','Allow hold requests to be placed on damaged items','YesNo'),
28
('AllowHoldsOnPatronsPossessions','1',NULL,'Allow holds on records that patron have items of it','YesNo'),
28
('AllowHoldsOnPatronsPossessions','1',NULL,'Allow holds on records that patron have items of it','YesNo'),
29
('AllowCheckoutNotes', '0', NULL, 'Allow patrons to submit notes about checked out items.','YesNo'),
29
('AllowCheckoutNotes', '0', NULL, 'Allow patrons to submit notes about checked out items.','YesNo'),
30
('AllowItemsOnHoldCheckout','0','','Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','YesNo'),
30
('AllowItemsOnHoldCheckoutSIP','0','','Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else via SIP. This allows self checkouts for those items.','YesNo'),
31
('AllowItemsOnHoldCheckoutSCO','0','','Do not generate RESERVE_WAITING and RESERVED warning in the SCO module when checking out items reserved to someone else. This allows self checkouts for those items.','YesNo'),
31
('AllowItemsOnHoldCheckoutSCO','0','','Do not generate RESERVE_WAITING and RESERVED warning in the SCO module when checking out items reserved to someone else. This allows self checkouts for those items.','YesNo'),
32
('AllowMultipleCovers','0','1','Allow multiple cover images to be attached to each bibliographic record.','YesNo'),
32
('AllowMultipleCovers','0','1','Allow multiple cover images to be attached to each bibliographic record.','YesNo'),
33
('AllowMultipleIssuesOnABiblio',1,'Allow/Don\'t allow patrons to check out multiple items from one biblio','','YesNo'),
33
('AllowMultipleIssuesOnABiblio',1,'Allow/Don\'t allow patrons to check out multiple items from one biblio','','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-3 / +4 lines)
Lines 204-214 Circulation: Link Here
204
                  no: "Don't allow"
204
                  no: "Don't allow"
205
            - staff to renew items that are on hold by manually specifying a due date.
205
            - staff to renew items that are on hold by manually specifying a due date.
206
        -
206
        -
207
            - pref: AllowItemsOnHoldCheckout
207
            - pref: AllowItemsOnHoldCheckoutSIP
208
              choices:
208
              choices:
209
                  yes: Allow
209
                  yes: Allow
210
                  no: "Don't allow"
210
                  no: "Don't allow"
211
            - checkouts of items reserved to someone else. If allowed do not generate RESERVE_WAITING and RESERVED warning. This allows self checkouts for those items. If using the holds queue items with pending holds will be marked as "unavailable" if this set to "Don't Allow".
211
            - checkouts of items reserved to someone else via SIP checkout messages.
212
            - If allowed do not generate RESERVE_WAITING and RESERVED warning. 
213
            - This allows self checkouts for those items. If using the holds queue items with pending holds will be marked as "unavailable" if this set to "Don't Allow".
212
        -
214
        -
213
            - pref: AllowItemsOnHoldCheckoutSCO
215
            - pref: AllowItemsOnHoldCheckoutSCO
214
              choices:
216
              choices:
215
- 

Return to bug 23233