Adding a sprintf so fines show up to 2 decimal places
[koha_gimpoz] / members / member.pl
index 55b6090..85d3535 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Auth;
 use C4::Output;
 use C4::Interface::CGI::Output;
 use CGI;
-use C4::Search;
+use C4::Members;
 use HTML::Template;
 
 my $input = new CGI;
@@ -89,6 +89,7 @@ for (my $i=0; $i < $count; $i++){
 
   my %row = (
        background => $background,
+       count => $i+1,
         borrowernumber => $results->[$i]{'borrowernumber'},
         cardnumber => $results->[$i]{'cardnumber'},
         surname => $results->[$i]{'surname'},
@@ -96,16 +97,20 @@ for (my $i=0; $i < $count; $i++){
         categorycode => $results->[$i]{'categorycode'},
         streetaddress => $results->[$i]{'streetaddress'},
         city => $results->[$i]{'city'},
+        branchcode => $results->[$i]{'branchcode'},
         odissue => "$od/$issue",
-        fines => $fines,
-        borrowernotes => $results->[$i]{'borrowernotes'});
+        fines =>  sprintf("%.2f",$fines),
+        borrowernotes => $results->[$i]{'borrowernotes'},
+        sort1 => $results->[$i]{'sort1'},
+        sort2 => $results->[$i]{'sort2'},
+        );
   if ( $background ) { $background = 0; } else {$background = 1; }
   push(@resultsdata, \%row);
 }
 
 $template->param( 
                        member          => $member,
-                       numresults      => $count,
+                       numresults              => $count,
                        resultsloop     => \@resultsdata );
 
 output_html_with_http_headers $input, $cookie, $template->output;