Rerun of Manufactored Items, Dashboard. Produced Items.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 7 Nov 2017 14:27:29 +0000 (15:27 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 7 Nov 2017 14:27:29 +0000 (15:27 +0100)
includes/dashboard.inc

index 9acfc45dd80b97e09b4b2560b4664ea7850c59d1..bb6e6e258335fd231bd3bc75f987f302b663426e 100644 (file)
@@ -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' AND m.qty > 0 ";
+                       $sql .= "AND s.mb_flag='M' AND m.type <> ".ST_CUSTDELIVERY." AND m.type <> ".ST_CUSTCREDIT." ";
                elseif ($type == 2)     
                        $sql .= "AND s.mb_flag='F' ";
        }