Koha/suggestion
Fridolin Somers 8dca36661d Bug 11176: Add active switch on budgets select in suggestions
When creating a new purchase suggestion, all funds display and are available for selection.
The behaviour of this drop-down menu should mirror that of those drop-down menus elsewhere in acquisitions,
where only funds that are linked to active budgets display to the user.

This patch add the active switch based on what exists in acqui/invoice.tt and acqui/invoice.pl.

Looks like actually in suggestion.pl budgets list was fetches with GetBudgets().
But this is for the filter in 'Acquisition information'.
Budgets selection on suggestion creation/edition must use GetBudgetHierarchy(), like in acqui/invoice.pl,
in order to have the actif status.

Test plan :
1) Create a budget periods active B1 with a fund F1
2) Create a budget periods inactive B2 with a fund F2
3) Go to suggestions module
4) Create a new suggestion
5) Check you see only active fund F1
6) Click on 'Show inactive'
7) Check you see also 'F2 (inactive)'
8) Choose fund F1 and save
9) Select the suggestion and edit
10) Check fund F1 is selected
11) Come back to suggestion table
12) Check filter 'Book fund' under 'Acquisition information' contains all funds

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:11 +02:00
..
add_user_search.pl Bug 23590: (QA follow-up) Fix some problems created by recent changes and updatedatabase statement 2020-03-25 09:35:24 +00:00
suggester_search.pl Bug 24819: (follow-up) Rename suggestor to suggester 2020-04-20 13:36:42 +01:00
suggestion.pl Bug 11176: Add active switch on budgets select in suggestions 2020-09-28 16:09:11 +02:00