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:
parent
16aa7d1c8a
commit
22b18cc96d
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue