To reproduce: 1) Create two budgets -- let's say 'Budget 2014' and 'Budget 2015' 2) Create 'Books 2014' in Budget 2014 and 'Books 2015' in Budget 2015. 3) Mark Budget 2014 as inactive 4) Create a new invoice. Click on the 'Funds' drop down, and note that both 'Books 2014' and 'Books 2015' appear.
This is also showing up when receiving items. Example: When receiving a new shipment the shipping funds display as an option ONLY active funds. There is an option to show inactive funds as well. In another screen at the invoice detail level---the pull down menu to shipping costs shows ALL inactive and active funds. This can be a problem if you have to edit shipping cost and you use the same duplicated fund structure year after year. Would be nice to have only active funds shown here and then have the option check box as the prior screen to show inactive funds IF you want.
I agree, a checkbox to show the funds from the inactive budgets would be a good solution here. The list can get quite long for libraries using acquisitions over mulitple years.
Created attachment 66555 [details] [review] Bug 14850 - Add Koha Objects
Created attachment 66556 [details] [review] Bug 14850 - Use optgroups for active and inactive budgets on invoice.pl To test: 1 - Have some inactive and active budgets 2 - View an invoice in acquisitions 3 - Select the shipping fund dropdown 4 - Note you see all the budgets 5 - Apply patch 6 - View invoice and select shipping fund dropdown 7 - Note you see active budgets followed by inactive budgets
Not a hard fail. Missing License. https://wiki.koha-community.org/wiki/Coding_Guidelines#Licence Budget.pm is not perl tidy. https://wiki.koha-community.org/wiki/Coding_Guidelines#PERL1:_Perltidy > push @budgets_loop, \%$line; Isn't this the same as $line? You already treat $line as a hash ref in the previous line code change. Haven't tested just read it and thinking out loud.
Created attachment 77522 [details] [review] Bug 14850: Use optgroups to display active/inactive budgets This is incomplete, some issues: 1 - It doesn't match current use of checkbox on other pages 2 - It should use a block instead of repeating code 3 - All of the dropdowns for funds should probably be moved to a single include file and/or use a template plugin Leaving this here rather for future work
This is still an issue and very annoying for libraries with a lot of acq data from various years.
Would love to see this fixed.
Ditto, to Karin's remark. We have been with Koha for 5 years, have a general and trust fund budget, plus we share our catalog with a partner library, so around 15 listings per code.
+1 Marjorie
Created attachment 85521 [details] [review] Bug 14850: Funds from inactive budgets appear in 'Funds' dropdown on acqui/invoice.pl Test Plan: 1) Create some inactive and active budgets 2) View an invoice in acquisitions 4) Note the shipping fund dropdown behaves like acqui/parcels.pl
Patch tested with a sandbox, by Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 85522 [details] [review] Bug 14850: Funds from inactive budgets appear in 'Funds' dropdown on acqui/invoice.pl Test Plan: 1) Create some inactive and active budgets 2) View an invoice in acquisitions 4) Note the shipping fund dropdown behaves like acqui/parcels.pl Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Looked ok for me !
Created attachment 85600 [details] [review] Bug 14850: (QA follow-up) Remove debugging code Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 85601 [details] [review] Bug 14850: Funds from inactive budgets appear in 'Funds' dropdown on acqui/invoice.pl Test Plan: 1) Create some inactive and active budgets 2) View an invoice in acquisitions 4) Note the shipping fund dropdown behaves like acqui/parcels.pl Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 85602 [details] [review] Bug 14850: (QA follow-up) Remove debugging code Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
I passed this QA, as it fixes the annoying bug. This patch do it in the way other acquisition scripts do it. There is much of duplicate code, and too much of manipulation with budget data on the wrong place (.pl script). But the budget managament does not use Koha::Objects yet, and we will need a template plugin to generate budget dropdown the same way. This is out of scope of this bug.
Awesome work all! Pushed to master for 19.05
Pushed to 18.11.x for 18.11.04
Did not apply to 18.05.x. Please rebase to 18.05.x if needed.