use Modern::Perl;
use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Koha;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
use C4::Context;
-use C4::Acquisition;
-use C4::Letters;
-use Koha::DateUtils;
-use Koha::Acquisition::Orders;
+use C4::Letters qw( SendAlerts GetLetters );
+use Koha::DateUtils qw( dt_from_string output_pref );
+use Koha::Acquisition::Orders qw( filter_by_lates );
use Koha::CsvProfiles;
-my $input = new CGI;
+my $input = CGI->new;
my ($template, $loggedinuser, $cookie) = get_template_and_user(
{
template_name => "acqui/lateorders.tt",
query => $input,
type => "intranet",
- authnotrequired => 0,
flagsrequired => { acquisition => 'order_receive' },
- debug => 1,
}
);
}
}
-my @parameters = ( $delay );
-push @parameters, $estimateddeliverydatefrom_dt
- ? $estimateddeliverydatefrom_dt->ymd()
- : undef;
-
-push @parameters, $estimateddeliverydateto_dt
- ? $estimateddeliverydateto_dt->ymd()
- : undef;
-
my @lateorders = Koha::Acquisition::Orders->filter_by_lates(
{
delay => $delay,
estimateddeliverydatefrom => $estimateddeliverydatefrom,
estimateddeliverydateto => $estimateddeliverydateto,
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
- csv_profiles => [ Koha::CsvProfiles->search({ type => 'sql', used_for => 'late_orders' }) ],
+ csv_profiles => Koha::CsvProfiles->search({ type => 'sql', used_for => 'late_orders' }),
);
output_html_with_http_headers $input, $cookie, $template->output;