use C4::Members;
use List::MoreUtils qw/any uniq/;
use Koha::DateUtils;
-use C4::Members::Attributes qw(GetBorrowerAttributes);
use Koha::Patrons;
use Koha::Patron::Categories;
my ($template, $loggedinuser, $cookie)= get_template_and_user({template_name => "members/readingrec.tt",
query => $input,
type => "intranet",
- authnotrequired => 0,
flagsrequired => {borrowers => 'edit_borrowers'},
debug => 1,
});
$patron = Koha::Patrons->find( $borrowernumber );
}
-my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
+my $logged_in_user = Koha::Patrons->find( $loggedinuser );
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
my $order = 'date_due desc';
}
}
-my $category = $patron->category;
-if ( $category->category_type eq 'C') {
- my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
- $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
- $template->param( 'catcode' => $patron_categories->next->categorycode ) if $patron_categories->count == 1;
-}
-
-$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' );
if (! $limit){
$limit = 'full';
}
-if (C4::Context->preference('ExtendedPatronAttributes')) {
- my $attributes = GetBorrowerAttributes($patron->borrowernumber);
- $template->param(
- ExtendedPatronAttributes => 1,
- extendedattributes => $attributes
- );
-}
-
$template->param(
patron => $patron,
readingrecordview => 1,
- is_child => ( $category->category_type eq 'C' ),
loop_reading => $issues,
);
output_html_with_http_headers $input, $cookie, $template->output;