8 use C4::Interface::CGI::Output;
13 my ($template, $loggedinuser, $cookie)
14 = get_template_and_user({template_name => "acqui/lateorders.tmpl",
18 flagsrequired => {acquisition => 1},
21 # my $title = $query->param('title');
22 # my $ISSN = $query->param('ISSN');
23 # my @subscriptions = getsubscriptions($title,$ISSN);
25 my $supplierid = $query->param('supplierid');
26 my $delay = $query->param('delay');
27 my $branch = $query->param('branch');
29 $delay =($delay?$delay:30);
31 my %supplierlist = getsupplierlistwithlateorders($delay,$branch);
33 push @select_supplier,"";
34 foreach my $supplierid (keys %supplierlist){
35 push @select_supplier, $supplierid;
37 my $CGIsupplier=CGI::scrolling_list( -name => 'supplierid',
38 -values => \@select_supplier,
39 -default => $supplierid,
40 -labels => \%supplierlist,
46 push @select_branches,"";
47 $select_branches{""}="";
48 my ($count, @branches) = branches();
49 #branches is IndependantBranches aware
50 foreach my $branch (@branches){
51 push @select_branches, $branch->{branchcode};
52 $select_branches{$branch->{branchcode}}=$branch->{branchname};
54 my $CGIbranch=CGI::scrolling_list( -name => 'branch',
55 -values => \@select_branches,
56 -labels => \%select_branches,
60 my ($count, @lateorders) = getlateorders($delay,$supplierid,$branch);
62 $template->param(delay=>$delay) if ($delay);
64 CGIbranch => $CGIbranch,
65 CGIsupplier => $CGIsupplier,
66 lateorders => \@lateorders
68 output_html_with_http_headers $query, $cookie, $template->output;