]> git.koha-community.org Git - koha.git/commit
Bug 20997: Add Koha::Account::Line::apply method
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 26 Jun 2018 14:52:44 +0000 (11:52 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 10 Aug 2018 12:30:32 +0000 (12:30 +0000)
commit6f65887399a4bd276a5f83ed9d945e19e08036fd
treee08f18b4c82c257f9097bb9f6dac212c5b2650a4
parent46658a0e21594d1f7d76165d77297d4b5229fcab
Bug 20997: Add Koha::Account::Line::apply method

This patch implements the ->apply() method for account lines.
It will only work on credit lines, and raise an exception otherwise.

It implements ->is_credit() as well.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account/Lines.t
=> SUCCESS: Tests pass!
- Check all use cases are covered by the tests
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/Account/Line.pm
Koha/Exceptions/Account.pm [new file with mode: 0644]