Lines 161-173
if ($count_parcels) {
Link Here
|
161 |
$template->param( searchresults => $loopres, count => $count_parcels ); |
161 |
$template->param( searchresults => $loopres, count => $count_parcels ); |
162 |
} |
162 |
} |
163 |
|
163 |
|
164 |
my $budgets = GetBudgets(); |
164 |
# build budget list |
165 |
my @budgets_loop; |
165 |
my $budget_loop = []; |
166 |
foreach my $budget (@$budgets) { |
166 |
my $budgets = GetBudgetHierarchy; |
167 |
next unless CanUserUseBudget($loggedinuser, $budget, $flags); |
167 |
foreach my $r (@{$budgets}) { |
168 |
push @budgets_loop, $budget; |
168 |
next unless (CanUserUseBudget($loggedinuser, $r, $flags)); |
|
|
169 |
if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) { |
170 |
next; |
171 |
} |
172 |
push @{$budget_loop}, { |
173 |
b_id => $r->{budget_id}, |
174 |
b_txt => $r->{budget_name}, |
175 |
b_active => $r->{budget_period_active}, |
176 |
}; |
169 |
} |
177 |
} |
170 |
|
178 |
|
|
|
179 |
@{$budget_loop} = |
180 |
sort { uc( $a->{b_txt}) cmp uc( $b->{b_txt}) } @{$budget_loop}; |
181 |
|
171 |
$template->param( |
182 |
$template->param( |
172 |
orderby => $order, |
183 |
orderby => $order, |
173 |
filter => $code, |
184 |
filter => $code, |
Lines 179-185
$template->param(
Link Here
|
179 |
shipmentdate_today => C4::Dates->new()->output(), |
190 |
shipmentdate_today => C4::Dates->new()->output(), |
180 |
booksellerid => $booksellerid, |
191 |
booksellerid => $booksellerid, |
181 |
GST => C4::Context->preference('gist'), |
192 |
GST => C4::Context->preference('gist'), |
182 |
budgets => \@budgets_loop, |
193 |
budget_loop => $budget_loop, |
183 |
); |
194 |
); |
184 |
|
195 |
|
185 |
output_html_with_http_headers $input, $cookie, $template->output; |
196 |
output_html_with_http_headers $input, $cookie, $template->output; |