diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index ea3fbf56b2..aa8fad0885 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -189,7 +189,10 @@ if ($op=~/else/) { my $suggestions = &SearchSuggestion($suggestion_ref); foreach my $suggestion (@$suggestions){ - $suggestion->{budget_name}=GetBudget($suggestion->{budgetid})->{budget_name} if $suggestion->{budgetid}; + if($suggestion->{budgetid}) { + my $budget = GetBudget($suggestion->{budgetid}); + $suggestion->{budget_name}=$budget->{budget_name} if $budget; + } foreach my $date qw(suggesteddate manageddate accepteddate){ if ($suggestion->{$date} ne "0000-00-00" && $suggestion->{$date} ne "" ){ $suggestion->{$date}=format_date($suggestion->{$date}) ;