-my $period = GetBudgetPeriod;
-my $budget_period_id = $period->{budget_period_id};
-my $budget_branchcode = $period->{budget_branchcode};
-my $moo = GetBudgetHierarchy('',$homebranch, $template->{param_map}->{'USER_INFO'}[0]->{'borrowernumber'} );
-my @results = @$moo;
-my $period_total = 0;
-my $toggle = 0;
-my @loop;
-my ( $total, $totspent, $totcomtd, $totavail );
-
-foreach my $result (@results) {
- # only get top-level budgets for display
- # warn $result->{'budget_branchcode'};
-
- $period_total += $result->{'budget_amount'};
-
- my $a = $result->{'budget_code_indent'};
- $a =~ s/\ /\ \;/g;
- $result->{'budget_code_indent'} = $a;
-
- my $r = GetBranchName( $result->{'budget_owner_id'} );
- $result->{'budget_branchname'} = GetBranchName( $result->{'budget_branchcode'} );
-
- my $member = GetMember( $result->{'budget_owner_id'} );
- my $member_full = $member->{'firstname'} . ' ' . $member->{'surname'};
-
- $result->{'budget_owner'} = $member_full;
- $result->{'budget_avail'} = $result->{'budget_amount'} - $result->{'budget_spent'};
- $result->{'budget_spent'} = GetBudgetSpent( $result->{'budget_id'} );
-
- $total += $result->{'budget_amount'};
- $totspent += $result->{'budget_spent'};
- $totavail += $result->{'budget_avail'};
-
- $result->{'budget_amount'} = $num->format_price( $result->{'budget_amount'} );
- $result->{'budget_spent'} = $num->format_price( $result->{'budget_spent'} );
- $result->{'budget_avail'} = $num->format_price( $result->{'budget_avail'} );
-
- # my $spent_percent = ( $result->{'budget_spent'} / $result->{'budget_amount'} ) * 100;
- # $result->{'budget_spent_percent'} = sprintf( "%00d", $spent_percent );
-
- my $borrower = &GetMember( $result->{budget_owner_id} );
- $result->{budget_owner_name} = $borrower->{'firstname'} . ' ' . $borrower->{'surname'};
-
- push( @loop_budget, { %{$result}, toggle => $toggle++ % 2, } );
-}
-
-
-# ---------------------------------------------------
-
-=c FIXME
-
-
-### $cur
-
-## suggestions
-
-my $dbh = C4::Context->dbh;
-
-
-## liste des domaines
-
-my $sth=$dbh->prepare("
-SELECT bookfundgroupnumber,bookfundgroupname
-FROM `aq2bookfundgroups`
-ORDER BY Bookfundgroupname
-");
-$sth->execute;
-
-my @bookfundgroup_loop; ## liste des domaines
-
-while (my $row=$sth->fetchrow_hashref) {
- push @bookfundgroup_loop,$row;
-}
-$sth->finish;
-
-
-## liste des BFG ayant des suggestions à traiter