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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt (+3 lines)
Lines 47-52 Link Here
47
            <li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today | $KohaDates %]" class="datepicker" disabled /></li>
47
            <li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today | $KohaDates %]" class="datepicker" disabled /></li>
48
            <li><label for="compareinv2barcd">Compare barcodes list to results: </label><input type="checkbox" name="compareinv2barcd" id="compareinv2barcd" disabled /></li>
48
            <li><label for="compareinv2barcd">Compare barcodes list to results: </label><input type="checkbox" name="compareinv2barcd" id="compareinv2barcd" disabled /></li>
49
            <li><label for="dont_checkin">Do not check in items scanned during inventory: </label><input type="checkbox" name="dont_checkin" id="dont_checkin" disabled /></li>
49
            <li><label for="dont_checkin">Do not check in items scanned during inventory: </label><input type="checkbox" name="dont_checkin" id="dont_checkin" disabled /></li>
50
            <li><label for="out_of_order">Check barcodes list for items shelved out of order: </label><input type="checkbox" name="out_of_order" id="out_of_order" disabled /></li>
50
          </ol>
51
          </ol>
51
        </fieldset>
52
        </fieldset>
52
53
Lines 224-229 Link Here
224
                    Still checked out<br/>
225
                    Still checked out<br/>
225
                [% ELSIF problem.key == 'no_barcode' %]
226
                [% ELSIF problem.key == 'no_barcode' %]
226
                    No barcode<br/>
227
                    No barcode<br/>
228
                [% ELSIF problem.key == 'out_of_order' %]
229
                    Item may be shelved out of order<br/>
227
                [% END %]
230
                [% END %]
228
            [% END %]
231
            [% END %]
229
            </td>
232
            </td>
(-)a/tools/inventory.pl (-2 / +23 lines)
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
- 

Return to bug 21408