`user` smallint(6) unsigned NOT NULL default '0',
`stamp` timestamp NOT NULL,
`description` varchar(60) default NULL,
- `fiscal_year` int(11) NOT NULL,
+ `fiscal_year` int(11) NOT NULL default 0,
`gl_date` date NOT NULL default '0000-00-00',
`gl_seq` int(11) unsigned default NULL,
PRIMARY KEY (`id`),
DROP TABLE IF EXISTS `0_cust_allocations`;
CREATE TABLE IF NOT EXISTS `0_cust_allocations` (
`id` int(11) NOT NULL auto_increment,
+ `person_id` int(11) DEFAULT NULL,
`amt` double unsigned default NULL,
`date_alloc` date NOT NULL default '0000-00-00',
`trans_no_from` int(11) default NULL,
`trans_no_to` int(11) default NULL,
`trans_type_to` int(11) default NULL,
PRIMARY KEY (`id`),
- UNIQUE KEY (`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
+ UNIQUE KEY `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
KEY `From` (`trans_type_from`,`trans_no_from`),
KEY `To` (`trans_type_to`,`trans_no_to`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- Dumping data for table `0_fiscal_year`
--
-INSERT INTO `0_fiscal_year` VALUES(1, '2013-01-01', '2013-12-31', 0);
-INSERT INTO `0_fiscal_year` VALUES(2, '2014-01-01', '2014-12-31', 0);
+INSERT INTO `0_fiscal_year` VALUES(1, '2015-01-01', '2015-12-31', 0);
--
-- Table structure for table `0_gl_trans`
CREATE TABLE IF NOT EXISTS `0_gl_trans` (
`counter` int(11) NOT NULL auto_increment,
`type` smallint(6) NOT NULL default '0',
- `type_no` bigint(16) NOT NULL default '1',
+ `type_no` int(11) NOT NULL default '0',
`tran_date` date NOT NULL default '0000-00-00',
`account` varchar(15) NOT NULL default '',
`memo_` tinytext NOT NULL,
INSERT INTO `0_item_units` VALUES('each', 'Each', 0, 0);
INSERT INTO `0_item_units` VALUES('hr', 'Hours', 0, 0);
+-- Table structure for table `0_journal`
+
+DROP TABLE IF EXISTS `0_journal`;
+CREATE TABLE `0_journal` (
+ `type` smallint(6) NOT NULL DEFAULT '0',
+ `trans_no` int(11) NOT NULL DEFAULT '0',
+ `tran_date` date DEFAULT '0000-00-00',
+ `reference` varchar(60) NOT NULL DEFAULT '',
+ `source_ref` varchar(60) NOT NULL DEFAULT '',
+ `event_date` date DEFAULT '0000-00-00',
+ `doc_date` date NOT NULL DEFAULT '0000-00-00',
+ `currency` char(3) NOT NULL DEFAULT '',
+ `amount` double NOT NULL DEFAULT '0',
+ `rate` double NOT NULL DEFAULT '1',
+ PRIMARY KEY (`type`,`trans_no`),
+ KEY `tran_date` (`tran_date`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
+
+-- Data of table `0_journal`
+
+
-- --------------------------------------------------------
--
CREATE TABLE IF NOT EXISTS `0_loc_stock` (
`loc_code` char(5) NOT NULL default '',
`stock_id` char(20) NOT NULL default '',
- `reorder_level` bigint(20) NOT NULL default '0',
+ `reorder_level` double NOT NULL default '0',
PRIMARY KEY (`loc_code`,`stock_id`),
KEY `stock_id` (`stock_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
`id` smallint(6) unsigned NOT NULL auto_increment,
`type` tinyint(1) NOT NULL default '0',
`description` varchar(60) NOT NULL,
+ `usage` varchar(120) NULL,
`base_amount` double NOT NULL default '0',
`base_desc` varchar(60) default NULL,
`bal_type` tinyint(1) NOT NULL default '0',
-- Dumping data for table `0_quick_entries`
--
-INSERT INTO `0_quick_entries` VALUES(1, 1, 'Maintenance', 0, 'Amount', 0);
-INSERT INTO `0_quick_entries` VALUES(2, 4, 'Phone', 0, 'Amount', 0);
-INSERT INTO `0_quick_entries` VALUES(3, 2, 'Cash Sales', 0, 'Amount', 0);
+INSERT INTO `0_quick_entries` VALUES(1, 1, 'Maintenance', NULL, 0, 'Amount', 0);
+INSERT INTO `0_quick_entries` VALUES(2, 4, 'Phone', NULL, 0, 'Amount', 0);
+INSERT INTO `0_quick_entries` VALUES(3, 2, 'Cash Sales', 'Retail sales without invoice', 0, 'Amount', 0);
-- --------------------------------------------------------
`id` smallint(6) unsigned NOT NULL auto_increment,
`qid` smallint(6) unsigned NOT NULL,
`amount` double default '0',
+ `memo` tinytext NOT NULL,
`action` varchar(2) NOT NULL,
`dest_id` varchar(15) NOT NULL default '',
`dimension_id` smallint(6) unsigned default NULL,
-- Dumping data for table `0_quick_entry_lines`
--
-INSERT INTO `0_quick_entry_lines` VALUES(1, 1, 0, 't-', '1', 0, 0);
-INSERT INTO `0_quick_entry_lines` VALUES(2, 2, 0, 't-', '1', 0, 0);
-INSERT INTO `0_quick_entry_lines` VALUES(3, 3, 0, 't-', '1', 0, 0);
-INSERT INTO `0_quick_entry_lines` VALUES(4, 3, 0, '=', '4010', 0, 0);
-INSERT INTO `0_quick_entry_lines` VALUES(5, 1, 0, '=', '5765', 0, 0);
-INSERT INTO `0_quick_entry_lines` VALUES(6, 2, 0, '=', '5780', 0, 0);
+INSERT INTO `0_quick_entry_lines` VALUES(1, 1, 0, '', 't-', '1', 0, 0);
+INSERT INTO `0_quick_entry_lines` VALUES(2, 2, 0, '', 't-', '1', 0, 0);
+INSERT INTO `0_quick_entry_lines` VALUES(3, 3, 0, '', 't-', '1', 0, 0);
+INSERT INTO `0_quick_entry_lines` VALUES(4, 3, 0, '', '=', '4010', 0, 0);
+INSERT INTO `0_quick_entry_lines` VALUES(5, 1, 0, '', '=', '5765', 0, 0);
+INSERT INTO `0_quick_entry_lines` VALUES(6, 2, 0, '', '=', '5780', 0, 0);
-- --------------------------------------------------------
-- Table structure for table `0_stock_moves`
--
-DROP TABLE IF EXISTS `0_stock_moves`;
-CREATE TABLE IF NOT EXISTS `0_stock_moves` (
- `trans_id` int(11) NOT NULL auto_increment,
- `trans_no` int(11) NOT NULL default '0',
- `stock_id` char(20) NOT NULL default '',
- `type` smallint(6) NOT NULL default '0',
- `loc_code` char(5) NOT NULL default '',
- `tran_date` date NOT NULL default '0000-00-00',
- `person_id` int(11) default NULL,
- `price` double NOT NULL default '0',
- `reference` char(40) NOT NULL default '',
- `qty` double NOT NULL default '1',
- `discount_percent` double NOT NULL default '0',
- `standard_cost` double NOT NULL default '0',
- `visible` tinyint(1) NOT NULL default '1',
- PRIMARY KEY (`trans_id`),
+CREATE TABLE `0_stock_moves` (
+ `trans_id` int(11) NOT NULL AUTO_INCREMENT,
+ `trans_no` int(11) NOT NULL DEFAULT '0',
+ `stock_id` char(20) NOT NULL DEFAULT '',
+ `type` smallint(6) NOT NULL DEFAULT '0',
+ `loc_code` char(5) NOT NULL DEFAULT '',
+ `tran_date` date NOT NULL DEFAULT '0000-00-00',
+ `person_id` int(11) DEFAULT NULL,
+ `price` double NOT NULL DEFAULT '0',
+ `reference` char(40) NOT NULL DEFAULT '',
+ `qty` double NOT NULL DEFAULT '1',
+ `discount_percent` double NOT NULL DEFAULT '0',
+ `standard_cost` double NOT NULL DEFAULT '0',
+ PRIMARY KEY (`trans_id`),
KEY `type` (`type`,`trans_no`),
KEY `Move` (`stock_id`,`loc_code`,`tran_date`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
--
-- Dumping data for table `0_stock_moves`
--
`curr_code` char(3) default NULL,
`payment_terms` int(11) default NULL,
`tax_included` tinyint(1) NOT NULL default '0',
- `tax_algorithm` tinyint(1) NOT NULL default '1',
`dimension_id` int(11) default '0',
`dimension2_id` int(11) default '0',
`tax_group_id` int(11) default NULL,
DROP TABLE IF EXISTS `0_supp_allocations`;
CREATE TABLE IF NOT EXISTS `0_supp_allocations` (
`id` int(11) NOT NULL auto_increment,
+ `person_id` int(11) DEFAULT NULL,
`amt` double unsigned default NULL,
`date_alloc` date NOT NULL default '0000-00-00',
`trans_no_from` int(11) default NULL,
`trans_no_to` int(11) default NULL,
`trans_type_to` int(11) default NULL,
PRIMARY KEY (`id`),
- UNIQUE KEY (`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
+ UNIQUE KEY `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
KEY `From` (`trans_type_from`,`trans_no_from`),
KEY `To` (`trans_type_to`,`trans_no_to`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
`unit_price` double NOT NULL default '0',
`unit_tax` double NOT NULL default '0',
`memo_` tinytext,
+ `dimension_id` int(11) NOT NULL DEFAULT '0',
+ `dimension2_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
`rate` double NOT NULL default '1',
`alloc` double NOT NULL default '0',
`tax_included` tinyint(1) NOT NULL default '0',
- `tax_algorithm` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`type`,`trans_no`),
KEY `supplier_id` (`supplier_id`),
KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
`category` varchar(30) default NULL,
`type` varchar(20) NOT NULL default '',
`length` smallint(6) default NULL,
- `value` text NOT NULL,
+ `value` TEXT NOT NULL DEFAULT '',
PRIMARY KEY (`name`),
KEY `category` (`category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
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, '2');
+INSERT INTO `0_sys_prefs` VALUES('f_year', 'setup.company', 'int', 11, '1');
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');
`net_amount` double NOT NULL default '0',
`amount` double NOT NULL default '0',
`memo` tinytext,
+ `reg_type` tinyint(1) default NULL,
PRIMARY KEY (`id`),
KEY `Type_and_Number` (`trans_type`,`trans_no`),
KEY `tran_date` (`tran_date`)