@@ -, +, @@ --- misc/debarrBorrowersWithFines.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/misc/debarrBorrowersWithFines.pl +++ a/misc/debarrBorrowersWithFines.pl @@ -4,7 +4,8 @@ use Modern::Perl; use Getopt::Long; use C4::Accounts; -use Koha::Borrower::Debarments; +use Koha::Patrons; +use Koha::Patron::Debarments; my ($help, $confirm, $message, $expiration, $file); GetOptions( @@ -59,13 +60,13 @@ elsif (not($file) && not(length($message) > 20)) { exit 1; } -my $badBorrowers = C4::Accounts::GetAllBorrowersWithUnpaidFines(); +my $badBorrowers = Koha::Patrons->search->search_patrons_with_unpaid_fines(); $message = getMessageContent(); foreach my $bb (@$badBorrowers) { #Don't crash, but keep debarring as long as you can! eval { - my $success = Koha::Borrower::Debarments::AddDebarment({ + my $success = Koha::Patron::Debarments::AddDebarment({ borrowernumber => $bb->{borrowernumber}, expiration => $expiration, type => 'MANUAL', --