use Module::Load;
use Koha::Patrons;
use Koha::Token;
+use Koha::Patron::Categories;
if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preference('NorwegianPatronDBEnable') == 1 ) {
load Koha::NorwegianPatronDB, qw( NLMarkForDeletion NLSync );
}
}
-my $issues = GetPendingIssues($member); # FIXME: wasteful call when really, we only want the count
-my $countissues = scalar(@$issues);
-
my $charges = $patron->account->non_issues_charges;
+my $countissues = $patron->checkouts->count;
my $userenv = C4::Context->userenv;
if ($patron->category->category_type eq "S") {
}
}
+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;
+}
+
my $op = $input->param('op') || 'delete_confirm';
my $dbh = C4::Context->dbh;
my $is_guarantor = $dbh->selectrow_array("SELECT COUNT(*) FROM borrowers WHERE guarantorid=?", undef, $member);