From: Kyle Huckins Date: Mon, 16 Nov 2020 21:54:04 +0000 (+0000) Subject: lp1861319 Auto-Renew/OPAC Renewal Compatibility X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e5f46bb9920b039ec6de73e6d7dea2a1d2da5217;p=Evergreen.git lp1861319 Auto-Renew/OPAC Renewal Compatibility - Check global flag to determine which OU to check setting for. Signed-off-by: Kyle Huckins Signed-off-by: Jason Stephenson Signed-off-by: John Amundson Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm index be6917c70b..0d36dae8bf 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -1024,6 +1024,16 @@ sub mk_env { clean_ISO8601($patron->expire_date)); # An expired patron can renew with the assistance of an OUS. + if($self->opac_renewal or $self->auto_renewal) { + my $use_circ_lib = $self->editor->retrieve_config_global_flag('circ.opac_renewal.use_original_circ_lib'); + if($use_circ_lib and $U->is_true($use_circ_lib->enabled)) { + $self->circ_lib($self->circ->circ_lib); + } + else { + $self->circ_lib($patron->home_ou); + } + } + my $expire_setting = $U->ou_ancestor_setting_value($self->circ_lib, OILS_SETTING_ALLOW_RENEW_FOR_EXPIRED_PATRON); unless ($self->is_renewal and $expire_setting) { if(CORE::time > $expire->epoch) {