Bugzilla – Attachment 118552 Details for
Bug 23929
Invoice adjustments should filter inactive funds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23929: [20.05.x] Invoice adjustments should filter inactive funds
Bug-23929-2005x-Invoice-adjustments-should-filter-.patch (text/plain), 4.46 KB, created by
Nick Clemens (kidclamp)
on 2021-03-19 19:17:08 UTC
(
hide
)
Description:
Bug 23929: [20.05.x] Invoice adjustments should filter inactive funds
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-03-19 19:17:08 UTC
Size:
4.46 KB
patch
obsolete
>From cb597a380d8bedaa7f161944f38d090d857b5167 Mon Sep 17 00:00:00 2001 >From: Blou <blou@inlibro.com> >Date: Tue, 26 Jan 2021 15:36:31 -0500 >Subject: [PATCH] Bug 23929: [20.05.x] Invoice adjustments should filter > inactive funds > >Looking at invoice details, this makes the Adjustments Fund dropdown act >exactly like the Shipping Fund dropdown above, with a Show inactive >checkbox to help filter (by default) the inactive funds out of the list. > >Test plan: >0) requires a database with inactive (old) funds along with active ones. >1) Go to invoice details page >2) Click "Add adjustment" >3) Open the drop down beside the Fund label, you should see EVERY fund in database. >4) Compare with behavior of Shipping fund dropdown above. Not every fund is listed there >5) Apply patch >6) Now behavior is the same, only active fund are listed by default. >7) click "Show inactive" checkbox and see all the funds in the dropdown. > >Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/modules/acqui/invoice.tt | 28 ++++++++++++++++++---- > 1 file changed, 23 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >index 0d9b29cc70..dfd24e152f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >@@ -181,7 +181,7 @@ > </li> > [% reasons = AuthorisedValues.Get("ADJ_REASON") %] > [% IF reasons.0 %] >- <li> >+ <li> > <label for="reason_[% adjustment.adjustment_id | html %]">Reason: </label> > <select id="reason_[% adjustment.adjustment_id | html %]" name="reason"> > <option value="">No reason</option> >@@ -206,13 +206,19 @@ > <li> > <label for="budget_id_new">Fund: </label> > <select id="budget_id_new" name="budget_id"> >- <option selected="selected" value="">No fund</option> >+ <option value="">No fund</option> > [% FOREACH budget IN budgets %] >- <option value="[% budget.b_id | html %]"> >- [% budget.b_txt | html %] >- </option> >+ [% IF ( budget.selected ) %] >+ <option value="[% budget.b_id | html %]" selected="selected">[% budget.b_txt | html %] [% IF ( !budget.b_active ) %](inactive)[% END %]</option> >+ [% ELSIF ( budget.b_active ) %] >+ <option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option> >+ [% ELSE %] >+ <option value="[% budget.b_id | html %]" class="ab_inactive">[% budget.b_txt | html %] (inactive)</option> >+ [% END %] > [% END %] > </select> >+ <label for="showallfunds_adj" style="float:none;width:auto;"> Show inactive:</label> >+ <input type="checkbox" id="showallfunds_adj" /> > </li> > <li> > <label for="encumber_new">Encumber while invoice open? </label> >@@ -443,6 +449,18 @@ > $('.b_inactive').remove(); > } > }); >+ // same effort for the adjustments >+ var adjBudgetId = $("#budget_id_new"); >+ var disabledAdjBudgetsCopy = adjBudgetId.html(); >+ $('.ab_inactive').remove(); >+ $('#showallfunds_adj').click(function() { >+ if ($(this).is(":checked")) { >+ adjBudgetId.html(disabledAdjBudgetsCopy); //Puts back all the funds >+ } >+ else { >+ $('.ab_inactive').remove(); >+ } >+ }); > }); > </script> > [% END %] >-- >2.11.0
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 23929
:
94893
|
97354
|
97399
|
115836
|
116066
|
117169
| 118552