From: Janusz Dobrowolski Date: Wed, 30 Dec 2015 14:46:52 +0000 (+0100) Subject: Removed obsolete stock_master.last_cost field. X-Git-Tag: v2.4.2~19^2~74 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=a221a215b970c0b50bcbb9647ac7ca6244a8d009;p=fa-stable.git Removed obsolete stock_master.last_cost field. --- diff --git a/fixed_assets/includes/fixed_assets_db.inc b/fixed_assets/includes/fixed_assets_db.inc index 14dc3860..911cdddf 100644 --- a/fixed_assets/includes/fixed_assets_db.inc +++ b/fixed_assets/includes/fixed_assets_db.inc @@ -53,8 +53,7 @@ function process_fixed_asset_depreciation($stock_id, $gl_rows, $refline, $memo_) $sql = "UPDATE ".TB_PREF."stock_master SET depreciation_date='".date2sql($cart->tran_date)."', - material_cost=".db_escape($new_cost).", - last_cost=".db_escape($old_cost)." + material_cost=".db_escape($new_cost)." WHERE stock_id=".db_escape($stock_id); db_query($sql,"The depreciation start date could not be updated"); diff --git a/inventory/includes/db/items_trans_db.inc b/inventory/includes/db/items_trans_db.inc index c97be95c..84ba75ae 100644 --- a/inventory/includes/db/items_trans_db.inc +++ b/inventory/includes/db/items_trans_db.inc @@ -33,7 +33,6 @@ function stock_cost_update($stock_id, $material_cost, $labour_cost, $overhead_co $sql = "UPDATE ".TB_PREF."stock_master SET material_cost=".db_escape($material_cost).", labour_cost=".db_escape($labour_cost).", overhead_cost=".db_escape($overhead_cost).", - last_cost=".db_escape($last_cost)." WHERE stock_id=".db_escape($stock_id); db_query($sql,"The cost details for the inventory item could not be updated"); diff --git a/sql/alter2.4rc1.sql b/sql/alter2.4rc1.sql index 47ba2a17..b220d62a 100644 --- a/sql/alter2.4rc1.sql +++ b/sql/alter2.4rc1.sql @@ -28,3 +28,5 @@ INSERT IGNORE INTO `0_sys_prefs` VALUES ALTER TABLE `0_wo_issue_items` ADD COLUMN `unit_cost` double NOT NULL default '0' AFTER `qty_issued`; ALTER TABLE `0_wo_requirements` CHANGE COLUMN `std_cost` `unit_cost` double NOT NULL default '0'; + +ALTER TABLE `0_stock_master` DROP COLUMN `last_cost`; diff --git a/sql/en_US-demo.sql b/sql/en_US-demo.sql index 560d354c..9e364d4e 100644 --- a/sql/en_US-demo.sql +++ b/sql/en_US-demo.sql @@ -1876,7 +1876,6 @@ CREATE TABLE IF NOT EXISTS `0_stock_master` ( `dimension_id` int(11) DEFAULT NULL, `dimension2_id` int(11) DEFAULT NULL, `purchase_cost` double NOT NULL DEFAULT '0', - `last_cost` double NOT NULL DEFAULT '0', `material_cost` double NOT NULL DEFAULT '0', `labour_cost` double NOT NULL DEFAULT '0', `overhead_cost` double NOT NULL DEFAULT '0', @@ -1898,12 +1897,12 @@ CREATE TABLE IF NOT EXISTS `0_stock_master` ( -- INSERT INTO `0_stock_master` VALUES -('101', '1', '1', 'iPad Air 2 16GB', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '200', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''), -('102', '1', '1', 'iPhone 6 64GB', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '150', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''), -('103', '1', '1', 'iPhone Cover Case', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '10', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''), -('201', '3', '1', 'AP Surf Set', '', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '360', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''), -('202', '4', '1', 'Maintenance', '', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', 'S', '0', '1', '0000-00-00', '0000-00-00', ''), -('301', '4', '1', 'Support', '', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''); +('101', '1', '1', 'iPad Air 2 16GB', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '200', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''), +('102', '1', '1', 'iPhone 6 64GB', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '150', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''), +('103', '1', '1', 'iPhone Cover Case', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '10', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''), +('201', '3', '1', 'AP Surf Set', '', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '360', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''), +('202', '4', '1', 'Maintenance', '', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', 'S', '0', '1', '0000-00-00', '0000-00-00', ''), +('301', '4', '1', 'Support', '', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''); -- -------------------------------------------------------- diff --git a/sql/en_US-new.sql b/sql/en_US-new.sql index a7d345ea..41e7a4db 100644 --- a/sql/en_US-new.sql +++ b/sql/en_US-new.sql @@ -1634,7 +1634,6 @@ CREATE TABLE IF NOT EXISTS `0_stock_master` ( `dimension_id` int(11) default NULL, `dimension2_id` int(11) default NULL, `purchase_cost` double NOT NULL default '0', - `last_cost` double NOT NULL default '0', `material_cost` double NOT NULL default '0', `labour_cost` double NOT NULL default '0', `overhead_cost` double NOT NULL default '0',