Same as previously, we just want Koha::Patron->checkouts->count to know
if a patron has checkouts.
Test plan:
Confirm that you cannot delete a patron's card if they have pending checkouts
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@deichman.no>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
}
}
-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->pending_checkouts->count;
my $userenv = C4::Context->userenv;
if ($patron->category->category_type eq "S") {