[Koha-patches] [PATCH] Bug 5962 : Budgets showing when they shouldn't (MT #4717) Bug in Koha 3.2 on acqui-home.pl
Chris Cormack
chrisc at catalyst.net.nz
Mon Mar 28 03:43:38 CEST 2011
From: Christophe Croullebois <christophe.croullebois at biblibre.com>
In the screen all the budgets with budget_branchcode=NULL were displayed even if the budget_owner_id was not NULL. This patch fixes the bug
---
C4/Budgets.pm | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/C4/Budgets.pm b/C4/Budgets.pm
index 0882756..9d3e94b 100644
--- a/C4/Budgets.pm
+++ b/C4/Budgets.pm
@@ -506,8 +506,9 @@ sub GetBudgetHierarchy {
# show only budgets owned by me, my branch or everyone
if ($owner) {
if ($branchcode) {
- push @where_strings,qq{ (budget_owner_id = ? OR budget_branchcode = ? OR (budget_branchcode IS NULL or budget_branchcode="" AND (budget_owner_id IS NULL OR budget_owner_id="")))};
- push @bind_params, ($owner, $branchcode);
+ push @where_strings,
+ qq{ (budget_owner_id = ? OR budget_branchcode = ? OR ((budget_branchcode IS NULL or budget_branchcode="") AND (budget_owner_id IS NULL OR budget_owner_id="")))};
+ push @bind_params, ( $owner, $branchcode );
} else {
push @where_strings, ' (budget_owner_id = ? OR budget_owner_id IS NULL or budget_owner_id ="") ';
push @bind_params, $owner;
--
1.7.1
More information about the Koha-patches
mailing list