MT3421, Follow-up: Moves subscription history in a separate page
[koha.git] / labels / pcard-member-search.pl
index 5620a54..3842bd0 100755 (executable)
@@ -95,14 +95,12 @@ else
 
 
 my @resultsdata;
-my $toggle = 0;
 my $to=($count>($startfrom*$resultsperpage)?$startfrom*$resultsperpage:$count);
 for (my $i=($startfrom-1)*$resultsperpage; $i < $to; $i++){
   #find out stats
   my ($od,$issue,$fines)=GetMemberIssuesAndFines($results->[$i]{'borrowernumber'});
 
   my %row = (
-    toggle => $toggle,
     count => $i+1,
     borrowernumber => $results->[$i]{'borrowernumber'},
     cardnumber => $results->[$i]{'cardnumber'},
@@ -125,7 +123,6 @@ for (my $i=($startfrom-1)*$resultsperpage; $i < $to; $i++){
     sort2 => $results->[$i]{'sort2'},
     dateexpiry => C4::Dates->new($results->[$i]{'dateexpiry'},'iso')->output('syspref'),
     );
-  if ( $toggle ) { $toggle = 0; } else {$toggle = 1; }
   push(@resultsdata, \%row);
 }
 my $base_url =
@@ -144,7 +141,7 @@ my $base_url =
 
 $template->param(
     paginationbar => pagination_bar(
-        $base_url,  int( $count / $resultsperpage ) + 1,
+        $base_url,  int( ($count - 1) / $resultsperpage ) + 1,
         $startfrom, 'startfrom'
     ),
     startfrom => $startfrom,