From e72f0b009f8e0bbfe4b42aba11aded7f0d2b8c41 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sun, 2 May 2021 23:37:48 +0200 Subject: [PATCH] bug 5429: balance sheet report sometimes prints lines with zero amounts. Fixed. --- gl/includes/db/gl_db_trans.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gl/includes/db/gl_db_trans.inc b/gl/includes/db/gl_db_trans.inc index eed94384..ebea4c1d 100644 --- a/gl/includes/db/gl_db_trans.inc +++ b/gl/includes/db/gl_db_trans.inc @@ -289,7 +289,7 @@ function get_gl_balance_from_to($from_date, $to_date, $account, $dimension=0, $d $result = db_query($sql, "The starting balance for account $account could not be calculated"); $row = db_fetch_row($result); - return $row[0]; + return round2($row[0], user_price_dec()); } //-------------------------------------------------------------------------------- @@ -313,7 +313,7 @@ function get_gl_trans_from_to($from_date, $to_date, $account, $dimension=0, $dim $result = db_query($sql, "Transactions for account $account could not be calculated"); $row = db_fetch_row($result); - return (float)$row[0]; + return round2($row[0], user_price_dec()); } //---------------------------------------------------------------------------------------------------- -- 2.30.2