merging 2.2 branch with head. Sorry for not making it before, many many commits done...
[koha.git] / bull / lateissues.pl
1 #!/usr/bin/perl
2
3 use strict;
4 use CGI;
5 use C4::Auth;
6 use C4::Bull;
7 use C4::Output;
8 use C4::Interface::CGI::Output;
9 use C4::Context;
10 use HTML::Template;
11
12 my $query = new CGI;
13 # my $title = $query->param('title');
14 # my $ISSN = $query->param('ISSN');
15 # my @subscriptions = getsubscriptions($title,$ISSN);
16
17 my $supplierid = $query->param('supplierid');
18 my %supplierlist = getSupplierListWithLateIssues;
19 my @select_supplier;
20 push @select_supplier,"";
21 foreach my $supplierid (keys %supplierlist){
22         push @select_supplier, $supplierid
23 }
24 my $CGIsupplier=CGI::scrolling_list( -name     => 'supplierid',
25                         -values   => \@select_supplier,
26                         -default  => $supplierid,
27                         -labels   => \%supplierlist,
28                         -size     => 1,
29                         -multiple => 0 );
30
31 my @lateissues;
32 @lateissues = GetLateIssues($supplierid) if $supplierid;
33 my ($template, $loggedinuser, $cookie)
34 = get_template_and_user({template_name => "bull/lateissues.tmpl",
35                                 query => $query,
36                                 type => "intranet",
37                                 authnotrequired => 0,
38                                 flagsrequired => {catalogue => 1},
39                                 debug => 1,
40                                 });
41
42 $template->param(
43         CGIsupplier => $CGIsupplier,
44         lateissues => \@lateissues
45         );
46 output_html_with_http_headers $query, $cookie, $template->output;