(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 <gmcharlt@gmail.com>
This commit is contained in:
Alex Arnaud 2010-05-18 09:43:20 +02:00 committed by Galen Charlton
parent d6649d8831
commit d6e6d920b5

View file

@ -298,6 +298,9 @@ if ($op eq 'add_form') {
$$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"});
my $borrower = &GetMember( borrowernumber=>$budget->{budget_owner_id} );
$budget->{"budget_owner_name"} = $borrower->{'firstname'} . ' ' . $borrower->{'surname'};
$budget->{"budget_borrowernumber"} = $borrower->{'borrowernumber'};