Bug 23051: (RM follow-up) Fix rebase error
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 6 Mar 2020 13:13:37 +0000 (13:13 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 6 Mar 2020 13:14:55 +0000 (13:14 +0000)
Looks like at some point during reworking/rebasing the signature for
Koha::Account::Line->apply changed and was then reverted but one case of
the reversion got lost.

The error was highlighted in the patrons_accounts credit api tests.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/REST/V1/Patrons/Account.pm

index aca65dd..4dd9ee2 100644 (file)
@@ -130,7 +130,7 @@ sub add_credit {
         my $outstanding_credit = $credit->amountoutstanding;
         if ($debits) {
             # pay them!
-            $outstanding_credit = $credit->apply({ debits => [ $debits->as_list ], offset_type => 'payment' })->{outstanding_amount};
+            $outstanding_credit = $credit->apply({ debits => [ $debits->as_list ], offset_type => 'payment' });
         }
 
         if ($outstanding_credit) {