@@ -, +, @@ --- acqui/parcel.pl | 37 +-------- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 81 +++++++++++--------- 2 files changed, 48 insertions(+), 70 deletions(-) --- a/acqui/parcel.pl +++ a/acqui/parcel.pl @@ -212,7 +212,7 @@ for my $item ( @parcelitems ) { push @book_foot_loop, map { $_ } values %foot; my @loop_orders = (); -if(!defined $invoice->{closedate}) { +unless( defined $invoice->{closedate} ) { my $pendingorders; if($input->param('op') eq "search"){ my $search = $input->param('summaryfilter') || ''; @@ -297,40 +297,7 @@ if(!defined $invoice->{closedate}) { my $budget = GetBudget( $line{budget_id} ); $line{budget_name} = $budget->{'budget_name'}; - push @loop_orders, \%line if ($i >= $startfrom and $i < $startfrom + $resultsperpage); - } - - my $count = $countpendings; - - if ($count>$resultsperpage){ - my $displaynext=0; - my $displayprev=$startfrom; - if(($count - ($startfrom+$resultsperpage)) > 0 ) { - $displaynext = 1; - } - - my @numbers = (); - for (my $i=1; $i<$count/$resultsperpage+1; $i++) { - my $highlight=0; - ($startfrom/$resultsperpage==($i-1)) && ($highlight=1); - push @numbers, { number => $i, - highlight => $highlight , - startfrom => ($i-1)*$resultsperpage}; - } - - my $from = $startfrom*$resultsperpage+1; - my $to; - if($count < (($startfrom+1)*$resultsperpage)){ - $to = $count; - } else { - $to = (($startfrom+1)*$resultsperpage); - } - $template->param(numbers=>\@numbers, - displaynext=>$displaynext, - displayprev=>$displayprev, - nextstartfrom=>(($startfrom+$resultsperpage<$count)?$startfrom+$resultsperpage:$count), - prevstartfrom=>(($startfrom-$resultsperpage>0)?$startfrom-$resultsperpage:0) - ); + push @loop_orders, \%line; } $template->param( --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -4,6 +4,7 @@ [% INCLUDE 'doc-head-close.inc' %] + [% INCLUDE 'datatables-strings.inc' %] [% INCLUDE 'greybox.inc' %] @@ -14,10 +15,11 @@ dt_overwrite_html_sorting_localeCompare(); $(document).ready(function(){ + var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, { "bStateSave": true, "iCookieDuration": 60*60*24*1000, // 1000 days - "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]], + "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], "aoColumnDefs": [ { "aTargets": [ 3, 8, 9 ], "bSortable": false, "bSearchable": false }, ], @@ -33,12 +35,29 @@ null, null, ], + 'bAutoWidth': false, "sPaginationType": "four_button" - } ) ); + } ) + ).columnFilter({ + sPlaceHolder: "head:after", + aoColumns: [ + { type: "text" }, + { type: "text" }, + { type: "text" }, + null, + { type: "text" }, + { type: "text" }, + { type: "text" }, + { type: "text" }, + null, + null + ] + }); + var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, { "bStateSave": true, "iCookieDuration": 60*60*24*1000, // 1000 days - "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]], + "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], "aoColumnDefs": [ { "aTargets": [ 3, -1 ], "bSortable": false, "bSearchable": false }, ], @@ -55,12 +74,6 @@ ], "sPaginationType": "four_button" } ) ); -/* - $("#pendingt").tablesorter({ - headers: { 2: { sorter: 'articles' },3: { sorter: false },8:{sorter:false}} - }); -*/ - }); // Case-insensitive version of jquery's contains function @@ -165,12 +178,25 @@

Invoice number: [% invoice %] Received by: [% loggedinusername %] On: [% formatteddatereceived %]

[% UNLESS (invoiceclosedate) %] - [% ELSE %]

Invoice is closed, so you can't receive orders anymore. --