]> 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)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Thu, 31 Aug 2023 13:34:28 +0000 (13:34 +0000)
commitf9c1bc1f3485f8395d28f082eba3a1aeffc1e16e
treee6fe27d3f0e822fe7df27df840aae7b046a628c2
parent0723661c87392e30ac4a75539fe189f81f7dbc33
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>
(cherry picked from commit f8c474019d74c9fd608206daf3074a79c5737f12)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8fc3531e079d076a3212b2aa76525b5ca6e874bd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
C4/Circulation.pm