From 29470e6909afcc958cce5920f28740220651697e Mon Sep 17 00:00:00 2001 From: gmc Date: Wed, 3 Nov 2010 19:56:43 +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/trunk@18591 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 c8db485ec3..6b5777f4fd 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