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

(-)a/C4/SIP/ILS.pm (+9 lines)
Lines 273-278 sub checkin { Link Here
273
        return $circ;
273
        return $circ;
274
    }
274
    }
275
275
276
   if ( $data->{messages}->{ForbiddenNotForLoanStatus} ) {
277
        my $f_status = $data->{messages}->{ForbiddenNotForLoanStatus};
278
        $circ->ok(0);
279
        $circ->screen_msg(
280
            "Return not allowed, notforloan status (" . $f_status . ")" );
281
        siplog( "LOG_WARNING", "C4::SIP::ILS::Checkin - forbidden return status" );
282
        return $circ;
283
    }
284
276
    if ( !$circ->ok && $circ->alert_type && $circ->alert_type == 98 ) {    # data corruption
285
    if ( !$circ->ok && $circ->alert_type && $circ->alert_type == 98 ) {    # data corruption
277
        $circ->screen_msg("Checkin failed: data problem");
286
        $circ->screen_msg("Checkin failed: data problem");
278
        siplog( "LOG_WARNING", "Problem with issue_id in issues and old_issues; check the about page" );
287
        siplog( "LOG_WARNING", "Problem with issue_id in issues and old_issues; check the about page" );
(-)a/C4/SIP/ILS/Transaction/Checkin.pm (-1 / +20 lines)
Lines 55-60 sub do_checkin { Link Here
55
    my $cv_triggers_alert   = $account->{cv_triggers_alert};
55
    my $cv_triggers_alert   = $account->{cv_triggers_alert};
56
    my $holds_block_checkin = $account->{holds_block_checkin};
56
    my $holds_block_checkin = $account->{holds_block_checkin};
57
    my $holds_get_captured  = $account->{holds_get_captured} // 1;
57
    my $holds_get_captured  = $account->{holds_get_captured} // 1;
58
    my @forbidden_notforloan_status = split(",",$account->{forbidden_notforloan_status});
58
59
59
    if ( !$branch ) {
60
    if ( !$branch ) {
60
        $branch = 'SIP2';
61
        $branch = 'SIP2';
Lines 104-109 sub do_checkin { Link Here
104
        $return = 1 unless keys %$messages;
105
        $return = 1 unless keys %$messages;
105
    }
106
    }
106
107
108
   if (@forbidden_notforloan_status) {
109
        my @results = grep { $_ == $item->notforloan } @forbidden_notforloan_status;
110
        if (@results) {
111
            my $notforloan_desc =
112
              Koha::AuthorisedValues->get_description_by_koha_field(
113
                {
114
                    kohafield        => 'items.notforloan',
115
                    authorised_value => $item->notforloan
116
                }
117
              );
118
            my $f_status = $item->notforloan;
119
            $f_status .= "-$notforloan_desc->{lib}" if $notforloan_desc->{lib};
120
            $messages->{ForbiddenNotForLoanStatus} = $f_status;
121
        }
122
    }
123
107
    # biblionumber, biblioitemnumber, itemnumber
124
    # biblionumber, biblioitemnumber, itemnumber
108
    # borrowernumber, reservedate, branchcode
125
    # borrowernumber, reservedate, branchcode
109
    # cancellationdate, found, reservenotes, priority, timestamp
126
    # cancellationdate, found, reservenotes, priority, timestamp
Lines 140-145 sub do_checkin { Link Here
140
        $self->{item}->destination_loc( $item->homebranch );
157
        $self->{item}->destination_loc( $item->homebranch );
141
        $self->alert_type('04');           # send to other branch
158
        $self->alert_type('04');           # send to other branch
142
    }
159
    }
160
    if ( $messages->{ForbiddenNotForLoanStatus} ) {
161
        $self->alert_type('99');
162
    }
143
    if ( $messages->{ResFound} || $checkin_blocked_by_holds ) {
163
    if ( $messages->{ResFound} || $checkin_blocked_by_holds ) {
144
        if ($checkin_blocked_by_holds) {
164
        if ($checkin_blocked_by_holds) {
145
            $self->alert_type('99');
165
            $self->alert_type('99');
146
- 

Return to bug 34326