From: Joe Hunt Date: Tue, 7 Nov 2017 13:26:49 +0000 (+0100) Subject: Top manufactored dashboard shows wrong statistics. Fixed X-Git-Tag: v2.4.3~6 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=dfc8254c800df90e357cbdf9087d28d8999bcafa Top manufactored dashboard shows wrong statistics. Fixed --- diff --git a/includes/dashboard.inc b/includes/dashboard.inc index b9799751..9acfc45d 100644 --- a/includes/dashboard.inc +++ b/includes/dashboard.inc @@ -272,7 +272,7 @@ function stock_top($today, $limit=10, $width="33", $type=0, &$pg=null) SUM(qty) AS qty FROM ".TB_PREF."stock_master AS s, ".TB_PREF."stock_moves AS m WHERE s.stock_id=m.stock_id "; if ($type == 1) - $sql .= "AND s.mb_flag='M' "; + $sql .= "AND s.mb_flag='M' AND m.qty > 0 "; elseif ($type == 2) $sql .= "AND s.mb_flag='F' "; }