]> 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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 30 Aug 2023 20:06:00 +0000 (10:06 -1000)
commit8fc3531e079d076a3212b2aa76525b5ca6e874bd
treefd3fa4e2eacdb3c4defcb5889b110949cdebafd3
parentb0fa0150b8a348c8b1ebab1308819e1ca1453675
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>
C4/Circulation.pm
t/db_dependent/Circulation.t