[open-ils-commits] [GIT] Evergreen ILS branch master updated. 78d7ce8ee4e5670c2af963bee2445d041b2f651d

Evergreen Git git at git.evergreen-ils.org
Mon Feb 16 08:40:55 EST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  78d7ce8ee4e5670c2af963bee2445d041b2f651d (commit)
       via  43c8619f84ab200024f85f4e3cb5173b5c31a84e (commit)
       via  e65a76067dae8496ab56bb33f3ae4ef5a38fe026 (commit)
      from  d0455836db7bf38b286857682f929b7af8639e63 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 78d7ce8ee4e5670c2af963bee2445d041b2f651d
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Sat Feb 14 16:43:02 2015 -0500

    lp1413592: Release notes entry for no changes to fully-paid lost transactions
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/docs/RELEASE_NOTES_NEXT/Circulation/no-change-on-zero-balance-lost-LO.txt b/docs/RELEASE_NOTES_NEXT/Circulation/no-change-on-zero-balance-lost-LO.txt
new file mode 100644
index 0000000..983d5a9
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Circulation/no-change-on-zero-balance-lost-LO.txt
@@ -0,0 +1,16 @@
+Option to stop billing activity on zero-balance billed  transactions
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+A new setting is available via the Library Settings Editor to stop any billing
+activity on fully-paid lost or longoverdue transactions. When the _Do not
+change fines/fees on zero-balance LOST transaction_ setting is enabled, once a
+lost of long overdue transaction
+has been fully paid, no more lost fees will be voided or overdue fines restored
+or generated if the item is returned. The setting will reduce, though not
+eliminate, negative balances in the system.
+
+New Library Setting
++++++++++++++++++++
+ * Do not change fines/fees on zero-balance LOST transaction (circ.checkin.lost_zero_balance.do_not_change') - When an item has been marked lost and all
+fines/fees have been completely paid on the transaction, do not void or
+reinstate any fines/fees EVEN IF circ.void_lost_on_checkin and/or
+circ.void_lost_proc_fee_on_checkin are enabled.  

commit 43c8619f84ab200024f85f4e3cb5173b5c31a84e
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Feb 10 10:46:20 2015 -0500

    LP#1413592: Avoid generating fines in "consider zero balance closed" mode
    
    We will now also disable the behavior triggered by the "Lost Checkin
    Generates New Overdues" org setting when the new "Do not change fines/fees
    on zero-balance LOST transaction" org setting is enabled.  This is to follow
    the new rule that the new setting creates: a zero-balance LOST transaction is
    considered handled, and should not be changed by the system.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

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 6cfe056..b9737b8 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -3600,6 +3600,7 @@ sub checkin_handle_lost_or_longoverdue {
         # marked as long-overdue before it was done being regular-overdue
         if (!$args{is_longoverdue}) {
             $self->generate_lost_overdue(1) if 
+                !$dont_change and
                 $U->ou_ancestor_setting_value($circ_lib, 
                     OILS_SETTING_GENERATE_OVERDUE_ON_LOST_RETURN, 
                     $self->editor);

commit e65a76067dae8496ab56bb33f3ae4ef5a38fe026
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Jan 28 08:40:20 2015 -0500

    LP#1413592: Don't change lost/long-overdue fines/fees on zero-balance
    
    The situation that has been reported as the worst offender for creating
    negative balances for folks that do not want that to happen goes like this:
    
    1) Item is lost or goes long-overdue
    2) Fees/fines charged
    3) Said fees/fines are paid in full
    4) Item is found and returned
    4a) "Void fines and fees on lost item return" settings are enabled
    4b) "Reinstate overdue fines on lost item return" setting is enabled
    4c) System dutifully voids the lost fines/fees
    4d) System dutifully reinstates the overdue fines
    
    So we add an YAOUS to ensure that when a lost item is returned and the
    balance of the transaction is exactly $0, the lost fines and fees are not
    voided EVEN IF "void fines and fees on lost/long-overdue return" settings are
    enabled, and voided overdue fees are likewise not reinstated EVEN IF
    "restore overdue on lost/long-overdue return" settings are enabled.
    
    The reason for the second condition is that the point of this new setting is
    to have Evergreen consider zero-balance lost/long-overdue transactions as
    "handled", and that they should not automatically change.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

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 549e27e..6cfe056 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -3467,6 +3467,7 @@ sub checkin_handle_lost {
     return $self->checkin_handle_lost_or_longoverdue(
         circ_lib => $circ_lib,
         max_return => $max_return,
+        ous_dont_change_on_zero => 'circ.checkin.lost_zero_balance.do_not_change',
         ous_void_item_cost => OILS_SETTING_VOID_LOST_ON_CHECKIN,
         ous_void_proc_fee => OILS_SETTING_VOID_LOST_PROCESS_FEE_ON_CHECKIN,
         ous_restore_overdue => OILS_SETTING_RESTORE_OVERDUE_ON_LOST_RETURN,
@@ -3496,6 +3497,7 @@ sub checkin_handle_long_overdue {
         circ_lib => $circ_lib,
         max_return => $max_return,
         is_longoverdue => 1,
+        ous_dont_change_on_zero => 'circ.checkin.lost_zero_balance.do_not_change',
         ous_void_item_cost => 'circ.void_longoverdue_on_checkin',
         ous_void_proc_fee => 'circ.void_longoverdue_proc_fee_on_checkin',
         ous_restore_overdue => 'circ.restore_overdue_on_longoverdue_return',
@@ -3575,6 +3577,17 @@ sub checkin_handle_lost_or_longoverdue {
             "max return interval (or no interval is defined).  Proceeding ".
             "with fine/fee voiding, etc.");
 
+        my $dont_change = $U->ou_ancestor_setting_value(
+            $circ_lib, $args{ous_dont_change_on_zero}, $self->editor) || 0;
+
+        if ($dont_change) {
+            my ($obt) = $U->fetch_mbts($circ->id, $self->editor);
+            $dont_change = 0 if( $obt and $obt->balance_owed != 0 );
+        }
+
+        $logger->info("circulator: check-in of lost/lo item having a balance ".
+            "of zero, skipping fine/fee voiding and reinstatement.") if ($dont_change);
+
         my $void_cost = $U->ou_ancestor_setting_value(
             $circ_lib, $args{ous_void_item_cost}, $self->editor) || 0;
         my $void_proc_fee = $U->ou_ancestor_setting_value(
@@ -3593,11 +3606,11 @@ sub checkin_handle_lost_or_longoverdue {
         }
 
         $self->checkin_handle_lost_or_lo_now_found(
-            $args{void_cost_btype}, $args{is_longoverdue}) if $void_cost;
+            $args{void_cost_btype}, $args{is_longoverdue}) if ($void_cost and !$dont_change);
         $self->checkin_handle_lost_or_lo_now_found(
-            $args{void_fee_btype}, $args{is_longoverdue}) if $void_proc_fee;
+            $args{void_fee_btype}, $args{is_longoverdue}) if ($void_proc_fee and !$dont_change);
         $self->checkin_handle_lost_or_lo_now_found_restore_od($circ_lib) 
-            if $restore_od && ! $self->void_overdues;
+            if ! $dont_change && $restore_od && ! $self->void_overdues;
     }
 
     if ($circ_lib != $self->circ_lib) {
diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 0f0e9f3..4eaa6e6 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -5016,6 +5016,16 @@ INSERT into config.org_unit_setting_type
      'Use Lost and Paid copy status when lost or long overdue billing is paid',
      'coust', 'description'),
  'bool', null)
+
+,( 'circ.checkin.lost_zero_balance.do_not_change', 'circ',
+    oils_i18n_gettext('circ.checkin.lost_zero_balance.do_not_change',
+        'Do not change fines/fees on zero-balance LOST transaction',
+        'coust', 'label'),
+    oils_i18n_gettext('circ.checkin.lost_zero_balance.do_not_change',
+        'When an item has been marked lost and all fines/fees have been completely paid on the transaction, do not void or reinstate any fines/fees EVEN IF circ.void_lost_on_checkin and/or circ.void_lost_proc_fee_on_checkin are enabled',
+        'coust', 'description'),
+    'bool', null)
+
 ;
 
 UPDATE config.org_unit_setting_type
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXX.data.avoid_lost_void_on_zero_balance.sql b/Open-ILS/src/sql/Pg/upgrade/XXX.data.avoid_lost_void_on_zero_balance.sql
new file mode 100644
index 0000000..9934cc9
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXX.data.avoid_lost_void_on_zero_balance.sql
@@ -0,0 +1,15 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT into config.org_unit_setting_type
+( name, grp, label, description, datatype ) VALUES
+
+( 'circ.checkin.lost_zero_balance.do_not_change',
+  'circ',
+  'Do not change fines/fees on zero-balance LOST transaction',
+  'When an item has been marked lost and all fines/fees have been completely paid on the transaction, do not void or reinstate any fines/fees EVEN IF circ.void_lost_on_checkin and/or circ.void_lost_proc_fee_on_checkin are enabled',
+  'bool');
+
+COMMIT;
+

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/Application/Circ/Circulate.pm      |   20 +++++++++++++++++---
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   10 ++++++++++
 .../XXX.data.avoid_lost_void_on_zero_balance.sql   |   15 +++++++++++++++
 .../no-change-on-zero-balance-lost-LO.txt          |   16 ++++++++++++++++
 4 files changed, 58 insertions(+), 3 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXX.data.avoid_lost_void_on_zero_balance.sql
 create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/no-change-on-zero-balance-lost-LO.txt


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list