follow-up : remove perl error if the librarian choose no budget

the librarian can enter the suggestion without selecting any budget.
Searching the budget name in this case resulted in a Perl error

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Paul Poulain 2010-03-26 11:25:34 +01:00 committed by Galen Charlton
parent c841eb0e0c
commit ae281f3712
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ if ($op=~/else/) {
my $suggestions = &SearchSuggestion($suggestion_ref);
foreach my $suggestion (@$suggestions){
$suggestion->{budget_name}=GetBudget($suggestion->{budgetid})->{budget_name};
$suggestion->{budget_name}=GetBudget($suggestion->{budgetid})->{budget_name} if $suggestion->{budgetid};
foreach my $date qw(suggesteddate manageddate accepteddate){
if ($suggestion->{$date} ne "0000-00-00" && $suggestion->{$date} ne "" ){
$suggestion->{$date}=format_date($suggestion->{$date}) ;