From c37e5eebe94960f1a838b1a4c3789f2ce1863d99 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Wed, 7 Dec 2016 02:41:08 +0000 Subject: [PATCH] Bug 15897 - Folowup Revert "Bug 15896: [QA Follow-up] Add accountlines_id parameter in paycollect" This reverts commit b6d5748c001febc5acd67938d12ba25844d11fbc. As this bug report no more uses the accounline_id parameter to identify account lines to pay in Koha::Account->pay, it should revert this, to use the new notation everywhere. Signed-off-by: Jonathan Druart --- members/paycollect.pl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/members/paycollect.pl b/members/paycollect.pl index b34dba6..b341e8c 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -112,12 +112,15 @@ if ( $total_paid and $total_paid ne '0.00' ) { } else { if ($individual) { if ( $total_paid == $total_due ) { - Koha::Account->new( { patron_id => $borrowernumber } )->pay({ - accountlines_id => $accountlines_id, - amount => $total_paid, - library_id => $branch, - note => $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.9.3