(bug #3348) fix funds and budget table
[koha.git] / acqui / spent.pl
index b62f16d..2dd4ddb 100755 (executable)
@@ -44,11 +44,11 @@ my $query =
    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;