Bug 12596 - Backdating returns with SpecifiyReturnDate causes fines for items not...
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 17 Jul 2014 14:57:06 +0000 (10:57 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 25 Jul 2014 12:57:50 +0000 (09:57 -0300)
commit07dad6bb8358133d2724836a41006e0d54ea6cbd
tree189533418c24973519979d5e16d7aaab227fbe63
parentcb0dc893a396179cb9e5eda03f5debc7a0fb842a
Bug 12596 - Backdating returns with SpecifiyReturnDate causes fines for items not overdue!

When using the backdating of returns feature, an item that is not
overdue is treated as being as many days overdue as it is *not* overdue.
This is due to the fact that _get_chargeable_units appears to return the
difference between the return date and the due date without
consideration the return date being earlier than the due date.

Test Plan:
1) Apply the unit test patch
2) prove t/db_dependent/Circulation.t
3) Note the failure
4) Apply the second patch
5) prove t/db_dependent/Circulation.t
6) Note there are no failures

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Fixes some badly named variables also

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
In order to test this, you need to activate SpecifyReturnDate.
I confirmed the problem and verified that the bug fixes it
by running the tests, but also by testing in staff.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Overdues.pm