From 3f8ccff0ba2e652766c03e36ab379e7d7bdd9778 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 27 Jan 2023 09:22:59 -0500 Subject: [PATCH] Bug 29145: (QA follow-up) Rename has_debarring_overdues to has_restricting_overdues --- C4/Circulation.pm | 2 +- Koha/Patron.pm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 77953e5812..08e7e49ac7 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2636,7 +2636,7 @@ sub MarkIssueReturned { if (C4::Context->preference('AutoRemoveOverduesRestrictions') ne 'no' && $patron->is_debarred) { my $remove_restrictions = C4::Context->preference('AutoRemoveOverduesRestrictions') eq 'when_no_overdue_causing_debarment' ? - !$patron->has_debarring_overdues({ issue_branchcode => $issue_branchcode }) : + !$patron->has_restricting_overdues({ issue_branchcode => $issue_branchcode }) : !$patron->has_overdues; if ( $remove_restrictions && $overdue_restrictions->count diff --git a/Koha/Patron.pm b/Koha/Patron.pm index a2c99d2c12..3f1621f961 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1000,15 +1000,15 @@ sub has_overdues { } -=head3 has_debarring_overdues +=head3 has_restricting_overdues -my $has_debarring_overdues = $patron->has_debarring_overdues({ issue_branchcode => $branchcode }); +my $has_restricting_overdues = $patron->has_restricting_overdues({ issue_branchcode => $branchcode }); Returns true if patron has overdues that would result in debarment. =cut -sub has_debarring_overdues { +sub has_restricting_overdues { my ($self, $params) = @_; $params //= {}; my $date = dt_from_string()->truncate( to => 'day' ); -- 2.30.2