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, $units='', $mb_flag='', $sales_account, $inventory_account,
+ $tax_type_id, $units, $mb_flag, $sales_account, $inventory_account,
$cogs_account, $adjustment_account, $wip_account, $dimension_id,
$dimension2_id, $no_sale, $editable, $no_purchase,
$depreciation_method = 'D', $depreciation_rate=100, $depreciation_factor=1,
return db_query($sql, "Failed in retreiving item list.");
}
+function get_item_code_id($stock_id)
+{
+ $sql = "SELECT ic.id
+ FROM ".TB_PREF."item_codes ic, ".TB_PREF."stock_master sm
+ WHERE ic.item_code = ".db_escape($stock_id)." AND ic.item_code = ic.stock_id AND
+ ic.stock_id = sm.stock_id";
+
+ $result = db_query($sql, "could not get item id");
+ $row = db_fetch_row($result);
+
+ return is_array($row) ? $row[0] : false;
+}
\ No newline at end of file