LP 1198465: Move overdue restore above lost void/adjustment
authorDan Wells <dbw2@calvin.edu>
Wed, 26 Feb 2014 22:49:49 +0000 (17:49 -0500)
committerDan Wells <dbw2@calvin.edu>
Wed, 5 Mar 2014 22:21:21 +0000 (17:21 -0500)
If a person loses something and has their overdues adjusted to zero,
then pays for part of it, then returns the item, the part they
actually paid should apply to the overdues.  In order for this to
happen, the overdues must exist *before* the lost fines are adjusted.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm

index 9e1d018..9a0b3d7 100644 (file)
@@ -3591,12 +3591,12 @@ sub checkin_handle_lost_or_longoverdue {
                     $self->editor);
         }
 
+        $self->checkin_handle_lost_or_lo_now_found_restore_od($circ_lib) 
+            if $restore_od && ! $self->void_overdues;
         $self->checkin_handle_lost_or_lo_now_found(
             $args{void_cost_btype}, $args{is_longoverdue}) if $void_cost;
         $self->checkin_handle_lost_or_lo_now_found(
             $args{void_fee_btype}, $args{is_longoverdue}) if $void_proc_fee;
-        $self->checkin_handle_lost_or_lo_now_found_restore_od($circ_lib) 
-            if $restore_od && ! $self->void_overdues;
     }
 
     if ($circ_lib != $self->circ_lib) {