]> git.koha-community.org Git - koha.git/commit
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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 29 Dec 2014 17:57:31 +0000 (18:57 +0100)
commitd9db936ad49efff64937e62b465da611e7143922
tree24e95697fc45d488f0ce456046c62e753286390f
parent7aa79b87132e45e1d8a7bbd8928560b663bb8d17
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>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 462c33aeb6a71eb8c5d9afa98d05b7f48b7d742f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Overdues.pm