@@ -, +, @@ with issues misc/cronjobs/delete_patrons.pl with uses C4::Members GetBorrowersToExpunge which excludes patrons with current issues) --- tools/cleanborrowers.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/tools/cleanborrowers.pl +++ a/tools/cleanborrowers.pl @@ -159,12 +159,13 @@ $template->param( #writing the template output_html_with_http_headers $cgi, $cookie, $template->output; -sub _skip_borrowers_with_nonzero_balance { +sub _skip_borrowers_with_nonzero_balance_or_issues { my $borrowers = shift; my $balance; + mu $issues; @$borrowers = map { - (undef, undef, $balance) = GetMemberIssuesAndFines( $_->{borrowernumber} ); - ($balance != 0) ? (): ($_); + (undef, $issues, $balance) = GetMemberIssuesAndFines( $_->{borrowernumber} ); + ($balance != 0i || $issues!= 0) ? (): ($_); } @$borrowers; } --