From 00dd0ae6276e9ea9d744d42b3871a4d35a70a1d7 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Wed, 4 Aug 2010 15:48:10 +1200 Subject: [PATCH] Bug 5084 - hide funds that are part of an inactive budget Prevents inactive funds from showing in the aquisitions module, they still show in the administration. Signed-off-by: Chris Cormack --- C4/Budgets.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/C4/Budgets.pm b/C4/Budgets.pm index 005bba8d17..088275676e 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -492,9 +492,13 @@ sub GetBudgetHierarchy { my $dbh = C4::Context->dbh; my $query = qq| SELECT aqbudgets.* - FROM aqbudgets |; - # show only period X if requested + FROM aqbudgets + LEFT JOIN aqbudgetperiods + ON aqbudgetperiods.budget_period_id=aqbudgets.budget_period_id |; my @where_strings; + # Pick out the active ones + push @where_strings, 'aqbudgetperiods.budget_period_active=1'; + # show only period X if requested if ($budget_period_id) { push @where_strings," aqbudgets.budget_period_id = ?"; push @bind_params, $budget_period_id; -- 2.39.5