From dbd41a9e6042cfcacd49b41d9a2cb15e00631366 Mon Sep 17 00:00:00 2001 From: gmc Date: Wed, 3 Nov 2010 19:58:18 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@18592 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm index e3f8ae3f53..36339a3e66 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm @@ -768,8 +768,7 @@ sub fund_exceeds_balance_percent { 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( -- 2.11.0