]> git.koha-community.org Git - koha.git/commit
Bug 13098: Tests for all _FixAccountForLostAndReturned use cases
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 12 Oct 2018 13:27:06 +0000 (10:27 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 31 Oct 2018 13:12:25 +0000 (13:12 +0000)
commit0fb422d8f9dba77edde17d18eeac6471c7245730
treebdfc2025ed0f8fd82629deeb18ef4457d0a75946
parent9acfe172574d91da9b6724c1b9e61a00a0017271
Bug 13098: Tests for all _FixAccountForLostAndReturned use cases

This patch introduces tests for all the use cases for
_FixAccountForLostAndReturned. This includes the following scenarios
before _FixAccountForLostAndReturned is called:

- Full write off (the original issue)
- Full payment
- No payment or write off
- Partial payment and partial write off

Written off debts (L lines) are just skipped, any kind of payment is
added and then refund as a single credit (CR). Amount outstanding is set
to 0. Offsets need to be generated for paper trail of this decisions.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Circulation.t
=> FAIL: Tests fail because _FixAccountForLostAndReturned is not doing
the right thing :-D

Followed test plan, patch works as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
t/db_dependent/Circulation.t