Bug 14101: Automatic renewals exactly on due date
authorHolger Meißner <h.meissner.82@web.de>
Tue, 2 Jun 2015 13:39:21 +0000 (15:39 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 20 Nov 2015 13:13:47 +0000 (10:13 -0300)
commita68d565622abefe7acb4aca617d1ca064bc2fd62
treeec1395b2f9253417ed85b4eec01bc5be9e824a3c
parent379329861d19b178f14d360d9fee2518a462d8a7
Bug 14101: Automatic renewals exactly on due date

If no value for 'no renewal before' is specified, automatic renewal now
falls back on the due date. Also 'no renewal before' can now be zero, so
both automatic and manual renewals can be delayed until due date.

Test plan:

1) Create some circulation rules with different settings for 'No renewal
   before' and 'Automatic renewal'. Both daily and hourly loans should
   work.

2) Try to renew both manually and automatically before and after a renewal
   should be possible. You can run misc/cronjobs/automatic_renewals.pl for
   automatic renewal.

3) Confirm that:
   * Both automatic and manual renewal with 'No renewal before' set
     to 0 do not happen before the due date (exact DateTime).
   * Manual renewal with 'No renewal before' set to undef (enter empty
     string) is unrestricted.
   * Automatic renewal with 'No renewal before' set to undef does not
     happen before the due date.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Circulation.pm
admin/smart-rules.pl