From 12a6d4d4ba10fab47fa088eea984c28d318425a7 Mon Sep 17 00:00:00 2001 From: David Gustafsson Date: Fri, 4 Nov 2022 15:16:17 +0100 Subject: [PATCH] Bug 29145: (QA follow-up) Add missing POD and don't return undef Signed-off-by: Tomas Cohen Arazi --- Koha/Patron.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 7fb8a26d78..6e7bbbfd85 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1014,6 +1014,15 @@ sub has_overdues { return $self->_result->issues->search({ date_due => { '<' => $dtf->format_datetime($date) } })->count; } + +=head3 has_debarring_overdues + +my $has_debarring_overdues = $patron->has_debarring_overdues({ issue_branchcode => $branchcode }); + +Returns true if patron has overdues that would result in debarment. + +=cut + sub has_debarring_overdues { my ($self, $params) = @_; $params //= {}; @@ -1082,7 +1091,6 @@ sub _get_overdue_debarred_delay { return $overdue_rules->{"delay2"} if($overdue_rules->{"debarred2"}); return $overdue_rules->{"delay3"} if($overdue_rules->{"debarred3"}); } - return undef; } =head3 track_login -- 2.39.5