[open-ils-commits] r18592 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Acq (gmc)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Nov 3 15:58:23 EDT 2010


Author: gmc
Date: 2010-11-03 15:58:18 -0400 (Wed, 03 Nov 2010)
New Revision: 18592

Modified:
   branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
Log:
flip sense of spending limit check

Testing showed users expecting that the limit would
be based on amount spent, not the amount available
to send.

Signed-off-by: Galen Charlton <gmc at esilibrary.com>


Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm	2010-11-03 19:56:43 UTC (rev 18591)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm	2010-11-03 19:58:18 UTC (rev 18592)
@@ -768,8 +768,7 @@
 
         if ( 
             $allocations == 0 || # if no allocations were ever made, assume we have hit the stop percent
-            ((($balance - $debit_amount) / $allocations) * 100) <
-                $fund->$method_name
+            (($allocations - $balance + $debit_amount) / $allocations) * 100) > $fund->$method_name
         ) {
             $logger->info("fund would hit a limit: " . $fund->id . ", $balance, $debit_amount, $allocations, $method_name");
             $e->event(



More information about the open-ils-commits mailing list