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 <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2019-05-03 12:59:16 +01:00
parent 16aa7d1c8a
commit 22b18cc96d
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -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(