-#!/usr/bin/perl -w
+#!/usr/bin/perl
# Copyright 2006 Katipo Communications
#
use strict;
use CGI;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
my $dbh = C4::Context->dbh;
my $input = new CGI;
AND budgetdate < ?
AND (datecancellationprinted IS NULL
OR datecancellationprinted = \'0000-00-00\')
+ AND (closedate >= ? and closedate < ?)
';
-warn $query;
my $sth = $dbh->prepare($query);
-$sth->execute( $bookfund, $start, $end );
+$sth->execute( $bookfund, $start, $end, $start, $end);
my @commited_loop;
my $total = 0;
}
if ( $left && $left > 0 ) {
my $subtotal = $left * $data->{'ecost'};
- $data->{subtotal} = $subtotal;
+ $data->{subtotal} = sprintf("%.2f",$subtotal);
$data->{'left'} = $left;
push @commited_loop, $data;
$total += $subtotal;
}
$template->param(
- COMMITEDLOOP => \@commited_loop,
- total => $total
+ COMMITTEDLOOP => \@commited_loop,
+ total => sprintf("%.2f",$total),
);
$sth->finish;
$dbh->disconnect;