diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 9f2188af56..6e6ea2fd0f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -605,7 +605,7 @@ [% END %] - +
  • @@ -1219,22 +1219,25 @@
    1. - + + +
    @@ -1325,6 +1328,20 @@ }); return 0; } + + //keep a copy of all budgets before removing the inactives + var budgetId = $("#budgetid"); + var disabledBudgetsCopy = budgetId.html(); + $('.b_inactive').remove(); + + $('.showallfunds').click(function() { + if ($(this).is(":checked")) { + budgetId.html(disabledBudgetsCopy); //Puts back all the funds + } + else { + $('.b_inactive').remove(); + } + }); [% IF ( op == 'show' || op == 'else' ) %] @@ -1483,19 +1500,6 @@ $('#notify').prop('checked', false).prop('disabled', true); }); - //keep a copy of all budgets before removing the inactives - var budgetId = $("form#add_edit #budgetid"); - var disabledBudgetsCopy = budgetId.html(); - $('.b_inactive').remove(); - - $('#showallfunds').click(function() { - if ($(this).is(":checked")) { - budgetId.html(disabledBudgetsCopy); //Puts back all the funds - } - else { - $('.b_inactive').remove(); - } - }); }); diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index cf1b975315..9aacf428c6 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -471,21 +471,6 @@ $template->param( returnsuggestedby => $returnsuggestedby ); my $patron_reason_loop = GetAuthorisedValues("OPAC_SUG"); $template->param(patron_reason_loop=>$patron_reason_loop); -# Budgets for filtering -my $budgets = GetBudgets; -my @budgets_loop; -foreach my $budget ( @{$budgets} ) { - next unless (CanUserUseBudget($borrowernumber, $budget, $userflags)); - - ## Please see file perltidy.ERR - $budget->{'selected'} = 1 - if ($$suggestion_ref{'budgetid'} - && $budget->{'budget_id'} eq $$suggestion_ref{'budgetid'}); - - push @budgets_loop, $budget; -} -$template->param( budgetsloop => \@budgets_loop); - # Budgets for suggestion add or edition my $sugg_budget_loop = []; my $sugg_budgets = GetBudgetHierarchy();