X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sql%2Fen_US-new.sql;h=b025189a685689c9c5afea160d2aceb9f686c7fb;hb=317210096efdbe5b375d5a0112d4f10a3c3c0b53;hp=f482ee658b11d60241cc9fe526df696eb52b1531;hpb=0e87db6a9397046b9bd89df588e31acc9be113e5;p=fa-stable.git diff --git a/sql/en_US-new.sql b/sql/en_US-new.sql index f482ee65..b025189a 100644 --- a/sql/en_US-new.sql +++ b/sql/en_US-new.sql @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Host: localhost --- Generation Time: Sep 26, 2014 at 11:37 AM +-- Generation Time: Sep 26, 2015 at 11:37 AM -- Server version: 5.0.51 -- PHP Version: 5.2.6-1+lenny2 @@ -250,13 +250,14 @@ INSERT INTO `0_chart_master` VALUES ('1205', '', 'Allowance for doubtful account INSERT INTO `0_chart_master` VALUES ('1510', '', 'Inventory', '2', 0); INSERT INTO `0_chart_master` VALUES ('1520', '', 'Stocks of Raw Materials', '2', 0); INSERT INTO `0_chart_master` VALUES ('1530', '', 'Stocks of Work In Progress', '2', 0); -INSERT INTO `0_chart_master` VALUES ('1540', '', 'Stocks of Finsihed Goods', '2', 0); +INSERT INTO `0_chart_master` VALUES ('1540', '', 'Stocks of Finished Goods', '2', 0); INSERT INTO `0_chart_master` VALUES ('1550', '', 'Goods Received Clearing account', '2', 0); INSERT INTO `0_chart_master` VALUES ('1820', '', 'Office Furniture & Equipment', '3', 0); INSERT INTO `0_chart_master` VALUES ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', 0); INSERT INTO `0_chart_master` VALUES ('1840', '', 'Vehicle', '3', 0); INSERT INTO `0_chart_master` VALUES ('1845', '', 'Accum. Amort. -Vehicle', '3', 0); INSERT INTO `0_chart_master` VALUES ('2100', '', 'Accounts Payable', '4', 0); +INSERT INTO `0_chart_master` VALUES ('2105', '', 'Deferred Income', '4', 0); INSERT INTO `0_chart_master` VALUES ('2110', '', 'Accrued Income Tax - Federal', '4', 0); INSERT INTO `0_chart_master` VALUES ('2120', '', 'Accrued Income Tax - State', '4', 0); INSERT INTO `0_chart_master` VALUES ('2130', '', 'Accrued Franchise Tax', '4', 0); @@ -446,7 +447,7 @@ INSERT INTO `0_crm_categories` VALUES (12, 'supplier', 'invoice', 'Invoices', 'I DROP TABLE IF EXISTS `0_crm_contacts`; CREATE TABLE IF NOT EXISTS `0_crm_contacts` ( `id` int(11) NOT NULL auto_increment, - `person_id` int(11) NOT NULL default '0' COMMENT 'foreign key to crm_contacts', + `person_id` int(11) NOT NULL default '0' COMMENT 'foreign key to crm_persons', `type` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories', `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories', `entity_id` varchar(11) default NULL COMMENT 'entity id in related class table', @@ -619,7 +620,7 @@ CREATE TABLE IF NOT EXISTS `0_debtor_trans` ( `trans_no` int(11) unsigned NOT NULL default '0', `type` smallint(6) unsigned NOT NULL default '0', `version` tinyint(1) unsigned NOT NULL default '0', - `debtor_no` int(11) unsigned default NULL, + `debtor_no` int(11) unsigned NOT NULL, `branch_code` int(11) NOT NULL default '-1', `tran_date` date NOT NULL default '0000-00-00', `due_date` date NOT NULL default '0000-00-00', @@ -639,7 +640,7 @@ CREATE TABLE IF NOT EXISTS `0_debtor_trans` ( `dimension2_id` int(11) NOT NULL default '0', `payment_terms` int(11) default NULL, `tax_included` tinyint(1) unsigned NOT NULL default '0', - PRIMARY KEY (`type`,`trans_no`), + PRIMARY KEY (`type`,`trans_no`,`debtor_no`), KEY `debtor_no` (`debtor_no`,`branch_code`), KEY `tran_date` (`tran_date`), KEY `order_` (`order_`) @@ -746,7 +747,7 @@ CREATE TABLE IF NOT EXISTS `0_fiscal_year` ( -- Dumping data for table `0_fiscal_year` -- -INSERT INTO `0_fiscal_year` VALUES (1, '2015-01-01', '2015-12-31', 0); +INSERT INTO `0_fiscal_year` VALUES (1, '2018-01-01', '2018-12-31', 0); -- -------------------------------------------------------- @@ -978,6 +979,7 @@ CREATE TABLE IF NOT EXISTS `0_locations` ( `fax` varchar(30) NOT NULL default '', `email` varchar(100) NOT NULL default '', `contact` varchar(30) NOT NULL default '', + `fixed_asset` tinyint(1) NOT NULL DEFAULT '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`loc_code`) ) ENGINE=InnoDB; @@ -986,7 +988,7 @@ CREATE TABLE IF NOT EXISTS `0_locations` ( -- Dumping data for table `0_locations` -- -INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '', 0); +INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '', 0, 0); -- -------------------------------------------------------- @@ -1032,6 +1034,7 @@ INSERT INTO `0_payment_terms` VALUES (1, 'Due 15th Of the Following Month', 0, 1 INSERT INTO `0_payment_terms` VALUES (2, 'Due By End Of The Following Month', 0, 30, 0); INSERT INTO `0_payment_terms` VALUES (3, 'Payment due within 10 days', 10, 0, 0); INSERT INTO `0_payment_terms` VALUES (4, 'Cash Only', 0, 0, 0); +INSERT INTO `0_payment_terms` VALUES (5, 'Prepaid', -1, 0, 0); -- -------------------------------------------------------- @@ -1275,7 +1278,7 @@ CREATE TABLE IF NOT EXISTS `0_recurrent_invoices` ( -- -------------------------------------------------------- -- ---- Table structure for table `0_reflines` +-- Table structure for table `0_reflines` -- DROP TABLE IF EXISTS `0_reflines`; @@ -1293,7 +1296,7 @@ CREATE TABLE `0_reflines` ( ) ENGINE=InnoDB AUTO_INCREMENT=23; -- ---- Dumping data for table `0_reflines` +-- Dumping data for table `0_reflines` -- INSERT INTO `0_reflines` VALUES @@ -1503,7 +1506,7 @@ CREATE TABLE IF NOT EXISTS `0_security_roles` ( -- INSERT INTO `0_security_roles` VALUES (1, 'Inquiries', 'Inquiries', '768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;773;774;2822;3073;3075;3076;3077;3329;3330;3331;3332;3333;3334;3335;5377;5633;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8450;8451;10497;10753;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15622;15623;15624;15625;15626;15873;15882;16129;16130;16131;16132;775', 0); -INSERT INTO `0_security_roles` VALUES (2, 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;10496;10752;11008;13056;13312;15616;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;526;769;770;771;772;773;774;2817;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5636;5637;5641;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8195;8196;8197;8449;8450;8451;10497;10753;10754;10755;10756;10757;11009;11010;11011;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15628;15625;15626;15627;15873;15874;15875;15876;15877;15878;15879;15880;15883;15881;15882;16129;16130;16131;16132;775', 0); +INSERT INTO `0_security_roles` VALUES (2, 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;9472;9728;10496;10752;11008;13056;13312;15616;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;526;769;770;771;772;773;774;2817;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5636;5637;5641;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8195;8196;8197;8449;8450;8451;9217;9218;9220;9473;9474;9475;9476;9729;10497;10753;10754;10755;10756;10757;11009;11010;11011;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15628;15625;15626;15627;15873;15874;15875;15876;15877;15878;15879;15880;15883;15881;15882;16129;16130;16131;16132;775', 0); INSERT INTO `0_security_roles` VALUES (3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873;775', 0); INSERT INTO `0_security_roles` VALUES (4, 'Stock Manager', 'Stock Manager', '768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '2818;2822;3073;3076;3077;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5889;5890;5891;8193;8194;8450;8451;10753;11009;11010;11012;13313;13315;15882;16129;16130;16131;16132;775', 0); INSERT INTO `0_security_roles` VALUES (5, 'Production Manager', 'Production Manager', '512;768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5640;5889;5890;5891;8193;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132;775', 0); @@ -1574,7 +1577,7 @@ CREATE TABLE IF NOT EXISTS `0_stock_category` ( `dflt_cogs_act` varchar(15) NOT NULL default '', `dflt_inventory_act` varchar(15) NOT NULL default '', `dflt_adjustment_act` varchar(15) NOT NULL default '', - `dflt_assembly_act` varchar(15) NOT NULL default '', + `dflt_wip_act` varchar(15) NOT NULL default '', `dflt_dim1` int(11) default NULL, `dflt_dim2` int(11) default NULL, `inactive` tinyint(1) NOT NULL default '0', @@ -1592,6 +1595,24 @@ INSERT INTO `0_stock_category` VALUES (1, 'Components', 1, 'each', 'B', '4010', INSERT INTO `0_stock_category` VALUES (2, 'Charges', 1, 'each', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 0); INSERT INTO `0_stock_category` VALUES (3, 'Systems', 1, 'each', 'M', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 0); INSERT INTO `0_stock_category` VALUES (4, 'Services', 1, 'hr', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 0); + +-- -------------------------------------------------------- + +-- +-- Structure of table `0_stock_fa_class` ### +-- + +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; + -- -------------------------------------------------------- -- @@ -1611,11 +1632,10 @@ CREATE TABLE IF NOT EXISTS `0_stock_master` ( `cogs_account` varchar(15) NOT NULL default '', `inventory_account` varchar(15) NOT NULL default '', `adjustment_account` varchar(15) NOT NULL default '', - `assembly_account` varchar(15) NOT NULL default '', + `wip_account` varchar(15) NOT NULL default '', `dimension_id` int(11) default NULL, `dimension2_id` int(11) default NULL, - `actual_cost` double NOT NULL default '0', - `last_cost` double NOT NULL default '0', + `purchase_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', @@ -1623,6 +1643,12 @@ CREATE TABLE IF NOT EXISTS `0_stock_master` ( `no_sale` tinyint(1) NOT NULL default '0', `no_purchase` tinyint(1) NOT NULL default '0', `editable` tinyint(1) NOT NULL default '0', + `depreciation_method` char(1) NOT NULL DEFAULT 'S', + `depreciation_rate` double NOT NULL DEFAULT '0', + `depreciation_factor` double NOT NULL DEFAULT '1', + `depreciation_start` date NOT NULL DEFAULT '0000-00-00', + `depreciation_date` date NOT NULL DEFAULT '0000-00-00', + `fa_class_id` varchar(20) NOT NULL DEFAULT '', PRIMARY KEY (`stock_id`) ) ENGINE=InnoDB; @@ -1761,7 +1787,7 @@ DROP TABLE IF EXISTS `0_supp_trans`; CREATE TABLE IF NOT EXISTS `0_supp_trans` ( `trans_no` int(11) unsigned NOT NULL default '0', `type` smallint(6) unsigned NOT NULL default '0', - `supplier_id` int(11) unsigned default NULL, + `supplier_id` int(11) unsigned NOT NULL, `reference` tinytext NOT NULL, `supp_reference` varchar(60) NOT NULL default '', `tran_date` date NOT NULL default '0000-00-00', @@ -1772,7 +1798,7 @@ CREATE TABLE IF NOT EXISTS `0_supp_trans` ( `rate` double NOT NULL default '1', `alloc` double NOT NULL default '0', `tax_included` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`type`,`trans_no`), + PRIMARY KEY (`type`,`trans_no`,`supplier_id`), KEY `supplier_id` (`supplier_id`), KEY `tran_date` (`tran_date`) ) ENGINE=InnoDB; @@ -1816,6 +1842,7 @@ INSERT INTO `0_sys_prefs` VALUES ('domicile', 'setup.company', 'varchar', 55, '' INSERT INTO `0_sys_prefs` VALUES ('curr_default', 'setup.company', 'char', 3, 'USD'); INSERT INTO `0_sys_prefs` VALUES ('use_dimension', 'setup.company', 'tinyint', 1, '1'); INSERT INTO `0_sys_prefs` VALUES ('f_year', 'setup.company', 'int', 11, '1'); +INSERT INTO `0_sys_prefs` VALUES ('shortname_name_in_list','setup.company', 'tinyint', 1, '0'); INSERT INTO `0_sys_prefs` VALUES ('no_item_list', 'setup.company', 'tinyint', 1, '0'); INSERT INTO `0_sys_prefs` VALUES ('no_customer_list', 'setup.company', 'tinyint', 1, '0'); INSERT INTO `0_sys_prefs` VALUES ('no_supplier_list', 'setup.company', 'tinyint', 1, '0'); @@ -1851,13 +1878,13 @@ INSERT INTO `0_sys_prefs` VALUES ('default_inventory_act', 'glsetup.items', 'var INSERT INTO `0_sys_prefs` VALUES ('default_cogs_act', 'glsetup.items', 'varchar', 15, '5010'); INSERT INTO `0_sys_prefs` VALUES ('default_adj_act', 'glsetup.items', 'varchar', 15, '5040'); INSERT INTO `0_sys_prefs` VALUES ('default_inv_sales_act', 'glsetup.items', 'varchar', 15, '4010'); -INSERT INTO `0_sys_prefs` VALUES ('default_assembly_act', 'glsetup.items', 'varchar', 15, '1530'); +INSERT INTO `0_sys_prefs` VALUES ('default_wip_act', 'glsetup.items', 'varchar', 15, '1530'); INSERT INTO `0_sys_prefs` VALUES ('default_workorder_required', 'glsetup.manuf', 'int', 11, '20'); -INSERT INTO `0_sys_prefs` VALUES ('version_id', 'system', 'varchar', 11, '2.4.0'); +INSERT INTO `0_sys_prefs` VALUES ('version_id', 'system', 'varchar', 11, '2.4.1'); INSERT INTO `0_sys_prefs` VALUES ('auto_curr_reval', 'setup.company', 'smallint', 6, '1'); INSERT INTO `0_sys_prefs` VALUES ('grn_clearing_act', 'glsetup.purchase', 'varchar', 15, '1550'); INSERT INTO `0_sys_prefs` VALUES ('bcc_email', 'setup.company', 'varchar', 100, ''); -INSERT INTO `0_sys_prefs` VALUES ('deferred_income_act', 'glsetup.sales', 'varchar', '15', ''); +INSERT INTO `0_sys_prefs` VALUES ('deferred_income_act', 'glsetup.sales', 'varchar', '15', '2105'); INSERT INTO `0_sys_prefs` VALUES ('gl_closing_date','setup.closing_date', 'date', 8, ''); INSERT INTO `0_sys_prefs` VALUES ('alternative_tax_include_on_docs','setup.company', 'tinyint', 1, '0'); INSERT INTO `0_sys_prefs` VALUES ('no_zero_lines_amount','glsetup.sales', 'tinyint', 1, '1'); @@ -1868,6 +1895,13 @@ INSERT INTO `0_sys_prefs` VALUES ('print_invoice_no','glsetup.sales', 'tinyint', INSERT INTO `0_sys_prefs` VALUES ('allow_negative_prices','glsetup.inventory', 'tinyint', 1, '1'); INSERT INTO `0_sys_prefs` VALUES ('print_item_images_on_quote','glsetup.inventory', 'tinyint', 1, '0'); INSERT INTO `0_sys_prefs` VALUES ('suppress_tax_rates','setup.company', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES ('company_logo_report','setup.company', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES ('barcodes_on_stock','setup.company', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES ('ref_no_auto_increase','setup.company', 'tinyint', 1, '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'); -- -------------------------------------------------------- @@ -2198,6 +2232,7 @@ CREATE TABLE IF NOT EXISTS `0_wo_issue_items` ( `stock_id` varchar(40) default NULL, `issue_id` int(11) default NULL, `qty_issued` double default NULL, + `unit_cost` double NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB; @@ -2239,7 +2274,7 @@ CREATE TABLE IF NOT EXISTS `0_wo_requirements` ( `stock_id` char(20) NOT NULL default '', `workcentre` int(11) NOT NULL default '0', `units_req` double NOT NULL default '1', - `std_cost` double NOT NULL default '0', + `unit_cost` double NOT NULL default '0', `loc_code` char(5) NOT NULL default '', `units_issued` double NOT NULL default '0', PRIMARY KEY (`id`),