Merged changes from main branch up to release 2.2.1
[fa-stable.git] / sql / en_US-demo.sql
index 9f23c83ffc23715754065fdd73bf6896911c2800..eca1048f1fc865e5f78a54ce7134435a616d7d4c 100644 (file)
@@ -80,6 +80,7 @@ CREATE TABLE `0_bank_accounts` (
   `bank_name` varchar(60) NOT NULL default '',
   `bank_address` tinytext,
   `bank_curr_code` char(3) NOT NULL default '',
+  `dflt_curr_act` TINYINT(1) NOT NULL default '0',
   `id` smallint(6) NOT NULL auto_increment,
   `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00',
   `ending_reconcile_balance` double NOT NULL default '0',
@@ -92,8 +93,8 @@ CREATE TABLE `0_bank_accounts` (
 
 ### Data of table `0_bank_accounts` ###
 
-INSERT INTO `0_bank_accounts` VALUES ('1060', '0', 'Current account', '9999999999', 'Wachovia Bank', '', 'USD', '1', '0000-00-00 00:00:00', '0', '0');
-INSERT INTO `0_bank_accounts` VALUES ('1065', '3', 'Petty Cash account', 'N/A', 'N/A', '', 'USD', '2', '0000-00-00 00:00:00', '0', '0');
+INSERT INTO `0_bank_accounts` VALUES ('1060', '0', 'Current account', '9999999999', 'Wachovia Bank', '', 'USD', '1', '1', '0000-00-00 00:00:00', '0', '0');
+INSERT INTO `0_bank_accounts` VALUES ('1065', '3', 'Petty Cash account', 'N/A', 'N/A', '', 'USD', '0', '2', '0000-00-00 00:00:00', '0', '0');
 
 
 ### Structure of table `0_bank_trans` ###
@@ -121,17 +122,17 @@ CREATE TABLE `0_bank_trans` (
 
 ### Data of table `0_bank_trans` ###
 
-INSERT INTO `0_bank_trans` VALUES ('1', '22', '4', '1', '1', '2009-06-21', '-3465', '0', '0', '3', '2', '');
-INSERT INTO `0_bank_trans` VALUES ('2', '26', '1', '1', '', '2009-06-21', '-10', '0', '0', '1', '1', '');
-INSERT INTO `0_bank_trans` VALUES ('3', '26', '1', '1', '', '2009-06-21', '-20', '0', '0', '1', '0', '');
-INSERT INTO `0_bank_trans` VALUES ('4', '0', '18', '1', '1', '2009-02-20', '1000', '0', '0', '0', '', '');
-INSERT INTO `0_bank_trans` VALUES ('5', '0', '19', '1', '2', '2009-02-21', '4000', '0', '0', '0', '', '');
-INSERT INTO `0_bank_trans` VALUES ('6', '2', '5', '1', '1', '2009-06-21', '100', '0', '0', '4', '3', '');
-INSERT INTO `0_bank_trans` VALUES ('7', '1', '8', '1', '1', '2009-06-21', '-50', '0', '0', '4', '1', '');
-INSERT INTO `0_bank_trans` VALUES ('8', '26', '5', '1', '', '2009-06-21', '-10', '0', '0', '1', '1', '');
-INSERT INTO `0_bank_trans` VALUES ('9', '26', '5', '1', '', '2009-06-21', '-20', '0', '0', '1', '0', '');
-INSERT INTO `0_bank_trans` VALUES ('10', '26', '7', '1', '', '2009-06-21', '-10', '0', '0', '1', '1', '');
-INSERT INTO `0_bank_trans` VALUES ('11', '26', '7', '1', '', '2009-06-21', '-20', '0', '0', '1', '0', '');
+INSERT INTO `0_bank_trans` VALUES ('1', '22', '4', '1', '1', '2009-06-21', '-3465', '0', '0', '3', '2', NULL);
+INSERT INTO `0_bank_trans` VALUES ('2', '26', '1', '1', '', '2009-06-21', '-10', '0', '0', '1', '1', NULL);
+INSERT INTO `0_bank_trans` VALUES ('3', '26', '1', '1', '', '2009-06-21', '-20', '0', '0', '1', '0', NULL);
+INSERT INTO `0_bank_trans` VALUES ('4', '0', '18', '1', '1', '2009-02-20', '1000', '0', '0', '0', '', NULL);
+INSERT INTO `0_bank_trans` VALUES ('5', '0', '19', '1', '2', '2009-02-21', '4000', '0', '0', '0', '', NULL);
+INSERT INTO `0_bank_trans` VALUES ('6', '2', '5', '1', '1', '2009-06-21', '100', '0', '0', '4', '3', NULL);
+INSERT INTO `0_bank_trans` VALUES ('7', '1', '8', '1', '1', '2009-06-21', '-50', '0', '0', '4', '1', NULL);
+INSERT INTO `0_bank_trans` VALUES ('8', '26', '5', '1', '', '2009-06-21', '-10', '0', '0', '1', '1', NULL);
+INSERT INTO `0_bank_trans` VALUES ('9', '26', '5', '1', '', '2009-06-21', '-20', '0', '0', '1', '0', NULL);
+INSERT INTO `0_bank_trans` VALUES ('10', '26', '7', '1', '', '2009-06-21', '-10', '0', '0', '1', '1', NULL);
+INSERT INTO `0_bank_trans` VALUES ('11', '26', '7', '1', '', '2009-06-21', '-20', '0', '0', '1', '0', NULL);
 
 
 ### Structure of table `0_bom` ###
@@ -495,6 +496,7 @@ CREATE TABLE `0_cust_branch` (
   `area` int(11) default NULL,
   `salesman` int(11) NOT NULL default '0',
   `phone` varchar(30) NOT NULL default '',
+  `phone2` varchar(30) NOT NULL default '',
   `fax` varchar(30) NOT NULL default '',
   `contact_name` varchar(60) NOT NULL default '',
   `email` varchar(100) NOT NULL default '',
@@ -508,6 +510,7 @@ CREATE TABLE `0_cust_branch` (
   `disable_trans` tinyint(4) NOT NULL default '0',
   `br_post_address` tinytext NOT NULL,
   `group_no` int(11) NOT NULL default '0',
+  `notes` tinytext NOT NULL,
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`branch_code`,`debtor_no`),
   KEY `branch_code` (`branch_code`),
@@ -517,9 +520,9 @@ CREATE TABLE `0_cust_branch` (
 
 ### Data of table `0_cust_branch` ###
 
-INSERT INTO `0_cust_branch` VALUES ('1', '1', 'Beefeater Ltd.', 'Beefeater', '', '1', '1', '', '', 'Main Branch', '', 'DEF', '2', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '0');
-INSERT INTO `0_cust_branch` VALUES ('2', '2', 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\r\nAddress 2\r\nAddress 3', '1', '1', '', '', 'Main Branch', '', 'DEF', '1', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '0');
-INSERT INTO `0_cust_branch` VALUES ('3', '3', 'Brezan', 'Brezan', 'Address 1\r\nAddress 2\r\nAddress 3', '1', '1', '', '', 'Main Branch', '', 'DEF', '1', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '0');
+INSERT INTO `0_cust_branch` VALUES ('1', '1', 'Beefeater Ltd.', 'Beefeater', '', '1', '1', '', '', '', 'Main Branch', '', 'DEF', '2', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '', '0');
+INSERT INTO `0_cust_branch` VALUES ('2', '2', 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\r\nAddress 2\r\nAddress 3', '1', '1', '', '', '', 'Main Branch', '', 'DEF', '1', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '', '0');
+INSERT INTO `0_cust_branch` VALUES ('3', '3', 'Brezan', 'Brezan', 'Address 1\r\nAddress 2\r\nAddress 3', '1', '1', '', '', '', 'Main Branch', '', 'DEF', '1', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '', '0');
 
 
 ### Structure of table `0_debtor_trans` ###
@@ -603,7 +606,7 @@ DROP TABLE IF EXISTS `0_debtors_master`;
 
 CREATE TABLE `0_debtors_master` (
   `debtor_no` int(11) NOT NULL auto_increment,
-  `name` varchar(80) NOT NULL default '',
+  `name` varchar(100) NOT NULL default '',
   `debtor_ref` varchar(30) NOT NULL,
   `address` tinytext,
   `email` varchar(100) NOT NULL default '',
@@ -617,6 +620,7 @@ CREATE TABLE `0_debtors_master` (
   `discount` double NOT NULL default '0',
   `pymt_discount` double NOT NULL default '0',
   `credit_limit` float NOT NULL default '1000',
+  `notes` tinytext NOT NULL,
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`debtor_no`),
   UNIQUE KEY `name` (`name`)
@@ -625,9 +629,9 @@ CREATE TABLE `0_debtors_master` (
 
 ### Data of table `0_debtors_master` ###
 
-INSERT INTO `0_debtors_master` VALUES ('1', 'Beefeater Ltd.', 'Beefeater', 'Addr 1\r\nAddr 2\r\nAddr 3', '', '345678', 'GBP', '2', '0', '0', '1', '3', '0', '0', '1000', '0');
-INSERT INTO `0_debtors_master` VALUES ('2', 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\r\nAddress 2\r\nAddress 3', '', '2222222', 'USD', '1', '0', '0', '1', '4', '0', '0', '1000', '0');
-INSERT INTO `0_debtors_master` VALUES ('3', 'Brezan', 'Brezan', 'Address 1\r\nAddress 2\r\nAddress 3', '', '7777777', 'EUR', '2', '0', '0', '1', '3', '0', '0', '1000', '0');
+INSERT INTO `0_debtors_master` VALUES ('1', 'Beefeater Ltd.', 'Beefeater', 'Addr 1\r\nAddr 2\r\nAddr 3', '', '345678', 'GBP', '2', '0', '0', '1', '3', '0', '0', '1000', '', '0');
+INSERT INTO `0_debtors_master` VALUES ('2', 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\r\nAddress 2\r\nAddress 3', '', '2222222', 'USD', '1', '0', '0', '1', '4', '0', '0', '1000', '', '0');
+INSERT INTO `0_debtors_master` VALUES ('3', 'Brezan', 'Brezan', 'Address 1\r\nAddress 2\r\nAddress 3', '', '7777777', 'EUR', '2', '0', '0', '1', '3', '0', '0', '1000', '', '0');
 
 
 ### Structure of table `0_dimensions` ###
@@ -724,14 +728,14 @@ INSERT INTO `0_gl_trans` VALUES ('4', '20', '7', '2009-06-21', '1510', '', '1200
 INSERT INTO `0_gl_trans` VALUES ('5', '20', '7', '2009-06-21', '2150', '', '165', '0', '0', '3', '2');
 INSERT INTO `0_gl_trans` VALUES ('6', '22', '4', '2009-06-21', '2100', '', '3465', '0', '0', '3', '2');
 INSERT INTO `0_gl_trans` VALUES ('7', '22', '4', '2009-06-21', '1060', '', '-3465', '0', '0', '3', '2');
-INSERT INTO `0_gl_trans` VALUES ('8', '26', '1', '2009-06-21', '1510', '', '-100', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('9', '26', '1', '2009-06-21', '1510', '', '-110', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('10', '26', '1', '2009-06-21', '1510', '', '-120', '0', '0', '', '');
+INSERT INTO `0_gl_trans` VALUES ('8', '26', '1', '2009-06-21', '1510', '', '-100', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('9', '26', '1', '2009-06-21', '1510', '', '-110', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('10', '26', '1', '2009-06-21', '1510', '', '-120', '0', '0', NULL, '');
 INSERT INTO `0_gl_trans` VALUES ('11', '26', '1', '2009-06-21', '1060', 'Overhead Cost', '-10', '0', '0', '1', '1');
 INSERT INTO `0_gl_trans` VALUES ('12', '26', '1', '2009-06-21', '1530', 'Overhead Cost', '10', '0', '0', '1', '1');
 INSERT INTO `0_gl_trans` VALUES ('13', '26', '1', '2009-06-21', '1060', 'Labour Cost', '-20', '0', '0', '1', '0');
 INSERT INTO `0_gl_trans` VALUES ('14', '26', '1', '2009-06-21', '1530', 'Labour Cost', '20', '0', '0', '1', '0');
-INSERT INTO `0_gl_trans` VALUES ('15', '26', '1', '2009-06-21', '1510', '', '330', '0', '0', '', '');
+INSERT INTO `0_gl_trans` VALUES ('15', '26', '1', '2009-06-21', '1510', '', '330', '0', '0', NULL, '');
 INSERT INTO `0_gl_trans` VALUES ('16', '13', '2', '2009-06-21', '5010', '', '20', '0', '0', '2', '1');
 INSERT INTO `0_gl_trans` VALUES ('17', '13', '2', '2009-06-21', '1510', '', '-20', '0', '0', '2', '1');
 INSERT INTO `0_gl_trans` VALUES ('18', '13', '3', '2009-06-21', '5010', '', '10', '0', '0', '2', '2');
@@ -744,14 +748,14 @@ INSERT INTO `0_gl_trans` VALUES ('24', '13', '4', '2009-06-21', '1510', '', '-10
 INSERT INTO `0_gl_trans` VALUES ('25', '10', '18', '2009-06-21', '4010', '', '-50', '2', '0', '2', '3');
 INSERT INTO `0_gl_trans` VALUES ('26', '10', '18', '2009-06-21', '1200', '', '52.5', '0', '0', '2', '3');
 INSERT INTO `0_gl_trans` VALUES ('27', '10', '18', '2009-06-21', '2150', '', '-2.5', '0', '0', '2', '3');
-INSERT INTO `0_gl_trans` VALUES ('28', '0', '18', '2009-02-20', '1060', '', '1000', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('29', '0', '18', '2009-02-20', '3350', '', '-1000', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('30', '0', '19', '2009-02-21', '1060', '', '4000', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('31', '0', '19', '2009-02-21', '3350', '', '-4000', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('32', '26', '3', '2009-06-21', '1510', '', '-20', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('33', '26', '3', '2009-06-21', '1510', '', '-22', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('34', '26', '3', '2009-06-21', '1510', '', '-24', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('35', '26', '3', '2009-06-21', '1540', '', '66', '0', '0', '', '');
+INSERT INTO `0_gl_trans` VALUES ('28', '0', '18', '2009-02-20', '1060', '', '1000', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('29', '0', '18', '2009-02-20', '3350', '', '-1000', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('30', '0', '19', '2009-02-21', '1060', '', '4000', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('31', '0', '19', '2009-02-21', '3350', '', '-4000', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('32', '26', '3', '2009-06-21', '1510', '', '-20', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('33', '26', '3', '2009-06-21', '1510', '', '-22', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('34', '26', '3', '2009-06-21', '1510', '', '-24', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('35', '26', '3', '2009-06-21', '1540', '', '66', '0', '0', NULL, '');
 INSERT INTO `0_gl_trans` VALUES ('36', '2', '5', '2009-06-21', '2150', 'Cash Sales', '-4.76', '0', '0', '4', '3');
 INSERT INTO `0_gl_trans` VALUES ('37', '2', '5', '2009-06-21', '4010', 'Cash Sales', '-95.24', '0', '0', '4', '3');
 INSERT INTO `0_gl_trans` VALUES ('38', '2', '5', '2009-06-21', '1060', '', '100', '0', '0', '4', '3');
@@ -761,34 +765,34 @@ INSERT INTO `0_gl_trans` VALUES ('41', '1', '8', '2009-06-21', '1060', '', '-50'
 INSERT INTO `0_gl_trans` VALUES ('42', '20', '8', '2009-06-21', '2100', '', '-20', '0', '0', '3', '2');
 INSERT INTO `0_gl_trans` VALUES ('43', '20', '8', '2009-06-21', '2150', '', '0.95', '0', '0', '3', '2');
 INSERT INTO `0_gl_trans` VALUES ('44', '20', '8', '2009-06-21', '5780', '', '19.05', '0', '0', '3', '2');
-INSERT INTO `0_gl_trans` VALUES ('45', '26', '4', '2009-06-21', '1510', '', '-40', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('46', '26', '4', '2009-06-21', '1510', '', '-44', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('47', '26', '4', '2009-06-21', '1510', '', '-48', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('48', '26', '4', '2009-06-21', '1540', '', '132', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('49', '26', '2', '2009-06-21', '1510', '', '-20', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('50', '26', '2', '2009-06-21', '1510', '', '-22', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('51', '26', '2', '2009-06-21', '1510', '', '-24', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('52', '26', '2', '2009-06-21', '1540', '', '66', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('53', '26', '5', '2009-06-21', '1510', '', '-50', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('54', '26', '5', '2009-06-21', '1510', '', '-55', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('55', '26', '5', '2009-06-21', '1510', '', '-60', '0', '0', '', '');
+INSERT INTO `0_gl_trans` VALUES ('45', '26', '4', '2009-06-21', '1510', '', '-40', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('46', '26', '4', '2009-06-21', '1510', '', '-44', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('47', '26', '4', '2009-06-21', '1510', '', '-48', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('48', '26', '4', '2009-06-21', '1540', '', '132', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('49', '26', '2', '2009-06-21', '1510', '', '-20', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('50', '26', '2', '2009-06-21', '1510', '', '-22', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('51', '26', '2', '2009-06-21', '1510', '', '-24', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('52', '26', '2', '2009-06-21', '1540', '', '66', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('53', '26', '5', '2009-06-21', '1510', '', '-50', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('54', '26', '5', '2009-06-21', '1510', '', '-55', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('55', '26', '5', '2009-06-21', '1510', '', '-60', '0', '0', NULL, '');
 INSERT INTO `0_gl_trans` VALUES ('56', '26', '5', '2009-06-21', '1060', 'Overhead Cost', '-10', '0', '0', '1', '1');
 INSERT INTO `0_gl_trans` VALUES ('57', '26', '5', '2009-06-21', '1530', 'Overhead Cost', '10', '0', '0', '1', '1');
 INSERT INTO `0_gl_trans` VALUES ('58', '26', '5', '2009-06-21', '1060', 'Labour Cost', '-20', '0', '0', '1', '0');
 INSERT INTO `0_gl_trans` VALUES ('59', '26', '5', '2009-06-21', '1530', 'Labour Cost', '20', '0', '0', '1', '0');
-INSERT INTO `0_gl_trans` VALUES ('60', '26', '5', '2009-06-21', '1540', '', '165', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('61', '26', '6', '2009-06-21', '1510', '', '50', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('62', '26', '6', '2009-06-21', '1510', '', '55', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('63', '26', '6', '2009-06-21', '1510', '', '60', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('64', '26', '6', '2009-06-21', '1540', '', '-165', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('65', '26', '7', '2009-06-21', '1510', '', '20', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('66', '26', '7', '2009-06-21', '1510', '', '22', '0', '0', '', '');
-INSERT INTO `0_gl_trans` VALUES ('67', '26', '7', '2009-06-21', '1510', '', '24', '0', '0', '', '');
+INSERT INTO `0_gl_trans` VALUES ('60', '26', '5', '2009-06-21', '1540', '', '165', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('61', '26', '6', '2009-06-21', '1510', '', '50', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('62', '26', '6', '2009-06-21', '1510', '', '55', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('63', '26', '6', '2009-06-21', '1510', '', '60', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('64', '26', '6', '2009-06-21', '1540', '', '-165', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('65', '26', '7', '2009-06-21', '1510', '', '20', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('66', '26', '7', '2009-06-21', '1510', '', '22', '0', '0', NULL, '');
+INSERT INTO `0_gl_trans` VALUES ('67', '26', '7', '2009-06-21', '1510', '', '24', '0', '0', NULL, '');
 INSERT INTO `0_gl_trans` VALUES ('68', '26', '7', '2009-06-21', '1060', 'Overhead Cost', '-10', '0', '0', '1', '1');
 INSERT INTO `0_gl_trans` VALUES ('69', '26', '7', '2009-06-21', '1530', 'Overhead Cost', '10', '0', '0', '1', '1');
 INSERT INTO `0_gl_trans` VALUES ('70', '26', '7', '2009-06-21', '1060', 'Labour Cost', '-20', '0', '0', '1', '0');
 INSERT INTO `0_gl_trans` VALUES ('71', '26', '7', '2009-06-21', '1530', 'Labour Cost', '20', '0', '0', '1', '0');
-INSERT INTO `0_gl_trans` VALUES ('72', '26', '7', '2009-06-21', '1540', '', '-66', '0', '0', '', '');
+INSERT INTO `0_gl_trans` VALUES ('72', '26', '7', '2009-06-21', '1540', '', '-66', '0', '0', NULL, '');
 INSERT INTO `0_gl_trans` VALUES ('73', '13', '5', '2009-06-21', '5010', '', '10', '0', '0', '2', '2');
 INSERT INTO `0_gl_trans` VALUES ('74', '13', '5', '2009-06-21', '1510', '', '-10', '0', '0', '2', '2');
 INSERT INTO `0_gl_trans` VALUES ('75', '10', '19', '2009-06-21', '4010', '', '-47.62', '0', '0', '2', '2');
@@ -976,6 +980,7 @@ CREATE TABLE `0_locations` (
   `location_name` varchar(60) NOT NULL default '',
   `delivery_address` tinytext NOT NULL,
   `phone` varchar(30) NOT NULL default '',
+  `phone2` varchar(30) NOT NULL default '',
   `fax` varchar(30) NOT NULL default '',
   `email` varchar(100) NOT NULL default '',
   `contact` varchar(30) NOT NULL default '',
@@ -986,7 +991,7 @@ CREATE TABLE `0_locations` (
 
 ### Data of table `0_locations` ###
 
-INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'Delivery 1\r\nDelivery 2\r\nDelivery 3', '', '', '', '', '0');
+INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'Delivery 1\r\nDelivery 2\r\nDelivery 3', '', '', '', '', '', '0');
 
 
 ### Structure of table `0_movement_types` ###
@@ -1301,7 +1306,7 @@ INSERT INTO `0_sales_order_details` VALUES ('5', '5', '30', '102', '17inch VGA M
 DROP TABLE IF EXISTS `0_sales_orders`;
 
 CREATE TABLE `0_sales_orders` (
-  `order_no` int(11) NOT NULL auto_increment,
+  `order_no` int(11) NOT NULL,
   `trans_type` smallint(6) NOT NULL default '30',
   `version` tinyint(1) unsigned NOT NULL default '0',
   `type` tinyint(1) NOT NULL default '0',
@@ -1398,6 +1403,34 @@ CREATE TABLE `0_salesman` (
 
 INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
 
+### Structure of table `0_security_roles` ###
+
+DROP TABLE IF EXISTS `0_security_roles`;
+CREATE TABLE IF NOT EXISTS `0_security_roles` (
+  `id` int(11) NOT NULL auto_increment,
+  `role` varchar(30) NOT NULL,
+  `description` varchar(50) default NULL,
+  `sections` text,
+  `areas` text,
+  `inactive` tinyint(1) NOT NULL default '0',
+  PRIMARY KEY  (`id`),
+  UNIQUE KEY `role` (`role`)
+) TYPE=MyISAM  AUTO_INCREMENT=11 ;
+
+--
+-- Data of table `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', 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;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;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15625;15626;15627;15873;15874;15875;15876;15877;15878;15879;15880;15883;15881;15882;16129;16130;16131;16132', 0);
+INSERT INTO `0_security_roles` VALUES (3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873', 0);
+INSERT INTO `0_security_roles` VALUES (4, 'Stock Manager', 'Stock Manager', '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', 0);
+INSERT INTO `0_security_roles` VALUES (5, 'Production Manager', 'Production Manager', '512;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', 0);
+INSERT INTO `0_security_roles` VALUES (6, 'Purchase Officer', 'Purchase Officer', '512;2816;3072;3328;5376;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;5377;5633;5635;5640;5640;5889;5890;5891;8193;8194;8196;8197;8449;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0);
+INSERT INTO `0_security_roles` VALUES (7, 'AR Officer', 'AR Officer', '512;768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;771;773;774;2818;2819;2820;2821;2822;2823;3073;3073;3074;3075;3076;3077;3078;3079;3080;3081;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5633;5634;5637;5638;5639;5640;5640;5889;5890;5891;8193;8194;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0);
+INSERT INTO `0_security_roles` VALUES (8, 'AP Officer', 'AP Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;769;770;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5635;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0);
+INSERT INTO `0_security_roles` VALUES (9, 'Accountant', 'New Accountant', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0);
+INSERT INTO `0_security_roles` VALUES (10, 'Sub Admin', 'Sub Admin', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;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;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15873;15874;15876;15877;15878;15879;15880;15882;16129;16130;16131;16132', 0);
 
 ### Structure of table `0_shippers` ###
 
@@ -1407,6 +1440,7 @@ CREATE TABLE `0_shippers` (
   `shipper_id` int(11) NOT NULL auto_increment,
   `shipper_name` varchar(60) NOT NULL default '',
   `phone` varchar(30) NOT NULL default '',
+  `phone2` varchar(30) NOT NULL default '',
   `contact` tinytext NOT NULL,
   `address` tinytext NOT NULL,
   `inactive` tinyint(1) NOT NULL default '0',
@@ -1417,7 +1451,7 @@ CREATE TABLE `0_shippers` (
 
 ### Data of table `0_shippers` ###
 
-INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '0');
+INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '', '0');
 
 
 ### Structure of table `0_sql_trail` ###
@@ -1663,6 +1697,7 @@ CREATE TABLE `0_suppliers` (
   `address` tinytext NOT NULL,
   `supp_address` tinytext NOT NULL,
   `phone` varchar(30) NOT NULL default '',
+  `phone2` varchar(30) NOT NULL default '',
   `fax` varchar(30) NOT NULL default '',
   `gst_no` varchar(25) NOT NULL default '',
   `contact` varchar(60) NOT NULL default '',
@@ -1687,9 +1722,9 @@ CREATE TABLE `0_suppliers` (
 
 ### Data of table `0_suppliers` ###
 
-INSERT INTO `0_suppliers` VALUES ('1', 'Junk Beer ApS', 'Junk Beer', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '+45 55667788', '', '123456', 'Contact', '111', '', '', '', 'DKK', '3', '1', '0', '2', '1', '5010', '2100', '5060', 'A supplier with junk beers.', '0');
-INSERT INTO `0_suppliers` VALUES ('2', 'Lucky Luke Inc.', 'Lucky Luke', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '(111) 222.333.444', '', '654321', 'Luke', '333', '', '', '', 'USD', '3', '0', '0', '1', '1', '5010', '2100', '5060', '', '0');
-INSERT INTO `0_suppliers` VALUES ('3', 'Money Makers Ltd.', 'Money Makers', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '+44 444 555 666', '', '987654', 'Makers', '222', '', '', '', 'GBP', '3', '0', '0', '2', '1', '5010', '2100', '5060', '', '0');
+INSERT INTO `0_suppliers` VALUES ('1', 'Junk Beer ApS', 'Junk Beer', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '+45 55667788', '', '', '123456', 'Contact', '111', '', '', '', 'DKK', '3', '1', '0', '2', '1', '5010', '2100', '5060', 'A supplier with junk beers.', '0');
+INSERT INTO `0_suppliers` VALUES ('2', 'Lucky Luke Inc.', 'Lucky Luke', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '(111) 222.333.444', '', '', '654321', 'Luke', '333', '', '', '', 'USD', '3', '0', '0', '1', '1', '5010', '2100', '5060', '', '0');
+INSERT INTO `0_suppliers` VALUES ('3', 'Money Makers Ltd.', 'Money Makers', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '+44 444 555 666', '', '', '987654', 'Makers', '222', '', '', '', 'GBP', '3', '0', '0', '2', '1', '5010', '2100', '5060', '', '0');
 
 
 ### Structure of table `0_sys_types` ###
@@ -1862,7 +1897,7 @@ CREATE TABLE `0_users` (
 ### Data of table `0_users` ###
 
 INSERT INTO `0_users` VALUES ('1', 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', '2', '', 'adm@adm.com', 'en_US', '0', '0', '0', '0', 'default', 'Letter', '2', '2', '4', '1', '1', '0', '0', '2009-01-30 09:39:03', '10', '1', '1', '1', '1', '0', 'orders', '0');
-INSERT INTO `0_users` VALUES ('2', 'demouser', '5f4dcc3b5aa765d61d8327deb882cf99', 'Demo User', '1', '999-999-999', 'demo@demo.nu', 'en_US', '0', '0', '0', '0', 'default', 'Letter', '2', '2', '3', '1', '1', '0', '0', '2008-02-06 19:02:35', '10', '1', '1', '1', '1', '0', 'orders', '0');
+INSERT INTO `0_users` VALUES ('2', 'demouser', '5f4dcc3b5aa765d61d8327deb882cf99', 'Demo User', '9', '999-999-999', 'demo@demo.nu', 'en_US', '0', '0', '0', '0', 'default', 'Letter', '2', '2', '3', '1', '1', '0', '0', '2008-02-06 19:02:35', '10', '1', '1', '1', '1', '0', 'orders', '0');
 
 ### Structure of table `0_voided` ###
 
@@ -2030,22 +2065,47 @@ INSERT INTO `0_workorders` VALUES ('5', '5', 'DEF', '5', '3400', '2009-06-21', '
 INSERT INTO `0_workorders` VALUES ('6', '6', 'DEF', '-5', '3400', '2009-06-21', '1', '2009-06-21', '2009-06-21', '-5', '1', '1', '0');
 INSERT INTO `0_workorders` VALUES ('7', '7', 'DEF', '-2', '3400', '2009-06-21', '1', '2009-06-21', '2009-06-21', '-2', '1', '1', '10');
 
-DROP TABLE IF EXISTS `0_security_roles`;
 
-CREATE TABLE `0_security_roles` (
+### Structure of table `0_tags` ###
+
+DROP TABLE IF EXISTS `0_tags`;
+
+CREATE TABLE `0_tags` (
   `id` int(11) NOT NULL auto_increment,
-  `role` varchar(20) NOT NULL,
-  `description` varchar(50) default NULL,
-  `modules` text,
-  `areas` text,
+  `type` smallint(6) NOT NULL,
+  `name` varchar(30) NOT NULL,
+  `description` varchar(60) default NULL,
   `inactive` tinyint(1) NOT NULL default '0',
   PRIMARY KEY  (`id`),
-  UNIQUE KEY `role` (`role`)
-) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;
+  UNIQUE KEY(`type`,`name`)
+) TYPE=MyISAM AUTO_INCREMENT=1;
+
+
+### Data of table `0_chart_tags` ###
+
+
+
+### Structure of table `0_tag_associations` ###
+
+DROP TABLE IF EXISTS `0_tag_associations`;
+
+CREATE TABLE `0_tag_associations` (
+  `record_id` varchar(11) NOT NULL,
+  `tag_id` int(11) NOT NULL,
+  UNIQUE KEY(`record_id`,`tag_id`)
+) TYPE=MyISAM;
+
+
+### Data of table `0_tag_associations` ###
 
+DROP TABLE IF EXISTS `0_useronline` ;
 
-### Data of table `0_security_roles` ###
+CREATE TABLE `0_useronline` (
+       `id` int(11) NOT NULL AUTO_INCREMENT ,
+       `timestamp` int(15) NOT NULL default '0',
+       `ip` varchar(40) NOT NULL default '',
+       `file` varchar(100) NOT NULL default '',
+       PRIMARY KEY `id` (`id`) ,
+       KEY (`timestamp`) 
+) TYPE=MYISAM AUTO_INCREMENT=1;
 
-INSERT INTO `0_security_roles` VALUES ('2', 'System Admin', 'Full system access', '256;512;768;1024;1280;1536;1792', '257;258;259;260;261;262;263;264;267;268;269;270;271;272;277;278;279;280;513;523;524;525;526;527;533;534;535;536;769;770;771;772;773;774;775;776;777;779;780;789;790;791;799;800;801;1025;1026;1035;1036;1045;1046;1047;1281;1291;1301;1302;1303;1537;1538;1539;1540;1541;1542;1543;1547;1548;1549;1550;1551;1552;1557;1558;1559;1793;1794;1795;1796;1797;1798;1799;1800;1801;1802;1803;1804;1805;1806;1807;1808;1809;1810', '0');
-INSERT INTO `0_security_roles` VALUES ('7', 'Accountant', 'Accounting features and most non-admin options', '256;512;768;1024;1280;1536;1792', '257;258;263;264;267;268;269;270;271;272;277;278;279;280;513;523;524;525;526;527;533;534;535;536;769;770;771;772;773;774;775;776;777;779;780;789;790;791;799;800;801;1026;1045;1046;1047;1291;1301;1302;1538;1547;1548;1549;1550;1552;1557;1558;1559;1796;1804;1805', '0');
-INSERT INTO `0_security_roles` VALUES ('6', 'Sub Admin', 'Near full system access', '256;512;768;1024;1280;1536;1792', '257;258;263;264;267;268;269;270;271;272;277;278;279;280;513;523;524;525;526;527;533;534;535;536;769;770;771;772;773;774;775;776;777;779;780;789;790;791;799;800;801;1026;1045;1046;1047;1291;1301;1302;1538;1547;1548;1549;1550;1552;1557;1558;1559;1796;1804;1805', '0');