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 <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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(