Changed structure of tag_association table
[fa-stable.git] / inventory / includes / db / items_codes_db.inc
index c349cb1ef09d7c0dffd5ac8b7e13ef8f235bcb23..d262ee7120f954ea0a09893c99243f5e2c7ee242 100644 (file)
@@ -1,4 +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>.
+***********************************************************************/
 /*
        item_codes table is used to store both multiply foreign codes and 
        sale kits definition.
@@ -15,7 +25,7 @@ function update_item_code($id, $item_code, $stock_id, $description, $category, $
                WHERE ";
                        
        if ($id == -1) // update with unknown $id i.e. from items table editor
-               "item_code = ".db_escape($item_code)
+               $sql .= "item_code = ".db_escape($item_code)
                ." AND stock_id = ".db_escape($stock_id);
        else
                $sql .= "id = $id";