Skip to content

Commit

Permalink
(BUG #4521) aqbudgets.pl - Transform undefined budget spent value to …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
alexarn authored and gmcharlt committed May 24, 2010
1 parent d6649d8 commit d6e6d92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions admin/aqbudgets.pl
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@
$$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'};
Expand Down

0 comments on commit d6e6d92

Please sign in to comment.