|
Lines 179-191
if ($count_parcels) {
Link Here
|
| 179 |
$template->param( searchresults => $loopres, count => $count_parcels ); |
179 |
$template->param( searchresults => $loopres, count => $count_parcels ); |
| 180 |
} |
180 |
} |
| 181 |
|
181 |
|
| 182 |
my $budgets = GetBudgets(); |
182 |
# build budget list |
| 183 |
my @budgets_loop; |
183 |
my $budget_loop = []; |
| 184 |
foreach my $budget (@$budgets) { |
184 |
my $budgets = GetBudgetHierarchy; |
| 185 |
next unless CanUserUseBudget($loggedinuser, $budget, $flags); |
185 |
foreach my $r (@{$budgets}) { |
| 186 |
push @budgets_loop, $budget; |
186 |
next unless (CanUserUseBudget($loggedinuser, $r, $flags)); |
|
|
187 |
if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) { |
| 188 |
next; |
| 189 |
} |
| 190 |
push @{$budget_loop}, { |
| 191 |
b_id => $r->{budget_id}, |
| 192 |
b_txt => $r->{budget_name}, |
| 193 |
b_active => $r->{budget_period_active}, |
| 194 |
}; |
| 187 |
} |
195 |
} |
| 188 |
|
196 |
|
|
|
197 |
@{$budget_loop} = |
| 198 |
sort { uc( $a->{b_txt}) cmp uc( $b->{b_txt}) } @{$budget_loop}; |
| 199 |
|
| 200 |
|
| 189 |
$template->param( |
201 |
$template->param( |
| 190 |
orderby => $order, |
202 |
orderby => $order, |
| 191 |
filter => $code, |
203 |
filter => $code, |
|
Lines 196-202
$template->param(
Link Here
|
| 196 |
shipmentdate_today => C4::Dates->new()->output(), |
208 |
shipmentdate_today => C4::Dates->new()->output(), |
| 197 |
booksellerid => $booksellerid, |
209 |
booksellerid => $booksellerid, |
| 198 |
GST => C4::Context->preference('gist'), |
210 |
GST => C4::Context->preference('gist'), |
| 199 |
budgets => \@budgets_loop, |
211 |
budgets => $budget_loop, |
| 200 |
); |
212 |
); |
| 201 |
|
213 |
|
| 202 |
output_html_with_http_headers $input, $cookie, $template->output; |
214 |
output_html_with_http_headers $input, $cookie, $template->output; |