Lines 335-345
my $patron = Koha::Patrons->find( $loggedinuser )->unblessed;
Link Here
|
335 |
|
335 |
|
336 |
my $budget = GetBudget($budget_id); |
336 |
my $budget = GetBudget($budget_id); |
337 |
# build budget list |
337 |
# build budget list |
338 |
my $budget_loop = []; |
338 |
my %budget_loops; |
339 |
my $budgets = GetBudgetHierarchy; |
339 |
my $budgets = GetBudgetHierarchy; |
340 |
foreach my $r (@{$budgets}) { |
340 |
foreach my $r (@{$budgets}) { |
341 |
next unless (CanUserUseBudget($patron, $r, $userflags)); |
341 |
next unless (CanUserUseBudget($patron, $r, $userflags)); |
342 |
push @{$budget_loop}, { |
342 |
unless ( defined $budget_loops{$r->{budget_period_id}} ){ |
|
|
343 |
$budget_loops{$r->{budget_period_id}}->{description} = $r->{budget_period_description}; |
344 |
$budget_loops{$r->{budget_period_id}}->{active} = $r->{budget_period_active}; |
345 |
$budget_loops{$r->{budget_period_id}}->{funds} = []; |
346 |
} |
347 |
push @{$budget_loops{$r->{budget_period_id}}->{funds}}, { |
343 |
b_id => $r->{budget_id}, |
348 |
b_id => $r->{budget_id}, |
344 |
b_txt => $r->{budget_name}, |
349 |
b_txt => $r->{budget_name}, |
345 |
b_sort1_authcat => $r->{'sort1_authcat'}, |
350 |
b_sort1_authcat => $r->{'sort1_authcat'}, |
Lines 350-356
foreach my $r (@{$budgets}) {
Link Here
|
350 |
}; |
355 |
}; |
351 |
} |
356 |
} |
352 |
|
357 |
|
353 |
|
|
|
354 |
$template->param( sort1 => $data->{'sort1'} ); |
358 |
$template->param( sort1 => $data->{'sort1'} ); |
355 |
$template->param( sort2 => $data->{'sort2'} ); |
359 |
$template->param( sort2 => $data->{'sort2'} ); |
356 |
|
360 |
|
Lines 487-493
$template->param(
Link Here
|
487 |
author => $data->{'author'}, |
491 |
author => $data->{'author'}, |
488 |
publicationyear => $data->{'publicationyear'} ? $data->{'publicationyear'} : $data->{'copyrightdate'}, |
492 |
publicationyear => $data->{'publicationyear'} ? $data->{'publicationyear'} : $data->{'copyrightdate'}, |
489 |
editionstatement => $data->{'editionstatement'}, |
493 |
editionstatement => $data->{'editionstatement'}, |
490 |
budget_loop => $budget_loop, |
494 |
budget_loop => \%budget_loops, |
491 |
isbn => $data->{'isbn'}, |
495 |
isbn => $data->{'isbn'}, |
492 |
ean => $data->{'ean'}, |
496 |
ean => $data->{'ean'}, |
493 |
seriestitle => $data->{'seriestitle'}, |
497 |
seriestitle => $data->{'seriestitle'}, |