Lines 51-61
sub do_checkin {
Link Here
|
51 |
my $return_date = shift; |
51 |
my $return_date = shift; |
52 |
my $account = shift; |
52 |
my $account = shift; |
53 |
|
53 |
|
54 |
my $checked_in_ok = $account->{checked_in_ok}; |
54 |
my $checked_in_ok = $account->{checked_in_ok}; |
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 |
my @forbidden_notforloan_status = split( ",", $account->{forbidden_notforloan_status} ); |
59 |
|
59 |
|
60 |
if ( !$branch ) { |
60 |
if ( !$branch ) { |
61 |
$branch = 'SIP2'; |
61 |
$branch = 'SIP2'; |
Lines 95-126
sub do_checkin {
Link Here
|
95 |
|
95 |
|
96 |
my $checkin_blocked_by_holds = $holds_block_checkin && $reserved; |
96 |
my $checkin_blocked_by_holds = $holds_block_checkin && $reserved; |
97 |
|
97 |
|
98 |
( $return, $messages, $issue, $borrower ) = AddReturn( $barcode, $branch, undef, $return_date ) |
98 |
my $checkin_blocked_by_notforloan_status = 0; |
99 |
unless $human_required || $checkin_blocked_by_holds; |
99 |
if (@forbidden_notforloan_status) { |
100 |
|
|
|
101 |
if ($checked_in_ok) { |
102 |
delete $messages->{ItemLocationUpdated}; |
103 |
delete $messages->{NotIssued}; |
104 |
delete $messages->{LocalUse}; |
105 |
$return = 1 unless keys %$messages; |
106 |
} |
107 |
|
108 |
if (@forbidden_notforloan_status) { |
109 |
my @results = grep { $_ == $item->notforloan } @forbidden_notforloan_status; |
100 |
my @results = grep { $_ == $item->notforloan } @forbidden_notforloan_status; |
110 |
if (@results) { |
101 |
if (@results) { |
111 |
my $notforloan_desc = |
102 |
$checkin_blocked_by_notforloan_status = 1; |
112 |
Koha::AuthorisedValues->get_description_by_koha_field( |
103 |
my $notforloan_desc = Koha::AuthorisedValues->get_description_by_koha_field( |
113 |
{ |
104 |
{ |
114 |
kohafield => 'items.notforloan', |
105 |
kohafield => 'items.notforloan', |
115 |
authorised_value => $item->notforloan |
106 |
authorised_value => $item->notforloan |
116 |
} |
107 |
} |
117 |
); |
108 |
); |
118 |
my $f_status = $item->notforloan; |
109 |
my $f_status = $item->notforloan; |
119 |
$f_status .= "-$notforloan_desc->{lib}" if $notforloan_desc->{lib}; |
110 |
$f_status .= "-$notforloan_desc->{lib}" if $notforloan_desc->{lib}; |
120 |
$messages->{ForbiddenNotForLoanStatus} = $f_status; |
111 |
$messages->{ForbiddenNotForLoanStatus} = $f_status; |
121 |
} |
112 |
} |
122 |
} |
113 |
} |
123 |
|
114 |
|
|
|
115 |
( $return, $messages, $issue, $borrower ) = AddReturn( $barcode, $branch, undef, $return_date ) |
116 |
unless $human_required || $checkin_blocked_by_holds || $checkin_blocked_by_notforloan_status; |
117 |
|
118 |
if ($checked_in_ok) { |
119 |
delete $messages->{ItemLocationUpdated}; |
120 |
delete $messages->{NotIssued}; |
121 |
delete $messages->{LocalUse}; |
122 |
$return = 1 unless keys %$messages; |
123 |
} |
124 |
|
124 |
# biblionumber, biblioitemnumber, itemnumber |
125 |
# biblionumber, biblioitemnumber, itemnumber |
125 |
# borrowernumber, reservedate, branchcode |
126 |
# borrowernumber, reservedate, branchcode |
126 |
# cancellationdate, found, reservenotes, priority, timestamp |
127 |
# cancellationdate, found, reservenotes, priority, timestamp |
127 |
- |
|
|