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

(-)a/tools/inventory.pl (-5 / +10 lines)
Lines 150-157 my @scanned_items; Link Here
150
my @errorloop;
150
my @errorloop;
151
if ( $uploadbarcodes && length($uploadbarcodes) > 0 ) {
151
if ( $uploadbarcodes && length($uploadbarcodes) > 0 ) {
152
    my $dbh = C4::Context->dbh;
152
    my $dbh = C4::Context->dbh;
153
    my $date = dt_from_string( $input->param('setdate') );
153
    my $date;
154
    $date = output_pref( $date, 'iso' );
154
    if (C4::Context->preference('dateformat') eq 'dd/mm/yyyy') {
155
        $date = dt_from_string( $input->param('setdate'), 'metric' );
156
    }
157
    else {
158
        $date = dt_from_string( $input->param('setdate') );
159
    }
160
    $date = output_pref( { dt => $date, dateformat => 'iso' } );
155
161
156
    my $strsth  = "select * from issues, items where items.itemnumber=issues.itemnumber and items.barcode =?";
162
    my $strsth  = "select * from issues, items where items.itemnumber=issues.itemnumber and items.barcode =?";
157
    my $qonloan = $dbh->prepare($strsth);
163
    my $qonloan = $dbh->prepare($strsth);
Lines 204-212 if ( $markseen or $op ) { Link Here
204
# If "compare barcodes list to results" has been checked, we want to alert for missing items
210
# If "compare barcodes list to results" has been checked, we want to alert for missing items
205
if ( $compareinv2barcd ) {
211
if ( $compareinv2barcd ) {
206
    # set "missing" flags for all items with a datelastseen (dls) before the choosen datelastseen (cdls)
212
    # set "missing" flags for all items with a datelastseen (dls) before the choosen datelastseen (cdls)
207
    my $dls = output_pref( dt_from_string( $datelastseen ), 'iso' );
213
    my $dls = output_pref( { dt => dt_from_string( $datelastseen ), dateformat => 'iso' } );
208
    foreach my $item ( @$inventorylist ) {
214
    foreach my $item ( @$inventorylist ) {
209
        my $cdls = output_pref( dt_from_string( $_->{datelastseen} ), 'iso' );
215
        my $cdls = output_pref( { dt => dt_from_string( $_->{datelastseen} ), dateformat => 'iso' } );
210
        if ( $cdls lt $dls ) {
216
        if ( $cdls lt $dls ) {
211
            $item->{problem} = 'missingitem';
217
            $item->{problem} = 'missingitem';
212
            # We have to push a copy of the item, not the reference
218
            # We have to push a copy of the item, not the reference
213
- 

Return to bug 11253