Bug 14653: Acq planning filter always use default active period
commit837fa140e7c6621b3cfa9b0ce825844cac4543f5
authorFridolin Somers <fridolin.somers@biblibre.com>
Thu, 6 Aug 2015 08:49:03 +0000 (6 10:49 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 13 Oct 2015 15:19:30 +0000 (13 12:19 -0300)
tree97363aa86dc67a8e35504528d08dc2933bc90e24
parentddd18a6958126ec22d78bab5e7e8f5b9f05a790b
Bug 14653: Acq planning filter always use default active period

In Acq planning /cgi-bin/koha/admin/aqplan.pl, left side filter and export forms have no parameter budget_period_id nor authcat, so the use the default active period.
As said in code :
- IF PERIOD_ID IS DEFINED,  GET THE PERIOD - ELSE GET THE ACTIVE PERIOD BY DEFAULT
my $period = GetBudgetPeriod($budget_period_id);

This patch corrects the filter form.

Test plan :
- Create an active budget "B_ACTIVE" with 1 fund
- Create an inactive budget "B_OLD" with 3 funds
- Go to "B_OLD" planning by libraries
- You see 3 funds
- In filter form, select "by months" in "Select planning type"
=> Without patch, you see planning of "B_ACTIVE" with 1 fund
=> Without patch, you see planning of "B_OLD" with 3 funds

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt