From 9ecb5bdf3e9926c4358f2148c13137b4cee89e65 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 8 Jan 2018 11:16:09 -0300 Subject: [PATCH] Bug 19935: Replace GetPendingIssues - deletemem.pl 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 --- members/deletemem.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/members/deletemem.pl b/members/deletemem.pl index 96f6251..8e89acd 100755 --- a/members/deletemem.pl +++ b/members/deletemem.pl @@ -74,10 +74,8 @@ if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preferen } } -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") { -- 2.1.4