X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=suggestion%2Fsuggestion.pl;h=d00b6322ef27c5e59692591c83957ff6677889d7;hb=4d67e6910775ea389cfa0a25e3fb55b9cf17bd6f;hp=aa8fad088548dfc876d2adaf4f8bc0fa84f510f0;hpb=9a54047b6d10eb4b553ad29c6130a1e276252fe5;p=koha_fer diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index aa8fad0885..d00b6322ef 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -288,10 +288,16 @@ my $patron_reason_loop = GetAuthorisedValues("OPAC_SUG",$$suggestion_ref{'patron $template->param(patron_reason_loop=>$patron_reason_loop); #Budgets management -my $searchbudgets={ budget_branchcode=>$branchfilter} if $branchfilter; -my $budgets = GetBudgets($searchbudgets); +my $budgets = []; +if ($branchfilter) { + my $searchbudgets = { budget_branchcode => $branchfilter }; + $budgets = GetBudgets($searchbudgets); +} else { + $budgets = GetBudgets(undef); +} -foreach my $budget (@$budgets){ +foreach my $budget ( @{$budgets} ) { +## Please see file perltidy.ERR $budget->{'selected'}=1 if ($$suggestion_ref{'budgetid'} && $budget->{'budget_id'} eq $$suggestion_ref{'budgetid'}) };