From 484d1490925d736f99a430a6933c96e42ea4e768 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Wed, 30 Oct 2013 10:28:49 +0100 Subject: [PATCH] Bug 11166: make library filter in funds administration page more precise In funds administration, admin/aqbudgets.pl, there is a combobox for filtering by library code. The bug is that the filter uses a pattern match instead of equals : next unless $budget->{budget_branchcode} =~ m/$filter_budgetbranch/; In this case, if there is a library with code '1' and one with code '12', filtering by library '1' will also show funds of library '12'. Test plan : - Create a library with code '1' and one with code '12' - Create funds in both libraries - Go to admin/aqbudgets.pl - Filter by branch '12' => You see only funds of this library - Filter by branch '1' => You see only funds of this library Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall Passes koha-qa.pl, works as advertised Signed-off-by: Galen Charlton --- admin/aqbudgets.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index 42a39f7d5e..229606e4b0 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -296,7 +296,7 @@ if ($op eq 'add_form') { || $budget->{budget_name} =~ m/$filter_budgetname/i; } if ($filter_budgetbranch ) { - next unless $budget->{budget_branchcode} =~ m/$filter_budgetbranch/; + next unless $budget->{budget_branchcode} eq $filter_budgetbranch; } ## TOTALS -- 2.20.1