Bug 15897 - Folowup Revert "Bug 15896: [QA Follow-up] Add accountlines_id parameter...
authorJosef Moravec <josef.moravec@gmail.com>
Wed, 7 Dec 2016 02:41:08 +0000 (02:41 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 10 Jan 2017 13:33:18 +0000 (13:33 +0000)
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 <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
members/paycollect.pl

index b34dba6..b341e8c 100755 (executable)
@@ -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 );