Bad balance in GL trans for chart en_US-demo.sql
[fa-stable.git] / inventory / inquiry / stock_movements.php
index 0f4b21daaf8c2a8220596379bd7dac48ebbe5117..e8591e8f57503ce57463b663a6b2cb3d966f0d27 100644 (file)
@@ -19,7 +19,9 @@ if ($use_date_picker)
 page(_("Inventory Item Movement"), false, false, "", $js);
 //------------------------------------------------------------------------------------------------
 
-if(get_post('ShowMoves')) 
+check_db_has_stock_items(_("There are no items defined in the system."));
+
+if(get_post('ShowMoves'))
 {
        $Ajax->activate('doc_tbl');
 }
@@ -134,7 +136,7 @@ while ($myrow = db_fetch($result))
                        $person = $cust_row['name'] . " (" . $cust_row['br_name'] . ")";
 
        }
-       elseif ($myrow["type"] == 25)
+       elseif ($myrow["type"] == 25 || $myrow['type'] == 21)
        {
                // get the supplier name
                $sql = "SELECT supp_name FROM ".TB_PREF."suppliers WHERE supplier_id = '" . $myrow["person_id"] . "'";