@@ -, +, @@ --- C4/Circulation.pm | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -3621,10 +3621,14 @@ sub ProcessOfflineIssue { sub ProcessOfflinePayment { my $operation = shift; - my $borrower = C4::Members::GetMemberDetails( undef, $operation->{cardnumber} ); # Get borrower from operation cardnumber - my $amount = $operation->{amount}; - - recordpayment( $borrower->{borrowernumber}, $amount ); + AddCredit( + { + borrower => Koha::Database->new()->schema->resultset('Borrower') + ->single( { cardnumber => $operation->{cardnumber} } ), + amount => $operation->{amount}, + notes => 'via offline circulation', + } + ); return "Success." } --