Changed notice msg to warnings and changed bg color for warning
[fa-stable.git] / inventory / inquiry / stock_movements.php
index 0f4b21daaf8c2a8220596379bd7dac48ebbe5117..161493d5c84dea1d1d4952121e8a0b5f2ad3f16d 100644 (file)
@@ -1,6 +1,14 @@
 <?php
-
-
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU Affero General Public License,
+       AGPL, as published by the Free Software Foundation, either version 
+       3 of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
 $page_security = 2;
 $path_to_root="../..";
 include_once($path_to_root . "/includes/session.inc");
@@ -19,7 +27,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 +144,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"] . "'";
@@ -173,16 +183,12 @@ while ($myrow = db_fetch($result))
 }
 //end of while loop
 
-// 2008-06-14. Always write this.
-//if ($total_in != 0 || $total_out != 0)
-//{
-       start_row("class='inquirybg'");
-    label_cell("<b>"._("Quantity on hand after") . " " . $_POST['BeforeDate']."</b>", "align=center colspan=5");
-    qty_cell($total_in, false, $dec);
-    qty_cell($total_out, false, $dec);
-    qty_cell($after_qty, false, $dec);
-    end_row();
-//}
+start_row("class='inquirybg'");
+label_cell("<b>"._("Quantity on hand after") . " " . $_POST['BeforeDate']."</b>", "align=center colspan=5");
+qty_cell($total_in, false, $dec);
+qty_cell($total_out, false, $dec);
+qty_cell($after_qty, false, $dec);
+end_row();
 
 end_table(1);
 div_end();