Lines 52-57
my $branch = $input->param('branch');
Link Here
|
52 |
my $op = $input->param('op'); |
52 |
my $op = $input->param('op'); |
53 |
my $compareinv2barcd = $input->param('compareinv2barcd'); |
53 |
my $compareinv2barcd = $input->param('compareinv2barcd'); |
54 |
my $dont_checkin = $input->param('dont_checkin'); |
54 |
my $dont_checkin = $input->param('dont_checkin'); |
|
|
55 |
my $out_of_order = $input->param('out_of_order'); |
55 |
|
56 |
|
56 |
my ( $template, $borrowernumber, $cookie ) = get_template_and_user( |
57 |
my ( $template, $borrowernumber, $cookie ) = get_template_and_user( |
57 |
{ template_name => "tools/inventory.tt", |
58 |
{ template_name => "tools/inventory.tt", |
Lines 252-258
if( @scanned_items ) {
Link Here
|
252 |
|
253 |
|
253 |
# Report scanned items that are on the wrong place, or have a wrong notforloan |
254 |
# Report scanned items that are on the wrong place, or have a wrong notforloan |
254 |
# status, or are still checked out. |
255 |
# status, or are still checked out. |
255 |
foreach my $item ( @scanned_items ) { |
256 |
for ( my $i = 0; $i < @scanned_items; $i++ ) { |
|
|
257 |
|
258 |
my $item = $scanned_items[$i]; |
259 |
|
256 |
$item->{notforloancode} = $item->{notforloan}; # save for later use |
260 |
$item->{notforloancode} = $item->{notforloan}; # save for later use |
257 |
my $fc = $item->{'frameworkcode'} || ''; |
261 |
my $fc = $item->{'frameworkcode'} || ''; |
258 |
|
262 |
|
Lines 271-276
foreach my $item ( @scanned_items ) {
Link Here
|
271 |
additemtoresults( $item, $results ); |
275 |
additemtoresults( $item, $results ); |
272 |
} |
276 |
} |
273 |
|
277 |
|
|
|
278 |
# Check for items shelved out of order |
279 |
if ($out_of_order) { |
280 |
unless ( $i == 0 ) { |
281 |
my $previous_item = $scanned_items[ $i - 1 ]; |
282 |
if ( $previous_item && $item->{cn_sort} lt $previous_item->{cn_sort} ) { |
283 |
$item->{problems}->{out_of_order} = 1; |
284 |
additemtoresults( $item, $results ); |
285 |
} |
286 |
} |
287 |
unless ( $i == scalar(@scanned_items) ) { |
288 |
my $next_item = $scanned_items[ $i + 1 ]; |
289 |
if ( $next_item && $item->{cn_sort} gt $next_item->{cn_sort} ) { |
290 |
$item->{problems}->{out_of_order} = 1; |
291 |
additemtoresults( $item, $results ); |
292 |
} |
293 |
} |
294 |
} |
295 |
|
274 |
# Report an item that is checked out (unusual!) or wrongly placed |
296 |
# Report an item that is checked out (unusual!) or wrongly placed |
275 |
if( $item->{onloan} ) { |
297 |
if( $item->{onloan} ) { |
276 |
$item->{problems}->{checkedout} = 1; |
298 |
$item->{problems}->{checkedout} = 1; |
277 |
- |
|
|