`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`area_code`),
UNIQUE KEY `description` (`description`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`area_code`),
UNIQUE KEY `description` (`description`)
`filetype` varchar(60) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `type_no` (`type_no`,`trans_no`)
`filetype` varchar(60) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `type_no` (`type_no`,`trans_no`)
PRIMARY KEY (`id`),
KEY `Seq` (`fiscal_year`,`gl_date`,`gl_seq`),
KEY `Type_and_Number` (`type`,`trans_no`)
PRIMARY KEY (`id`),
KEY `Seq` (`fiscal_year`,`gl_date`,`gl_seq`),
KEY `Type_and_Number` (`type`,`trans_no`)
KEY `bank_account_name` (`bank_account_name`),
KEY `bank_account_number` (`bank_account_number`),
KEY `account_code` (`account_code`)
KEY `bank_account_name` (`bank_account_name`),
KEY `bank_account_number` (`bank_account_number`),
KEY `account_code` (`account_code`)
KEY `type` (`type`,`trans_no`),
KEY `bank_act_2` (`bank_act`,`reconciled`),
KEY `bank_act_3` (`bank_act`,`trans_date`)
KEY `type` (`type`,`trans_no`),
KEY `bank_act_2` (`bank_act`,`reconciled`),
KEY `bank_act_3` (`bank_act`,`trans_date`)
KEY `loc_code` (`loc_code`),
KEY `parent` (`parent`,`loc_code`),
KEY `workcentre_added` (`workcentre_added`)
KEY `loc_code` (`loc_code`),
KEY `parent` (`parent`,`loc_code`),
KEY `workcentre_added` (`workcentre_added`)
PRIMARY KEY (`counter`),
KEY `Type_and_Number` (`type`,`type_no`),
KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`)
PRIMARY KEY (`counter`),
KEY `Type_and_Number` (`type`,`type_no`),
KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`)
`ctype` tinyint(1) NOT NULL default '0',
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`cid`)
`ctype` tinyint(1) NOT NULL default '0',
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`cid`)
PRIMARY KEY (`account_code`),
KEY `account_name` (`account_name`),
KEY `accounts_by_type` (`account_type`,`account_code`)
PRIMARY KEY (`account_code`),
KEY `account_name` (`account_name`),
KEY `accounts_by_type` (`account_type`,`account_code`)
`date_` date default '0000-00-00',
`memo_` tinytext,
KEY `type_and_id` (`type`,`id`)
`date_` date default '0000-00-00',
`memo_` tinytext,
KEY `type_and_id` (`type`,`id`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `reason_description` (`reason_description`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `reason_description` (`reason_description`)
PRIMARY KEY (`id`),
UNIQUE KEY `type` (`type`,`action`),
UNIQUE KEY `type_2` (`type`,`name`)
PRIMARY KEY (`id`),
UNIQUE KEY `type` (`type`,`action`),
UNIQUE KEY `type_2` (`type`,`name`)
`entity_id` varchar(11) default NULL COMMENT 'entity id in related class table',
PRIMARY KEY (`id`),
KEY `type` (`type`,`action`)
`entity_id` varchar(11) default NULL COMMENT 'entity id in related class table',
PRIMARY KEY (`id`),
KEY `type` (`type`,`action`)
`auto_update` tinyint(1) NOT NULL default '1',
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`curr_abrev`)
`auto_update` tinyint(1) NOT NULL default '1',
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`curr_abrev`)
PRIMARY KEY (`id`),
KEY `From` (`trans_type_from`,`trans_no_from`),
KEY `To` (`trans_type_to`,`trans_no_to`)
PRIMARY KEY (`id`),
KEY `From` (`trans_type_from`,`trans_no_from`),
KEY `To` (`trans_type_to`,`trans_no_to`)
KEY `branch_code` (`branch_code`),
KEY `branch_ref` (`branch_ref`),
KEY `group_no` (`group_no`)
KEY `branch_code` (`branch_code`),
KEY `branch_ref` (`branch_ref`),
KEY `group_no` (`group_no`)
`payment_terms` int(11) default NULL,
PRIMARY KEY (`type`,`trans_no`),
KEY `debtor_no` (`debtor_no`,`branch_code`),
`payment_terms` int(11) default NULL,
PRIMARY KEY (`type`,`trans_no`),
KEY `debtor_no` (`debtor_no`,`branch_code`),
`date_` date NOT NULL default '0000-00-00',
PRIMARY KEY (`id`),
UNIQUE KEY `curr_code` (`curr_code`,`date_`)
`date_` date NOT NULL default '0000-00-00',
PRIMARY KEY (`id`),
UNIQUE KEY `curr_code` (`curr_code`,`date_`)
-INSERT INTO `0_fiscal_year` VALUES(1, '2008-01-01', '2008-12-31', 0);
-INSERT INTO `0_fiscal_year` VALUES(2, '2009-01-01', '2009-12-31', 0);
-INSERT INTO `0_fiscal_year` VALUES(3, '2010-01-01', '2010-12-31', 0);
+INSERT INTO `0_fiscal_year` VALUES(2, '2016-01-01', '2016-12-31', 0);
KEY `dimension2_id` (`dimension2_id`),
KEY `tran_date` (`tran_date`),
KEY `account_and_tran_date` (`account`,`tran_date`)
KEY `dimension2_id` (`dimension2_id`),
KEY `tran_date` (`tran_date`),
KEY `account_and_tran_date` (`account`,`tran_date`)
PRIMARY KEY (`id`),
KEY `delivery_date` (`delivery_date`),
KEY `purch_order_no` (`purch_order_no`)
PRIMARY KEY (`id`),
KEY `delivery_date` (`delivery_date`),
KEY `purch_order_no` (`purch_order_no`)
`quantity_inv` double NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `grn_batch_id` (`grn_batch_id`)
`quantity_inv` double NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `grn_batch_id` (`grn_batch_id`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `description` (`description`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `description` (`description`)
PRIMARY KEY (`id`),
UNIQUE KEY `stock_id` (`stock_id`,`item_code`),
KEY `item_code` (`item_code`)
PRIMARY KEY (`id`),
UNIQUE KEY `stock_id` (`stock_id`,`item_code`),
KEY `item_code` (`item_code`)
`item_tax_type_id` int(11) NOT NULL default '0',
`tax_type_id` int(11) NOT NULL default '0',
PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
`item_tax_type_id` int(11) NOT NULL default '0',
`tax_type_id` int(11) NOT NULL default '0',
PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
-INSERT INTO `0_item_units` VALUES('ea.', 'Each', 0, 0);
+INSERT INTO `0_item_units` VALUES('each', 'Each', 0, 0);
+INSERT INTO `0_item_units` VALUES('hr', 'Hours', 0, 0);
`contact` varchar(30) NOT NULL default '',
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`loc_code`)
`contact` varchar(30) NOT NULL default '',
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`loc_code`)
`reorder_level` bigint(20) NOT NULL default '0',
PRIMARY KEY (`loc_code`,`stock_id`),
KEY `stock_id` (`stock_id`)
`reorder_level` bigint(20) NOT NULL default '0',
PRIMARY KEY (`loc_code`,`stock_id`),
KEY `stock_id` (`stock_id`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`terms_indicator`),
UNIQUE KEY `terms` (`terms`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`terms_indicator`),
UNIQUE KEY `terms` (`terms`)
`price` double NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
`price` double NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
`printer` tinyint(3) unsigned default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `profile` (`profile`,`report`)
`printer` tinyint(3) unsigned default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `profile` (`profile`,`report`)
`conversion_factor` double NOT NULL default '1',
`supplier_description` char(50) NOT NULL default '',
PRIMARY KEY (`supplier_id`,`stock_id`)
`conversion_factor` double NOT NULL default '1',
`supplier_description` char(50) NOT NULL default '',
PRIMARY KEY (`supplier_id`,`stock_id`)
`tax_included` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`order_no`),
KEY `ord_date` (`ord_date`)
`tax_included` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`order_no`),
KEY `ord_date` (`ord_date`)
`quantity_received` double NOT NULL default '0',
PRIMARY KEY (`po_detail_item`),
KEY `order` (`order_no`,`po_detail_item`)
`quantity_received` double NOT NULL default '0',
PRIMARY KEY (`po_detail_item`),
KEY `order` (`order_no`,`po_detail_item`)
`bal_type` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `description` (`description`)
`bal_type` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `description` (`description`)
`last_sent` date NOT NULL default '0000-00-00',
PRIMARY KEY (`id`),
UNIQUE KEY `description` (`description`)
`last_sent` date NOT NULL default '0000-00-00',
PRIMARY KEY (`id`),
UNIQUE KEY `description` (`description`)
`reference` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`,`type`),
KEY `Type_and_Reference` (`type`,`reference`)
`reference` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`,`type`),
KEY `Type_and_Reference` (`type`,`reference`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`salesman_code`),
UNIQUE KEY `salesman_name` (`salesman_name`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`salesman_code`),
UNIQUE KEY `salesman_name` (`salesman_name`)
`payment_terms` int(11) default NULL,
`total` double NOT NULL default '0',
PRIMARY KEY (`trans_type`,`order_no`)
`payment_terms` int(11) default NULL,
`total` double NOT NULL default '0',
PRIMARY KEY (`trans_type`,`order_no`)
`discount_percent` double NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `sorder` (`trans_type`,`order_no`)
`discount_percent` double NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `sorder` (`trans_type`,`order_no`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `pos_name` (`pos_name`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `pos_name` (`pos_name`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `sales_type` (`sales_type`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `sales_type` (`sales_type`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`shipper_id`),
UNIQUE KEY `name` (`shipper_name`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`shipper_id`),
UNIQUE KEY `name` (`shipper_name`)
`result` tinyint(1) NOT NULL,
`msg` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
`result` tinyint(1) NOT NULL,
`msg` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
`dflt_no_sale` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`category_id`),
UNIQUE KEY `description` (`description`)
`dflt_no_sale` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`category_id`),
UNIQUE KEY `description` (`description`)
INSERT INTO `0_stock_category` VALUES(1, 'Components', 1, 'each', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0);
INSERT INTO `0_stock_category` VALUES(2, 'Charges', 1, 'each', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0);
INSERT INTO `0_stock_category` VALUES(3, 'Systems', 1, 'each', 'M', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0);
INSERT INTO `0_stock_category` VALUES(1, 'Components', 1, 'each', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0);
INSERT INTO `0_stock_category` VALUES(2, 'Charges', 1, 'each', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0);
INSERT INTO `0_stock_category` VALUES(3, 'Systems', 1, 'each', 'M', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0);
-INSERT INTO `0_stock_category` VALUES(4, 'Services', 1, 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0);
+INSERT INTO `0_stock_category` VALUES(4, 'Services', 1, 'hr', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0);
`no_sale` tinyint(1) NOT NULL default '0',
`editable` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`stock_id`)
`no_sale` tinyint(1) NOT NULL default '0',
`editable` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`stock_id`)
PRIMARY KEY (`trans_id`),
KEY `type` (`type`,`trans_no`),
KEY `Move` (`stock_id`,`loc_code`,`tran_date`)
PRIMARY KEY (`trans_id`),
KEY `type` (`type`,`trans_no`),
KEY `Move` (`stock_id`,`loc_code`,`tran_date`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`supplier_id`),
KEY `supp_ref` (`supp_ref`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`supplier_id`),
KEY `supp_ref` (`supp_ref`)
PRIMARY KEY (`id`),
KEY `From` (`trans_type_from`,`trans_no_from`),
KEY `To` (`trans_type_to`,`trans_no_to`)
PRIMARY KEY (`id`),
KEY `From` (`trans_type_from`,`trans_no_from`),
KEY `To` (`trans_type_to`,`trans_no_to`)
KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
KEY `type` (`type`),
KEY `tran_date` (`tran_date`)
KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
KEY `type` (`type`),
KEY `tran_date` (`tran_date`)
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('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, '3');
+INSERT INTO `0_sys_prefs` VALUES('f_year', 'setup.company', 'int', 11, '2');
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');
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');
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.3rc');
INSERT INTO `0_sys_prefs` VALUES('auto_curr_reval', 'setup.company', 'smallint', 6, '1');
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.3rc');
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, '');
`type_no` int(11) NOT NULL default '1',
`next_reference` varchar(100) NOT NULL default '',
PRIMARY KEY (`type_id`)
`type_no` int(11) NOT NULL default '1',
`next_reference` varchar(100) NOT NULL default '',
PRIMARY KEY (`type_id`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `type` (`type`,`name`)
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `type` (`type`,`name`)
`record_id` varchar(15) NOT NULL,
`tag_id` int(11) NOT NULL,
UNIQUE KEY `record_id` (`record_id`,`tag_id`)
`record_id` varchar(15) NOT NULL,
`tag_id` int(11) NOT NULL,
UNIQUE KEY `record_id` (`record_id`,`tag_id`)
`tax_type_id` int(11) NOT NULL default '0',
`rate` double NOT NULL default '0',
PRIMARY KEY (`tax_group_id`,`tax_type_id`)
`tax_type_id` int(11) NOT NULL default '0',
`rate` double NOT NULL default '0',
PRIMARY KEY (`tax_group_id`,`tax_type_id`)
`name` varchar(60) NOT NULL default '',
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`)
`name` varchar(60) NOT NULL default '',
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
KEY `Type_and_Number` (`trans_type`,`trans_no`),
KEY `tran_date` (`tran_date`)
PRIMARY KEY (`id`),
KEY `Type_and_Number` (`trans_type`,`trans_no`),
KEY `tran_date` (`tran_date`)
`show_codes` tinyint(1) NOT NULL default '0',
`show_hints` tinyint(1) NOT NULL default '0',
`last_visit_date` datetime default NULL,
`show_codes` tinyint(1) NOT NULL default '0',
`show_hints` tinyint(1) NOT NULL default '0',
`last_visit_date` datetime default NULL,
`graphic_links` tinyint(1) default '1',
`pos` smallint(6) default '1',
`graphic_links` tinyint(1) default '1',
`pos` smallint(6) default '1',
`rep_popup` tinyint(1) default '1',
`sticky_doc_date` tinyint(1) default '0',
`startup_tab` varchar(20) NOT NULL default '',
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `user_id` (`user_id`)
`rep_popup` tinyint(1) default '1',
`sticky_doc_date` tinyint(1) default '0',
`startup_tab` varchar(20) NOT NULL default '',
`inactive` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `user_id` (`user_id`)
`date_` date NOT NULL default '0000-00-00',
`memo_` tinytext NOT NULL,
UNIQUE KEY `id` (`type`,`id`)
`date_` date NOT NULL default '0000-00-00',
`memo_` tinytext NOT NULL,
UNIQUE KEY `id` (`type`,`id`)
`additional_costs` double NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `wo_ref` (`wo_ref`)
`additional_costs` double NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `wo_ref` (`wo_ref`)
`workcentre_id` int(11) default NULL,
PRIMARY KEY (`issue_no`),
KEY `workorder_id` (`workorder_id`)
`workcentre_id` int(11) default NULL,
PRIMARY KEY (`issue_no`),
KEY `workorder_id` (`workorder_id`)
`issue_id` int(11) default NULL,
`qty_issued` double default NULL,
PRIMARY KEY (`id`)
`issue_id` int(11) default NULL,
`qty_issued` double default NULL,
PRIMARY KEY (`id`)
`date_` date NOT NULL default '0000-00-00',
PRIMARY KEY (`id`),
KEY `workorder_id` (`workorder_id`)
`date_` date NOT NULL default '0000-00-00',
PRIMARY KEY (`id`),
KEY `workorder_id` (`workorder_id`)
`units_issued` double NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `workorder_id` (`workorder_id`)
`units_issued` double NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `workorder_id` (`workorder_id`)