From 1e8c06c522c4d26273b90b95adf642eece05dc9e Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Thu, 24 Jun 2010 19:26:14 +0200 Subject: [PATCH] (BUG #4521) aqbudgets.pl - Transform undefined budget spent value to 0.00 value This patch tranform the undefined value of budget spent to a money value which equals 0.00. Signed-off-by: Galen Charlton --- admin/aqbudgets.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index 9da555dbc6..95f5f26291 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -293,11 +293,11 @@ if ($op eq 'add_form') { $budget->{'remaining_pos'} = 1 if $budget->{'budget_remaining'} > 0; $budget->{'remaining_neg'} = 1 if $budget->{'budget_remaining'} < 0; for (grep {/total_levels_spent|budget_spent|budget_amount|budget_remaining|budget_unalloc/} keys %$budget){ - $$budget{$_} = $num->format_price( $$budget{$_} ) if defined($$budget{$_}) + $budget->{$_} = $num->format_price( $budget->{$_} ) if defined($budget->{$_}) } # Value of budget_spent equals 0 instead of undefined value - $$budget{"budget_spent"} = $num->format_price(0) unless defined($$budget{"budget_spent"}); + $budget->{"budget_spent"} = $num->format_price(0) unless defined($budget->{"budget_spent"}); my $borrower = &GetMember( borrowernumber=>$budget->{budget_owner_id} ); $budget->{"budget_owner_name"} = $borrower->{'firstname'} . ' ' . $borrower->{'surname'};