[Koha-bugs] [Bug 21759] Avoid manually setting amountoutstanding in _FixAccountForLostAndReturned

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 11 15:20:20 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21759

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #83038|0                           |1
        is obsolete|                            |

--- Comment #10 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 83040
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83040&action=edit
Bug 21759: Regression tests

This patch tests for a new behaviour in the _FixAccountForLostAndFound
method.

The method will now add the amountoutstanding value for the lost item
fee to the CR credit to be generated. This means that:
- If there's some remaining debt, the same amount  will be added to the
  CR credit and used to cancel that debt. The final amountoutstanding
  will be the same as before, but an offset will be generated as
  required.
- If the line was written off, the behaviour remains unchanged, so no
  offset.
- If the line was payed and/or written off in full only the payments are
  refund, preserving the current behaviour.

Only changes to the 'remaining debt' use cases on this tests are
expected.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Circulation.t
=> FAIL: Tests fail because the behaviour is not correct.

Note: some tests order changes are introduced to avoid calling
discard_changes twice

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list