From fd7157b34f2902bf340fc8846541e5e44fac16ee Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 3 Apr 2018 09:49:54 -0300 Subject: [PATCH] Bug 19935: Use ->checkouts when ->pending_checkouts->count was used --- Koha/Patron/Discharge.pm | 2 +- members/deletemem.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Patron/Discharge.pm b/Koha/Patron/Discharge.pm index 2f3c4e4ed4..03642140b2 100644 --- a/Koha/Patron/Discharge.pm +++ b/Koha/Patron/Discharge.pm @@ -36,7 +36,7 @@ sub can_be_discharged { my $patron = Koha::Patrons->find( $params->{borrowernumber} ); return unless $patron; - my $has_pending_checkouts = $patron->pending_checkouts->count; + my $has_pending_checkouts = $patron->checkouts->count; return $has_pending_checkouts ? 0 : 1; } diff --git a/members/deletemem.pl b/members/deletemem.pl index 8e89acd481..1da27fc1df 100755 --- a/members/deletemem.pl +++ b/members/deletemem.pl @@ -75,7 +75,7 @@ if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preferen } my $charges = $patron->account->non_issues_charges; -my $countissues = $patron->pending_checkouts->count; +my $countissues = $patron->checkouts->count; my $userenv = C4::Context->userenv; if ($patron->category->category_type eq "S") { -- 2.11.0