MT2889 : Fix statistics' itemtype when item-level_itypes is ON
[koha.git] / acqui / acqui-home.pl
index 7b35c3f..929779d 100755 (executable)
@@ -15,7 +15,6 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id$
 
 
 =head1 NAME
@@ -68,6 +67,7 @@ my $borrower= GetMember($loggedinuser);
 my ( $flags, $homebranch )= ($borrower->{'flags'},$borrower->{'branchcode'});
 
 my @results = GetBookFunds($homebranch);
+
 my $count = scalar @results;
 
 my $classlist   = '';
@@ -78,7 +78,7 @@ my $totavail    = 0;
 my @loop_budget = ();
 
 for (my $i=0; $i<$count; $i++){
-       my ($spent,$comtd)=GetBookFundBreakdown($results[$i]->{'bookfundid'},$results[$i]->{'startdate'},$results[$i]->{'enddate'});
+       my ($spent,$comtd)=GetBookFundBreakdown($results[$i]->{'aqbudgetid'},$results[$i]->{'startdate'},$results[$i]->{'enddate'});
        my $avail=$results[$i]->{'budgetamount'}-($spent+$comtd);
        my %line;
        $line{bookfundname} = $results[$i]->{'bookfundname'};