Company setup option for printing server Time Zone on Reports Print-Out.
[fa-stable.git] / inventory / includes / db / items_db.inc
index 7a6bd4ff48bf8d15c2451467fd71a73169353f76..e336155254177289c0af78e8a2ac0448287beda6 100644 (file)
@@ -1,5 +1,14 @@
 <?php
-
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU General Public License, GPL, 
+       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/gpl-3.0.html>.
+***********************************************************************/
 function update_item($stock_id, $description, $long_description, $category_id, $tax_type_id,
        $sales_account, $inventory_account, $cogs_account, $adjustment_account,
        $assembly_account, $dimension_id, $dimension2_id)
@@ -19,7 +28,7 @@ function update_item($stock_id, $description, $long_description, $category_id, $
 
        db_query($sql, "The item could not be updated");
 
-       update_item_code(-1, $stock_id, $stock_id, $description, 1, 0);
+       update_item_code(-1, $stock_id, $stock_id, $description, $category_id, 1, 0);
 }
 
 function add_item($stock_id, $description, $long_description, $category_id, $tax_type_id, $units, $mb_flag,
@@ -41,7 +50,7 @@ function add_item($stock_id, $description, $long_description, $category_id, $tax
 
        db_query($sql, "The item locstock could not be added");
 
-       add_item_code($stock_id, $stock_id, $description, 1, 0);
+       add_item_code($stock_id, $stock_id, $description, $category_id, 1, 0);
 }
 
 function delete_item($stock_id)