use List::MoreUtils qw/any/;
use C4::Dates qw/format_date/;
+use C4::Members::Attributes qw(GetBorrowerAttributes);
my $input = CGI->new;
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
$template->param( picture => 1 ) if $picture;
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+ my $attributes = GetBorrowerAttributes($borrowernumber);
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}
+
$template->param(
readingrecordview => 1,
biblionumber => $data->{'biblionumber'},
title => $data->{'title'},
initials => $data->{'initials'},
surname => $data->{'surname'},
+ othernames => $data->{'othernames'},
borrowernumber => $borrowernumber,
limit => $limit,
firstname => $data->{'firstname'},
address => $data->{'address'},
address2 => $data->{'address2'},
city => $data->{'city'},
+ state => $data->{'state'},
zipcode => $data->{'zipcode'},
country => $data->{'country'},
phone => $data->{'phone'},
is_child => ($data->{'category_type'} eq 'C'),
branchname => GetBranchName($data->{'branchcode'}),
showfulllink => (scalar @loop_reading > 50),
- loop_reading => \@loop_reading);
+ loop_reading => \@loop_reading,
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
+);
output_html_with_http_headers $input, $cookie, $template->output;