4 #script to display reports
6 # Copyright 2000-2002 Katipo Communications
8 # This file is part of Koha.
10 # Koha is free software; you can redistribute it and/or modify it under the
11 # terms of the GNU General Public License as published by the Free Software
12 # Foundation; either version 2 of the License, or (at your option) any later
15 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
17 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License along with
20 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
21 # Suite 330, Boston, MA 02111-1307 USA
30 use C4::Interface::CGI::Output;
33 my $time = $input->param('time');
35 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
37 template_name => "reports/reservereport.tmpl",
41 flagsrequired => { editcatalogue => 1 },
46 my ( $count, $data ) = unfilledreserves();
50 for ( my $i = 0 ; $i < $count ; $i++ ) {
52 $toggle = $i%2 ? 0 : 1;
53 $line{'borrowernumber'} = $data->[$i]->{'borrowernumber'};
54 $line{'surname'} = $data->[$i]->{'surname'};
55 $line{'firstname'} = $data->[$i]->{'firstname'};
56 $line{'reservedate'} = format_date($data->[$i]->{'reservedate'});
57 $line{'biblionumber'} = $data->[$i]->{'biblionumber'};
58 $line{'title'} = $data->[$i]->{'title'};
59 $line{'classification'} = $data->[$i]->{'classification'};
60 $line{'dewey'} = $data->[$i]->{'dewey'};
61 $line{'status'} = $data->[$i]->{'found'};
62 $line{'toggle'} = $toggle;
64 push( @dataloop, \%line );
70 dataloop => \@dataloop
73 output_html_with_http_headers $input, $cookie, $template->output;