Bug 21896: Add Koha::Account::normalize_balance
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 27 Nov 2018 22:34:29 +0000 (19:34 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 10 Dec 2018 09:54:34 +0000 (09:54 +0000)
commit032da8e72555c6e441d225de3be9c92b6a478de1
treed38e54d1063fbaf35fe52097fe94a9e681369c26
parent09a8fa69ae85d32978c8555121104a73c3ddffde
Bug 21896: Add Koha::Account::normalize_balance

This patch adds the normalize_balance() method to Koha::Account. Its
purpose is to apply outstanding credits (i.e. manual ones ore remaining
amounts like in the case of refunds) to outstanding debts.

To test:
- Apply this patchset
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1176947b42342ca725020455361fe092255e4d04)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Account.pm