fix crash when recording payment for lost item
[koha_fer] / members / readingrec.pl
index a7ef3a4..e47b5f6 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Output;
 use CGI;
 use C4::Members;
 
-use C4::Date;
+use C4::Dates qw/format_date/;
 my $input=new CGI;
 
 
@@ -42,7 +42,7 @@ my $limit=$input->param('limit');
 
 if ($limit){
     if ($limit eq 'full'){
-       $limit=0;
+               $limit=0;
     }
 } 
 else {
@@ -79,8 +79,15 @@ for (my $i=0;$i<$count;$i++){
        my $borrowercategory = GetBorrowercategory( $data->{'categorycode'} );
        my $category_type = $borrowercategory->{'category_type'};
        ( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' );
+if (! $limit){ 
+       $limit = 'full'; 
+}
+
+my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
+$template->param( picture => 1 ) if $picture;
 
 $template->param(
+                                               readingrecordview => 1,
                                                biblionumber => $data->{'biblionumber'},
                                                title => $data->{'title'},
                                                initials => $data->{'initials'},