Bug 8154: The export today's checked in barcodes generated file is always empty
authorJonathan Druart <jonathan.druart@biblibre.com>
Mon, 18 Jun 2012 08:19:12 +0000 (10:19 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 20 Jun 2012 21:19:34 +0000 (23:19 +0200)
Comparation of date and datetime is always false

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Exported file contains the list of checked in items.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
members/readingrec.pl

index 2645eda..d95cc8f 100755 (executable)
@@ -84,7 +84,8 @@ foreach my $issue (@{$issues}){
        $line{barcode}         = $issue->{'barcode'};
        $line{volumeddesc}     = $issue->{'volumeddesc'};
        push(@loop_reading,\%line);
-    if (($input->param('op') eq 'export_barcodes') and ($today eq $issue->{'returndate'})) {
+    my $return_dt = Koha::DateUtils::dt_from_string($issue->{'returndate'}, 'iso');
+    if ( ( $input->param('op') eq 'export_barcodes' ) and ( $today eq $return_dt->ymd() ) ) {
         push( @barcodes, $issue->{'barcode'} );
     }
 }