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

(-)a/C4/SIP/ILS.pm (+3 lines)
Lines 226-231 sub checkin { Link Here
226
    } elsif ( $data->{messages}->{WasLost} && !$circ->ok ) {
226
    } elsif ( $data->{messages}->{WasLost} && !$circ->ok ) {
227
            $circ->screen_msg("Item lost, return not allowed");
227
            $circ->screen_msg("Item lost, return not allowed");
228
            syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - item lost");
228
            syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - item lost");
229
    } elsif ($data->{messages}->{ResFound}->{AllowSIPCheckinOnHolds} && !$circ->ok) {
230
            $circ->screen_msg("Checkin failed, item reserved. Please bring to issue desk.");
231
            syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - item reserved");
229
    } elsif ( !$item->{patron} ) {
232
    } elsif ( !$item->{patron} ) {
230
        if ( $checked_in_ok ) { # Mark checkin ok although book not checked out
233
        if ( $checked_in_ok ) { # Mark checkin ok although book not checked out
231
            $circ->ok( 1 );
234
            $circ->ok( 1 );
(-)a/C4/SIP/ILS/Transaction/Checkin.pm (-1 / +27 lines)
Lines 68-75 sub do_checkin { Link Here
68
                   . ':'
68
                   . ':'
69
                   . substr( $return_date, 16, 2 );
69
                   . substr( $return_date, 16, 2 );
70
70
71
    my ($return, $messages, $issue, $borrower);
72
73
    if ( !C4::Context->preference("AllowSIPCheckinOnHolds") ) {
74
        if ( scalar @{ $self->{item}->{hold_queue} } ) {    # there's an item-level hold, is it for this item?
75
            foreach my $hq ( @{ $self->{item}->{hold_queue} } ) {
76
                if ( $self->{item}->{itemnumber} == $hq->{itemnumber} ) {
77
                    $messages = { "ResFound" => { "AllowSIPCheckinOnHolds" => 1 } };
78
                    $self->alert_type('01');
79
                    $self->ok(0);
80
                    return { messages => $messages };
81
                }
82
83
            }
84
        }
85
        if ( scalar @{ $self->{item}->{pending_queue} } ) {
86
             foreach my $pq ( @{ $self->{item}->{pending_queue} } ) {
87
                if ( $pq->{item_level_hold} == 0 ) {    # bib level hold?
88
                    $messages = { "ResFound" => { "AllowSIPCheckinOnHolds" => 1 } };
89
                        $self->alert_type('01');
90
                        $self->ok(0);
91
                        return { messages => $messages };
92
                    }
93
                }
94
        }
95
    }
96
71
    $debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
97
    $debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
72
    my ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, dt_from_string($return_date));
98
    ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, dt_from_string($return_date));
73
99
74
    if ( $checked_in_ok ) {
100
    if ( $checked_in_ok ) {
75
        delete $messages->{NotIssued};
101
        delete $messages->{NotIssued};
(-)a/installer/data/mysql/atomicupdate/bug_15729.perl (+6 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('AllowSIPCheckInOnHolds','0','','SIP checkin transaction to proceed if the item being checked in has an existing hold on it.','YesNo');
4
5
6
}
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 42-47 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
42
('AllowRenewalOnHoldOverride','0',NULL,'If ON, allow items on hold to be renewed with a specified due date','YesNo'),
42
('AllowRenewalOnHoldOverride','0',NULL,'If ON, allow items on hold to be renewed with a specified due date','YesNo'),
43
('AllowReturnToBranch','anywhere','anywhere|homebranch|holdingbranch|homeorholdingbranch','Where an item may be returned','Choice'),
43
('AllowReturnToBranch','anywhere','anywhere|homebranch|holdingbranch|homeorholdingbranch','Where an item may be returned','Choice'),
44
('AllowSelfCheckReturns','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
44
('AllowSelfCheckReturns','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
45
('AllowSIPCheckInOnHolds','0','','SIP checkin transaction to proceed if the item being checked in has an existing hold on it.','YesNo'),
45
('AllowStaffToSetCheckoutsVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.',  'YesNo'),
46
('AllowStaffToSetCheckoutsVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.',  'YesNo'),
46
('AllowStaffToSetFinesVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s fines to be visible to linked patrons from the opac.',  'YesNo'),
47
('AllowStaffToSetFinesVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s fines to be visible to linked patrons from the opac.',  'YesNo'),
47
('AllowTooManyOverride','1','','If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts','YesNo'),
48
('AllowTooManyOverride','1','','If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +6 lines)
Lines 505-510 Circulation: Link Here
505
                  no: "Don't"
505
                  no: "Don't"
506
            - automatically fill holds instead of asking the librarian.
506
            - automatically fill holds instead of asking the librarian.
507
        -
507
        -
508
            - pref: AllowSIPCheckInOnHolds
509
              choices:
510
                  yes: Allow
511
                  no: "Don't Allow"
512
            - SIP checkin transaction to proceed if the item being checked in has an existing hold on it.
513
        -
508
            - pref: HoldsAutoFillPrintSlip
514
            - pref: HoldsAutoFillPrintSlip
509
              choices:
515
              choices:
510
                  yes: Do
516
                  yes: Do
511
- 

Return to bug 15729