use Koha::DateUtils;
use Koha::Patrons;
use Koha::Patron::Files;
+use Koha::Patron::Categories;
my $cgi = CGI->new;
);
}
-
- $template->param( adultborrower => 1 )
- if ( $patron_category->category_type eq 'A' || $patron_category->category_type eq 'I' );
+ if ( $patron->is_child ) {
+ 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(
files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )