]> git.koha-community.org Git - koha.git/commit
Bug 20990: (QA follow-up) make outstanding_credits return the account lines only
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 2 Jul 2018 18:59:54 +0000 (15:59 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 2 Aug 2018 17:03:35 +0000 (18:03 +0100)
commit6ee9d8a888fa32a737116c15e9e5e5cae2f6653d
tree5c8ad8523e8a8727ad299e5720517b15082d8334
parentd5ab20c1c9a6feaba592700ed4b4be87ae6f8ff2
Bug 20990: (QA follow-up) make outstanding_credits 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_credits return the account
lines, code that used the $total value, will just use

    $lines->total_outstanding;

Tests are adjusted accordingly.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account.t
=> SUCCESS: Test pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9bfb3bc3782dd6b516d0144074b57e55cbefae2e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Account.pm
t/db_dependent/Koha/Account.t