Bug 28688: Add renew option to membership_expiry.pl
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 14 Jun 2023 13:34:11 +0000 (13:34 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 10 Oct 2023 12:22:29 +0000 (09:22 -0300)
commit9022ec16c33a5d4caba193c0b8ba34aa61ca42dc
tree09af120f5eb072f2114f854b2646dad95fe4b0a0
parenta912709898952849ab9843fe31f9591af1d1b685
Bug 28688: Add renew option to membership_expiry.pl

Test plan:
[1] Pick an account to expire soon.
[2] Choose MembershipExpiryDaysNotice so that it will be selected.
    (Note: You can extend the selection with -before or -after.)
[3] Run misc/cronjobs/membership_expiry.pl -c -v -renew
[4] Check new expiry date in the notice. Does it correspond with
    enrollment period of category and pref BorrowerRenewalPeriodBase?
[5] If the patron category has an enrollment fee, check account too.
[6] Reset dateexpiry of this patron to original date.
[7] Run misc/cronjobs/membership_expiry.pl -c -v
[8] Check if you got an expiry notice instead and dateexpiry did not
    change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed $fees and $substitute in favor of notice approach

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
misc/cronjobs/membership_expiry.pl