[open-ils-commits] r19641 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ (dbwells)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 8 14:16:02 EST 2011


Author: dbwells
Date: 2011-03-08 14:15:58 -0500 (Tue, 08 Mar 2011)
New Revision: 19641

Modified:
   branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
Log:
Address LP bug #724583, "Paying Bills with Patron Credit does not always decrease patron Credit"


Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm	2011-03-08 19:15:22 UTC (rev 19640)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm	2011-03-08 19:15:58 UTC (rev 19641)
@@ -322,11 +322,11 @@
         my $amount = $payment->amount;
         my $transid = $payment->xact;
         my $trans = $xacts{$transid};
+        # making payment with existing patron credit.
+        $credit -= $amount if $type eq 'credit_payment';
         if( (my $cred = ($trans->balance_owed - $amount)) <= 0 ) {
             # Any overpay on this transaction goes directly into patron
-            # credit making payment with existing patron credit.
-            $credit -= $amount if $type eq 'credit_payment';
-
+            # credit
             $cred = -$cred;
             $credit += $cred;
             my $circ = $e->retrieve_action_circulation($transid);



More information about the open-ils-commits mailing list