]> git.koha-community.org Git - koha.git/commit
Bug 13841 - Returns via backdating or SIP2 can create new fines with an amount outsta...
authorKyle M Hall <kyle@bywatersolutions.com>
Mon, 16 Mar 2015 14:16:40 +0000 (10:16 -0400)
committerChris Cormack <chris@bigballofwax.co.nz>
Mon, 6 Apr 2015 08:24:58 +0000 (20:24 +1200)
commit98b9b0f9e5842518274695dc2afd44fc19fac826
tree8bca0fa8318131ae7d69099b4cace3e0b5a52f9b
parent62329207b90029e1d8d3895379d4b61f942648e2
Bug 13841 - Returns via backdating or SIP2 can create new fines with an amount outstanding of 0

Due to the way AddReturn and UpdateFine work, if you pass in a return
date to AddReturn, and that item has a calculated fine of 0, Koha will
insert the 0 amount fine into accountlines.

This is good behavior when we want to update an existing fine, but bad
behavior if there was no fine to begin with!

Test Plan:
1) Apply the unit test patch
2) prove t/db_dependent/Circulation.t
3) Note the test fails
4) Apply this patch
5) prove t/db_dependent/Circulation.t
6) Note the test passes

Signed-off-by: Jen DeMuth <jdemuth@roseville.ca.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Confirmed the problem in the staff interface and that the patch
fixes it. Also tested that fines still get calculated.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit faab00b88a155bdd7d5de35ef9226e134ce4b35b)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
C4/Overdues.pm