From 2a10da6967503b4b0c82fd69cafc31febf0e1acd Mon Sep 17 00:00:00 2001 From: Rogan Hamby Date: Fri, 24 May 2019 12:06:51 -0400 Subject: [PATCH] supress deposit billings and messages on renewal --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 { -- 2.11.0