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,
46 $template->param(Supplier=>$supplierlist{$supplierid}) if ($supplierid);
48 my $branches = getbranches;
50 foreach my $thisbranch (sort keys %$branches) {
51 my %row =(value => $thisbranch,
52 branchname => $branches->{$thisbranch}->{'branchname'},
54 push @branchloop, \%row;
56 my $CGIbranch=CGI::scrolling_list( -name => 'branch',
57 -values => \@select_branches,
58 -labels => \%select_branches,
63 my ($count, @lateorders) = getlateorders($delay,$supplierid,$branch);
65 foreach my $lateorder (@lateorders){
66 $total+=$lateorder->{subtotal};
68 $template->param(delay=>$delay) if ($delay);
70 branchloop => \@branchloop,
71 CGIsupplier => $CGIsupplier,
72 lateorders => \@lateorders,
74 intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
76 output_html_with_http_headers $query, $cookie, $template->output;