From: erickson Date: Thu, 22 Oct 2009 13:41:14 +0000 (+0000) Subject: added support for voiding overdue fines on the most recent circ when marking an item... X-Git-Tag: kcls-grey-screen-prod1~3230 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=795d29883bac27270f20a7f6ba7df9c6e8f55209;p=evergreen%2Fequinox.git added support for voiding overdue fines on the most recent circ when marking an item as damaged git-svn-id: svn://svn.open-ils.org/ILS/trunk@14556 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm index d20b924a48..ea3694c527 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm @@ -1097,6 +1097,9 @@ sub handle_mark_damaged { my $proc_fee = $U->ou_ancestor_setting_value( $owning_lib, 'circ.damaged_item_processing_fee', $e) || 0; + my $void_overdue = $U->ou_ancestor_setting_value( + $owning_lib, 'circ.damaged.void_ovedue', $e) || 0; + return undef unless $charge_price or $proc_fee; my $copy_price = ($charge_price) ? $U->get_copy_price($e, $copy) : 0; @@ -1116,6 +1119,13 @@ sub handle_mark_damaged { return $evt if $evt; } + # the assumption is that you would not void the overdues unless you + # were also charging for the item and/or applying a processing fee + if($void_overdue) { + my $evt = OpenILS::Application::Circ::CircCommon->void_overdues($e, $circ); + return $evt if $evt; + } + my $evt = OpenILS::Application::Circ::CircCommon->reopen_xact($e, $circ->id); return $evt if $evt;