@@ -, +, @@ --- Koha/Account/Line.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/Koha/Account/Line.pm +++ a/Koha/Account/Line.pm @@ -191,7 +191,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( --