Fixed reserve report script

This commit is contained in:
rangi 2005-08-25 23:17:26 +00:00
parent a39bfaf75d
commit 719ed44fe6

View file

@ -3,7 +3,6 @@
#written 26/4/2000
#script to display reports
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
@ -27,29 +26,40 @@ use Date::Manip;
use CGI;
use C4::Output;
use HTML::Template;
use C4::Auth;
use C4::Interface::CGI::Output;
my $input = new CGI;
my $time = $input->param('time');
#print $input->header;
#print startpage;
#print startmenu('report');
my $template = gettemplate("reservereport.tmpl");
#print center;
#print mktablehdr();
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
{
template_name => "reports/reservereport.tmpl",
query => $input,
type => "intranet",
authnotrequired => 0,
flagsrequired => { editcatalogue => 1 },
debug => 1,
}
);
my ( $count, $data ) = unfilledreserves();
my @dataloop;
for ( my $i = 0 ; $i < $count ; $i++ ) {
warn "here";
my %line;
$line{name} = "$data->[$i]->{'surname'}\, $data->[$i]->{'firstname'}";
$line{'reservedate'} = $data->[$i]->{'reservedate'};
$line{'title'} = $data->[$i]->{'title'};
$line{'classification'}="$data->[$i]->{'classification'}$data->[$i]->{'dewey'}";
$line{'classification'} =
"$data->[$i]->{'classification'}$data->[$i]->{'dewey'}";
push( @dataloop, \%line );
}
$template->param( count => $count,
dataloop => \@dataloop);
print "Content-Type: text/html\n\n", $template->output;
$template->param(
count => $count,
dataloop => \@dataloop
);
output_html_with_http_headers $input, $cookie, $template->output;