Bug 8255: allow local cover images to be cached
[koha_gimpoz] / acqui / spent.pl
index a50b7ae..0dcba98 100755 (executable)
 
 =head1 DESCRIPTION
 
-this script is designed to show the spent amount in budges
+this script is designed to show the spent amount in budgets
 
 =cut
 
 use C4::Context;
 use C4::Auth;
 use C4::Output;
-use C4::Dates;
 use strict;
 use warnings;
 use CGI;
@@ -40,8 +39,7 @@ use CGI;
 my $dbh      = C4::Context->dbh;
 my $input    = new CGI;
 my $bookfund = $input->param('fund');
-my $start    = $input->param('start');
-my $end      = $input->param('end');
+my $fund_code = $input->param('fund_code');
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
@@ -49,7 +47,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $input,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => { acquisition => 1 },
+        flagsrequired   => { acquisition => '*' },
         debug           => 1,
     }
 );
@@ -107,6 +105,7 @@ $total = sprintf( "%.2f", $total );
 $template->{VARS}->{'fund'}  = $bookfund;
 $template->{VARS}->{'spent'} = \@spent;
 $template->{VARS}->{'total'} = $total;
+$template->{VARS}->{'fund_code'} = $fund_code;
 $sth->finish;
 
 output_html_with_http_headers $input, $cookie, $template->output;