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@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18591
dcc99617-32d9-48b4-a31d-
7c20da2025e4
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(