Cleanup - admin scripts
[koha.git] / serials / routing-preview.pl
index 06fa34c..7a33010 100755 (executable)
@@ -7,7 +7,7 @@ use strict;
 use CGI;
 use C4::Koha;
 use C4::Auth;
-use C4::Date;
+use C4::Dates;
 use C4::Output;
 use C4::Acquisition;
 use C4::Reserves;
@@ -15,6 +15,7 @@ use C4::Circulation;
 use C4::Context;
 use C4::Members;
 use C4::Biblio;
+use C4::Items;
 use C4::Serials;
 
 my $query = new CGI;
@@ -61,8 +62,7 @@ if($ok){
     my $notes;
     my $title = $subs->{'bibliotitle'};
     for(my $i=0;$i<$routing;$i++){
-       my $sth = $dbh->prepare("SELECT * FROM reserves WHERE biblionumber = ? AND borrowernumber = ? 
-                                 AND cancellationdate is NULL AND (found <> 'F' or found is NULL)");
+       my $sth = $dbh->prepare("SELECT * FROM reserves WHERE biblionumber = ? AND borrowernumber = ?");
         $sth->execute($biblio,$routinglist[$i]->{'borrowernumber'});
         my $data = $sth->fetchrow_hashref;