@@ -, +, @@ addorderiso2907.pl work for item budgets --- .../prog/en/modules/acqui/addorderiso2709.tt | 16 +++++++++++++--- koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js | 17 +++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -342,11 +342,21 @@
  • - [% FOREACH budget_loo IN budget_loop %] - [% IF ( budget_loo.b_id ) == ( item.budget_id ) %] - [% ELSE %] + [% IF ( budget_loo.b_active ) %] + [% IF ( budget_loo.b_id ) == ( item.budget_id ) %] + + [% ELSE %] + + [% END %] + [% ELSE %] + [% IF ( budget_loo.b_id ) == ( item.budget_id ) %] + + [% ELSE %] + + [% END %] [% END %] [% END %] --- a/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js +++ a/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js @@ -6,12 +6,29 @@ $(document).ready(function() { $("select[name='all_budget_id'] .b_inactive").remove(); $("select[name='budget_id'] .b_inactive").remove(); + $(".budget_code_item").each(function(){ + let active_only = $(this).clone(); + active_only.children().remove('.budget_item_inactive'); + active_only.attr('id', this.id + '_active'); + active_only.prop('hidden',false); + active_only.prop('disabled',false); + active_only.removeClass('bci_all').addClass('bci_active'); + $(this).after(active_only); + }); + $(".budget_code_item").change(function(){ + $(this).siblings('select').val( $(this).val() ); + }); + $("#showallbudgets").click(function() { if ($(this).is(":checked")) { $("select[name='budget_id']").html(disabledBudgetsCopy) + $(".bci_active").prop('disabled',true).prop('hidden',true); + $(".bci_all").prop('disabled',false).prop('hidden',false); } else { $("select[name='budget_id'] .b_inactive").remove(); + $(".bci_active").prop('disabled',false).prop('hidden',false); + $(".bci_all").prop('disabled',true).prop('hidden',true); } }); --