From 91ecb7405ebc9698283315d5caa7b5ad603e3534 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 Signed-off-by: Tomas Cohen Arazi --- 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 ad06d5df59..75c36a93ba 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2629,7 +2629,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 6e7bbbfd85..df9ad20bd9 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1015,15 +1015,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.39.5