From: Joe Date: Wed, 7 Sep 2022 16:34:17 +0000 (+0200) Subject: Incorrect Journal Balance (sales invoice) when many decimals in tax and price. X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=48589f9ce6c51bb25e2fa8ed83c57d9dfa485e44 Incorrect Journal Balance (sales invoice) when many decimals in tax and price. --- diff --git a/gl/includes/db/gl_db_trans.inc b/gl/includes/db/gl_db_trans.inc index c614c092..a899f7b4 100644 --- a/gl/includes/db/gl_db_trans.inc +++ b/gl/includes/db/gl_db_trans.inc @@ -92,7 +92,7 @@ function add_gl_balance($type, $trans_id, $date_, $amount, $person_type_id=null, { $amount = round2($amount, user_price_dec()); - if (floatcmp($amount, 0)) + if ($amount != 0.0) { error_log(sprintf( _("Rounding error %s encountered for trans_type:%s,trans_no:%s"), $amount, $type, $trans_id)); return add_gl_trans($type, $trans_id, $date_, get_company_pref('exchange_diff_act'), 0, 0, "",