]> 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)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 13 Jul 2018 10:34:32 +0000 (10:34 +0000)
commit9bfb3bc3782dd6b516d0144074b57e55cbefae2e
tree36f0ac8291ebd06e74d092226bb830f7e7b24c2c
parent3e0aa0f3191a570dceb834e4036932d9af3c820e
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>
Koha/Account.pm
t/db_dependent/Koha/Account.t