|
Lines 123-128
for my $authvfield (@$statuses) {
Link Here
|
| 123 |
} |
123 |
} |
| 124 |
} |
124 |
} |
| 125 |
|
125 |
|
|
|
126 |
my $report_lost_items; |
| 127 |
if ( defined $input->param('ReportLostItems') && $input->param('ReportLostItems') eq 'on' ) { |
| 128 |
$report_lost_items = "1"; |
| 129 |
} |
| 130 |
|
| 126 |
# if there's a list of not for loans types selected use it rather than |
131 |
# if there's a list of not for loans types selected use it rather than |
| 127 |
# the full set. |
132 |
# the full set. |
| 128 |
@notforloans = @{$staton->{'items.notforloan'}} if defined $staton->{'items.notforloan'} and scalar @{$staton->{'items.notforloan'}} > 0; |
133 |
@notforloans = @{$staton->{'items.notforloan'}} if defined $staton->{'items.notforloan'} and scalar @{$staton->{'items.notforloan'}} > 0; |
|
Lines 162-167
my $results = {};
Link Here
|
| 162 |
my @scanned_items; |
167 |
my @scanned_items; |
| 163 |
my @errorloop; |
168 |
my @errorloop; |
| 164 |
my $moddatecount = 0; |
169 |
my $moddatecount = 0; |
|
|
170 |
my @lost_items; |
| 165 |
if ( $op eq 'cud-inventory' |
171 |
if ( $op eq 'cud-inventory' |
| 166 |
&& ( ( $uploadbarcodes && length($uploadbarcodes) > 0 ) || ( $barcodelist && length($barcodelist) > 0 ) ) ) |
172 |
&& ( ( $uploadbarcodes && length($uploadbarcodes) > 0 ) || ( $barcodelist && length($barcodelist) > 0 ) ) ) |
| 167 |
{ |
173 |
{ |
|
Lines 225-230
if ( $op eq 'cud-inventory'
Link Here
|
| 225 |
next; |
231 |
next; |
| 226 |
} |
232 |
} |
| 227 |
# Modify date last seen for scanned items, remove lost status |
233 |
# Modify date last seen for scanned items, remove lost status |
|
|
234 |
if ( $item->unblessed->{itemlost} ) { |
| 235 |
push @lost_items, $barcode; |
| 236 |
} |
| 228 |
$item->set({ itemlost => 0, datelastseen => $date_dt })->store; |
237 |
$item->set({ itemlost => 0, datelastseen => $date_dt })->store; |
| 229 |
my $item_unblessed = $item->unblessed; |
238 |
my $item_unblessed = $item->unblessed; |
| 230 |
$moddatecount++; |
239 |
$moddatecount++; |
|
Lines 291-297
if( @scanned_items ) {
Link Here
|
| 291 |
$rightplacelist = { |
300 |
$rightplacelist = { |
| 292 |
map { $_->{barcode} ? ( $_->{barcode}, $_ ) : (); } @$rightplacelist |
301 |
map { $_->{barcode} ? ( $_->{barcode}, $_ ) : (); } @$rightplacelist |
| 293 |
}; |
302 |
}; |
| 294 |
|
|
|
| 295 |
} |
303 |
} |
| 296 |
|
304 |
|
| 297 |
# Report scanned items that are on the wrong place, or have a wrong notforloan |
305 |
# Report scanned items that are on the wrong place, or have a wrong notforloan |
|
Lines 335-340
for ( my $i = 0; $i < @scanned_items; $i++ ) {
Link Here
|
| 335 |
$item->{problems}->{wrongplace} = 1; |
343 |
$item->{problems}->{wrongplace} = 1; |
| 336 |
additemtoresults( $item, $results ); |
344 |
additemtoresults( $item, $results ); |
| 337 |
} |
345 |
} |
|
|
346 |
|
| 347 |
# Report a lost item if asked |
| 348 |
if ( @lost_items && ( scalar grep { $_ eq $item->{barcode} } @lost_items ) && $report_lost_items ) { |
| 349 |
$item->{problems}->{lost} = 1; |
| 350 |
additemtoresults( $item, $results ); |
| 351 |
} |
| 338 |
} |
352 |
} |
| 339 |
|
353 |
|
| 340 |
# Compare barcodes with inventory list, report no_barcode and not_scanned. |
354 |
# Compare barcodes with inventory list, report no_barcode and not_scanned. |
|
Lines 418-423
if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){
Link Here
|
| 418 |
$errstr .= "checked out,"; |
432 |
$errstr .= "checked out,"; |
| 419 |
} elsif( $key eq 'out_of_order' ) { |
433 |
} elsif( $key eq 'out_of_order' ) { |
| 420 |
$errstr .= "shelved out of order,"; |
434 |
$errstr .= "shelved out of order,"; |
|
|
435 |
} elsif ( $key eq 'lost' ) { |
| 436 |
$errstr .= "item was lost"; |
| 421 |
} |
437 |
} |
| 422 |
} |
438 |
} |
| 423 |
$errstr =~ s/,$//; |
439 |
$errstr =~ s/,$//; |
| 424 |
- |
|
|