From 0b4e3dd343b8757e402a943fdb6c4d349f9b1e10 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 Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- members/deletemem.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/members/deletemem.pl b/members/deletemem.pl index 96f6251753..8e89acd481 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.39.5