]> git.koha-community.org Git - koha.git/commit
Bug 30362: Fix GetSoonestRenewDate to really return soonest renew date
authorDavid Cook <dcook@prosentient.com.au>
Thu, 20 Jul 2023 02:39:27 +0000 (02:39 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 30 Aug 2023 12:02:43 +0000 (09:02 -0300)
commitf8c474019d74c9fd608206daf3074a79c5737f12
tree24d00c4c2cf6aad20faedf5f54fc1f4f6d401139
parent95aa1c3da584c06ce439cc2d065e838790e7f6f9
Bug 30362: Fix GetSoonestRenewDate to really return soonest renew date

This change fixes GetSoonestRenewDate so that it returns the soonest
renew date as calculated using "No Renewal Before" and "NoRenewalBeforePrecision".
In the past, it would only return the soonest renew date if "$now" was
lesser than it, which would typically only happen when using an "exact"
precision rather than a "date" precision.

Test plan:
0. Apply the patch
1. prove t/db_dependent/Circulation.t

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Circulation.pm
t/db_dependent/Circulation.t