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=0aed3930a4649827ef86816d4c324caa841a2cc1;p=working%2FEvergreen.git supress deposit billings and messages on renewal Signed-off-by: Rogan Hamby --- 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 d99d5259c4..046ff057e6 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -1071,7 +1071,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; } @@ -1086,6 +1086,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; } @@ -3037,7 +3038,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 {