Bug 14605 - Corrects the individual fine's description
[koha-ffzg.git] / members / statistics.pl
index af31815..07406fd 100755 (executable)
@@ -24,7 +24,7 @@
 
 use Modern::Perl;
 
-use CGI;
+use CGI qw ( -utf8 );
 use C4::Auth;
 use C4::Branch;
 use C4::Context;
@@ -32,6 +32,7 @@ use C4::Members;
 use C4::Members::Statistics;
 use C4::Members::Attributes qw(GetBorrowerAttributes);
 use C4::Output;
+use Koha::Patron::Images;
 
 my $input = new CGI;
 
@@ -93,18 +94,15 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
     );
 }
 
-my ($picture, $dberror) = GetPatronImage($borrower->{'borrowernumber'});
-$template->param( picture => 1 ) if $picture;
+my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber});
+$template->param( picture => 1 ) if $patron_image;
 
-# Computes full borrower address
-my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{streettype} );
-my $address = $borrower->{'streetnumber'} . " $roadtype " . $borrower->{'address'};
+$template->param(%$borrower);
 
 $template->param(
-    statisticsview => 1,
-    datas          => $datas,
-    address        => $address,
-    column_names   => \@statistic_column_names,
+    statisticsview     => 1,
+    datas              => $datas,
+    column_names       => \@statistic_column_names,
     count_total_issues => $count_total_issues,
     count_total_issues_returned => $count_total_issues_returned,
     count_total_precedent_state => $count_total_precedent_state,