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

(-)a/tools/inventory.pl (-5 / +4 lines)
Lines 159-166 my @errorloop; Link Here
159
my $moddatecount = 0;
159
my $moddatecount = 0;
160
if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length($barcodelist) > 0) ) {
160
if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length($barcodelist) > 0) ) {
161
    my $dbh = C4::Context->dbh;
161
    my $dbh = C4::Context->dbh;
162
    my $date = dt_from_string( scalar $input->param('setdate') );
162
    my $date = $input->param('setdate');
163
    $date = output_pref ( { dt => $date, dateformat => 'iso' } );
163
    my $date_dt = dt_from_string($date);
164
164
165
    my $strsth  = "select * from issues, items where items.itemnumber=issues.itemnumber and items.barcode =?";
165
    my $strsth  = "select * from issues, items where items.itemnumber=issues.itemnumber and items.barcode =?";
166
    my $qonloan = $dbh->prepare($strsth);
166
    my $qonloan = $dbh->prepare($strsth);
Lines 217-223 if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length Link Here
217
            my $item = Koha::Items->find({barcode => $barcode});
217
            my $item = Koha::Items->find({barcode => $barcode});
218
            if ( $item ) {
218
            if ( $item ) {
219
                # Modify date last seen for scanned items, remove lost status
219
                # Modify date last seen for scanned items, remove lost status
220
                $item->set({ itemlost => 0, datelastseen => $date })->store;
220
                $item->set({ itemlost => 0, datelastseen => $date_dt })->store;
221
                my $item_unblessed = $item->unblessed;
221
                my $item_unblessed = $item->unblessed;
222
                $moddatecount++;
222
                $moddatecount++;
223
                unless ( $dont_checkin ) {
223
                unless ( $dont_checkin ) {
Lines 239-245 if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length Link Here
239
            }
239
            }
240
        }
240
        }
241
    }
241
    }
242
    $template->param( date => $date );
242
    $template->param( date => output_pref ( { str => $date, dateformat => 'iso' } ) );
243
    $template->param( errorloop => \@errorloop ) if (@errorloop);
243
    $template->param( errorloop => \@errorloop ) if (@errorloop);
244
}
244
}
245
245
246
- 

Return to bug 28015