budget limit not working
authorPaul Poulain <paul.poulain@biblibre.com>
Fri, 26 Mar 2010 10:25:37 +0000 (11:25 +0100)
committerGalen Charlton <gmcharlt@gmail.com>
Fri, 23 Apr 2010 10:56:39 +0000 (06:56 -0400)
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>
acqui/neworderempty.pl

index 8b88f93..562a146 100755 (executable)
@@ -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;