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

(-)a/C4/SIP/ILS.pm (-2 / +2 lines)
Lines 201-207 sub checkin { Link Here
201
201
202
    my $checked_in_ok     = $account->{checked_in_ok};
202
    my $checked_in_ok     = $account->{checked_in_ok};
203
    my $cv_triggers_alert = $account->{cv_triggers_alert};
203
    my $cv_triggers_alert = $account->{cv_triggers_alert};
204
    my $no_holds_checkin  = $account->{no_holds_checkin};
204
    my $holds_block_checkin  = $account->{holds_block_checkin};
205
205
206
    my ( $patron, $item, $circ );
206
    my ( $patron, $item, $circ );
207
207
Lines 225-231 sub checkin { Link Here
225
    if ( !$circ->ok && $circ->alert_type && $circ->alert_type == 98 ) { # data corruption
225
    if ( !$circ->ok && $circ->alert_type && $circ->alert_type == 98 ) { # data corruption
226
        $circ->screen_msg("Checkin failed: data problem");
226
        $circ->screen_msg("Checkin failed: data problem");
227
        siplog( "LOG_WARNING", "Problem with issue_id in issues and old_issues; check the about page" );
227
        siplog( "LOG_WARNING", "Problem with issue_id in issues and old_issues; check the about page" );
228
    } elsif ( $data->{messages}->{ResFound} && !$circ->ok && $no_holds_checkin ) {
228
    } elsif ( $data->{messages}->{ResFound} && !$circ->ok && $holds_block_checkin ) {
229
        $circ->screen_msg("Item is on hold, please return to circulation desk");
229
        $circ->screen_msg("Item is on hold, please return to circulation desk");
230
        siplog ("LOG_DEBUG", "C4::SIP::ILS::Checkin - item withdrawn");
230
        siplog ("LOG_DEBUG", "C4::SIP::ILS::Checkin - item withdrawn");
231
    } elsif ( $data->{messages}->{withdrawn} && !$circ->ok && C4::Context->preference("BlockReturnOfWithdrawnItems") ) {
231
    } elsif ( $data->{messages}->{withdrawn} && !$circ->ok && C4::Context->preference("BlockReturnOfWithdrawnItems") ) {
(-)a/C4/SIP/ILS/Transaction/Checkin.pm (-2 / +2 lines)
Lines 52-58 sub do_checkin { Link Here
52
52
53
    my $checked_in_ok     = $account->{checked_in_ok};
53
    my $checked_in_ok     = $account->{checked_in_ok};
54
    my $cv_triggers_alert = $account->{cv_triggers_alert};
54
    my $cv_triggers_alert = $account->{cv_triggers_alert};
55
    my $no_holds_checkin  = $account->{no_holds_checkin};
55
    my $holds_block_checkin  = $account->{holds_block_checkin};
56
56
57
    if (!$branch) {
57
    if (!$branch) {
58
        $branch = 'SIP2';
58
        $branch = 'SIP2';
Lines 116-122 sub do_checkin { Link Here
116
        $self->alert_type('04');            # send to other branch
116
        $self->alert_type('04');            # send to other branch
117
    }
117
    }
118
    if ($messages->{ResFound}) {
118
    if ($messages->{ResFound}) {
119
        if ($no_holds_checkin) {
119
        if ($holds_block_checkin) {
120
            $self->alert_type('99');
120
            $self->alert_type('99');
121
            $return = 0;
121
            $return = 0;
122
        } elsif ($branch eq $messages->{ResFound}->{branchcode}) {
122
        } elsif ($branch eq $messages->{ResFound}->{branchcode}) {
(-)a/debian/templates/SIPconfig.xml (-1 / +1 lines)
Lines 51-57 Link Here
51
      <login id="lpl-sc-beacock" password="xyzzy"
51
      <login id="lpl-sc-beacock" password="xyzzy"
52
             delimiter="|" error-detect="enabled" institution="LPL"
52
             delimiter="|" error-detect="enabled" institution="LPL"
53
             send_patron_home_library_in_af="1"
53
             send_patron_home_library_in_af="1"
54
             no_holds_checkin="1"
54
             holds_block_checkin="1"
55
             av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" >
55
             av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" >
56
          <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
56
          <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
57
          <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
57
          <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
(-)a/etc/SIPconfig.xml (-1 / +1 lines)
Lines 60-66 Link Here
60
             av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]"
60
             av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]"
61
             hide_fields="BD,BE,BF,PB"
61
             hide_fields="BD,BE,BF,PB"
62
             register_id=''
62
             register_id=''
63
             no_holds_checkin="1">
63
             holds_block_checkin="1">
64
          <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
64
          <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
65
          <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
65
          <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
66
          <patron_attribute field="XY" code="CODE" />
66
          <patron_attribute field="XY" code="CODE" />
(-)a/t/db_dependent/SIP/Message.t (-3 / +2 lines)
Lines 601-607 sub test_checkin_v2 { Link Here
601
601
602
    # Test account option no_holds_check that prevents items on hold from being checked in via SIP
602
    # Test account option no_holds_check that prevents items on hold from being checked in via SIP
603
    Koha::Old::Checkouts->search({ issue_id => $issue->issue_id })->delete;
603
    Koha::Old::Checkouts->search({ issue_id => $issue->issue_id })->delete;
604
    $server->{account}->{no_holds_checkin} = 1;
604
    $server->{account}->{holds_block_checkin} = 1;
605
    my $reserve_id = AddReserve({
605
    my $reserve_id = AddReserve({
606
        branchcode     => $branchcode,
606
        branchcode     => $branchcode,
607
        borrowernumber => $patron1->{borrowernumber},
607
        borrowernumber => $patron1->{borrowernumber},
Lines 617-623 sub test_checkin_v2 { Link Here
617
    is( substr($response,5,1), 'Y', 'Alert flag is set' );
617
    is( substr($response,5,1), 'Y', 'Alert flag is set' );
618
    check_field( $respcode, $response, FID_SCREEN_MSG, 'Item is on hold, please return to circulation desk', 'Screen message is correct' );
618
    check_field( $respcode, $response, FID_SCREEN_MSG, 'Item is on hold, please return to circulation desk', 'Screen message is correct' );
619
    $hold->delete();
619
    $hold->delete();
620
    $server->{account}->{no_holds_checkin} = 0;
620
    $server->{account}->{holds_block_checkin} = 0;
621
621
622
}
622
}
623
623
624
- 

Return to bug 25541