and (datereceived >= ? and datereceived < ?)
and (datecancellationprinted is NULL or
datecancellationprinted='0000-00-00')
-
+ and (closedate >= ? and closedate < ?)
";
my $sth = $dbh->prepare($query);
-$sth->execute( $bookfund, $start, $end );
+$sth->execute( $bookfund, $start, $end, $start, $end);
my $total = 0;
my $toggle;