@@ -, +, @@ --- Koha/Account.pm | 3 --- Koha/Account/Line.pm | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) --- a/Koha/Account.pm +++ a/Koha/Account.pm @@ -36,7 +36,6 @@ use Koha::Account::DebitTypes; use Koha::Exceptions; use Koha::Exceptions::Account; use Koha::Plugins; -use Koha::Patron::Debarments; =head1 NAME @@ -103,8 +102,6 @@ sub pay { } ); - Koha::Patron::Debarments::del_restrictions_after_payment({ borrowernumber => $self->{patron_id} }); - # NOTE: Pay historically always applied as much credit as it could to all # existing outstanding debits, whether passed specific debits or otherwise. if ( $payment->amountoutstanding ) { --- a/Koha/Account/Line.pm +++ a/Koha/Account/Line.pm @@ -29,6 +29,7 @@ use Koha::Database; use Koha::DateUtils qw( dt_from_string ); use Koha::Exceptions::Account; use Koha::Items; +use Koha::Patron::Debarments; use base qw(Koha::Object Koha::Object::Mixin::AdditionalFields); @@ -701,6 +702,8 @@ sub apply { } }); + Koha::Patron::Debarments::del_restrictions_after_payment({ borrowernumber => $self->borrowernumber }); + return $self; } --