From 22b18cc96d2a04f72ccbe1ea001648eab887f19e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 3 May 2019 12:59:16 +0100 Subject: [PATCH] Bug 22837: Update apply to accept an arrayref This patch update the signature of Koha::Account::Line->apply to accept an arrayref of debits to apply against a credit instead of requireing a Koha::Objects set. Signed-off-by: Liz Rea Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize --- Koha/Account/Line.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm index f4f9498ee1..f745dc13e2 100644 --- a/Koha/Account/Line.pm +++ b/Koha/Account/Line.pm @@ -204,7 +204,7 @@ sub apply { my $schema = Koha::Database->new->schema; $schema->txn_do( sub { - while ( my $debit = $debits->next ) { + for my $debit ( @{$debits} ) { unless ( $debit->is_debit ) { Koha::Exceptions::Account::IsNotDebit->throw( -- 2.39.5