From 275aa1c8d70339f13b7ec3f6c84c77fa5ff63b07 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 Signed-off-by: Kyle M Hall --- members/paycollect.pl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/members/paycollect.pl b/members/paycollect.pl index b34dba660a..b341e8c856 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.39.5