budget limit not working

on a new order, the branch limits for the budgets where not managed properly
if a budget had a limit on branch, it was not respected : the list displayed all budgets, including other branches than mine

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Paul Poulain 2010-03-26 11:25:37 +01:00 committed by Galen Charlton
parent ee06b581ce
commit 7a5174049d

View file

@ -231,7 +231,7 @@ my ( $flags, $homebranch )= ($borrower->{'flags'},$borrower->{'branchcode'});
my $budget = GetBudget($budget_id);
# build budget list
my $budget_loop = [];
my $budgets = GetBudgetHierarchy(q{},q{},$borrower->{borrowernumber});
my $budgets = GetBudgetHierarchy(q{},$borrower->{branchcode},$borrower->{borrowernumber});
foreach my $r (@{$budgets}) {
if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) {
next;