9 use C4::Interface::CGI::Output;
14 my ($template, $loggedinuser, $cookie)
15 = get_template_and_user({template_name => "acqui/lateorders.tmpl",
19 flagsrequired => {acquisition => 1},
22 # my $title = $query->param('title');
23 # my $ISSN = $query->param('ISSN');
24 # my @subscriptions = getsubscriptions($title,$ISSN);
26 my $supplierid = $query->param('supplierid');
27 my $delay = $query->param('delay');
28 my $branch = $query->param('branch');
30 $delay =($delay?$delay:30);
32 my %supplierlist = getsupplierlistwithlateorders($delay,$branch);
34 push @select_supplier,"";
35 foreach my $supplierid (keys %supplierlist){
36 push @select_supplier, $supplierid;
38 my $CGIsupplier=CGI::scrolling_list( -name => 'supplierid',
39 -values => \@select_supplier,
40 -default => $supplierid,
41 -labels => \%supplierlist,
45 $template->param(Supplier=>$supplierlist{$supplierid}) if ($supplierid);
47 my $branches = getbranches;
49 foreach my $thisbranch (sort keys %$branches) {
50 my %row =(value => $thisbranch,
51 branchname => $branches->{$thisbranch}->{'branchname'},
53 push @branchloop, \%row;
56 my ($count, @lateorders) = getlateorders($delay,$supplierid,$branch);
58 foreach my $lateorder (@lateorders){
59 $total+=$lateorder->{subtotal};
61 $template->param(delay=>$delay) if ($delay);
63 branchloop => \@branchloop,
64 CGIsupplier => $CGIsupplier,
65 lateorders => \@lateorders,
68 output_html_with_http_headers $query, $cookie, $template->output;