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.
Created attachment 29802 [details] [review] 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.
Created attachment 29803 [details] [review] 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.
Created attachment 29804 [details] [review] Bug 12596 - Unit Test
Created attachment 29805 [details] [review] 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.
Created attachment 29806 [details] [review] 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
Created attachment 29940 [details] [review] Bug 12596 - Unit Test Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 29941 [details] [review] 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
Created attachment 30049 [details] [review] [PASSED QA] Bug 12596 - Unit Test Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Created attachment 30050 [details] [review] [PASSED QA] 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.
Patches pushed to master. Thanks Kyle!
Pushed to 3.16.x for inclusion in 3.16.3.
Pushed to 3.14.x, will be in 3.14.13