X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdashboard.inc;fp=includes%2Fdashboard.inc;h=9acfc45dd80b97e09b4b2560b4664ea7850c59d1;hb=dfc8254c800df90e357cbdf9087d28d8999bcafa;hp=b9799751a80782b156313e860aabe2aa98c8a5d4;hpb=b359f536c776828082fe16b4587edff08a75d089;p=fa-stable.git 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' "; }