Bug 17600: Standardize our EXPORT_OK
[srvgit] / circ / waitingreserves.pl
index 6db24ce..c9d4e84 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Circulation;
-use C4::Members;
-use C4::Biblio;
-use C4::Items;
-use Date::Calc qw(
-  Today
-  Add_Delta_Days
-  Date_to_Days
-);
-use C4::Reserves;
-use C4::Koha;
-use Koha::DateUtils;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Items qw( ModItemTransfer );
+use Date::Calc qw( Date_to_Days Today );
+use C4::Reserves qw( ModReserve ModReserveCancelAll );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::BiblioFrameworks;
 use Koha::Items;
 use Koha::ItemTypes;
@@ -56,7 +48,6 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
         query           => $input,
         type            => "intranet",
         flagsrequired   => { circulate => "circulate_remaining_permissions" },
-        debug           => 1,
     }
 );
 
@@ -89,7 +80,7 @@ my $holds = Koha::Holds->waiting->search({ priority => 0, ( $all_branches ? () :
 my $today = Date_to_Days(&Today);
 
 while ( my $hold = $holds->next ) {
-    next unless ($hold->waitingdate && $hold->waitingdate ne '0000-00-00');
+    next unless $hold->waitingdate;
 
     my ( $expire_year, $expire_month, $expire_day ) = split (/-/, $hold->expirationdate);
     my $calcDate = Date_to_Days( $expire_year, $expire_month, $expire_day );