From: Rogan Hamby Date: Fri, 24 May 2019 16:06:51 +0000 (-0400) Subject: supress deposit billings and messages on renewal X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Frogan%2Flp1170794_deposit_bad_on_renew;p=working%2FEvergreen.git supress deposit billings and messages on renewal --- 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 73d69efda6..afbec602b5 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -1066,7 +1066,7 @@ sub do_permit { sub check_item_deposit_events { my $self = shift; $self->push_events(OpenILS::Event->new('ITEM_DEPOSIT_REQUIRED', payload => $self->copy)) - if $self->is_deposit and not $self->is_deposit_exempt; + if $self->is_deposit and not $self->is_deposit_exempt and not $self->is_renewal; $self->push_events(OpenILS::Event->new('ITEM_RENTAL_FEE_REQUIRED', payload => $self->copy)) if $self->is_rental and not $self->is_rental_exempt; } @@ -1081,6 +1081,7 @@ sub is_deposit_exempt { for my $grp (@$groups) { return 1 if $self->is_group_descendant($grp, $pid); } + return 1 if $self->is_renewal; return 0; } @@ -3032,7 +3033,7 @@ sub check_circ_deposit { }, {idlist => 1})->[0]; $self->push_events(OpenILS::Event->new( - 'ITEM_DEPOSIT_PAID', payload => $deposit)) if $deposit; + 'ITEM_DEPOSIT_PAID', payload => $deposit)) if $deposit and not $self->is_renewal; } sub reshelve_copy {