X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sql%2Falter2.4.sql;h=09ab36f7aeb2afd57152bda4e19704d3378076cd;hb=75a427435541f54e1834409dde4c9b02e81dc2de;hp=2e765bfb9916b8129bd09b33ad8ce9a02b219abb;hpb=19dce8c7be29e4cc8e7be92d044259348373d456;p=fa-stable.git diff --git a/sql/alter2.4.sql b/sql/alter2.4.sql index 2e765bfb..09ab36f7 100644 --- a/sql/alter2.4.sql +++ b/sql/alter2.4.sql @@ -257,3 +257,35 @@ CREATE TABLE `0_reflines` ( INSERT INTO `0_reflines` (`trans_type`, `pattern`, `default`) SELECT `type_id`, `next_reference`, 1 FROM `0_sys_types`; DROP TABLE `0_sys_types`; + +ALTER TABLE `0_cust_branch` DROP KEY `branch_code`; +ALTER TABLE `0_supp_trans` DROP KEY `SupplierID_2`; +ALTER TABLE `0_supp_trans` DROP KEY `type`; + +# RC1 +ALTER TABLE `0_locations` ADD COLUMN `fixed_asset` tinyint(1) NOT NULL DEFAULT '0' after `contact`; + +DROP TABLE IF EXISTS `0_stock_fa_class`; +CREATE TABLE `0_stock_fa_class` ( + `fa_class_id` varchar(20) NOT NULL DEFAULT '', + `parent_id` varchar(20) NOT NULL DEFAULT '', + `description` varchar(200) NOT NULL DEFAULT '', + `long_description` tinytext NOT NULL, + `depreciation_rate` double NOT NULL DEFAULT '0', + `inactive` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`fa_class_id`) +) ENGINE=InnoDB; + +ALTER TABLE `0_stock_master` ADD COLUMN `depreciation_method` char(1) NOT NULL DEFAULT 'S' AFTER `editable`; +ALTER TABLE `0_stock_master` ADD COLUMN `depreciation_rate` double NOT NULL DEFAULT '0' AFTER `depreciation_method`; +ALTER TABLE `0_stock_master` ADD COLUMN `depreciation_factor` double NOT NULL DEFAULT '0' AFTER `depreciation_rate`; +ALTER TABLE `0_stock_master` ADD COLUMN `depreciation_start` date NOT NULL DEFAULT '0000-00-00' AFTER `depreciation_factor`; +ALTER TABLE `0_stock_master` ADD COLUMN `depreciation_date` date NOT NULL DEFAULT '0000-00-00' AFTER `depreciation_start`; +ALTER TABLE `0_stock_master` ADD COLUMN `fa_class_id` varchar(20) NOT NULL DEFAULT '' AFTER `depreciation_date`; +ALTER TABLE `0_stock_master` CHANGE `actual_cost` `purchase_cost` double NOT NULL default 0; + +INSERT INTO `0_sys_prefs` VALUES ('default_loss_on_asset_disposal_act', 'glsetup.items', 'varchar', '15', '5660'); +INSERT INTO `0_sys_prefs` VALUES ('depreciation_period', 'glsetup.company', 'tinyint', '1', '1'); + +INSERT INTO `0_sys_prefs` VALUES ('use_manufacturing','setup.company', 'tinyint', 1, '1'); +INSERT INTO `0_sys_prefs` VALUES ('use_fixed_assets','setup.company', 'tinyint', 1, '1');