added support for voiding overdue fines on the most recent circ when marking an item...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 22 Oct 2009 13:41:14 +0000 (13:41 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 22 Oct 2009 13:41:14 +0000 (13:41 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14556 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ.pm

index d20b924..ea3694c 100644 (file)
@@ -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;