diff --git a/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js b/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js index 6659e3e7be..3c520bac48 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js @@ -1,7 +1,8 @@ /* getAuthValueDropbox from js/acq.js is needed */ $(document).ready(function() { // keep copy of the inactive budgets - disabledBudgetsCopy = $("select[name='all_budget_id']").html(); + disabledAllBudgetsCopy = $("select[name='all_budget_id']").html(); + disabledBudgetsCopy = $("select[name='budget_id']").first().html(); $("select[name='all_budget_id'] .b_inactive").remove(); $("select[name='budget_id'] .b_inactive").remove(); @@ -16,7 +17,7 @@ $(document).ready(function() { $("#all_showallbudgets").click(function() { if ($(this).is(":checked")) { - $("select[name='all_budget_id']").html(disabledBudgetsCopy); + $("select[name='all_budget_id']").html(disabledAllBudgetsCopy); } else { $("select[name='all_budget_id'] .b_inactive").remove();