From: Janusz Dobrowolski Date: Fri, 20 Sep 2013 14:03:52 +0000 (+0200) Subject: Fixed bug in bank history check resulting in false negative balance errors. X-Git-Tag: 2.3-final~191 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=7bf9f5e2892a53d6eb8c0f98d142106da1025541;p=fa-stable.git Fixed bug in bank history check resulting in false negative balance errors. --- diff --git a/gl/includes/db/gl_db_bank_trans.inc b/gl/includes/db/gl_db_bank_trans.inc index 3bd65e23..601827b1 100644 --- a/gl/includes/db/gl_db_bank_trans.inc +++ b/gl/includes/db/gl_db_bank_trans.inc @@ -168,7 +168,7 @@ function check_bank_account_history($delta_amount, $bank_account, $date=null, $u if (!isset($balance) && isset($date)) return null; // unlimited account - if ($balance < $delta_amount) + if ($balance < -$delta_amount) return array('amount' => $balance, 'trans_date'=> $date); $balance += $delta_amount;