[open-ils-commits] r18591 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq (gmc)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Nov 3 15:56:48 EDT 2010
Author: gmc
Date: 2010-11-03 15:56:43 -0400 (Wed, 03 Nov 2010)
New Revision: 18591
Modified:
trunk/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: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm 2010-11-03 14:46:51 UTC (rev 18590)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm 2010-11-03 19:56:43 UTC (rev 18591)
@@ -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