LP#980296: Add void of lost processing fee on claims returned.
authorJason Stephenson <jstephenson@mvlc.org>
Mon, 1 Oct 2012 21:10:25 +0000 (17:10 -0400)
committerBen Shum <bshum@biblio.org>
Tue, 13 Jan 2015 21:58:28 +0000 (16:58 -0500)
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.coust_void_lost_on_claimsreturned.sql

index 3e8dc15..8cbe1b6 100644 (file)
@@ -486,6 +486,17 @@ sub set_circ_claims_returned {
         return $result if ($result);
     }
 
+    # Check if the copy circ lib wants lost processing fees voided on
+    # claims returned.
+    if ($U->is_true($U->ou_ancestor_setting_value($copy->circ_lib, 'circ.void_lost_proc_fee_on_claimsreturned', $e))) {
+        my $result = OpenILS::Application::Circ::CircCommon->void_lost(
+            $e,
+            $circ,
+            4
+        );
+        return $result if ($result);
+    }
+
     $e->commit;
     return 1;
 }
index d518dad..f4bfed9 100644 (file)
@@ -95,7 +95,7 @@ sub void_lost {
             my $note = ($bill->note) ? $bill->note . "\n" : '';
             $bill->note("${note}System: VOIDED FOR LOST ITEM RETURNED");
 
-            return $e->die_event
+            return $e->event
                 unless $e->update_money_billing($bill);
         }
     }
index 107906d..cace52b 100644 (file)
@@ -14145,4 +14145,13 @@ INSERT INTO config.org_unit_setting_type
          oils_i18n_gettext('circ.void_lost_on_claimsreturned',
              'Void lost item billing when claims returned',
              'coust', 'description'),
+         'bool'),
+        ('circ.void_lost_proc_fee_on_claimsreturned',
+         'circ',
+         oils_i18n_gettext('circ.void_lost_proc_fee_on_claimsreturned',
+             'Void lost item processing fee when claims returned',
+             'coust', 'label'),
+         oils_i18n_gettext('circ.void_lost_proc_fee_on_claimsreturned',
+             'Void lost item processing fee when claims returned',
+             'coust', 'description'),
          'bool');
index 4180672..e811484 100644 (file)
@@ -13,6 +13,15 @@ INSERT INTO config.org_unit_setting_type
          oils_i18n_gettext('circ.void_lost_on_claimsreturned',
              'Void lost item billing when claims returned',
              'coust', 'description'),
+         'bool'),
+        ('circ.void_lost_proc_fee_on_claimsreturned',
+         'circ',
+         oils_i18n_gettext('circ.void_lost_proc_fee_on_claimsreturned',
+             'Void lost item processing fee when claims returned',
+             'coust', 'label'),
+         oils_i18n_gettext('circ.void_lost_proc_fee_on_claimsreturned',
+             'Void lost item processing fee when claims returned',
+             'coust', 'description'),
          'bool');
 
 COMMIT;