From ea049e3f10d5eb262e6a64ec05a3ce664d10cd86 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 18 Aug 2014 14:48:01 +0200 Subject: [PATCH] Bug 11714: A fund is a top-level fund if it does not have any parent --- admin/aqbudgets.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index 0ca05f8..5699f10 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -295,7 +295,7 @@ if ( $op eq 'list' ) { $budget->{'budget_remaining'} = $budget->{'budget_amount'} - $budget->{'budget_spent'} - $budget->{budget_ordered}; $budget->{'total_remaining'} = $budget->{'budget_amount'} - $budget->{'total_spent'} - $budget->{total_ordered}; # adds to total - only if budget is a 'top-level' budget - if ($budget->{depth} == 0) { + unless ( defined $budget->{budget_parent_id} ) { $period_alloc_total += $budget->{'budget_amount'}; $spent_total += $budget->{total_spent}; $ordered_total += $budget->{total_ordered}; -- 2.0.0.rc2