Added missing company settings to upgrade script, fixed company settings refreshing...
[fa-stable.git] / sql / en_US-demo.sql
index c681eea953bfc2c3a944f5f840a10ff3c08d7c52..3effa593b6bb302af828d229c82e15e2b7cd89d3 100644 (file)
@@ -24,7 +24,7 @@ CREATE TABLE IF NOT EXISTS `0_areas` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`area_code`),
   UNIQUE KEY `description` (`description`)
-) ENGINE=MyISAM  AUTO_INCREMENT=2 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=2 ;
 
 --
 -- Dumping data for table `0_areas`
@@ -51,7 +51,7 @@ CREATE TABLE IF NOT EXISTS `0_attachments` (
   `filetype` varchar(60) NOT NULL default '',
   PRIMARY KEY  (`id`),
   KEY `type_no` (`type_no`,`trans_no`)
-) ENGINE=MyISAM AUTO_INCREMENT=1 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 --
 -- Dumping data for table `0_attachments`
@@ -72,13 +72,13 @@ CREATE TABLE IF NOT EXISTS `0_audit_trail` (
   `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`),
   KEY `Seq` (`fiscal_year`,`gl_date`,`gl_seq`),
   KEY `Type_and_Number` (`type`,`trans_no`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 --
 -- Dumping data for table `0_audit_trail`
@@ -110,7 +110,7 @@ CREATE TABLE IF NOT EXISTS `0_bank_accounts` (
   KEY `bank_account_name` (`bank_account_name`),
   KEY `bank_account_number` (`bank_account_number`),
   KEY `account_code` (`account_code`)
-) ENGINE=MyISAM  AUTO_INCREMENT=3 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=3 ;
 
 --
 -- Dumping data for table `0_bank_accounts`
@@ -144,7 +144,7 @@ CREATE TABLE IF NOT EXISTS `0_bank_trans` (
   KEY `type` (`type`,`trans_no`),
   KEY `bank_act_2` (`bank_act`,`reconciled`),
   KEY `bank_act_3` (`bank_act`,`trans_date`)
-) ENGINE=InnoDB  AUTO_INCREMENT=12 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=12 ;
 
 --
 -- Dumping data for table `0_bank_trans`
@@ -182,7 +182,7 @@ CREATE TABLE IF NOT EXISTS `0_bom` (
   KEY `loc_code` (`loc_code`),
   KEY `parent` (`parent`,`loc_code`),
   KEY `workcentre_added` (`workcentre_added`)
-) ENGINE=MyISAM  AUTO_INCREMENT=4 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=4 ;
 
 --
 -- Dumping data for table `0_bom`
@@ -209,7 +209,7 @@ CREATE TABLE IF NOT EXISTS `0_budget_trans` (
   `dimension2_id` int(11) default '0',
   PRIMARY KEY  (`id`),
   KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 --
 -- Dumping data for table `0_budget_trans`
@@ -229,7 +229,7 @@ CREATE TABLE IF NOT EXISTS `0_chart_class` (
   `ctype` tinyint(1) NOT NULL default '0',
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`cid`)
-) ENGINE=MyISAM;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_chart_class`
@@ -256,7 +256,7 @@ CREATE TABLE IF NOT EXISTS `0_chart_master` (
   PRIMARY KEY  (`account_code`),
   KEY `account_name` (`account_name`),
   KEY `accounts_by_type` (`account_type`,`account_code`)
-) ENGINE=MyISAM;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_chart_master`
@@ -357,7 +357,7 @@ CREATE TABLE IF NOT EXISTS `0_chart_types` (
   PRIMARY KEY  (`id`),
   KEY `name` (`name`),
   KEY `class_id` (`class_id`)
-) ENGINE=MyISAM ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
 
 --
 -- Dumping data for table `0_chart_types`
@@ -389,7 +389,7 @@ CREATE TABLE IF NOT EXISTS `0_comments` (
   `date_` date default '0000-00-00',
   `memo_` tinytext,
   KEY `type_and_id` (`type`,`id`)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_comments`
@@ -410,7 +410,7 @@ CREATE TABLE IF NOT EXISTS `0_credit_status` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `reason_description` (`reason_description`)
-) ENGINE=MyISAM  AUTO_INCREMENT=5 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=5 ;
 
 --
 -- Dumping data for table `0_credit_status`
@@ -438,7 +438,7 @@ CREATE TABLE IF NOT EXISTS `0_crm_categories` (
   PRIMARY KEY  (`id`),
   UNIQUE KEY `type` (`type`,`action`),
   UNIQUE KEY `type_2` (`type`,`name`)
-) ENGINE=InnoDB  AUTO_INCREMENT=13 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=13 ;
 
 --
 -- Dumping data for table `0_crm_categories`
@@ -472,7 +472,7 @@ CREATE TABLE IF NOT EXISTS `0_crm_contacts` (
   `entity_id` varchar(11) default NULL COMMENT 'entity id in related class table',
   PRIMARY KEY  (`id`),
   KEY `type` (`type`,`action`)
-) ENGINE=InnoDB  AUTO_INCREMENT=10 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=10 ;
 
 --
 -- Dumping data for table `0_crm_contacts`
@@ -510,7 +510,7 @@ CREATE TABLE IF NOT EXISTS `0_crm_persons` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   KEY `ref` (`ref`)
-) ENGINE=InnoDB  AUTO_INCREMENT=10 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=10 ;
 
 --
 -- Dumping data for table `0_crm_persons`
@@ -542,7 +542,7 @@ CREATE TABLE IF NOT EXISTS `0_currencies` (
   `auto_update` tinyint(1) NOT NULL default '1',
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`curr_abrev`)
-) ENGINE=MyISAM;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_currencies`
@@ -563,6 +563,7 @@ INSERT INTO `0_currencies` VALUES('DK Kroner', 'DKK', 'kr', 'Denmark', 'Ore', 1,
 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,
@@ -570,16 +571,16 @@ CREATE TABLE IF NOT EXISTS `0_cust_allocations` (
   `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  AUTO_INCREMENT=2 ;
+) 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);
 
 -- --------------------------------------------------------
 
@@ -612,7 +613,7 @@ CREATE TABLE IF NOT EXISTS `0_cust_branch` (
   KEY `branch_code` (`branch_code`),
   KEY `branch_ref` (`branch_ref`),
   KEY `group_no` (`group_no`)
-) ENGINE=MyISAM  AUTO_INCREMENT=4 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=4 ;
 
 --
 -- Dumping data for table `0_cust_branch`
@@ -649,7 +650,7 @@ CREATE TABLE IF NOT EXISTS `0_debtors_master` (
   PRIMARY KEY  (`debtor_no`),
   KEY `name` (`name`),
   UNIQUE KEY `debtor_ref` (`debtor_ref`)
-) ENGINE=MyISAM  AUTO_INCREMENT=4 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=4 ;
 
 --
 -- Dumping data for table `0_debtors_master`
@@ -694,7 +695,7 @@ CREATE TABLE IF NOT EXISTS `0_debtor_trans` (
   KEY `debtor_no` (`debtor_no`,`branch_code`),
   KEY `tran_date` (`tran_date`),
   KEY `order_` (`order_`)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_debtor_trans`
@@ -732,7 +733,7 @@ CREATE TABLE IF NOT EXISTS `0_debtor_trans_details` (
   PRIMARY KEY  (`id`),
   KEY `Transaction` (`debtor_trans_type`,`debtor_trans_no`),
   KEY (`src_id`)
-) ENGINE=InnoDB  AUTO_INCREMENT=9 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=9 ;
 
 --
 -- Dumping data for table `0_debtor_trans_details`
@@ -767,7 +768,7 @@ CREATE TABLE IF NOT EXISTS `0_dimensions` (
   KEY `date_` (`date_`),
   KEY `due_date` (`due_date`),
   KEY `type_` (`type_`)
-) ENGINE=InnoDB  AUTO_INCREMENT=3 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=3 ;
 
 --
 -- Dumping data for table `0_dimensions`
@@ -791,7 +792,7 @@ CREATE TABLE IF NOT EXISTS `0_exchange_rates` (
   `date_` date NOT NULL default '0000-00-00',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `curr_code` (`curr_code`,`date_`)
-) ENGINE=MyISAM  AUTO_INCREMENT=4 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=4 ;
 
 --
 -- Dumping data for table `0_exchange_rates`
@@ -816,7 +817,7 @@ CREATE TABLE IF NOT EXISTS `0_fiscal_year` (
   PRIMARY KEY  (`id`),
   UNIQUE KEY `begin` (`begin`),
   UNIQUE KEY `end` (`end`)
-) ENGINE=InnoDB  AUTO_INCREMENT=3 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=3 ;
 
 --
 -- Dumping data for table `0_fiscal_year`
@@ -833,7 +834,7 @@ DROP TABLE IF EXISTS `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,
@@ -848,7 +849,7 @@ CREATE TABLE IF NOT EXISTS `0_gl_trans` (
   KEY `dimension2_id` (`dimension2_id`),
   KEY `tran_date` (`tran_date`),
   KEY `account_and_tran_date` (`account`,`tran_date`)
-) ENGINE=InnoDB  AUTO_INCREMENT=84 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=84 ;
 
 --
 -- Dumping data for table `0_gl_trans`
@@ -952,16 +953,17 @@ CREATE TABLE IF NOT EXISTS `0_grn_batch` (
   `reference` varchar(60) NOT NULL default '',
   `delivery_date` date NOT NULL default '0000-00-00',
   `loc_code` varchar(5) default NULL,
+  `rate` double NULL default '1',
   PRIMARY KEY  (`id`),
   KEY `delivery_date` (`delivery_date`),
   KEY `purch_order_no` (`purch_order_no`)
-) ENGINE=InnoDB  AUTO_INCREMENT=2 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=2 ;
 
 --
 -- Dumping data for table `0_grn_batch`
 --
 
-INSERT INTO `0_grn_batch` VALUES(1, 2, 1, '1', '2014-06-21', 'DEF');
+INSERT INTO `0_grn_batch` VALUES(1, 2, 1, '1', '2014-06-21', 'DEF', '1');
 
 -- --------------------------------------------------------
 
@@ -980,7 +982,7 @@ CREATE TABLE IF NOT EXISTS `0_grn_items` (
   `quantity_inv` double NOT NULL default '0',
   PRIMARY KEY  (`id`),
   KEY `grn_batch_id` (`grn_batch_id`)
-) ENGINE=InnoDB  AUTO_INCREMENT=4 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=4 ;
 
 --
 -- Dumping data for table `0_grn_items`
@@ -1003,7 +1005,7 @@ CREATE TABLE IF NOT EXISTS `0_groups` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `description` (`description`)
-) ENGINE=MyISAM  AUTO_INCREMENT=4 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=4 ;
 
 --
 -- Dumping data for table `0_groups`
@@ -1032,7 +1034,7 @@ CREATE TABLE IF NOT EXISTS `0_item_codes` (
   PRIMARY KEY  (`id`),
   UNIQUE KEY `stock_id` (`stock_id`,`item_code`),
   KEY `item_code` (`item_code`)
-) ENGINE=MyISAM  AUTO_INCREMENT=6 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=6 ;
 
 --
 -- Dumping data for table `0_item_codes`
@@ -1058,7 +1060,7 @@ CREATE TABLE IF NOT EXISTS `0_item_tax_types` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `name` (`name`)
-) ENGINE=InnoDB  AUTO_INCREMENT=2 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=2 ;
 
 --
 -- Dumping data for table `0_item_tax_types`
@@ -1077,7 +1079,7 @@ CREATE TABLE IF NOT EXISTS `0_item_tax_type_exemptions` (
   `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`)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_item_tax_type_exemptions`
@@ -1098,7 +1100,7 @@ CREATE TABLE IF NOT EXISTS `0_item_units` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`abbr`),
   UNIQUE KEY `name` (`name`)
-) ENGINE=MyISAM;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_item_units`
@@ -1107,6 +1109,27 @@ CREATE TABLE IF NOT EXISTS `0_item_units` (
 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`
+
+
 -- --------------------------------------------------------
 
 --
@@ -1125,7 +1148,7 @@ CREATE TABLE IF NOT EXISTS `0_locations` (
   `contact` varchar(30) NOT NULL default '',
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`loc_code`)
-) ENGINE=MyISAM;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_locations`
@@ -1143,10 +1166,10 @@ DROP TABLE IF EXISTS `0_loc_stock`;
 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;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_loc_stock`
@@ -1171,7 +1194,7 @@ CREATE TABLE IF NOT EXISTS `0_movement_types` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `name` (`name`)
-) ENGINE=MyISAM  AUTO_INCREMENT=2 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=2 ;
 
 --
 -- Dumping data for table `0_movement_types`
@@ -1194,7 +1217,7 @@ CREATE TABLE IF NOT EXISTS `0_payment_terms` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`terms_indicator`),
   UNIQUE KEY `terms` (`terms`)
-) ENGINE=MyISAM  AUTO_INCREMENT=5 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=5 ;
 
 --
 -- Dumping data for table `0_payment_terms`
@@ -1220,7 +1243,7 @@ CREATE TABLE IF NOT EXISTS `0_prices` (
   `price` double NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
-) ENGINE=MyISAM  AUTO_INCREMENT=5 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=5 ;
 
 --
 -- Dumping data for table `0_prices`
@@ -1248,7 +1271,7 @@ CREATE TABLE IF NOT EXISTS `0_printers` (
   `timeout` tinyint(3) unsigned NOT NULL,
   PRIMARY KEY  (`id`),
   UNIQUE KEY `name` (`name`)
-) ENGINE=MyISAM  AUTO_INCREMENT=4 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=4 ;
 
 --
 -- Dumping data for table `0_printers`
@@ -1272,7 +1295,7 @@ CREATE TABLE IF NOT EXISTS `0_print_profiles` (
   `printer` tinyint(3) unsigned default NULL,
   PRIMARY KEY  (`id`),
   UNIQUE KEY `profile` (`profile`,`report`)
-) ENGINE=MyISAM  AUTO_INCREMENT=10 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=10 ;
 
 --
 -- Dumping data for table `0_print_profiles`
@@ -1303,7 +1326,7 @@ CREATE TABLE IF NOT EXISTS `0_purch_data` (
   `conversion_factor` double NOT NULL default '1',
   `supplier_description` char(50) NOT NULL default '',
   PRIMARY KEY  (`supplier_id`,`stock_id`)
-) ENGINE=MyISAM;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_purch_data`
@@ -1335,7 +1358,7 @@ CREATE TABLE IF NOT EXISTS `0_purch_orders` (
   `tax_included` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`order_no`),
   KEY `ord_date` (`ord_date`)
-) ENGINE=InnoDB  AUTO_INCREMENT=3 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=3 ;
 
 --
 -- Dumping data for table `0_purch_orders`
@@ -1366,7 +1389,7 @@ CREATE TABLE IF NOT EXISTS `0_purch_order_details` (
   PRIMARY KEY  (`po_detail_item`),
   KEY `order` (`order_no`,`po_detail_item`),
   KEY `itemcode` (`item_code`)
-) ENGINE=InnoDB  AUTO_INCREMENT=6 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=6 ;
 
 --
 -- Dumping data for table `0_purch_order_details`
@@ -1389,20 +1412,21 @@ CREATE TABLE IF NOT EXISTS `0_quick_entries` (
   `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',
   PRIMARY KEY  (`id`),
   KEY `description` (`description`)
-) ENGINE=MyISAM  AUTO_INCREMENT=4 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=4 ;
 
 --
 -- 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);
 
 -- --------------------------------------------------------
 
@@ -1415,24 +1439,25 @@ CREATE TABLE IF NOT EXISTS `0_quick_entry_lines` (
   `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,
   `dimension2_id` smallint(6) unsigned default NULL,
   PRIMARY KEY  (`id`),
   KEY `qid` (`qid`)
-) ENGINE=MyISAM  AUTO_INCREMENT=8 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=8 ;
 
 --
 -- 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);
 
 -- --------------------------------------------------------
 
@@ -1454,7 +1479,7 @@ CREATE TABLE IF NOT EXISTS `0_recurrent_invoices` (
   `last_sent` date NOT NULL default '0000-00-00',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `description` (`description`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 --
 -- Dumping data for table `0_recurrent_invoices`
@@ -1474,7 +1499,7 @@ CREATE TABLE IF NOT EXISTS `0_refs` (
   `reference` varchar(100) NOT NULL default '',
   PRIMARY KEY  (`id`,`type`),
   KEY `Type_and_Reference` (`type`,`reference`)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_refs`
@@ -1502,7 +1527,7 @@ CREATE TABLE IF NOT EXISTS `0_salesman` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`salesman_code`),
   UNIQUE KEY `salesman_name` (`salesman_name`)
-) ENGINE=MyISAM  AUTO_INCREMENT=2 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=2 ;
 
 --
 -- Dumping data for table `0_salesman`
@@ -1542,7 +1567,7 @@ CREATE TABLE IF NOT EXISTS `0_sales_orders` (
   `prep_amount` double NOT NULL DEFAULT '0',
   `alloc` double NOT NULL DEFAULT '0',
   PRIMARY KEY  (`trans_type`,`order_no`)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_sales_orders`
@@ -1575,7 +1600,7 @@ CREATE TABLE IF NOT EXISTS `0_sales_order_details` (
   PRIMARY KEY  (`id`),
   KEY `sorder` (`trans_type`,`order_no`),
   KEY `stkcode` (`stk_code`)
-) ENGINE=InnoDB  AUTO_INCREMENT=6 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=6 ;
 
 --
 -- Dumping data for table `0_sales_order_details`
@@ -1604,7 +1629,7 @@ CREATE TABLE IF NOT EXISTS `0_sales_pos` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `pos_name` (`pos_name`)
-) ENGINE=MyISAM  AUTO_INCREMENT=2 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=2 ;
 
 --
 -- Dumping data for table `0_sales_pos`
@@ -1627,7 +1652,7 @@ CREATE TABLE IF NOT EXISTS `0_sales_types` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `sales_type` (`sales_type`)
-) ENGINE=MyISAM  AUTO_INCREMENT=3 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=3 ;
 
 --
 -- Dumping data for table `0_sales_types`
@@ -1652,7 +1677,7 @@ CREATE TABLE IF NOT EXISTS `0_security_roles` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `role` (`role`)
-) ENGINE=MyISAM  AUTO_INCREMENT=11 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=11 ;
 
 --
 -- Dumping data for table `0_security_roles`
@@ -1686,7 +1711,7 @@ CREATE TABLE IF NOT EXISTS `0_shippers` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`shipper_id`),
   UNIQUE KEY `name` (`shipper_name`)
-) ENGINE=MyISAM  AUTO_INCREMENT=2 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=2 ;
 
 --
 -- Dumping data for table `0_shippers`
@@ -1707,7 +1732,7 @@ CREATE TABLE IF NOT EXISTS `0_sql_trail` (
   `result` tinyint(1) NOT NULL,
   `msg` varchar(255) NOT NULL,
   PRIMARY KEY  (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=1 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 --
 -- Dumping data for table `0_sql_trail`
@@ -1739,7 +1764,7 @@ CREATE TABLE IF NOT EXISTS `0_stock_category` (
   `dflt_no_purchase` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`category_id`),
   UNIQUE KEY `description` (`description`)
-) ENGINE=MyISAM  AUTO_INCREMENT=5 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=5 ;
 
 --
 -- Dumping data for table `0_stock_category`
@@ -1782,7 +1807,7 @@ CREATE TABLE IF NOT EXISTS `0_stock_master` (
   `no_purchase` tinyint(1) NOT NULL default '0',
   `editable` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`stock_id`)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_stock_master`
@@ -1818,7 +1843,7 @@ CREATE TABLE IF NOT EXISTS `0_stock_moves` (
   PRIMARY KEY  (`trans_id`),
   KEY `type` (`type`,`trans_no`),
   KEY `Move` (`stock_id`,`loc_code`,`tran_date`)
-) ENGINE=InnoDB  AUTO_INCREMENT=37 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=37 ;
 
 --
 -- Dumping data for table `0_stock_moves`
@@ -1882,7 +1907,6 @@ CREATE TABLE IF NOT EXISTS `0_suppliers` (
   `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,
@@ -1894,15 +1918,15 @@ CREATE TABLE IF NOT EXISTS `0_suppliers` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`supplier_id`),
   KEY `supp_ref` (`supp_ref`)
-) ENGINE=MyISAM  AUTO_INCREMENT=4 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=4 ;
 
 --
 -- Dumping data for table `0_suppliers`
 --
 
-INSERT INTO `0_suppliers` VALUES(1, 'Junk Beer ApS', 'Junk Beer', 'Mailing 1\nMailing 2\nMailing 3', 'Address 1\nAddress 2\nAddress 3', '123456', 'Contact', '111', '', '', 'DKK', 3, 0, 1, 1, 0, 2, 1000, '', '2100', '5060', 'A supplier with junk beers.', 0);
-INSERT INTO `0_suppliers` VALUES(2, 'Lucky Luke Inc.', 'Lucky Luke', 'Mailing 1\nMailing 2\nMailing 3', 'Address 1\nAddress 2\nAddress 3', '654321', 'Luke', '333', '', '', 'USD', 3, 0, 1, 0, 0, 1, 500, '', '2100', '5060', '', 0);
-INSERT INTO `0_suppliers` VALUES(3, 'Money Makers Ltd.', 'Money Makers', 'Mailing 1\nMailing 2\nMailing 3', 'Address 1\nAddress 2\nAddress 3', '987654', 'Makers', '222', '', '', 'GBP', 3, 0, 1, 0, 0, 2, 300, '', '2100', '5060', '', 0);
+INSERT INTO `0_suppliers` VALUES(1, 'Junk Beer ApS', 'Junk Beer', 'Mailing 1\nMailing 2\nMailing 3', 'Address 1\nAddress 2\nAddress 3', '123456', 'Contact', '111', '', '', 'DKK', 3, 0, 1, 0, 2, 1000, '', '2100', '5060', 'A supplier with junk beers.', 0);
+INSERT INTO `0_suppliers` VALUES(2, 'Lucky Luke Inc.', 'Lucky Luke', 'Mailing 1\nMailing 2\nMailing 3', 'Address 1\nAddress 2\nAddress 3', '654321', 'Luke', '333', '', '', 'USD', 3, 0, 0, 0, 1, 500, '', '2100', '5060', '', 0);
+INSERT INTO `0_suppliers` VALUES(3, 'Money Makers Ltd.', 'Money Makers', 'Mailing 1\nMailing 2\nMailing 3', 'Address 1\nAddress 2\nAddress 3', '987654', 'Makers', '222', '', '', 'GBP', 3, 0, 0, 0, 2, 300, '', '2100', '5060', '', 0);
 
 -- --------------------------------------------------------
 
@@ -1913,6 +1937,7 @@ INSERT INTO `0_suppliers` VALUES(3, 'Money Makers Ltd.', 'Money Makers', 'Mailin
 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,
@@ -1920,16 +1945,16 @@ CREATE TABLE IF NOT EXISTS `0_supp_allocations` (
   `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  AUTO_INCREMENT=2 ;
+) 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);
 
 -- --------------------------------------------------------
 
@@ -1951,19 +1976,21 @@ CREATE TABLE IF NOT EXISTS `0_supp_invoice_items` (
   `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  AUTO_INCREMENT=6 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=6 ;
 
 --
 -- Dumping data for table `0_supp_invoice_items`
 --
 
-INSERT INTO `0_supp_invoice_items` VALUES(1, 7, 20, '0', 1, 1, '102', '17inch VGA Monitor', 100, 10, 0.5, '');
-INSERT INTO `0_supp_invoice_items` VALUES(2, 7, 20, '0', 2, 2, '103', '32MB VGA Card', 100, 11, 0.55, '');
-INSERT INTO `0_supp_invoice_items` VALUES(3, 7, 20, '0', 3, 3, '104', '52x CD Drive', 100, 12, 0.6, '');
-INSERT INTO `0_supp_invoice_items` VALUES(4, 8, 20, '2150', 0, 0, '', '', 0, 0.95, 0, 'Phone');
-INSERT INTO `0_supp_invoice_items` VALUES(5, 8, 20, '5780', 0, 0, '', '', 0, 19.05, 0, 'Phone');
+INSERT INTO `0_supp_invoice_items` VALUES(1, 7, 20, '0', 1, 1, '102', '17inch VGA Monitor', 100, 10, 0.5, '', 0, 0);
+INSERT INTO `0_supp_invoice_items` VALUES(2, 7, 20, '0', 2, 2, '103', '32MB VGA Card', 100, 11, 0.55, '', 0, 0);
+INSERT INTO `0_supp_invoice_items` VALUES(3, 7, 20, '0', 3, 3, '104', '52x CD Drive', 100, 12, 0.6, '', 0, 0);
+INSERT INTO `0_supp_invoice_items` VALUES(4, 8, 20, '2150', 0, 0, '', '', 0, 0.95, 0, 'Phone', 0, 0);
+INSERT INTO `0_supp_invoice_items` VALUES(5, 8, 20, '5780', 0, 0, '', '', 0, 19.05, 0, 'Phone', 0, 0);
 
 -- --------------------------------------------------------
 
@@ -1986,21 +2013,20 @@ 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',
-  `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`),
   KEY `type` (`type`),
   KEY `tran_date` (`tran_date`)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_supp_trans`
 --
 
-INSERT INTO `0_supp_trans` VALUES(7, 20, 2, '1', '5t', '2014-06-21', '2014-07-01', 3300, 0, 165, 1, 3465, 0, 1);
-INSERT INTO `0_supp_trans` VALUES(8, 20, 2, '2', 'cc', '2014-06-21', '2014-07-01', 20, 0, 0, 1, 0, 0, 1);
-INSERT INTO `0_supp_trans` VALUES(4, 22, 2, '1', '', '2014-06-21', '2014-06-21', -3465, 0, 0, 1, 3465, 0, 1);
+INSERT INTO `0_supp_trans` VALUES(7, 20, 2, '1', '5t', '2014-06-21', '2014-07-01', 3300, 0, 165, 1, 3465, 0);
+INSERT INTO `0_supp_trans` VALUES(8, 20, 2, '2', 'cc', '2014-06-21', '2014-07-01', 20, 0, 0, 1, 0, 0);
+INSERT INTO `0_supp_trans` VALUES(4, 22, 2, '1', '', '2014-06-21', '2014-06-21', -3465, 0, 0, 1, 3465, 0);
 
 -- --------------------------------------------------------
 
@@ -2017,7 +2043,7 @@ CREATE TABLE IF NOT EXISTS `0_sys_prefs` (
   `value` text NOT NULL,
   PRIMARY KEY  (`name`),
   KEY `category` (`category`)
-) ENGINE=MyISAM;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_sys_prefs`
@@ -2074,14 +2100,12 @@ INSERT INTO `0_sys_prefs` VALUES('default_adj_act', 'glsetup.items', 'varchar',
 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_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('version_id', 'system', 'varchar', 11, '2.4.0');
 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('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('suppress_tax_rates','setup.company', 'tinyint', 1, '0');
 INSERT INTO `0_sys_prefs` VALUES('no_zero_lines_amount','glsetup.sales', 'tinyint', 1, '1');
 INSERT INTO `0_sys_prefs` VALUES('show_po_item_codes','glsetup.purchase', 'tinyint', 1, '0');
 INSERT INTO `0_sys_prefs` VALUES('accounts_alpha','glsetup.general', 'tinyint', 1, '0');
@@ -2105,7 +2129,7 @@ CREATE TABLE IF NOT EXISTS `0_sys_types` (
   `type_no` int(11) NOT NULL default '1',
   `next_reference` varchar(100) NOT NULL default '',
   PRIMARY KEY  (`type_id`)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_sys_types`
@@ -2149,7 +2173,7 @@ CREATE TABLE IF NOT EXISTS `0_tags` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `type` (`type`,`name`)
-) ENGINE=MyISAM AUTO_INCREMENT=1 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 --
 -- Dumping data for table `0_tags`
@@ -2167,7 +2191,7 @@ CREATE TABLE IF NOT EXISTS `0_tag_associations` (
   `record_id` varchar(15) NOT NULL,
   `tag_id` int(11) NOT NULL,
   UNIQUE KEY `record_id` (`record_id`,`tag_id`)
-) ENGINE=MyISAM;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_tag_associations`
@@ -2187,7 +2211,7 @@ CREATE TABLE IF NOT EXISTS `0_tax_groups` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `name` (`name`)
-) ENGINE=InnoDB  AUTO_INCREMENT=3 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=3 ;
 
 --
 -- Dumping data for table `0_tax_groups`
@@ -2208,7 +2232,7 @@ CREATE TABLE IF NOT EXISTS `0_tax_group_items` (
   `tax_type_id` int(11) NOT NULL default '0',
   `tax_shipping` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`tax_group_id`,`tax_type_id`)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_tax_group_items`
@@ -2231,7 +2255,7 @@ CREATE TABLE IF NOT EXISTS `0_tax_types` (
   `name` varchar(60) NOT NULL default '',
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`)
-) ENGINE=InnoDB  AUTO_INCREMENT=2 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=2 ;
 
 --
 -- Dumping data for table `0_tax_types`
@@ -2258,26 +2282,27 @@ CREATE TABLE IF NOT EXISTS `0_trans_tax_details` (
   `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`)
-) ENGINE=InnoDB  AUTO_INCREMENT=12 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=12 ;
 
 --
 -- Dumping data for table `0_trans_tax_details`
 --
 
-INSERT INTO `0_trans_tax_details` VALUES(1, 20, 7, '2014-06-21', 1, 5, 1, 0, 3300, 165, '5t');
-INSERT INTO `0_trans_tax_details` VALUES(2, 13, 3, '2014-06-21', 1, 5, 1, 0, 50, 2.5, 'auto');
-INSERT INTO `0_trans_tax_details` VALUES(3, 10, 17, '2014-06-21', 1, 5, 1, 0, 50, 2.5, '1');
-INSERT INTO `0_trans_tax_details` VALUES(4, 13, 4, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, 'auto');
-INSERT INTO `0_trans_tax_details` VALUES(5, 10, 18, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, '2');
-INSERT INTO `0_trans_tax_details` VALUES(6, 2, 5, '2014-06-21', 1, 5, 1, 0, 95.2, 4.76, '');
-INSERT INTO `0_trans_tax_details` VALUES(7, 1, 8, '2014-06-21', 1, 5, 1, 0, -47.6, -2.38, '');
-INSERT INTO `0_trans_tax_details` VALUES(8, 20, 8, '2014-06-21', 1, 5, 1, 0, -19, -0.95, 'cc');
-INSERT INTO `0_trans_tax_details` VALUES(9, 13, 5, '2014-06-21', 1, 5, 1, 1, 47.619047619048, 2.3809523809524, 'auto');
-INSERT INTO `0_trans_tax_details` VALUES(10, 10, 19, '2014-06-21', 1, 5, 1, 1, 47.619047619048, 2.3809523809524, '3');
-INSERT INTO `0_trans_tax_details` VALUES(11, 11, 3, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, '1');
+INSERT INTO `0_trans_tax_details` VALUES(1, 20, 7, '2014-06-21', 1, 5, 1, 0, 3300, 165, '5t', 1);
+INSERT INTO `0_trans_tax_details` VALUES(2, 13, 3, '2014-06-21', 1, 5, 1, 0, 50, 2.5, 'auto', NULL);
+INSERT INTO `0_trans_tax_details` VALUES(3, 10, 17, '2014-06-21', 1, 5, 1, 0, 50, 2.5, '1', 0);
+INSERT INTO `0_trans_tax_details` VALUES(4, 13, 4, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, 'auto', NULL);
+INSERT INTO `0_trans_tax_details` VALUES(5, 10, 18, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, '2', 0);
+INSERT INTO `0_trans_tax_details` VALUES(6, 2, 5, '2014-06-21', 1, 5, 1, 0, 95.2, 4.76, '', NULL);
+INSERT INTO `0_trans_tax_details` VALUES(7, 1, 8, '2014-06-21', 1, 5, 1, 0, -47.6, -2.38, '', NULL);
+INSERT INTO `0_trans_tax_details` VALUES(8, 20, 8, '2014-06-21', 1, 5, 1, 0, -19, -0.95, 'cc', 1);
+INSERT INTO `0_trans_tax_details` VALUES(9, 13, 5, '2014-06-21', 1, 5, 1, 1, 47.619047619048, 2.3809523809524, 'auto', NULL);
+INSERT INTO `0_trans_tax_details` VALUES(10, 10, 19, '2014-06-21', 1, 5, 1, 1, 47.619047619048, 2.3809523809524, '3', 0);
+INSERT INTO `0_trans_tax_details` VALUES(11, 11, 3, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, '1', 0);
 
 -- --------------------------------------------------------
 
@@ -2294,7 +2319,7 @@ CREATE TABLE IF NOT EXISTS `0_useronline` (
   PRIMARY KEY  (`id`),
   KEY `timestamp` (`timestamp`),
   KEY `ip` (`ip`)
-) ENGINE=MyISAM AUTO_INCREMENT=1 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 --
 -- Dumping data for table `0_useronline`
@@ -2346,7 +2371,7 @@ CREATE TABLE IF NOT EXISTS `0_users` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `user_id` (`user_id`)
-) ENGINE=MyISAM  AUTO_INCREMENT=3 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=3 ;
 
 --
 -- Dumping data for table `0_users`
@@ -2368,7 +2393,7 @@ CREATE TABLE IF NOT EXISTS `0_voided` (
   `date_` date NOT NULL default '0000-00-00',
   `memo_` tinytext NOT NULL,
   UNIQUE KEY `id` (`type`,`id`)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_voided`
@@ -2389,7 +2414,7 @@ CREATE TABLE IF NOT EXISTS `0_workcentres` (
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `name` (`name`)
-) ENGINE=MyISAM  AUTO_INCREMENT=2 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=2 ;
 
 --
 -- Dumping data for table `0_workcentres`
@@ -2420,7 +2445,7 @@ CREATE TABLE IF NOT EXISTS `0_workorders` (
   `additional_costs` double NOT NULL default '0',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `wo_ref` (`wo_ref`)
-) ENGINE=InnoDB  AUTO_INCREMENT=8 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=8 ;
 
 --
 -- Dumping data for table `0_workorders`
@@ -2449,7 +2474,7 @@ CREATE TABLE `0_wo_costing` (
   `trans_no` int(11) NOT NULL default '0',
   `factor` double NOT NULL default '1',
   PRIMARY KEY  (`id`)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
 -- Dumping data for table `0_wo_costing`
@@ -2472,7 +2497,7 @@ CREATE TABLE IF NOT EXISTS `0_wo_issues` (
   `workcentre_id` int(11) default NULL,
   PRIMARY KEY  (`issue_no`),
   KEY `workorder_id` (`workorder_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 --
 -- Dumping data for table `0_wo_issues`
@@ -2492,7 +2517,7 @@ CREATE TABLE IF NOT EXISTS `0_wo_issue_items` (
   `issue_id` int(11) default NULL,
   `qty_issued` double default NULL,
   PRIMARY KEY  (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 --
 -- Dumping data for table `0_wo_issue_items`
@@ -2514,7 +2539,7 @@ CREATE TABLE IF NOT EXISTS `0_wo_manufacture` (
   `date_` date NOT NULL default '0000-00-00',
   PRIMARY KEY  (`id`),
   KEY `workorder_id` (`workorder_id`)
-) ENGINE=InnoDB  AUTO_INCREMENT=2 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=2 ;
 
 --
 -- Dumping data for table `0_wo_manufacture`
@@ -2540,7 +2565,7 @@ CREATE TABLE IF NOT EXISTS `0_wo_requirements` (
   `units_issued` double NOT NULL default '0',
   PRIMARY KEY  (`id`),
   KEY `workorder_id` (`workorder_id`)
-) ENGINE=InnoDB  AUTO_INCREMENT=22 ;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  AUTO_INCREMENT=22 ;
 
 --
 -- Dumping data for table `0_wo_requirements`