From e716299c32e201e2cf442a937a7fa7a6a47f6907 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 24 Feb 2016 15:51:07 +0000 Subject: [PATCH] Bug 15906 - Remove use of makepayment in paycollect.pl Test plan: 1) Apply this patch 2) Make a payment in full using the "Pay" button 3) Note payment succeeds Signed-off-by: Owen Leonard Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall --- members/paycollect.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/members/paycollect.pl b/members/paycollect.pl index 1cb6ad9a70..b341e8c856 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -112,8 +112,15 @@ if ( $total_paid and $total_paid ne '0.00' ) { } else { if ($individual) { if ( $total_paid == $total_due ) { - makepayment( $accountlines_id, $borrowernumber, $accountno, $total_paid, $user, - $branch, $payment_note ); + my $line = Koha::Account::Lines->find($accountlines_id); + Koha::Account->new( { patron_id => $borrowernumber } )->pay( + { + lines => [$line], + amount => $total_paid, + library_id => $branch, + note => $payment_note + } + ); } else { makepartialpayment( $accountlines_id, $borrowernumber, $accountno, $total_paid, $user, $branch, $payment_note ); -- 2.39.2