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=2 ;
-- Dumping data for table `0_cust_allocations`
--
-INSERT INTO `0_cust_allocations` VALUES(1, 37.68, '2014-06-21', 3, 11, 18, 10);
+INSERT INTO `0_cust_allocations` VALUES(1, 3, 37.68, '2014-06-21', 3, 11, 18, 10);
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `0_gl_trans` (
`counter` int(11) NOT NULL auto_increment,
`type` smallint(6) NOT NULL default '0',
- `type_no` `type_no` int(11) NOT NULL default '0',
+ `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', 1, 0);
+--- Structure of 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`
+
+
-- --------------------------------------------------------
--
`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);
-- --------------------------------------------------------
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=2 ;
-- Dumping data for table `0_supp_allocations`
--
-INSERT INTO `0_supp_allocations` VALUES(1, 3465, '2014-06-21', 4, 22, 7, 20);
+INSERT INTO `0_supp_allocations` VALUES(1, 2, 3465, '2014-06-21', 4, 22, 7, 20);
-- --------------------------------------------------------