Lines 136-145
my $datereceived = C4::Dates->new();
Link Here
|
136 |
my $code = $input->param('code'); |
136 |
my $code = $input->param('code'); |
137 |
my @rcv_err = $input->param('error'); |
137 |
my @rcv_err = $input->param('error'); |
138 |
my @rcv_err_barcode = $input->param('error_bc'); |
138 |
my @rcv_err_barcode = $input->param('error_bc'); |
139 |
my $startfrom=$input->param('startfrom'); |
|
|
140 |
my $resultsperpage = $input->param('resultsperpage'); |
141 |
$resultsperpage = 20 unless ($resultsperpage); |
142 |
$startfrom=0 unless ($startfrom); |
143 |
|
139 |
|
144 |
|
140 |
|
145 |
|
141 |
|
Lines 281-320
if(!defined $invoice->{closedate}) {
Link Here
|
281 |
my $budget = GetBudget( $line{budget_id} ); |
277 |
my $budget = GetBudget( $line{budget_id} ); |
282 |
$line{budget_name} = $budget->{'budget_name'}; |
278 |
$line{budget_name} = $budget->{'budget_name'}; |
283 |
|
279 |
|
284 |
push @loop_orders, \%line if ($i >= $startfrom and $i < $startfrom + $resultsperpage); |
280 |
push @loop_orders, \%line; |
285 |
} |
|
|
286 |
|
287 |
my $count = $countpendings; |
288 |
|
289 |
if ($count>$resultsperpage){ |
290 |
my $displaynext=0; |
291 |
my $displayprev=$startfrom; |
292 |
if(($count - ($startfrom+$resultsperpage)) > 0 ) { |
293 |
$displaynext = 1; |
294 |
} |
295 |
|
296 |
my @numbers = (); |
297 |
for (my $i=1; $i<$count/$resultsperpage+1; $i++) { |
298 |
my $highlight=0; |
299 |
($startfrom/$resultsperpage==($i-1)) && ($highlight=1); |
300 |
push @numbers, { number => $i, |
301 |
highlight => $highlight , |
302 |
startfrom => ($i-1)*$resultsperpage}; |
303 |
} |
304 |
|
305 |
my $from = $startfrom*$resultsperpage+1; |
306 |
my $to; |
307 |
if($count < (($startfrom+1)*$resultsperpage)){ |
308 |
$to = $count; |
309 |
} else { |
310 |
$to = (($startfrom+1)*$resultsperpage); |
311 |
} |
312 |
$template->param(numbers=>\@numbers, |
313 |
displaynext=>$displaynext, |
314 |
displayprev=>$displayprev, |
315 |
nextstartfrom=>(($startfrom+$resultsperpage<$count)?$startfrom+$resultsperpage:$count), |
316 |
prevstartfrom=>(($startfrom-$resultsperpage>0)?$startfrom-$resultsperpage:0) |
317 |
); |
318 |
} |
281 |
} |
319 |
|
282 |
|
320 |
$template->param( |
283 |
$template->param( |
Lines 337-343
$template->param(
Link Here
|
337 |
book_foot_loop => \@book_foot_loop, |
300 |
book_foot_loop => \@book_foot_loop, |
338 |
totalprice => sprintf($cfstr, $totalprice), |
301 |
totalprice => sprintf($cfstr, $totalprice), |
339 |
totalquantity => $totalquantity, |
302 |
totalquantity => $totalquantity, |
340 |
resultsperpage => $resultsperpage, |
|
|
341 |
(uc(C4::Context->preference("marcflavour"))) => 1, |
303 |
(uc(C4::Context->preference("marcflavour"))) => 1, |
342 |
total_quantity => $total_quantity, |
304 |
total_quantity => $total_quantity, |
343 |
total_gste => sprintf( "%.2f", $total_gste ), |
305 |
total_gste => sprintf( "%.2f", $total_gste ), |