@@ -, +, @@ ProcessOfflinePayment --- C4/Circulation.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -45,6 +45,7 @@ use C4::RotatingCollections qw(GetCollectionItemBranches); use Algorithm::CheckDigits; use Data::Dumper; +use Koha::Account; use Koha::DateUtils; use Koha::Calendar; use Koha::Items; @@ -3807,10 +3808,10 @@ sub ProcessOfflineIssue { sub ProcessOfflinePayment { my $operation = shift; - my $borrower = C4::Members::GetMemberDetails( undef, $operation->{cardnumber} ); # Get borrower from operation cardnumber + my $patron = Koha::Borrowers->find( { cardnumber => $operation->{cardnumber} }); my $amount = $operation->{amount}; - recordpayment( $borrower->{borrowernumber}, $amount ); + Koha::Account->new( { patron_id => $patron->id } )->pay( { amount => $amount } ); return "Success." } --