Lines 100-115
$template->param(
Link Here
|
100 |
|
100 |
|
101 |
my $budget; |
101 |
my $budget; |
102 |
|
102 |
|
103 |
my $branches = GetBranches($show_mine); |
103 |
my $branchloop = C4::Branch::GetBranchesLoop($filter_budgetbranch); |
104 |
my @branchloop2; |
|
|
105 |
foreach my $thisbranch (keys %$branches) { |
106 |
my %row = ( |
107 |
value => $thisbranch, |
108 |
branchname => $branches->{$thisbranch}->{'branchname'}, |
109 |
); |
110 |
$row{selected} = 1 if $thisbranch eq $filter_budgetbranch; |
111 |
push @branchloop2, \%row; |
112 |
} |
113 |
|
104 |
|
114 |
$template->param(auth_cats_loop => GetBudgetAuthCats( $budget_period_id )) |
105 |
$template->param(auth_cats_loop => GetBudgetAuthCats( $budget_period_id )) |
115 |
if $budget_period_id; |
106 |
if $budget_period_id; |
Lines 284-289
if ( $op eq 'list' ) {
Link Here
|
284 |
|
275 |
|
285 |
#This Looks WEIRD to me : should budgets be filtered in such a way ppl who donot own it would not see the amount spent on the budget by others ? |
276 |
#This Looks WEIRD to me : should budgets be filtered in such a way ppl who donot own it would not see the amount spent on the budget by others ? |
286 |
|
277 |
|
|
|
278 |
my @budgets_to_display; |
287 |
foreach my $budget (@budgets) { |
279 |
foreach my $budget (@budgets) { |
288 |
# PERMISSIONS |
280 |
# PERMISSIONS |
289 |
unless(CanUserModifyBudget($borrowernumber, $budget, $staffflags)) { |
281 |
unless(CanUserModifyBudget($borrowernumber, $budget, $staffflags)) { |
Lines 335-340
if ( $op eq 'list' ) {
Link Here
|
335 |
$budget->{budget_hierarchy} = \@budget_hierarchy; |
327 |
$budget->{budget_hierarchy} = \@budget_hierarchy; |
336 |
|
328 |
|
337 |
$budget->{budget_has_children} = BudgetHasChildren( $budget->{budget_id} ); |
329 |
$budget->{budget_has_children} = BudgetHasChildren( $budget->{budget_id} ); |
|
|
330 |
push @budgets_to_display, $budget; |
338 |
} |
331 |
} |
339 |
|
332 |
|
340 |
my $budget_period_total = $period->{budget_period_total}; |
333 |
my $budget_period_total = $period->{budget_period_total}; |
Lines 343-356
if ( $op eq 'list' ) {
Link Here
|
343 |
|
336 |
|
344 |
$template->param( |
337 |
$template->param( |
345 |
op => 'list', |
338 |
op => 'list', |
346 |
budgets => \@budgets, |
339 |
budgets => \@budgets_to_display, |
347 |
periods => $periods, |
340 |
periods => $periods, |
348 |
budget_period_total => $budget_period_total, |
341 |
budget_period_total => $budget_period_total, |
349 |
period_alloc_total => $period_alloc_total, |
342 |
period_alloc_total => $period_alloc_total, |
350 |
spent_total => $spent_total, |
343 |
spent_total => $spent_total, |
351 |
ordered_total => $ordered_total, |
344 |
ordered_total => $ordered_total, |
352 |
available_total => $available_total, |
345 |
available_total => $available_total, |
353 |
branchloop => \@branchloop2, |
346 |
branchloop => $branchloop, |
|
|
347 |
filter_budgetname => $filter_budgetname, |
354 |
); |
348 |
); |
355 |
|
349 |
|
356 |
} #---- END list |
350 |
} #---- END list |