Bug 20946: (QA follow-up) make outstanding_debits return the account lines only
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 2 Jul 2018 15:05:55 +0000 (12:05 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 10 Jul 2018 06:42:36 +0000 (07:42 +0100)
commit5a0152f3c9ae0ed1db9ded710493ccfc374736cd
tree160a69fd28295564d3cbf43394d0fe2498c43375
parent1b29258df1de93b9eaa0c8d66767e8d78db87def
Bug 20946: (QA follow-up) make outstanding_debits return the account lines only

This patch was discussed with Jonathan on a QA conversation. It is
better to keep this simpler and more reusable. And is the right approach
in this case.

This patch makes Koha::Account::outstanding_debits return the account
lines, and a method is added to Koha::Account::Lines so the outstanding
amount is calculated on the resultset. This is done the dame way it was
done before, and the tests got adjusted.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Account.pm
Koha/Account/Lines.pm
members/pay.pl
members/paycollect.pl
t/db_dependent/Koha/Account.t
t/db_dependent/Koha/Account/Lines.t