Bugzilla – Attachment 157691 Details for
Bug 22712
Funds from inactive budgets appear on Item details if using MarcItemFieldstoOrder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22712: Make 'Show inactive funds' button on addorderiso2907.pl work for item budgets
Bug-22712-Make-Show-inactive-funds-button-on-addor.patch (text/plain), 6.04 KB, created by
Nick Clemens (kidclamp)
on 2023-10-23 19:58:28 UTC
(
hide
)
Description:
Bug 22712: Make 'Show inactive funds' button on addorderiso2907.pl work for item budgets
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-10-23 19:58:28 UTC
Size:
6.04 KB
patch
obsolete
>From 04f1e732b3691d87a849e0929c4e4326a32fe810 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 23 Oct 2023 19:56:21 +0000 >Subject: [PATCH] Bug 22712: Make 'Show inactive funds' button on > addorderiso2907.pl work for item budgets > >This requires enabling MarcItemFieldsToOrder, see bug 34645 > >Add an inactive Budget and some funds to your system > >Import a file with multiple biblios > >Confirm the button hids/displays the funds for all item orders >--- > .../prog/en/modules/acqui/addorderiso2709.tt | 16 +++++++++++++--- > koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js | 17 +++++++++++++++++ > 2 files changed, 30 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index e598629e03..84e22d4f01 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -342,11 +342,21 @@ > </li> > <li> > <label for="budget_code_item_[% item.item_id | html %]">budget_code</label> >- <select class="budget_code_item" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% biblio.import_record_id | html %]"> >+ <select class="budget_code_item bci_all" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% biblio.import_record_id | html %]" hidden="hidden" disabled="disabled"> > <option value="">Select a fund (will use default if set)</option> > [% FOREACH budget_loo IN budget_loop %] >- [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]<option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option> >- [% ELSE %]<option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option> >+ [% IF ( budget_loo.b_active ) %] >+ [% IF ( budget_loo.b_id ) == ( item.budget_id ) %] >+ <option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option> >+ [% ELSE %] >+ <option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option> >+ [% END %] >+ [% ELSE %] >+ [% IF ( budget_loo.b_id ) == ( item.budget_id ) %] >+ <option value="[% budget_loo.b_id | html %]" class="buget_item_inactive" selected="selected">[% budget_loo.b_txt | html %] (inactive)</option> >+ [% ELSE %] >+ <option value="[% budget_loo.b_id | html %]" class="budget_item_inactive">[% budget_loo.b_txt | html %] (inactive)</option> >+ [% END %] > [% END %] > [% END %] > </select> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js b/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js >index 3c520bac48..75a85e247b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js >+++ b/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); > } > }); > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22712
:
88047
|
157691
|
157751
|
158036