View | Details | Raw Unified | Return to bug 10044
Collapse All | Expand All

(-)a/acqui/parcel.pl (-39 / +1 lines)
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 ),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt (-18 / +2 lines)
Lines 240-262 Link Here
240
                </tr>
240
                </tr>
241
            [% END %]
241
            [% END %]
242
        </tbody>
242
        </tbody>
243
         </table>[% ELSE %]There are no pending orders.[% END %]
243
        </table>
244
       <div id="resultnumber">
244
        [% ELSE %]There are no pending orders.[% END %]
245
        <!-- Row of numbers corresponding to search result pages -->
246
        [% IF ( displayprev ) %]
247
            <a href="parcel.pl?invoiceid=[% invoiceid %]&amp;startfrom=[% prevstartfrom %][% IF ( resultsperpage ) %]&amp;resultsperpage=[% resultsperpage %][% END %]#resultnumber">&lt;&lt; Previous</a>
248
        [% END %]
249
        [% FOREACH number IN numbers %]
250
            [% IF ( number.highlight ) %]
251
            <span class="current">[% number.number %]</span>
252
            [% ELSE %]
253
            <a href="parcel.pl?invoiceid=[% invoiceid %]&amp;startfrom=[% number.startfrom %][% IF ( resultsperpage ) %]&amp;resultsperpage=[% resultsperpage %][% END %]#resultnumber">[% number.number %]</a>
254
            [% END %]
255
        [% END %]
256
        [% IF ( displaynext ) %]
257
            <a href="parcel.pl?invoiceid=[% invoiceid %]&amp;startfrom=[% nextstartfrom %][% IF ( resultsperpage ) %]&amp;resultsperpage=[% resultsperpage %][% END %]#resultnumber">Next &gt;&gt;</a>
258
        [% END %]
259
        </div>
260
    </div>
245
    </div>
261
[% ELSE %]
246
[% ELSE %]
262
    <p>
247
    <p>
263
- 

Return to bug 10044