missing ) result in SQL error

This commit is contained in:
Paul Poulain 2009-11-16 16:02:52 +01:00 committed by Henri-Damien LAURENT
parent 19ac7c1569
commit feaaffd0b1

View file

@ -477,7 +477,7 @@ 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 @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 ="") ';