---
 suggestion/suggestion.pl |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl
index 7f197d8..f7c50b5 100755
--- a/suggestion/suggestion.pl
+++ b/suggestion/suggestion.pl
@@ -205,7 +205,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 $bud = GetBudget( $suggestion->{budgetid} );
+                $suggestion->{budget_name} = $bud->{budget_name} if $bud;
+            }
             foreach my $date qw(suggesteddate manageddate accepteddate) {
                 if ($suggestion->{$date} and $suggestion->{$date} ne 
"0000-00-00" && $suggestion->{$date} ne "" ) {
                     $suggestion->{$date} = format_date( $suggestion->{$date} );
-- 
1.7.4.1

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to