1-- phpMyAdmin SQL Dump 2-- version 2.11.8.1deb5 3-- http://www.phpmyadmin.net 4-- 5-- Host: localhost 6-- Generation Time: Sep 26, 2014 at 11:32 AM 7-- Server version: 5.0.51 8-- PHP Version: 5.2.6-1+lenny2 9 10-- 11-- Database: `fatest` 12-- 13 14-- -------------------------------------------------------- 15 16-- 17-- Table structure for table `0_areas` 18-- 19 20DROP TABLE IF EXISTS `0_areas`; 21CREATE TABLE IF NOT EXISTS `0_areas` ( 22 `area_code` int(11) NOT NULL auto_increment, 23 `description` varchar(60) NOT NULL default '', 24 `inactive` tinyint(1) NOT NULL default '0', 25 PRIMARY KEY (`area_code`), 26 UNIQUE KEY `description` (`description`) 27) ENGINE=MyISAM AUTO_INCREMENT=2 ; 28 29-- 30-- Dumping data for table `0_areas` 31-- 32 33INSERT INTO `0_areas` VALUES(1, 'Global', 0); 34 35-- -------------------------------------------------------- 36 37-- 38-- Table structure for table `0_attachments` 39-- 40 41DROP TABLE IF EXISTS `0_attachments`; 42CREATE TABLE IF NOT EXISTS `0_attachments` ( 43 `id` int(11) unsigned NOT NULL auto_increment, 44 `description` varchar(60) NOT NULL default '', 45 `type_no` int(11) NOT NULL default '0', 46 `trans_no` int(11) NOT NULL default '0', 47 `unique_name` varchar(60) NOT NULL default '', 48 `tran_date` date NOT NULL default '0000-00-00', 49 `filename` varchar(60) NOT NULL default '', 50 `filesize` int(11) NOT NULL default '0', 51 `filetype` varchar(60) NOT NULL default '', 52 PRIMARY KEY (`id`), 53 KEY `type_no` (`type_no`,`trans_no`) 54) ENGINE=MyISAM AUTO_INCREMENT=1 ; 55 56-- 57-- Dumping data for table `0_attachments` 58-- 59 60 61-- -------------------------------------------------------- 62 63-- 64-- Table structure for table `0_audit_trail` 65-- 66 67DROP TABLE IF EXISTS `0_audit_trail`; 68CREATE TABLE IF NOT EXISTS `0_audit_trail` ( 69 `id` int(11) NOT NULL auto_increment, 70 `type` smallint(6) unsigned NOT NULL default '0', 71 `trans_no` int(11) unsigned NOT NULL default '0', 72 `user` smallint(6) unsigned NOT NULL default '0', 73 `stamp` timestamp NOT NULL, 74 `description` varchar(60) default NULL, 75 `fiscal_year` int(11) NOT NULL, 76 `gl_date` date NOT NULL default '0000-00-00', 77 `gl_seq` int(11) unsigned default NULL, 78 PRIMARY KEY (`id`), 79 KEY `Seq` (`fiscal_year`,`gl_date`,`gl_seq`), 80 KEY `Type_and_Number` (`type`,`trans_no`) 81) ENGINE=InnoDB AUTO_INCREMENT=1 ; 82 83-- 84-- Dumping data for table `0_audit_trail` 85-- 86 87 88-- -------------------------------------------------------- 89 90-- 91-- Table structure for table `0_bank_accounts` 92-- 93 94DROP TABLE IF EXISTS `0_bank_accounts`; 95CREATE TABLE IF NOT EXISTS `0_bank_accounts` ( 96 `account_code` varchar(15) NOT NULL default '', 97 `account_type` smallint(6) NOT NULL default '0', 98 `bank_account_name` varchar(60) NOT NULL default '', 99 `bank_account_number` varchar(100) NOT NULL default '', 100 `bank_name` varchar(60) NOT NULL default '', 101 `bank_address` tinytext, 102 `bank_curr_code` char(3) NOT NULL default '', 103 `dflt_curr_act` tinyint(1) NOT NULL default '0', 104 `id` smallint(6) NOT NULL auto_increment, 105 `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00', 106 `ending_reconcile_balance` double NOT NULL default '0', 107 `inactive` tinyint(1) NOT NULL default '0', 108 PRIMARY KEY (`id`), 109 KEY `bank_account_name` (`bank_account_name`), 110 KEY `bank_account_number` (`bank_account_number`), 111 KEY `account_code` (`account_code`) 112) ENGINE=MyISAM AUTO_INCREMENT=3 ; 113 114-- 115-- Dumping data for table `0_bank_accounts` 116-- 117 118INSERT INTO `0_bank_accounts` VALUES('1060', 0, 'Current account', '9999999999', 'Wachovia Bank', '', 'USD', 1, 1, '0000-00-00 00:00:00', 0, 0); 119INSERT 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); 120 121-- -------------------------------------------------------- 122 123-- 124-- Table structure for table `0_bank_trans` 125-- 126 127DROP TABLE IF EXISTS `0_bank_trans`; 128CREATE TABLE IF NOT EXISTS `0_bank_trans` ( 129 `id` int(11) NOT NULL auto_increment, 130 `type` smallint(6) default NULL, 131 `trans_no` int(11) default NULL, 132 `bank_act` varchar(15) NOT NULL default '', 133 `ref` varchar(40) default NULL, 134 `trans_date` date NOT NULL default '0000-00-00', 135 `amount` double default NULL, 136 `dimension_id` int(11) NOT NULL default '0', 137 `dimension2_id` int(11) NOT NULL default '0', 138 `person_type_id` int(11) NOT NULL default '0', 139 `person_id` tinyblob, 140 `reconciled` date default NULL, 141 PRIMARY KEY (`id`), 142 KEY `bank_act` (`bank_act`,`ref`), 143 KEY `type` (`type`,`trans_no`), 144 KEY `bank_act_2` (`bank_act`,`reconciled`), 145 KEY `bank_act_3` (`bank_act`,`trans_date`) 146) ENGINE=InnoDB AUTO_INCREMENT=12 ; 147 148-- 149-- Dumping data for table `0_bank_trans` 150-- 151 152INSERT INTO `0_bank_trans` VALUES(1, 22, 4, '1', '1', '2014-06-21', -3465, 0, 0, 3, '2', NULL); 153INSERT INTO `0_bank_trans` VALUES(2, 26, 1, '1', '', '2014-06-21', -10, 0, 0, 1, '1', NULL); 154INSERT INTO `0_bank_trans` VALUES(3, 26, 1, '1', '', '2014-06-21', -20, 0, 0, 1, '0', NULL); 155INSERT INTO `0_bank_trans` VALUES(4, 0, 18, '1', '1', '2014-02-20', 1000, 0, 0, 0, '', NULL); 156INSERT INTO `0_bank_trans` VALUES(5, 0, 19, '1', '2', '2014-02-21', 4000, 0, 0, 0, '', NULL); 157INSERT INTO `0_bank_trans` VALUES(6, 2, 5, '1', '1', '2014-06-21', 100, 0, 0, 4, '3', NULL); 158INSERT INTO `0_bank_trans` VALUES(7, 1, 8, '1', '1', '2014-06-21', -50, 0, 0, 4, '1', NULL); 159INSERT INTO `0_bank_trans` VALUES(8, 26, 5, '1', '', '2014-06-21', -10, 0, 0, 1, '1', NULL); 160INSERT INTO `0_bank_trans` VALUES(9, 26, 5, '1', '', '2014-06-21', -20, 0, 0, 1, '0', NULL); 161INSERT INTO `0_bank_trans` VALUES(10, 26, 7, '1', '', '2014-06-21', -10, 0, 0, 1, '1', NULL); 162INSERT INTO `0_bank_trans` VALUES(11, 26, 7, '1', '', '2014-06-21', -20, 0, 0, 1, '0', NULL); 163 164-- -------------------------------------------------------- 165 166-- 167-- Table structure for table `0_bom` 168-- 169 170DROP TABLE IF EXISTS `0_bom`; 171CREATE TABLE IF NOT EXISTS `0_bom` ( 172 `id` int(11) NOT NULL auto_increment, 173 `parent` char(20) NOT NULL default '', 174 `component` char(20) NOT NULL default '', 175 `workcentre_added` int(11) NOT NULL default '0', 176 `loc_code` char(5) NOT NULL default '', 177 `quantity` double NOT NULL default '1', 178 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`), 179 KEY `component` (`component`), 180 KEY `id` (`id`), 181 KEY `loc_code` (`loc_code`), 182 KEY `parent` (`parent`,`loc_code`), 183 KEY `workcentre_added` (`workcentre_added`) 184) ENGINE=MyISAM AUTO_INCREMENT=4 ; 185 186-- 187-- Dumping data for table `0_bom` 188-- 189 190INSERT INTO `0_bom` VALUES(1, '3400', '102', 1, 'DEF', 1); 191INSERT INTO `0_bom` VALUES(2, '3400', '103', 1, 'DEF', 1); 192INSERT INTO `0_bom` VALUES(3, '3400', '104', 1, 'DEF', 1); 193 194-- -------------------------------------------------------- 195 196-- 197-- Table structure for table `0_budget_trans` 198-- 199 200DROP TABLE IF EXISTS `0_budget_trans`; 201CREATE TABLE IF NOT EXISTS `0_budget_trans` ( 202 `counter` int(11) NOT NULL auto_increment, 203 `type` smallint(6) NOT NULL default '0', 204 `type_no` bigint(16) NOT NULL default '1', 205 `tran_date` date NOT NULL default '0000-00-00', 206 `account` varchar(15) NOT NULL default '', 207 `memo_` tinytext NOT NULL, 208 `amount` double NOT NULL default '0', 209 `dimension_id` int(11) default '0', 210 `dimension2_id` int(11) default '0', 211 `person_type_id` int(11) default NULL, 212 `person_id` tinyblob, 213 PRIMARY KEY (`counter`), 214 KEY `Type_and_Number` (`type`,`type_no`), 215 KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`) 216) ENGINE=InnoDB AUTO_INCREMENT=1 ; 217 218-- 219-- Dumping data for table `0_budget_trans` 220-- 221 222 223-- -------------------------------------------------------- 224 225-- 226-- Table structure for table `0_chart_class` 227-- 228 229DROP TABLE IF EXISTS `0_chart_class`; 230CREATE TABLE IF NOT EXISTS `0_chart_class` ( 231 `cid` varchar(3) NOT NULL, 232 `class_name` varchar(60) NOT NULL default '', 233 `ctype` tinyint(1) NOT NULL default '0', 234 `inactive` tinyint(1) NOT NULL default '0', 235 PRIMARY KEY (`cid`) 236) ENGINE=MyISAM; 237 238-- 239-- Dumping data for table `0_chart_class` 240-- 241 242INSERT INTO `0_chart_class` VALUES('1', 'Assets', 1, 0); 243INSERT INTO `0_chart_class` VALUES('2', 'Liabilities', 2, 0); 244INSERT INTO `0_chart_class` VALUES('3', 'Income', 4, 0); 245INSERT INTO `0_chart_class` VALUES('4', 'Costs', 6, 0); 246 247-- -------------------------------------------------------- 248 249-- 250-- Table structure for table `0_chart_master` 251-- 252 253DROP TABLE IF EXISTS `0_chart_master`; 254CREATE TABLE IF NOT EXISTS `0_chart_master` ( 255 `account_code` varchar(15) NOT NULL default '', 256 `account_code2` varchar(15) NOT NULL default '', 257 `account_name` varchar(60) NOT NULL default '', 258 `account_type` varchar(10) NOT NULL default '0', 259 `inactive` tinyint(1) NOT NULL default '0', 260 PRIMARY KEY (`account_code`), 261 KEY `account_name` (`account_name`), 262 KEY `accounts_by_type` (`account_type`,`account_code`) 263) ENGINE=MyISAM; 264 265-- 266-- Dumping data for table `0_chart_master` 267-- 268 269INSERT INTO `0_chart_master` VALUES('1060', '', 'Checking Account', '1', 0); 270INSERT INTO `0_chart_master` VALUES('1065', '', 'Petty Cash', '1', 0); 271INSERT INTO `0_chart_master` VALUES('1200', '', 'Accounts Receivables', '1', 0); 272INSERT INTO `0_chart_master` VALUES('1205', '', 'Allowance for doubtful accounts', '1', 0); 273INSERT INTO `0_chart_master` VALUES('1510', '', 'Inventory', '2', 0); 274INSERT INTO `0_chart_master` VALUES('1520', '', 'Stocks of Raw Materials', '2', 0); 275INSERT INTO `0_chart_master` VALUES('1530', '', 'Stocks of Work In Progress', '2', 0); 276INSERT INTO `0_chart_master` VALUES('1540', '', 'Stocks of Finsihed Goods', '2', 0); 277INSERT INTO `0_chart_master` VALUES('1550', '', 'Goods Received Clearing account', '2', 0); 278INSERT INTO `0_chart_master` VALUES('1820', '', 'Office Furniture & Equipment', '3', 0); 279INSERT INTO `0_chart_master` VALUES('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', 0); 280INSERT INTO `0_chart_master` VALUES('1840', '', 'Vehicle', '3', 0); 281INSERT INTO `0_chart_master` VALUES('1845', '', 'Accum. Amort. -Vehicle', '3', 0); 282INSERT INTO `0_chart_master` VALUES('2100', '', 'Accounts Payable', '4', 0); 283INSERT INTO `0_chart_master` VALUES('2110', '', 'Accrued Income Tax - Federal', '4', 0); 284INSERT INTO `0_chart_master` VALUES('2120', '', 'Accrued Income Tax - State', '4', 0); 285INSERT INTO `0_chart_master` VALUES('2130', '', 'Accrued Franchise Tax', '4', 0); 286INSERT INTO `0_chart_master` VALUES('2140', '', 'Accrued Real & Personal Prop Tax', '4', 0); 287INSERT INTO `0_chart_master` VALUES('2150', '', 'Sales Tax', '4', 0); 288INSERT INTO `0_chart_master` VALUES('2160', '', 'Accrued Use Tax Payable', '4', 0); 289INSERT INTO `0_chart_master` VALUES('2210', '', 'Accrued Wages', '4', 0); 290INSERT INTO `0_chart_master` VALUES('2220', '', 'Accrued Comp Time', '4', 0); 291INSERT INTO `0_chart_master` VALUES('2230', '', 'Accrued Holiday Pay', '4', 0); 292INSERT INTO `0_chart_master` VALUES('2240', '', 'Accrued Vacation Pay', '4', 0); 293INSERT INTO `0_chart_master` VALUES('2310', '', 'Accr. Benefits - 401K', '4', 0); 294INSERT INTO `0_chart_master` VALUES('2320', '', 'Accr. Benefits - Stock Purchase', '4', 0); 295INSERT INTO `0_chart_master` VALUES('2330', '', 'Accr. Benefits - Med, Den', '4', 0); 296INSERT INTO `0_chart_master` VALUES('2340', '', 'Accr. Benefits - Payroll Taxes', '4', 0); 297INSERT INTO `0_chart_master` VALUES('2350', '', 'Accr. Benefits - Credit Union', '4', 0); 298INSERT INTO `0_chart_master` VALUES('2360', '', 'Accr. Benefits - Savings Bond', '4', 0); 299INSERT INTO `0_chart_master` VALUES('2370', '', 'Accr. Benefits - Garnish', '4', 0); 300INSERT INTO `0_chart_master` VALUES('2380', '', 'Accr. Benefits - Charity Cont.', '4', 0); 301INSERT INTO `0_chart_master` VALUES('2620', '', 'Bank Loans', '5', 0); 302INSERT INTO `0_chart_master` VALUES('2680', '', 'Loans from Shareholders', '5', 0); 303INSERT INTO `0_chart_master` VALUES('3350', '', 'Common Shares', '6', 0); 304INSERT INTO `0_chart_master` VALUES('3590', '', 'Retained Earnings - prior years', '7', 0); 305INSERT INTO `0_chart_master` VALUES('4010', '', 'Sales', '8', 0); 306INSERT INTO `0_chart_master` VALUES('4430', '', 'Shipping & Handling', '9', 0); 307INSERT INTO `0_chart_master` VALUES('4440', '', 'Interest', '9', 0); 308INSERT INTO `0_chart_master` VALUES('4450', '', 'Foreign Exchange Gain', '9', 0); 309INSERT INTO `0_chart_master` VALUES('4500', '', 'Prompt Payment Discounts', '9', 0); 310INSERT INTO `0_chart_master` VALUES('4510', '', 'Discounts Given', '9', 0); 311INSERT INTO `0_chart_master` VALUES('5010', '', 'Cost of Goods Sold - Retail', '10', 0); 312INSERT INTO `0_chart_master` VALUES('5020', '', 'Material Usage Varaiance', '10', 0); 313INSERT INTO `0_chart_master` VALUES('5030', '', 'Consumable Materials', '10', 0); 314INSERT INTO `0_chart_master` VALUES('5040', '', 'Purchase price Variance', '10', 0); 315INSERT INTO `0_chart_master` VALUES('5050', '', 'Purchases of materials', '10', 0); 316INSERT INTO `0_chart_master` VALUES('5060', '', 'Discounts Received', '10', 0); 317INSERT INTO `0_chart_master` VALUES('5100', '', 'Freight', '10', 0); 318INSERT INTO `0_chart_master` VALUES('5410', '', 'Wages & Salaries', '11', 0); 319INSERT INTO `0_chart_master` VALUES('5420', '', 'Wages - Overtime', '11', 0); 320INSERT INTO `0_chart_master` VALUES('5430', '', 'Benefits - Comp Time', '11', 0); 321INSERT INTO `0_chart_master` VALUES('5440', '', 'Benefits - Payroll Taxes', '11', 0); 322INSERT INTO `0_chart_master` VALUES('5450', '', 'Benefits - Workers Comp', '11', 0); 323INSERT INTO `0_chart_master` VALUES('5460', '', 'Benefits - Pension', '11', 0); 324INSERT INTO `0_chart_master` VALUES('5470', '', 'Benefits - General Benefits', '11', 0); 325INSERT INTO `0_chart_master` VALUES('5510', '', 'Inc Tax Exp - Federal', '11', 0); 326INSERT INTO `0_chart_master` VALUES('5520', '', 'Inc Tax Exp - State', '11', 0); 327INSERT INTO `0_chart_master` VALUES('5530', '', 'Taxes - Real Estate', '11', 0); 328INSERT INTO `0_chart_master` VALUES('5540', '', 'Taxes - Personal Property', '11', 0); 329INSERT INTO `0_chart_master` VALUES('5550', '', 'Taxes - Franchise', '11', 0); 330INSERT INTO `0_chart_master` VALUES('5560', '', 'Taxes - Foreign Withholding', '11', 0); 331INSERT INTO `0_chart_master` VALUES('5610', '', 'Accounting & Legal', '12', 0); 332INSERT INTO `0_chart_master` VALUES('5615', '', 'Advertising & Promotions', '12', 0); 333INSERT INTO `0_chart_master` VALUES('5620', '', 'Bad Debts', '12', 0); 334INSERT INTO `0_chart_master` VALUES('5660', '', 'Amortization Expense', '12', 0); 335INSERT INTO `0_chart_master` VALUES('5685', '', 'Insurance', '12', 0); 336INSERT INTO `0_chart_master` VALUES('5690', '', 'Interest & Bank Charges', '12', 0); 337INSERT INTO `0_chart_master` VALUES('5700', '', 'Office Supplies', '12', 0); 338INSERT INTO `0_chart_master` VALUES('5760', '', 'Rent', '12', 0); 339INSERT INTO `0_chart_master` VALUES('5765', '', 'Repair & Maintenance', '12', 0); 340INSERT INTO `0_chart_master` VALUES('5780', '', 'Telephone', '12', 0); 341INSERT INTO `0_chart_master` VALUES('5785', '', 'Travel & Entertainment', '12', 0); 342INSERT INTO `0_chart_master` VALUES('5790', '', 'Utilities', '12', 0); 343INSERT INTO `0_chart_master` VALUES('5795', '', 'Registrations', '12', 0); 344INSERT INTO `0_chart_master` VALUES('5800', '', 'Licenses', '12', 0); 345INSERT INTO `0_chart_master` VALUES('5810', '', 'Foreign Exchange Loss', '12', 0); 346INSERT INTO `0_chart_master` VALUES('9990', '', 'Year Profit/Loss', '12', 0); 347 348-- -------------------------------------------------------- 349 350-- 351-- Table structure for table `0_chart_types` 352-- 353 354DROP TABLE IF EXISTS `0_chart_types`; 355CREATE TABLE IF NOT EXISTS `0_chart_types` ( 356 `id` varchar(10) NOT NULL, 357 `name` varchar(60) NOT NULL default '', 358 `class_id` varchar(3) NOT NULL default '', 359 `parent` varchar(10) NOT NULL default '-1', 360 `inactive` tinyint(1) NOT NULL default '0', 361 PRIMARY KEY (`id`), 362 KEY `name` (`name`), 363 KEY `class_id` (`class_id`) 364) ENGINE=MyISAM ; 365 366-- 367-- Dumping data for table `0_chart_types` 368-- 369 370INSERT INTO `0_chart_types` VALUES('1', 'Current Assets', '1', '', 0); 371INSERT INTO `0_chart_types` VALUES('2', 'Inventory Assets', '1', '', 0); 372INSERT INTO `0_chart_types` VALUES('3', 'Capital Assets', '1', '', 0); 373INSERT INTO `0_chart_types` VALUES('4', 'Current Liabilities', '2', '', 0); 374INSERT INTO `0_chart_types` VALUES('5', 'Long Term Liabilities', '2', '', 0); 375INSERT INTO `0_chart_types` VALUES('6', 'Share Capital', '2', '', 0); 376INSERT INTO `0_chart_types` VALUES('7', 'Retained Earnings', '2', '', 0); 377INSERT INTO `0_chart_types` VALUES('8', 'Sales Revenue', '3', '', 0); 378INSERT INTO `0_chart_types` VALUES('9', 'Other Revenue', '3', '', 0); 379INSERT INTO `0_chart_types` VALUES('10', 'Cost of Goods Sold', '4', '', 0); 380INSERT INTO `0_chart_types` VALUES('11', 'Payroll Expenses', '4', '', 0); 381INSERT INTO `0_chart_types` VALUES('12', 'General & Administrative expenses', '4', '', 0); 382 383-- -------------------------------------------------------- 384 385-- 386-- Table structure for table `0_comments` 387-- 388 389DROP TABLE IF EXISTS `0_comments`; 390CREATE TABLE IF NOT EXISTS `0_comments` ( 391 `type` int(11) NOT NULL default '0', 392 `id` int(11) NOT NULL default '0', 393 `date_` date default '0000-00-00', 394 `memo_` tinytext, 395 KEY `type_and_id` (`type`,`id`) 396) ENGINE=InnoDB; 397 398-- 399-- Dumping data for table `0_comments` 400-- 401 402 403-- -------------------------------------------------------- 404 405-- 406-- Table structure for table `0_credit_status` 407-- 408 409DROP TABLE IF EXISTS `0_credit_status`; 410CREATE TABLE IF NOT EXISTS `0_credit_status` ( 411 `id` int(11) NOT NULL auto_increment, 412 `reason_description` char(100) NOT NULL default '', 413 `dissallow_invoices` tinyint(1) NOT NULL default '0', 414 `inactive` tinyint(1) NOT NULL default '0', 415 PRIMARY KEY (`id`), 416 UNIQUE KEY `reason_description` (`reason_description`) 417) ENGINE=MyISAM AUTO_INCREMENT=5 ; 418 419-- 420-- Dumping data for table `0_credit_status` 421-- 422 423INSERT INTO `0_credit_status` VALUES(1, 'Good History', 0, 0); 424INSERT INTO `0_credit_status` VALUES(3, 'No more work until payment received', 1, 0); 425INSERT INTO `0_credit_status` VALUES(4, 'In liquidation', 1, 0); 426 427-- -------------------------------------------------------- 428 429-- 430-- Table structure for table `0_crm_categories` 431-- 432 433DROP TABLE IF EXISTS `0_crm_categories`; 434CREATE TABLE IF NOT EXISTS `0_crm_categories` ( 435 `id` int(11) NOT NULL auto_increment COMMENT 'pure technical key', 436 `type` varchar(20) NOT NULL COMMENT 'contact type e.g. customer', 437 `action` varchar(20) NOT NULL COMMENT 'detailed usage e.g. department', 438 `name` varchar(30) NOT NULL COMMENT 'for category selector', 439 `description` tinytext NOT NULL COMMENT 'usage description', 440 `system` tinyint(1) NOT NULL default '0' COMMENT 'nonzero for core system usage', 441 `inactive` tinyint(1) NOT NULL default '0', 442 PRIMARY KEY (`id`), 443 UNIQUE KEY `type` (`type`,`action`), 444 UNIQUE KEY `type_2` (`type`,`name`) 445) ENGINE=InnoDB AUTO_INCREMENT=13 ; 446 447-- 448-- Dumping data for table `0_crm_categories` 449-- 450 451INSERT INTO `0_crm_categories` VALUES(1, 'cust_branch', 'general', 'General', 'General contact data for customer branch (overrides company setting)', 1, 0); 452INSERT INTO `0_crm_categories` VALUES(2, 'cust_branch', 'invoice', 'Invoices', 'Invoice posting (overrides company setting)', 1, 0); 453INSERT INTO `0_crm_categories` VALUES(3, 'cust_branch', 'order', 'Orders', 'Order confirmation (overrides company setting)', 1, 0); 454INSERT INTO `0_crm_categories` VALUES(4, 'cust_branch', 'delivery', 'Deliveries', 'Delivery coordination (overrides company setting)', 1, 0); 455INSERT INTO `0_crm_categories` VALUES(5, 'customer', 'general', 'General', 'General contact data for customer', 1, 0); 456INSERT INTO `0_crm_categories` VALUES(6, 'customer', 'order', 'Orders', 'Order confirmation', 1, 0); 457INSERT INTO `0_crm_categories` VALUES(7, 'customer', 'delivery', 'Deliveries', 'Delivery coordination', 1, 0); 458INSERT INTO `0_crm_categories` VALUES(8, 'customer', 'invoice', 'Invoices', 'Invoice posting', 1, 0); 459INSERT INTO `0_crm_categories` VALUES(9, 'supplier', 'general', 'General', 'General contact data for supplier', 1, 0); 460INSERT INTO `0_crm_categories` VALUES(10, 'supplier', 'order', 'Orders', 'Order confirmation', 1, 0); 461INSERT INTO `0_crm_categories` VALUES(11, 'supplier', 'delivery', 'Deliveries', 'Delivery coordination', 1, 0); 462INSERT INTO `0_crm_categories` VALUES(12, 'supplier', 'invoice', 'Invoices', 'Invoice posting', 1, 0); 463 464-- -------------------------------------------------------- 465 466-- 467-- Table structure for table `0_crm_contacts` 468-- 469 470DROP TABLE IF EXISTS `0_crm_contacts`; 471CREATE TABLE IF NOT EXISTS `0_crm_contacts` ( 472 `id` int(11) NOT NULL auto_increment, 473 `person_id` int(11) NOT NULL default '0' COMMENT 'foreign key to crm_contacts', 474 `type` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories', 475 `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories', 476 `entity_id` varchar(11) default NULL COMMENT 'entity id in related class table', 477 PRIMARY KEY (`id`), 478 KEY `type` (`type`,`action`) 479) ENGINE=InnoDB AUTO_INCREMENT=10 ; 480 481-- 482-- Dumping data for table `0_crm_contacts` 483-- 484 485INSERT INTO `0_crm_contacts` VALUES(1, 1, 'customer', 'general', '1'); 486INSERT INTO `0_crm_contacts` VALUES(2, 2, 'customer', 'general', '2'); 487INSERT INTO `0_crm_contacts` VALUES(3, 3, 'customer', 'general', '3'); 488INSERT INTO `0_crm_contacts` VALUES(4, 4, 'cust_branch', 'general', '1'); 489INSERT INTO `0_crm_contacts` VALUES(5, 5, 'cust_branch', 'general', '2'); 490INSERT INTO `0_crm_contacts` VALUES(6, 6, 'cust_branch', 'general', '3'); 491INSERT INTO `0_crm_contacts` VALUES(7, 7, 'supplier', 'general', '1'); 492INSERT INTO `0_crm_contacts` VALUES(8, 8, 'supplier', 'general', '2'); 493INSERT INTO `0_crm_contacts` VALUES(9, 9, 'supplier', 'general', '3'); 494 495-- -------------------------------------------------------- 496 497-- 498-- Table structure for table `0_crm_persons` 499-- 500 501DROP TABLE IF EXISTS `0_crm_persons`; 502CREATE TABLE IF NOT EXISTS `0_crm_persons` ( 503 `id` int(11) NOT NULL auto_increment, 504 `ref` varchar(30) NOT NULL, 505 `name` varchar(60) NOT NULL, 506 `name2` varchar(60) default NULL, 507 `address` tinytext, 508 `phone` varchar(30) default NULL, 509 `phone2` varchar(30) default NULL, 510 `fax` varchar(30) default NULL, 511 `email` varchar(100) default NULL, 512 `lang` char(5) default NULL, 513 `notes` tinytext NOT NULL, 514 `inactive` tinyint(1) NOT NULL default '0', 515 PRIMARY KEY (`id`), 516 KEY `ref` (`ref`) 517) ENGINE=InnoDB AUTO_INCREMENT=10 ; 518 519-- 520-- Dumping data for table `0_crm_persons` 521-- 522 523INSERT INTO `0_crm_persons` VALUES(1, 'Beefeater', '', NULL, NULL, NULL, NULL, NULL, '', '', '', 0); 524INSERT INTO `0_crm_persons` VALUES(2, 'Ghostbusters', '', NULL, NULL, NULL, NULL, NULL, '', NULL, '', 0); 525INSERT INTO `0_crm_persons` VALUES(3, 'Brezan', '', NULL, NULL, NULL, NULL, NULL, '', '', '', 0); 526INSERT INTO `0_crm_persons` VALUES(4, 'Beefeater', 'Main Branch', NULL, '', '', '', '', '', NULL, '', 0); 527INSERT INTO `0_crm_persons` VALUES(5, 'Ghostbusters', 'Main Branch', NULL, 'Address 1\nAddress 2\nAddress 3', '', '', '', '', NULL, '', 0); 528INSERT INTO `0_crm_persons` VALUES(6, 'Brezan', 'Main Branch', NULL, 'Address 1\nAddress 2\nAddress 3', '', '', '', '', NULL, '', 0); 529INSERT INTO `0_crm_persons` VALUES(7, 'Junk Beer', 'Contact', NULL, 'Address 1\nAddress 2\nAddress 3', '+45 55667788', '', '', '', '', '', 0); 530INSERT INTO `0_crm_persons` VALUES(8, 'Lucky Luke', 'Luke', NULL, 'Address 1\nAddress 2\nAddress 3', '(111) 222.333.444', '', '', '', NULL, '', 0); 531INSERT INTO `0_crm_persons` VALUES(9, 'Money Makers', 'Makers', NULL, 'Address 1\nAddress 2\nAddress 3', '+44 444 555 666', '', '', '', '', '', 0); 532 533-- -------------------------------------------------------- 534 535-- 536-- Table structure for table `0_currencies` 537-- 538 539DROP TABLE IF EXISTS `0_currencies`; 540CREATE TABLE IF NOT EXISTS `0_currencies` ( 541 `currency` varchar(60) NOT NULL default '', 542 `curr_abrev` char(3) NOT NULL default '', 543 `curr_symbol` varchar(10) NOT NULL default '', 544 `country` varchar(100) NOT NULL default '', 545 `hundreds_name` varchar(15) NOT NULL default '', 546 `auto_update` tinyint(1) NOT NULL default '1', 547 `inactive` tinyint(1) NOT NULL default '0', 548 PRIMARY KEY (`curr_abrev`) 549) ENGINE=MyISAM; 550 551-- 552-- Dumping data for table `0_currencies` 553-- 554 555INSERT INTO `0_currencies` VALUES('US Dollars', 'USD', '$', 'United States', 'Cents', 1, 0); 556INSERT INTO `0_currencies` VALUES('CA Dollars', 'CAD', '$', 'Canada', 'Cents', 1, 0); 557INSERT INTO `0_currencies` VALUES('Euro', 'EUR', '?', 'Europe', 'Cents', 1, 0); 558INSERT INTO `0_currencies` VALUES('Pounds', 'GBP', '?', 'England', 'Pence', 1, 0); 559INSERT INTO `0_currencies` VALUES('DK Kroner', 'DKK', 'kr', 'Denmark', 'Ore', 1, 0); 560 561-- -------------------------------------------------------- 562 563-- 564-- Table structure for table `0_cust_allocations` 565-- 566 567DROP TABLE IF EXISTS `0_cust_allocations`; 568CREATE TABLE IF NOT EXISTS `0_cust_allocations` ( 569 `id` int(11) NOT NULL auto_increment, 570 `amt` double unsigned default NULL, 571 `date_alloc` date NOT NULL default '0000-00-00', 572 `trans_no_from` int(11) default NULL, 573 `trans_type_from` int(11) default NULL, 574 `trans_no_to` int(11) default NULL, 575 `trans_type_to` int(11) default NULL, 576 PRIMARY KEY (`id`), 577 KEY `From` (`trans_type_from`,`trans_no_from`), 578 KEY `To` (`trans_type_to`,`trans_no_to`) 579) ENGINE=InnoDB AUTO_INCREMENT=2 ; 580 581-- 582-- Dumping data for table `0_cust_allocations` 583-- 584 585INSERT INTO `0_cust_allocations` VALUES(1, 37.68, '2014-06-21', 3, 11, 18, 10); 586 587-- -------------------------------------------------------- 588 589-- 590-- Table structure for table `0_cust_branch` 591-- 592 593DROP TABLE IF EXISTS `0_cust_branch`; 594CREATE TABLE IF NOT EXISTS `0_cust_branch` ( 595 `branch_code` int(11) NOT NULL auto_increment, 596 `debtor_no` int(11) NOT NULL default '0', 597 `br_name` varchar(60) NOT NULL default '', 598 `branch_ref` varchar(30) NOT NULL default '', 599 `br_address` tinytext NOT NULL, 600 `area` int(11) default NULL, 601 `salesman` int(11) NOT NULL default '0', 602 `contact_name` varchar(60) NOT NULL default '', 603 `default_location` varchar(5) NOT NULL default '', 604 `tax_group_id` int(11) default NULL, 605 `sales_account` varchar(15) NOT NULL default '', 606 `sales_discount_account` varchar(15) NOT NULL default '', 607 `receivables_account` varchar(15) NOT NULL default '', 608 `payment_discount_account` varchar(15) NOT NULL default '', 609 `default_ship_via` int(11) NOT NULL default '1', 610 `disable_trans` tinyint(4) NOT NULL default '0', 611 `br_post_address` tinytext NOT NULL, 612 `group_no` int(11) NOT NULL default '0', 613 `notes` tinytext NOT NULL, 614 `inactive` tinyint(1) NOT NULL default '0', 615 PRIMARY KEY (`branch_code`,`debtor_no`), 616 KEY `branch_code` (`branch_code`), 617 KEY `branch_ref` (`branch_ref`), 618 KEY `group_no` (`group_no`) 619) ENGINE=MyISAM AUTO_INCREMENT=4 ; 620 621-- 622-- Dumping data for table `0_cust_branch` 623-- 624 625INSERT INTO `0_cust_branch` VALUES(1, 1, 'Beefeater Ltd.', 'Beefeater', '', 1, 1, 'Main Branch', 'DEF', 2, '', '4510', '1200', '4500', 1, 0, 'Address 1\nAddress 2\nAddress 3', 0, '', 0); 626INSERT INTO `0_cust_branch` VALUES(2, 2, 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\nAddress 2\nAddress 3', 1, 1, 'Main Branch', 'DEF', 1, '', '4510', '1200', '4500', 1, 0, 'Address 1\nAddress 2\nAddress 3', 0, '', 0); 627INSERT INTO `0_cust_branch` VALUES(3, 3, 'Brezan', 'Brezan', 'Address 1\nAddress 2\nAddress 3', 1, 1, 'Main Branch', 'DEF', 1, '', '4510', '1200', '4500', 1, 0, 'Address 1\nAddress 2\nAddress 3', 0, '', 0); 628 629-- -------------------------------------------------------- 630 631-- 632-- Table structure for table `0_debtors_master` 633-- 634 635DROP TABLE IF EXISTS `0_debtors_master`; 636CREATE TABLE IF NOT EXISTS `0_debtors_master` ( 637 `debtor_no` int(11) NOT NULL auto_increment, 638 `name` varchar(100) NOT NULL default '', 639 `debtor_ref` varchar(30) NOT NULL, 640 `address` tinytext, 641 `tax_id` varchar(55) NOT NULL default '', 642 `curr_code` char(3) NOT NULL default '', 643 `sales_type` int(11) NOT NULL default '1', 644 `dimension_id` int(11) NOT NULL default '0', 645 `dimension2_id` int(11) NOT NULL default '0', 646 `credit_status` int(11) NOT NULL default '0', 647 `payment_terms` int(11) default NULL, 648 `discount` double NOT NULL default '0', 649 `pymt_discount` double NOT NULL default '0', 650 `credit_limit` float NOT NULL default '1000', 651 `notes` tinytext NOT NULL, 652 `inactive` tinyint(1) NOT NULL default '0', 653 PRIMARY KEY (`debtor_no`), 654 KEY `name` (`name`), 655 UNIQUE KEY `debtor_ref` (`debtor_ref`) 656) ENGINE=MyISAM AUTO_INCREMENT=4 ; 657 658-- 659-- Dumping data for table `0_debtors_master` 660-- 661 662INSERT INTO `0_debtors_master` VALUES(1, 'Beefeater Ltd.', 'Beefeater', 'Addr 1\nAddr 2\nAddr 3', '345678', 'GBP', 2, 0, 0, 1, 3, 0, 0, 1000, '', 0); 663INSERT INTO `0_debtors_master` VALUES(2, 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\nAddress 2\nAddress 3', '2222222', 'USD', 1, 0, 0, 1, 4, 0, 0, 1000, '', 0); 664INSERT INTO `0_debtors_master` VALUES(3, 'Brezan', 'Brezan', 'Address 1\nAddress 2\nAddress 3', '7777777', 'EUR', 2, 0, 0, 1, 3, 0, 0, 1000, '', 0); 665 666-- -------------------------------------------------------- 667 668-- 669-- Table structure for table `0_debtor_trans` 670-- 671 672DROP TABLE IF EXISTS `0_debtor_trans`; 673CREATE TABLE IF NOT EXISTS `0_debtor_trans` ( 674 `trans_no` int(11) unsigned NOT NULL default '0', 675 `type` smallint(6) unsigned NOT NULL default '0', 676 `version` tinyint(1) unsigned NOT NULL default '0', 677 `debtor_no` int(11) unsigned default NULL, 678 `branch_code` int(11) NOT NULL default '-1', 679 `tran_date` date NOT NULL default '0000-00-00', 680 `due_date` date NOT NULL default '0000-00-00', 681 `reference` varchar(60) NOT NULL default '', 682 `tpe` int(11) NOT NULL default '0', 683 `order_` int(11) NOT NULL default '0', 684 `ov_amount` double NOT NULL default '0', 685 `ov_gst` double NOT NULL default '0', 686 `ov_freight` double NOT NULL default '0', 687 `ov_freight_tax` double NOT NULL default '0', 688 `ov_discount` double NOT NULL default '0', 689 `alloc` double NOT NULL default '0', 690 `rate` double NOT NULL default '1', 691 `ship_via` int(11) default NULL, 692 `dimension_id` int(11) NOT NULL default '0', 693 `dimension2_id` int(11) NOT NULL default '0', 694 `payment_terms` int(11) default NULL, 695 PRIMARY KEY (`type`,`trans_no`), 696 KEY `debtor_no` (`debtor_no`,`branch_code`), 697 KEY `tran_date` (`tran_date`), 698 KEY `order_` (`order_`) 699) ENGINE=InnoDB; 700 701-- 702-- Dumping data for table `0_debtor_trans` 703-- 704 705INSERT INTO `0_debtor_trans` VALUES(17, 10, 0, 2, 2, '2014-06-21', '2014-06-22', '1', 1, 2, 50, 2.5, 0, 0, 0, 0, 1, 1, 0, 0, 4); 706INSERT INTO `0_debtor_trans` VALUES(18, 10, 1, 3, 3, '2014-06-21', '2014-07-01', '2', 2, 3, 35.89, 1.79, 0, 0, 0, 37.68, 1.3932, 1, 2, 0, 3); 707INSERT INTO `0_debtor_trans` VALUES(19, 10, 0, 2, 2, '2014-06-21', '2014-06-22', '3', 1, 5, 50, 0, 5, 0, 0, 0, 1, 1, 0, 0, 4); 708INSERT INTO `0_debtor_trans` VALUES(3, 11, 0, 3, 3, '2014-06-21', '0000-00-00', '1', 2, 3, 35.89, 1.79, 0, 0, 0, 37.68, 1.3932, 1, 2, 0, 3); 709INSERT INTO `0_debtor_trans` VALUES(2, 13, 0, 1, 1, '2014-06-21', '2014-06-22', '1', 2, 1, 60.8, 0, 10, 0, 0, 0, 1.6445729799917, 1, 0, 0, 3); 710INSERT INTO `0_debtor_trans` VALUES(3, 13, 1, 2, 2, '2014-06-21', '2014-06-22', 'auto', 1, 2, 50, 2.5, 0, 0, 0, 0, 1, 1, 0, 0, 4); 711INSERT INTO `0_debtor_trans` VALUES(4, 13, 1, 3, 3, '2014-06-21', '2014-07-01', 'auto', 2, 3, 35.89, 1.79, 0, 0, 0, 0, 1.3932, 1, 2, 0, 3); 712INSERT INTO `0_debtor_trans` VALUES(5, 13, 1, 2, 2, '2014-06-21', '2014-06-22', 'auto', 1, 5, 50, 0, 5, 0, 0, 0, 1, 1, 0, 0, 4); 713 714-- -------------------------------------------------------- 715 716-- 717-- Table structure for table `0_debtor_trans_details` 718-- 719 720DROP TABLE IF EXISTS `0_debtor_trans_details`; 721CREATE TABLE IF NOT EXISTS `0_debtor_trans_details` ( 722 `id` int(11) NOT NULL auto_increment, 723 `debtor_trans_no` int(11) default NULL, 724 `debtor_trans_type` int(11) default NULL, 725 `stock_id` varchar(20) NOT NULL default '', 726 `description` tinytext, 727 `unit_price` double NOT NULL default '0', 728 `unit_tax` double NOT NULL default '0', 729 `quantity` double NOT NULL default '0', 730 `discount_percent` double NOT NULL default '0', 731 `standard_cost` double NOT NULL default '0', 732 `qty_done` double NOT NULL default '0', 733 `src_id` int(11) NOT NULL, 734 PRIMARY KEY (`id`), 735 KEY `Transaction` (`debtor_trans_type`,`debtor_trans_no`), 736 KEY (`src_id`) 737) ENGINE=InnoDB AUTO_INCREMENT=9 ; 738 739-- 740-- Dumping data for table `0_debtor_trans_details` 741-- 742 743INSERT INTO `0_debtor_trans_details` VALUES(1, 2, 13, '102', '17inch VGA Monitor', 30.4, 0, 2, 0, 10, 0, 1); 744INSERT INTO `0_debtor_trans_details` VALUES(2, 3, 13, '102', '17inch VGA Monitor', 50, 2.5, 1, 0, 10, 1, 2); 745INSERT INTO `0_debtor_trans_details` VALUES(3, 17, 10, '102', '17inch VGA Monitor', 50, 2.5, 1, 0, 10, 2, 2); 746INSERT INTO `0_debtor_trans_details` VALUES(4, 4, 13, '102', '17inch VGA Monitor', 35.89, 1.79, 1, 0, 10, 1,3); 747INSERT INTO `0_debtor_trans_details` VALUES(5, 18, 10, '102', '17inch VGA Monitor', 35.89, 1.79, 1, 0, 10, 1,4); 748INSERT INTO `0_debtor_trans_details` VALUES(6, 5, 13, '102', '17inch VGA Monitor', 50, 2.38, 1, 0, 10, 1,5); 749INSERT INTO `0_debtor_trans_details` VALUES(7, 19, 10, '102', '17inch VGA Monitor', 50, 2.38, 1, 0, 10, 0,6); 750INSERT INTO `0_debtor_trans_details` VALUES(8, 3, 11, '102', '17inch VGA Monitor', 35.89, 1.79, 1, 0, 10, 0,5); 751 752-- -------------------------------------------------------- 753 754-- 755-- Table structure for table `0_dimensions` 756-- 757 758DROP TABLE IF EXISTS `0_dimensions`; 759CREATE TABLE IF NOT EXISTS `0_dimensions` ( 760 `id` int(11) NOT NULL auto_increment, 761 `reference` varchar(60) NOT NULL default '', 762 `name` varchar(60) NOT NULL default '', 763 `type_` tinyint(1) NOT NULL default '1', 764 `closed` tinyint(1) NOT NULL default '0', 765 `date_` date NOT NULL default '0000-00-00', 766 `due_date` date NOT NULL default '0000-00-00', 767 PRIMARY KEY (`id`), 768 UNIQUE KEY `reference` (`reference`), 769 KEY `date_` (`date_`), 770 KEY `due_date` (`due_date`), 771 KEY `type_` (`type_`) 772) ENGINE=InnoDB AUTO_INCREMENT=3 ; 773 774-- 775-- Dumping data for table `0_dimensions` 776-- 777 778INSERT INTO `0_dimensions` VALUES(1, '1', 'Support', 1, 0, '2014-06-21', '2020-07-11'); 779INSERT INTO `0_dimensions` VALUES(2, '2', 'Development', 1, 0, '2014-06-21', '2020-07-11'); 780 781-- -------------------------------------------------------- 782 783-- 784-- Table structure for table `0_exchange_rates` 785-- 786 787DROP TABLE IF EXISTS `0_exchange_rates`; 788CREATE TABLE IF NOT EXISTS `0_exchange_rates` ( 789 `id` int(11) NOT NULL auto_increment, 790 `curr_code` char(3) NOT NULL default '', 791 `rate_buy` double NOT NULL default '0', 792 `rate_sell` double NOT NULL default '0', 793 `date_` date NOT NULL default '0000-00-00', 794 PRIMARY KEY (`id`), 795 UNIQUE KEY `curr_code` (`curr_code`,`date_`) 796) ENGINE=MyISAM AUTO_INCREMENT=4 ; 797 798-- 799-- Dumping data for table `0_exchange_rates` 800-- 801 802INSERT INTO `0_exchange_rates` VALUES(1, 'DKK', 0.18717252868313, 0.18717252868313, '2014-06-21'); 803INSERT INTO `0_exchange_rates` VALUES(2, 'GBP', 1.6445729799917, 1.6445729799917, '2014-06-21'); 804INSERT INTO `0_exchange_rates` VALUES(3, 'EUR', 1.3932, 1.3932, '2014-06-21'); 805 806-- -------------------------------------------------------- 807 808-- 809-- Table structure for table `0_fiscal_year` 810-- 811 812DROP TABLE IF EXISTS `0_fiscal_year`; 813CREATE TABLE IF NOT EXISTS `0_fiscal_year` ( 814 `id` int(11) NOT NULL auto_increment, 815 `begin` date default '0000-00-00', 816 `end` date default '0000-00-00', 817 `closed` tinyint(1) NOT NULL default '0', 818 PRIMARY KEY (`id`), 819 UNIQUE KEY `begin` (`begin`), 820 UNIQUE KEY `end` (`end`) 821) ENGINE=InnoDB AUTO_INCREMENT=5 ; 822 823-- 824-- Dumping data for table `0_fiscal_year` 825-- 826 827INSERT INTO `0_fiscal_year` VALUES(1, '2013-01-01', '2013-12-31', 0); 828INSERT INTO `0_fiscal_year` VALUES(2, '2014-01-01', '2014-12-31', 0); 829INSERT INTO `0_fiscal_year` VALUES(3, '2015-01-01', '2015-12-31', 0); 830INSERT INTO `0_fiscal_year` VALUES(4, '2016-01-01', '2016-12-31', 0); 831 832-- 833-- Table structure for table `0_gl_trans` 834-- 835 836DROP TABLE IF EXISTS `0_gl_trans`; 837CREATE TABLE IF NOT EXISTS `0_gl_trans` ( 838 `counter` int(11) NOT NULL auto_increment, 839 `type` smallint(6) NOT NULL default '0', 840 `type_no` bigint(16) NOT NULL default '1', 841 `tran_date` date NOT NULL default '0000-00-00', 842 `account` varchar(15) NOT NULL default '', 843 `memo_` tinytext NOT NULL, 844 `amount` double NOT NULL default '0', 845 `dimension_id` int(11) NOT NULL default '0', 846 `dimension2_id` int(11) NOT NULL default '0', 847 `person_type_id` int(11) default NULL, 848 `person_id` tinyblob, 849 PRIMARY KEY (`counter`), 850 KEY `Type_and_Number` (`type`,`type_no`), 851 KEY `dimension_id` (`dimension_id`), 852 KEY `dimension2_id` (`dimension2_id`), 853 KEY `tran_date` (`tran_date`), 854 KEY `account_and_tran_date` (`account`,`tran_date`) 855) ENGINE=InnoDB AUTO_INCREMENT=84 ; 856 857-- 858-- Dumping data for table `0_gl_trans` 859-- 860 861INSERT INTO `0_gl_trans` VALUES(1, 20, 7, '2014-06-21', '2100', '', -3465, 0, 0, 3, '2'); 862INSERT INTO `0_gl_trans` VALUES(2, 20, 7, '2014-06-21', '1510', '', 1000, 0, 0, 3, '2'); 863INSERT INTO `0_gl_trans` VALUES(3, 20, 7, '2014-06-21', '1510', '', 1100, 0, 0, 3, '2'); 864INSERT INTO `0_gl_trans` VALUES(4, 20, 7, '2014-06-21', '1510', '', 1200, 0, 0, 3, '2'); 865INSERT INTO `0_gl_trans` VALUES(5, 20, 7, '2014-06-21', '2150', '', 165, 0, 0, 3, '2'); 866INSERT INTO `0_gl_trans` VALUES(6, 22, 4, '2014-06-21', '2100', '', 3465, 0, 0, 3, '2'); 867INSERT INTO `0_gl_trans` VALUES(7, 22, 4, '2014-06-21', '1060', '', -3465, 0, 0, 3, '2'); 868INSERT INTO `0_gl_trans` VALUES(8, 26, 1, '2014-06-21', '1510', '', -100, 0, 0, NULL, ''); 869INSERT INTO `0_gl_trans` VALUES(9, 26, 1, '2014-06-21', '1510', '', -110, 0, 0, NULL, ''); 870INSERT INTO `0_gl_trans` VALUES(10, 26, 1, '2014-06-21', '1510', '', -120, 0, 0, NULL, ''); 871INSERT INTO `0_gl_trans` VALUES(11, 26, 1, '2014-06-21', '1060', 'Overhead Cost', -10, 0, 0, 1, '1'); 872INSERT INTO `0_gl_trans` VALUES(12, 26, 1, '2014-06-21', '1530', 'Overhead Cost', 10, 0, 0, 1, '1'); 873INSERT INTO `0_gl_trans` VALUES(13, 26, 1, '2014-06-21', '1060', 'Labour Cost', -20, 0, 0, 1, '0'); 874INSERT INTO `0_gl_trans` VALUES(14, 26, 1, '2014-06-21', '1530', 'Labour Cost', 20, 0, 0, 1, '0'); 875INSERT INTO `0_gl_trans` VALUES(15, 26, 1, '2014-06-21', '1510', '', 330, 0, 0, NULL, ''); 876INSERT INTO `0_gl_trans` VALUES(16, 13, 2, '2014-06-21', '5010', '', 20, 0, 0, 2, '1'); 877INSERT INTO `0_gl_trans` VALUES(17, 13, 2, '2014-06-21', '1510', '', -20, 0, 0, 2, '1'); 878INSERT INTO `0_gl_trans` VALUES(18, 13, 3, '2014-06-21', '5010', '', 10, 0, 0, 2, '2'); 879INSERT INTO `0_gl_trans` VALUES(19, 13, 3, '2014-06-21', '1510', '', -10, 0, 0, 2, '2'); 880INSERT INTO `0_gl_trans` VALUES(20, 10, 17, '2014-06-21', '4010', '', -50, 0, 0, 2, '2'); 881INSERT INTO `0_gl_trans` VALUES(21, 10, 17, '2014-06-21', '1200', '', 52.5, 0, 0, 2, '2'); 882INSERT INTO `0_gl_trans` VALUES(22, 10, 17, '2014-06-21', '2150', '', -2.5, 0, 0, 2, '2'); 883INSERT INTO `0_gl_trans` VALUES(23, 13, 4, '2014-06-21', '5010', '', 10, 2, 0, 2, '3'); 884INSERT INTO `0_gl_trans` VALUES(24, 13, 4, '2014-06-21', '1510', '', -10, 0, 0, 2, '3'); 885INSERT INTO `0_gl_trans` VALUES(25, 10, 18, '2014-06-21', '4010', '', -50, 2, 0, 2, '3'); 886INSERT INTO `0_gl_trans` VALUES(26, 10, 18, '2014-06-21', '1200', '', 52.5, 0, 0, 2, '3'); 887INSERT INTO `0_gl_trans` VALUES(27, 10, 18, '2014-06-21', '2150', '', -2.5, 0, 0, 2, '3'); 888INSERT INTO `0_gl_trans` VALUES(28, 0, 18, '2014-02-20', '1060', '', 1000, 0, 0, NULL, ''); 889INSERT INTO `0_gl_trans` VALUES(29, 0, 18, '2014-02-20', '3350', '', -1000, 0, 0, NULL, ''); 890INSERT INTO `0_gl_trans` VALUES(30, 0, 19, '2014-02-21', '1060', '', 4000, 0, 0, NULL, ''); 891INSERT INTO `0_gl_trans` VALUES(31, 0, 19, '2014-02-21', '3350', '', -4000, 0, 0, NULL, ''); 892INSERT INTO `0_gl_trans` VALUES(32, 26, 3, '2014-06-21', '1510', '', -20, 0, 0, NULL, ''); 893INSERT INTO `0_gl_trans` VALUES(33, 26, 3, '2014-06-21', '1510', '', -22, 0, 0, NULL, ''); 894INSERT INTO `0_gl_trans` VALUES(34, 26, 3, '2014-06-21', '1510', '', -24, 0, 0, NULL, ''); 895INSERT INTO `0_gl_trans` VALUES(35, 26, 3, '2014-06-21', '1540', '', 66, 0, 0, NULL, ''); 896INSERT INTO `0_gl_trans` VALUES(36, 2, 5, '2014-06-21', '2150', 'Cash Sales', -4.76, 0, 0, 4, '3'); 897INSERT INTO `0_gl_trans` VALUES(37, 2, 5, '2014-06-21', '4010', 'Cash Sales', -95.24, 0, 0, 4, '3'); 898INSERT INTO `0_gl_trans` VALUES(38, 2, 5, '2014-06-21', '1060', '', 100, 0, 0, 4, '3'); 899INSERT INTO `0_gl_trans` VALUES(39, 1, 8, '2014-06-21', '2150', 'Maintenance', 2.38, 0, 0, 4, '1'); 900INSERT INTO `0_gl_trans` VALUES(40, 1, 8, '2014-06-21', '5765', 'Maintenance', 47.62, 0, 0, 4, '1'); 901INSERT INTO `0_gl_trans` VALUES(41, 1, 8, '2014-06-21', '1060', '', -50, 0, 0, 4, '1'); 902INSERT INTO `0_gl_trans` VALUES(42, 20, 8, '2014-06-21', '2100', '', -20, 0, 0, 3, '2'); 903INSERT INTO `0_gl_trans` VALUES(43, 20, 8, '2014-06-21', '2150', '', 0.95, 0, 0, 3, '2'); 904INSERT INTO `0_gl_trans` VALUES(44, 20, 8, '2014-06-21', '5780', '', 19.05, 0, 0, 3, '2'); 905INSERT INTO `0_gl_trans` VALUES(45, 26, 4, '2014-06-21', '1510', '', -40, 0, 0, NULL, ''); 906INSERT INTO `0_gl_trans` VALUES(46, 26, 4, '2014-06-21', '1510', '', -44, 0, 0, NULL, ''); 907INSERT INTO `0_gl_trans` VALUES(47, 26, 4, '2014-06-21', '1510', '', -48, 0, 0, NULL, ''); 908INSERT INTO `0_gl_trans` VALUES(48, 26, 4, '2014-06-21', '1540', '', 132, 0, 0, NULL, ''); 909INSERT INTO `0_gl_trans` VALUES(49, 26, 2, '2014-06-21', '1510', '', -20, 0, 0, NULL, ''); 910INSERT INTO `0_gl_trans` VALUES(50, 26, 2, '2014-06-21', '1510', '', -22, 0, 0, NULL, ''); 911INSERT INTO `0_gl_trans` VALUES(51, 26, 2, '2014-06-21', '1510', '', -24, 0, 0, NULL, ''); 912INSERT INTO `0_gl_trans` VALUES(52, 26, 2, '2014-06-21', '1540', '', 66, 0, 0, NULL, ''); 913INSERT INTO `0_gl_trans` VALUES(53, 26, 5, '2014-06-21', '1510', '', -50, 0, 0, NULL, ''); 914INSERT INTO `0_gl_trans` VALUES(54, 26, 5, '2014-06-21', '1510', '', -55, 0, 0, NULL, ''); 915INSERT INTO `0_gl_trans` VALUES(55, 26, 5, '2014-06-21', '1510', '', -60, 0, 0, NULL, ''); 916INSERT INTO `0_gl_trans` VALUES(56, 26, 5, '2014-06-21', '1060', 'Overhead Cost', -10, 0, 0, 1, '1'); 917INSERT INTO `0_gl_trans` VALUES(57, 26, 5, '2014-06-21', '1530', 'Overhead Cost', 10, 0, 0, 1, '1'); 918INSERT INTO `0_gl_trans` VALUES(58, 26, 5, '2014-06-21', '1060', 'Labour Cost', -20, 0, 0, 1, '0'); 919INSERT INTO `0_gl_trans` VALUES(59, 26, 5, '2014-06-21', '1530', 'Labour Cost', 20, 0, 0, 1, '0'); 920INSERT INTO `0_gl_trans` VALUES(60, 26, 5, '2014-06-21', '1540', '', 165, 0, 0, NULL, ''); 921INSERT INTO `0_gl_trans` VALUES(61, 26, 6, '2014-06-21', '1510', '', 50, 0, 0, NULL, ''); 922INSERT INTO `0_gl_trans` VALUES(62, 26, 6, '2014-06-21', '1510', '', 55, 0, 0, NULL, ''); 923INSERT INTO `0_gl_trans` VALUES(63, 26, 6, '2014-06-21', '1510', '', 60, 0, 0, NULL, ''); 924INSERT INTO `0_gl_trans` VALUES(64, 26, 6, '2014-06-21', '1540', '', -165, 0, 0, NULL, ''); 925INSERT INTO `0_gl_trans` VALUES(65, 26, 7, '2014-06-21', '1510', '', 20, 0, 0, NULL, ''); 926INSERT INTO `0_gl_trans` VALUES(66, 26, 7, '2014-06-21', '1510', '', 22, 0, 0, NULL, ''); 927INSERT INTO `0_gl_trans` VALUES(67, 26, 7, '2014-06-21', '1510', '', 24, 0, 0, NULL, ''); 928INSERT INTO `0_gl_trans` VALUES(68, 26, 7, '2014-06-21', '1060', 'Overhead Cost', -10, 0, 0, 1, '1'); 929INSERT INTO `0_gl_trans` VALUES(69, 26, 7, '2014-06-21', '1530', 'Overhead Cost', 10, 0, 0, 1, '1'); 930INSERT INTO `0_gl_trans` VALUES(70, 26, 7, '2014-06-21', '1060', 'Labour Cost', -20, 0, 0, 1, '0'); 931INSERT INTO `0_gl_trans` VALUES(71, 26, 7, '2014-06-21', '1530', 'Labour Cost', 20, 0, 0, 1, '0'); 932INSERT INTO `0_gl_trans` VALUES(72, 26, 7, '2014-06-21', '1540', '', -66, 0, 0, NULL, ''); 933INSERT INTO `0_gl_trans` VALUES(73, 13, 5, '2014-06-21', '5010', '', 10, 0, 0, 2, '2'); 934INSERT INTO `0_gl_trans` VALUES(74, 13, 5, '2014-06-21', '1510', '', -10, 0, 0, 2, '2'); 935INSERT INTO `0_gl_trans` VALUES(75, 10, 19, '2014-06-21', '4010', '', -47.62, 0, 0, 2, '2'); 936INSERT INTO `0_gl_trans` VALUES(76, 10, 19, '2014-06-21', '1200', '', 55, 0, 0, 2, '2'); 937INSERT INTO `0_gl_trans` VALUES(77, 10, 19, '2014-06-21', '4430', '', -5, 0, 0, 2, '2'); 938INSERT INTO `0_gl_trans` VALUES(78, 10, 19, '2014-06-21', '2150', '', -2.38, 0, 0, 2, '2'); 939INSERT INTO `0_gl_trans` VALUES(79, 11, 3, '2014-06-21', '5010', '', -10, 2, 0, 2, '3'); 940INSERT INTO `0_gl_trans` VALUES(80, 11, 3, '2014-06-21', '1510', '', 10, 0, 0, 2, '3'); 941INSERT INTO `0_gl_trans` VALUES(81, 11, 3, '2014-06-21', '4010', '', 50, 2, 0, 2, '3'); 942INSERT INTO `0_gl_trans` VALUES(82, 11, 3, '2014-06-21', '1200', '', -52.5, 0, 0, 2, '3'); 943INSERT INTO `0_gl_trans` VALUES(83, 11, 3, '2014-06-21', '2150', '', 2.5, 0, 0, 2, '3'); 944 945-- -------------------------------------------------------- 946 947-- 948-- Table structure for table `0_grn_batch` 949-- 950 951DROP TABLE IF EXISTS `0_grn_batch`; 952CREATE TABLE IF NOT EXISTS `0_grn_batch` ( 953 `id` int(11) NOT NULL auto_increment, 954 `supplier_id` int(11) NOT NULL default '0', 955 `purch_order_no` int(11) default NULL, 956 `reference` varchar(60) NOT NULL default '', 957 `delivery_date` date NOT NULL default '0000-00-00', 958 `loc_code` varchar(5) default NULL, 959 PRIMARY KEY (`id`), 960 KEY `delivery_date` (`delivery_date`), 961 KEY `purch_order_no` (`purch_order_no`) 962) ENGINE=InnoDB AUTO_INCREMENT=2 ; 963 964-- 965-- Dumping data for table `0_grn_batch` 966-- 967 968INSERT INTO `0_grn_batch` VALUES(1, 2, 1, '1', '2014-06-21', 'DEF'); 969 970-- -------------------------------------------------------- 971 972-- 973-- Table structure for table `0_grn_items` 974-- 975 976DROP TABLE IF EXISTS `0_grn_items`; 977CREATE TABLE IF NOT EXISTS `0_grn_items` ( 978 `id` int(11) NOT NULL auto_increment, 979 `grn_batch_id` int(11) default NULL, 980 `po_detail_item` int(11) NOT NULL default '0', 981 `item_code` varchar(20) NOT NULL default '', 982 `description` tinytext, 983 `qty_recd` double NOT NULL default '0', 984 `quantity_inv` double NOT NULL default '0', 985 PRIMARY KEY (`id`), 986 KEY `grn_batch_id` (`grn_batch_id`) 987) ENGINE=InnoDB AUTO_INCREMENT=4 ; 988 989-- 990-- Dumping data for table `0_grn_items` 991-- 992 993INSERT INTO `0_grn_items` VALUES(1, 1, 1, '102', '17inch VGA Monitor', 100, 100); 994INSERT INTO `0_grn_items` VALUES(2, 1, 2, '103', '32MB VGA Card', 100, 100); 995INSERT INTO `0_grn_items` VALUES(3, 1, 3, '104', '52x CD Drive', 100, 100); 996 997-- -------------------------------------------------------- 998 999-- 1000-- Table structure for table `0_groups` 1001-- 1002 1003DROP TABLE IF EXISTS `0_groups`; 1004CREATE TABLE IF NOT EXISTS `0_groups` ( 1005 `id` smallint(6) unsigned NOT NULL auto_increment, 1006 `description` varchar(60) NOT NULL default '', 1007 `inactive` tinyint(1) NOT NULL default '0', 1008 PRIMARY KEY (`id`), 1009 UNIQUE KEY `description` (`description`) 1010) ENGINE=MyISAM AUTO_INCREMENT=4 ; 1011 1012-- 1013-- Dumping data for table `0_groups` 1014-- 1015 1016INSERT INTO `0_groups` VALUES(1, 'Small', 0); 1017INSERT INTO `0_groups` VALUES(2, 'Medium', 0); 1018INSERT INTO `0_groups` VALUES(3, 'Large', 0); 1019 1020-- -------------------------------------------------------- 1021 1022-- 1023-- Table structure for table `0_item_codes` 1024-- 1025 1026DROP TABLE IF EXISTS `0_item_codes`; 1027CREATE TABLE IF NOT EXISTS `0_item_codes` ( 1028 `id` int(11) unsigned NOT NULL auto_increment, 1029 `item_code` varchar(20) NOT NULL, 1030 `stock_id` varchar(20) NOT NULL, 1031 `description` varchar(200) NOT NULL default '', 1032 `category_id` smallint(6) unsigned NOT NULL, 1033 `quantity` double NOT NULL default '1', 1034 `is_foreign` tinyint(1) NOT NULL default '0', 1035 `inactive` tinyint(1) NOT NULL default '0', 1036 PRIMARY KEY (`id`), 1037 UNIQUE KEY `stock_id` (`stock_id`,`item_code`), 1038 KEY `item_code` (`item_code`) 1039) ENGINE=MyISAM AUTO_INCREMENT=6 ; 1040 1041-- 1042-- Dumping data for table `0_item_codes` 1043-- 1044 1045INSERT INTO `0_item_codes` VALUES(1, '102', '102', '17inch VGA Monitor', 1, 1, 0, 0); 1046INSERT INTO `0_item_codes` VALUES(2, '103', '103', '32MB VGA Card', 1, 1, 0, 0); 1047INSERT INTO `0_item_codes` VALUES(3, '104', '104', '52x CD Drive', 1, 1, 0, 0); 1048INSERT INTO `0_item_codes` VALUES(4, '3400', '3400', 'P4 Business System', 3, 1, 0, 0); 1049INSERT INTO `0_item_codes` VALUES(5, '201', '201', 'Assembly Labour', 4, 1, 0, 0); 1050 1051-- -------------------------------------------------------- 1052 1053-- 1054-- Table structure for table `0_item_tax_types` 1055-- 1056 1057DROP TABLE IF EXISTS `0_item_tax_types`; 1058CREATE TABLE IF NOT EXISTS `0_item_tax_types` ( 1059 `id` int(11) NOT NULL auto_increment, 1060 `name` varchar(60) NOT NULL default '', 1061 `exempt` tinyint(1) NOT NULL default '0', 1062 `inactive` tinyint(1) NOT NULL default '0', 1063 PRIMARY KEY (`id`), 1064 UNIQUE KEY `name` (`name`) 1065) ENGINE=InnoDB AUTO_INCREMENT=2 ; 1066 1067-- 1068-- Dumping data for table `0_item_tax_types` 1069-- 1070 1071INSERT INTO `0_item_tax_types` VALUES(1, 'Regular', 0, 0); 1072 1073-- -------------------------------------------------------- 1074 1075-- 1076-- Table structure for table `0_item_tax_type_exemptions` 1077-- 1078 1079DROP TABLE IF EXISTS `0_item_tax_type_exemptions`; 1080CREATE TABLE IF NOT EXISTS `0_item_tax_type_exemptions` ( 1081 `item_tax_type_id` int(11) NOT NULL default '0', 1082 `tax_type_id` int(11) NOT NULL default '0', 1083 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`) 1084) ENGINE=InnoDB; 1085 1086-- 1087-- Dumping data for table `0_item_tax_type_exemptions` 1088-- 1089 1090 1091-- -------------------------------------------------------- 1092 1093-- 1094-- Table structure for table `0_item_units` 1095-- 1096 1097DROP TABLE IF EXISTS `0_item_units`; 1098CREATE TABLE IF NOT EXISTS `0_item_units` ( 1099 `abbr` varchar(20) NOT NULL, 1100 `name` varchar(40) NOT NULL, 1101 `decimals` tinyint(2) NOT NULL, 1102 `inactive` tinyint(1) NOT NULL default '0', 1103 PRIMARY KEY (`abbr`), 1104 UNIQUE KEY `name` (`name`) 1105) ENGINE=MyISAM; 1106 1107-- 1108-- Dumping data for table `0_item_units` 1109-- 1110 1111INSERT INTO `0_item_units` VALUES('each', 'Each', 0, 0); 1112INSERT INTO `0_item_units` VALUES('hr', 'Hours', 1, 0); 1113 1114-- -------------------------------------------------------- 1115 1116-- 1117-- Table structure for table `0_locations` 1118-- 1119 1120DROP TABLE IF EXISTS `0_locations`; 1121CREATE TABLE IF NOT EXISTS `0_locations` ( 1122 `loc_code` varchar(5) NOT NULL default '', 1123 `location_name` varchar(60) NOT NULL default '', 1124 `delivery_address` tinytext NOT NULL, 1125 `phone` varchar(30) NOT NULL default '', 1126 `phone2` varchar(30) NOT NULL default '', 1127 `fax` varchar(30) NOT NULL default '', 1128 `email` varchar(100) NOT NULL default '', 1129 `contact` varchar(30) NOT NULL default '', 1130 `inactive` tinyint(1) NOT NULL default '0', 1131 PRIMARY KEY (`loc_code`) 1132) ENGINE=MyISAM; 1133 1134-- 1135-- Dumping data for table `0_locations` 1136-- 1137 1138INSERT INTO `0_locations` VALUES('DEF', 'Default', 'Delivery 1\nDelivery 2\nDelivery 3', '', '', '', '', '', 0); 1139 1140-- -------------------------------------------------------- 1141 1142-- 1143-- Table structure for table `0_loc_stock` 1144-- 1145 1146DROP TABLE IF EXISTS `0_loc_stock`; 1147CREATE TABLE IF NOT EXISTS `0_loc_stock` ( 1148 `loc_code` char(5) NOT NULL default '', 1149 `stock_id` char(20) NOT NULL default '', 1150 `reorder_level` bigint(20) NOT NULL default '0', 1151 PRIMARY KEY (`loc_code`,`stock_id`), 1152 KEY `stock_id` (`stock_id`) 1153) ENGINE=InnoDB; 1154 1155-- 1156-- Dumping data for table `0_loc_stock` 1157-- 1158 1159INSERT INTO `0_loc_stock` VALUES('DEF', '102', 0); 1160INSERT INTO `0_loc_stock` VALUES('DEF', '103', 0); 1161INSERT INTO `0_loc_stock` VALUES('DEF', '104', 0); 1162INSERT INTO `0_loc_stock` VALUES('DEF', '201', 0); 1163INSERT INTO `0_loc_stock` VALUES('DEF', '3400', 0); 1164 1165-- -------------------------------------------------------- 1166 1167-- 1168-- Table structure for table `0_movement_types` 1169-- 1170 1171DROP TABLE IF EXISTS `0_movement_types`; 1172CREATE TABLE IF NOT EXISTS `0_movement_types` ( 1173 `id` int(11) NOT NULL auto_increment, 1174 `name` varchar(60) NOT NULL default '', 1175 `inactive` tinyint(1) NOT NULL default '0', 1176 PRIMARY KEY (`id`), 1177 UNIQUE KEY `name` (`name`) 1178) ENGINE=MyISAM AUTO_INCREMENT=2 ; 1179 1180-- 1181-- Dumping data for table `0_movement_types` 1182-- 1183 1184INSERT INTO `0_movement_types` VALUES(1, 'Adjustment', 0); 1185 1186-- -------------------------------------------------------- 1187 1188-- 1189-- Table structure for table `0_payment_terms` 1190-- 1191 1192DROP TABLE IF EXISTS `0_payment_terms`; 1193CREATE TABLE IF NOT EXISTS `0_payment_terms` ( 1194 `terms_indicator` int(11) NOT NULL auto_increment, 1195 `terms` char(80) NOT NULL default '', 1196 `days_before_due` smallint(6) NOT NULL default '0', 1197 `day_in_following_month` smallint(6) NOT NULL default '0', 1198 `inactive` tinyint(1) NOT NULL default '0', 1199 PRIMARY KEY (`terms_indicator`), 1200 UNIQUE KEY `terms` (`terms`) 1201) ENGINE=MyISAM AUTO_INCREMENT=5 ; 1202 1203-- 1204-- Dumping data for table `0_payment_terms` 1205-- 1206 1207INSERT INTO `0_payment_terms` VALUES(1, 'Due 15th Of the Following Month', 0, 17, 0); 1208INSERT INTO `0_payment_terms` VALUES(2, 'Due By End Of The Following Month', 0, 30, 0); 1209INSERT INTO `0_payment_terms` VALUES(3, 'Payment due within 10 days', 10, 0, 0); 1210INSERT INTO `0_payment_terms` VALUES(4, 'Cash Only', 0, 0, 0); 1211 1212-- -------------------------------------------------------- 1213 1214-- 1215-- Table structure for table `0_prices` 1216-- 1217 1218DROP TABLE IF EXISTS `0_prices`; 1219CREATE TABLE IF NOT EXISTS `0_prices` ( 1220 `id` int(11) NOT NULL auto_increment, 1221 `stock_id` varchar(20) NOT NULL default '', 1222 `sales_type_id` int(11) NOT NULL default '0', 1223 `curr_abrev` char(3) NOT NULL default '', 1224 `price` double NOT NULL default '0', 1225 PRIMARY KEY (`id`), 1226 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`) 1227) ENGINE=MyISAM AUTO_INCREMENT=5 ; 1228 1229-- 1230-- Dumping data for table `0_prices` 1231-- 1232 1233INSERT INTO `0_prices` VALUES(1, '3400', 1, 'USD', 100); 1234INSERT INTO `0_prices` VALUES(2, '102', 1, 'USD', 50); 1235INSERT INTO `0_prices` VALUES(3, '103', 1, 'USD', 55); 1236INSERT INTO `0_prices` VALUES(4, '104', 1, 'USD', 60); 1237 1238-- -------------------------------------------------------- 1239 1240-- 1241-- Table structure for table `0_printers` 1242-- 1243 1244DROP TABLE IF EXISTS `0_printers`; 1245CREATE TABLE IF NOT EXISTS `0_printers` ( 1246 `id` tinyint(3) unsigned NOT NULL auto_increment, 1247 `name` varchar(20) NOT NULL, 1248 `description` varchar(60) NOT NULL, 1249 `queue` varchar(20) NOT NULL, 1250 `host` varchar(40) NOT NULL, 1251 `port` smallint(11) unsigned NOT NULL, 1252 `timeout` tinyint(3) unsigned NOT NULL, 1253 PRIMARY KEY (`id`), 1254 UNIQUE KEY `name` (`name`) 1255) ENGINE=MyISAM AUTO_INCREMENT=4 ; 1256 1257-- 1258-- Dumping data for table `0_printers` 1259-- 1260 1261INSERT INTO `0_printers` VALUES(1, 'QL500', 'Label printer', 'QL500', 'server', 127, 20); 1262INSERT INTO `0_printers` VALUES(2, 'Samsung', 'Main network printer', 'scx4521F', 'server', 515, 5); 1263INSERT INTO `0_printers` VALUES(3, 'Local', 'Local print server at user IP', 'lp', '', 515, 10); 1264 1265-- -------------------------------------------------------- 1266 1267-- 1268-- Table structure for table `0_print_profiles` 1269-- 1270 1271DROP TABLE IF EXISTS `0_print_profiles`; 1272CREATE TABLE IF NOT EXISTS `0_print_profiles` ( 1273 `id` smallint(6) unsigned NOT NULL auto_increment, 1274 `profile` varchar(30) NOT NULL, 1275 `report` varchar(5) default NULL, 1276 `printer` tinyint(3) unsigned default NULL, 1277 PRIMARY KEY (`id`), 1278 UNIQUE KEY `profile` (`profile`,`report`) 1279) ENGINE=MyISAM AUTO_INCREMENT=10 ; 1280 1281-- 1282-- Dumping data for table `0_print_profiles` 1283-- 1284 1285INSERT INTO `0_print_profiles` VALUES(1, 'Out of office', '', 0); 1286INSERT INTO `0_print_profiles` VALUES(2, 'Sales Department', '', 0); 1287INSERT INTO `0_print_profiles` VALUES(3, 'Central', '', 2); 1288INSERT INTO `0_print_profiles` VALUES(4, 'Sales Department', '104', 2); 1289INSERT INTO `0_print_profiles` VALUES(5, 'Sales Department', '105', 2); 1290INSERT INTO `0_print_profiles` VALUES(6, 'Sales Department', '107', 2); 1291INSERT INTO `0_print_profiles` VALUES(7, 'Sales Department', '109', 2); 1292INSERT INTO `0_print_profiles` VALUES(8, 'Sales Department', '110', 2); 1293INSERT INTO `0_print_profiles` VALUES(9, 'Sales Department', '201', 2); 1294 1295-- -------------------------------------------------------- 1296 1297-- 1298-- Table structure for table `0_purch_data` 1299-- 1300 1301DROP TABLE IF EXISTS `0_purch_data`; 1302CREATE TABLE IF NOT EXISTS `0_purch_data` ( 1303 `supplier_id` int(11) NOT NULL default '0', 1304 `stock_id` char(20) NOT NULL default '', 1305 `price` double NOT NULL default '0', 1306 `suppliers_uom` char(50) NOT NULL default '', 1307 `conversion_factor` double NOT NULL default '1', 1308 `supplier_description` char(50) NOT NULL default '', 1309 PRIMARY KEY (`supplier_id`,`stock_id`) 1310) ENGINE=MyISAM; 1311 1312-- 1313-- Dumping data for table `0_purch_data` 1314-- 1315 1316INSERT INTO `0_purch_data` VALUES(2, '102', 10, '', 1, '17inch VGA Monitor'); 1317INSERT INTO `0_purch_data` VALUES(2, '103', 11, '', 1, '32MB VGA Card'); 1318INSERT INTO `0_purch_data` VALUES(2, '104', 12, '', 1, '52x CD Drive'); 1319 1320-- -------------------------------------------------------- 1321 1322-- 1323-- Table structure for table `0_purch_orders` 1324-- 1325 1326DROP TABLE IF EXISTS `0_purch_orders`; 1327CREATE TABLE IF NOT EXISTS `0_purch_orders` ( 1328 `order_no` int(11) NOT NULL auto_increment, 1329 `supplier_id` int(11) NOT NULL default '0', 1330 `comments` tinytext, 1331 `ord_date` date NOT NULL default '0000-00-00', 1332 `reference` tinytext NOT NULL, 1333 `requisition_no` tinytext, 1334 `into_stock_location` varchar(5) NOT NULL default '', 1335 `delivery_address` tinytext NOT NULL, 1336 `total` double NOT NULL default '0', 1337 `tax_included` tinyint(1) NOT NULL default '0', 1338 PRIMARY KEY (`order_no`), 1339 KEY `ord_date` (`ord_date`) 1340) ENGINE=InnoDB AUTO_INCREMENT=3 ; 1341 1342-- 1343-- Dumping data for table `0_purch_orders` 1344-- 1345 1346INSERT INTO `0_purch_orders` VALUES(1, 2, '', '2014-06-01', '1', '', 'DEF', 'Delivery 1\nDelivery 2\nDelivery 3', 0, 0); 1347INSERT INTO `0_purch_orders` VALUES(2, 3, '', '2014-06-21', '2', '', 'DEF', 'Delivery 1\nDelivery 2\nDelivery 3', 0, 0); 1348 1349-- -------------------------------------------------------- 1350 1351-- 1352-- Table structure for table `0_purch_order_details` 1353-- 1354 1355DROP TABLE IF EXISTS `0_purch_order_details`; 1356CREATE TABLE IF NOT EXISTS `0_purch_order_details` ( 1357 `po_detail_item` int(11) NOT NULL auto_increment, 1358 `order_no` int(11) NOT NULL default '0', 1359 `item_code` varchar(20) NOT NULL default '', 1360 `description` tinytext, 1361 `delivery_date` date NOT NULL default '0000-00-00', 1362 `qty_invoiced` double NOT NULL default '0', 1363 `unit_price` double NOT NULL default '0', 1364 `act_price` double NOT NULL default '0', 1365 `std_cost_unit` double NOT NULL default '0', 1366 `quantity_ordered` double NOT NULL default '0', 1367 `quantity_received` double NOT NULL default '0', 1368 PRIMARY KEY (`po_detail_item`), 1369 KEY `order` (`order_no`,`po_detail_item`) 1370) ENGINE=InnoDB AUTO_INCREMENT=6 ; 1371 1372-- 1373-- Dumping data for table `0_purch_order_details` 1374-- 1375 1376INSERT INTO `0_purch_order_details` VALUES(1, 1, '102', '17inch VGA Monitor', '2014-07-01', 100, 10, 10, 10, 100, 100); 1377INSERT INTO `0_purch_order_details` VALUES(2, 1, '103', '32MB VGA Card', '2014-07-01', 100, 11, 11, 11, 100, 100); 1378INSERT INTO `0_purch_order_details` VALUES(3, 1, '104', '52x CD Drive', '2014-07-01', 100, 12, 12, 12, 100, 100); 1379INSERT INTO `0_purch_order_details` VALUES(4, 2, '102', '17inch VGA Monitor', '2014-07-01', 0, 5, 0, 0, 1, 0); 1380INSERT INTO `0_purch_order_details` VALUES(5, 2, '103', '32MB VGA Card', '2014-07-01', 0, 5, 0, 0, 1, 0); 1381 1382-- -------------------------------------------------------- 1383 1384-- 1385-- Table structure for table `0_quick_entries` 1386-- 1387 1388DROP TABLE IF EXISTS `0_quick_entries`; 1389CREATE TABLE IF NOT EXISTS `0_quick_entries` ( 1390 `id` smallint(6) unsigned NOT NULL auto_increment, 1391 `type` tinyint(1) NOT NULL default '0', 1392 `description` varchar(60) NOT NULL, 1393 `base_amount` double NOT NULL default '0', 1394 `base_desc` varchar(60) default NULL, 1395 `bal_type` tinyint(1) NOT NULL default '0', 1396 PRIMARY KEY (`id`), 1397 KEY `description` (`description`) 1398) ENGINE=MyISAM AUTO_INCREMENT=4 ; 1399 1400-- 1401-- Dumping data for table `0_quick_entries` 1402-- 1403 1404INSERT INTO `0_quick_entries` VALUES(1, 1, 'Maintenance', 0, 'Amount', 0); 1405INSERT INTO `0_quick_entries` VALUES(2, 4, 'Phone', 0, 'Amount', 0); 1406INSERT INTO `0_quick_entries` VALUES(3, 2, 'Cash Sales', 0, 'Amount', 0); 1407 1408-- -------------------------------------------------------- 1409 1410-- 1411-- Table structure for table `0_quick_entry_lines` 1412-- 1413 1414DROP TABLE IF EXISTS `0_quick_entry_lines`; 1415CREATE TABLE IF NOT EXISTS `0_quick_entry_lines` ( 1416 `id` smallint(6) unsigned NOT NULL auto_increment, 1417 `qid` smallint(6) unsigned NOT NULL, 1418 `amount` double default '0', 1419 `action` varchar(2) NOT NULL, 1420 `dest_id` varchar(15) NOT NULL default '', 1421 `dimension_id` smallint(6) unsigned default NULL, 1422 `dimension2_id` smallint(6) unsigned default NULL, 1423 PRIMARY KEY (`id`), 1424 KEY `qid` (`qid`) 1425) ENGINE=MyISAM AUTO_INCREMENT=8 ; 1426 1427-- 1428-- Dumping data for table `0_quick_entry_lines` 1429-- 1430 1431INSERT INTO `0_quick_entry_lines` VALUES(1, 1, 0, 't-', '1', 0, 0); 1432INSERT INTO `0_quick_entry_lines` VALUES(2, 2, 0, 't-', '1', 0, 0); 1433INSERT INTO `0_quick_entry_lines` VALUES(3, 3, 0, 't-', '1', 0, 0); 1434INSERT INTO `0_quick_entry_lines` VALUES(4, 3, 0, '=', '4010', 0, 0); 1435INSERT INTO `0_quick_entry_lines` VALUES(5, 1, 0, '=', '5765', 0, 0); 1436INSERT INTO `0_quick_entry_lines` VALUES(6, 2, 0, '=', '5780', 0, 0); 1437 1438-- -------------------------------------------------------- 1439 1440-- 1441-- Table structure for table `0_recurrent_invoices` 1442-- 1443 1444DROP TABLE IF EXISTS `0_recurrent_invoices`; 1445CREATE TABLE IF NOT EXISTS `0_recurrent_invoices` ( 1446 `id` smallint(6) unsigned NOT NULL auto_increment, 1447 `description` varchar(60) NOT NULL default '', 1448 `order_no` int(11) unsigned NOT NULL, 1449 `debtor_no` int(11) unsigned default NULL, 1450 `group_no` smallint(6) unsigned default NULL, 1451 `days` int(11) NOT NULL default '0', 1452 `monthly` int(11) NOT NULL default '0', 1453 `begin` date NOT NULL default '0000-00-00', 1454 `end` date NOT NULL default '0000-00-00', 1455 `last_sent` date NOT NULL default '0000-00-00', 1456 PRIMARY KEY (`id`), 1457 UNIQUE KEY `description` (`description`) 1458) ENGINE=InnoDB AUTO_INCREMENT=1 ; 1459 1460-- 1461-- Dumping data for table `0_recurrent_invoices` 1462-- 1463 1464 1465-- -------------------------------------------------------- 1466 1467-- 1468-- Table structure for table `0_refs` 1469-- 1470 1471DROP TABLE IF EXISTS `0_refs`; 1472CREATE TABLE IF NOT EXISTS `0_refs` ( 1473 `id` int(11) NOT NULL default '0', 1474 `type` int(11) NOT NULL default '0', 1475 `reference` varchar(100) NOT NULL default '', 1476 PRIMARY KEY (`id`,`type`), 1477 KEY `Type_and_Reference` (`type`,`reference`) 1478) ENGINE=InnoDB; 1479 1480-- 1481-- Dumping data for table `0_refs` 1482-- 1483 1484INSERT INTO `0_refs` VALUES(18, 0, '1'); 1485INSERT INTO `0_refs` VALUES(19, 0, '2'); 1486 1487-- -------------------------------------------------------- 1488 1489-- 1490-- Table structure for table `0_salesman` 1491-- 1492 1493DROP TABLE IF EXISTS `0_salesman`; 1494CREATE TABLE IF NOT EXISTS `0_salesman` ( 1495 `salesman_code` int(11) NOT NULL auto_increment, 1496 `salesman_name` char(60) NOT NULL default '', 1497 `salesman_phone` char(30) NOT NULL default '', 1498 `salesman_fax` char(30) NOT NULL default '', 1499 `salesman_email` varchar(100) NOT NULL default '', 1500 `provision` double NOT NULL default '0', 1501 `break_pt` double NOT NULL default '0', 1502 `provision2` double NOT NULL default '0', 1503 `inactive` tinyint(1) NOT NULL default '0', 1504 PRIMARY KEY (`salesman_code`), 1505 UNIQUE KEY `salesman_name` (`salesman_name`) 1506) ENGINE=MyISAM AUTO_INCREMENT=2 ; 1507 1508-- 1509-- Dumping data for table `0_salesman` 1510-- 1511 1512INSERT INTO `0_salesman` VALUES(1, 'Sales Person', '', '', '', 5, 1000, 4, 0); 1513 1514-- -------------------------------------------------------- 1515 1516-- 1517-- Table structure for table `0_sales_orders` 1518-- 1519 1520DROP TABLE IF EXISTS `0_sales_orders`; 1521CREATE TABLE IF NOT EXISTS `0_sales_orders` ( 1522 `order_no` int(11) NOT NULL, 1523 `trans_type` smallint(6) NOT NULL default '30', 1524 `version` tinyint(1) unsigned NOT NULL default '0', 1525 `type` tinyint(1) NOT NULL default '0', 1526 `debtor_no` int(11) NOT NULL default '0', 1527 `branch_code` int(11) NOT NULL default '0', 1528 `reference` varchar(100) NOT NULL default '', 1529 `customer_ref` tinytext NOT NULL, 1530 `comments` tinytext, 1531 `ord_date` date NOT NULL default '0000-00-00', 1532 `order_type` int(11) NOT NULL default '0', 1533 `ship_via` int(11) NOT NULL default '0', 1534 `delivery_address` tinytext NOT NULL, 1535 `contact_phone` varchar(30) default NULL, 1536 `contact_email` varchar(100) default NULL, 1537 `deliver_to` tinytext NOT NULL, 1538 `freight_cost` double NOT NULL default '0', 1539 `from_stk_loc` varchar(5) NOT NULL default '', 1540 `delivery_date` date NOT NULL default '0000-00-00', 1541 `payment_terms` int(11) default NULL, 1542 `total` double NOT NULL default '0', 1543 PRIMARY KEY (`trans_type`,`order_no`) 1544) ENGINE=InnoDB; 1545 1546-- 1547-- Dumping data for table `0_sales_orders` 1548-- 1549 1550INSERT INTO `0_sales_orders` VALUES(1, 30, 1, 0, 1, 1, '1', '', '', '2014-06-21', 2, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Beefeater Ltd.', 10, 'DEF', '2014-06-22', 3, 0); 1551INSERT INTO `0_sales_orders` VALUES(2, 30, 1, 0, 2, 2, '2', '', '', '2014-06-21', 1, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Ghostbusters Corp.', 0, 'DEF', '2014-06-22', 4, 0); 1552INSERT INTO `0_sales_orders` VALUES(3, 30, 1, 0, 3, 3, '3', '', '', '2014-06-21', 2, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Brezan', 0, 'DEF', '2014-07-01', 3, 0); 1553INSERT INTO `0_sales_orders` VALUES(4, 30, 0, 0, 1, 1, '4', '', '', '2014-06-21', 2, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Beefeater Ltd.', 0, 'DEF', '2014-06-22', 3, 0); 1554INSERT INTO `0_sales_orders` VALUES(5, 30, 1, 0, 2, 2, '5', '', '', '2014-06-21', 1, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Ghostbusters Corp.', 5, 'DEF', '2014-06-22', 4, 0); 1555 1556-- -------------------------------------------------------- 1557 1558-- 1559-- Table structure for table `0_sales_order_details` 1560-- 1561 1562DROP TABLE IF EXISTS `0_sales_order_details`; 1563CREATE TABLE IF NOT EXISTS `0_sales_order_details` ( 1564 `id` int(11) NOT NULL auto_increment, 1565 `order_no` int(11) NOT NULL default '0', 1566 `trans_type` smallint(6) NOT NULL default '30', 1567 `stk_code` varchar(20) NOT NULL default '', 1568 `description` tinytext, 1569 `qty_sent` double NOT NULL default '0', 1570 `unit_price` double NOT NULL default '0', 1571 `quantity` double NOT NULL default '0', 1572 `discount_percent` double NOT NULL default '0', 1573 PRIMARY KEY (`id`), 1574 KEY `sorder` (`trans_type`,`order_no`) 1575) ENGINE=InnoDB AUTO_INCREMENT=6 ; 1576 1577-- 1578-- Dumping data for table `0_sales_order_details` 1579-- 1580 1581INSERT INTO `0_sales_order_details` VALUES(1, 1, 30, '102', '17inch VGA Monitor', 2, 30.4, 2, 0); 1582INSERT INTO `0_sales_order_details` VALUES(2, 2, 30, '102', '17inch VGA Monitor', 1, 50, 1, 0); 1583INSERT INTO `0_sales_order_details` VALUES(3, 3, 30, '102', '17inch VGA Monitor', 1, 35.89, 1, 0); 1584INSERT INTO `0_sales_order_details` VALUES(4, 4, 30, '102', '17inch VGA Monitor', 0, 21.28, 2, 0); 1585INSERT INTO `0_sales_order_details` VALUES(5, 5, 30, '102', '17inch VGA Monitor', 1, 50, 1, 0); 1586 1587-- -------------------------------------------------------- 1588 1589-- 1590-- Table structure for table `0_sales_pos` 1591-- 1592 1593DROP TABLE IF EXISTS `0_sales_pos`; 1594CREATE TABLE IF NOT EXISTS `0_sales_pos` ( 1595 `id` smallint(6) unsigned NOT NULL auto_increment, 1596 `pos_name` varchar(30) NOT NULL, 1597 `cash_sale` tinyint(1) NOT NULL, 1598 `credit_sale` tinyint(1) NOT NULL, 1599 `pos_location` varchar(5) NOT NULL, 1600 `pos_account` smallint(6) unsigned NOT NULL, 1601 `inactive` tinyint(1) NOT NULL default '0', 1602 PRIMARY KEY (`id`), 1603 UNIQUE KEY `pos_name` (`pos_name`) 1604) ENGINE=MyISAM AUTO_INCREMENT=2 ; 1605 1606-- 1607-- Dumping data for table `0_sales_pos` 1608-- 1609 1610INSERT INTO `0_sales_pos` VALUES(1, 'Default', 1, 1, 'DEF', 2, 0); 1611 1612-- -------------------------------------------------------- 1613 1614-- 1615-- Table structure for table `0_sales_types` 1616-- 1617 1618DROP TABLE IF EXISTS `0_sales_types`; 1619CREATE TABLE IF NOT EXISTS `0_sales_types` ( 1620 `id` int(11) NOT NULL auto_increment, 1621 `sales_type` char(50) NOT NULL default '', 1622 `tax_included` int(1) NOT NULL default '0', 1623 `factor` double NOT NULL default '1', 1624 `inactive` tinyint(1) NOT NULL default '0', 1625 PRIMARY KEY (`id`), 1626 UNIQUE KEY `sales_type` (`sales_type`) 1627) ENGINE=MyISAM AUTO_INCREMENT=3 ; 1628 1629-- 1630-- Dumping data for table `0_sales_types` 1631-- 1632 1633INSERT INTO `0_sales_types` VALUES(1, 'Retail', 1, 1, 0); 1634INSERT INTO `0_sales_types` VALUES(2, 'Wholesale', 0, 0.7, 0); 1635 1636-- -------------------------------------------------------- 1637 1638-- 1639-- Table structure for table `0_security_roles` 1640-- 1641 1642DROP TABLE IF EXISTS `0_security_roles`; 1643CREATE TABLE IF NOT EXISTS `0_security_roles` ( 1644 `id` int(11) NOT NULL auto_increment, 1645 `role` varchar(30) NOT NULL, 1646 `description` varchar(50) default NULL, 1647 `sections` text, 1648 `areas` text, 1649 `inactive` tinyint(1) NOT NULL default '0', 1650 PRIMARY KEY (`id`), 1651 UNIQUE KEY `role` (`role`) 1652) ENGINE=MyISAM AUTO_INCREMENT=11 ; 1653 1654-- 1655-- Dumping data for table `0_security_roles` 1656-- 1657 1658INSERT 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); 1659INSERT 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;526;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;11011;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15628;15625;15626;15627;15873;15874;15875;15876;15877;15878;15879;15880;15883;15881;15882;16129;16130;16131;16132', 0); 1660INSERT INTO `0_security_roles` VALUES(3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873', 0); 1661INSERT 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); 1662INSERT 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); 1663INSERT 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); 1664INSERT 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); 1665INSERT 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); 1666INSERT 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); 1667INSERT 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); 1668 1669-- -------------------------------------------------------- 1670 1671-- 1672-- Table structure for table `0_shippers` 1673-- 1674 1675DROP TABLE IF EXISTS `0_shippers`; 1676CREATE TABLE IF NOT EXISTS `0_shippers` ( 1677 `shipper_id` int(11) NOT NULL auto_increment, 1678 `shipper_name` varchar(60) NOT NULL default '', 1679 `phone` varchar(30) NOT NULL default '', 1680 `phone2` varchar(30) NOT NULL default '', 1681 `contact` tinytext NOT NULL, 1682 `address` tinytext NOT NULL, 1683 `inactive` tinyint(1) NOT NULL default '0', 1684 PRIMARY KEY (`shipper_id`), 1685 UNIQUE KEY `name` (`shipper_name`) 1686) ENGINE=MyISAM AUTO_INCREMENT=2 ; 1687 1688-- 1689-- Dumping data for table `0_shippers` 1690-- 1691 1692INSERT INTO `0_shippers` VALUES(1, 'Default', '', '', '', '', 0); 1693 1694-- -------------------------------------------------------- 1695 1696-- 1697-- Table structure for table `0_sql_trail` 1698-- 1699 1700DROP TABLE IF EXISTS `0_sql_trail`; 1701CREATE TABLE IF NOT EXISTS `0_sql_trail` ( 1702 `id` int(11) unsigned NOT NULL auto_increment, 1703 `sql` text NOT NULL, 1704 `result` tinyint(1) NOT NULL, 1705 `msg` varchar(255) NOT NULL, 1706 PRIMARY KEY (`id`) 1707) ENGINE=MyISAM AUTO_INCREMENT=1 ; 1708 1709-- 1710-- Dumping data for table `0_sql_trail` 1711-- 1712 1713 1714-- -------------------------------------------------------- 1715 1716-- 1717-- Table structure for table `0_stock_category` 1718-- 1719 1720DROP TABLE IF EXISTS `0_stock_category`; 1721CREATE TABLE IF NOT EXISTS `0_stock_category` ( 1722 `category_id` int(11) NOT NULL auto_increment, 1723 `description` varchar(60) NOT NULL default '', 1724 `dflt_tax_type` int(11) NOT NULL default '1', 1725 `dflt_units` varchar(20) NOT NULL default 'each', 1726 `dflt_mb_flag` char(1) NOT NULL default 'B', 1727 `dflt_sales_act` varchar(15) NOT NULL default '', 1728 `dflt_cogs_act` varchar(15) NOT NULL default '', 1729 `dflt_inventory_act` varchar(15) NOT NULL default '', 1730 `dflt_adjustment_act` varchar(15) NOT NULL default '', 1731 `dflt_assembly_act` varchar(15) NOT NULL default '', 1732 `dflt_dim1` int(11) default NULL, 1733 `dflt_dim2` int(11) default NULL, 1734 `inactive` tinyint(1) NOT NULL default '0', 1735 `dflt_no_sale` tinyint(1) NOT NULL default '0', 1736 PRIMARY KEY (`category_id`), 1737 UNIQUE KEY `description` (`description`) 1738) ENGINE=MyISAM AUTO_INCREMENT=5 ; 1739 1740-- 1741-- Dumping data for table `0_stock_category` 1742-- 1743 1744INSERT INTO `0_stock_category` VALUES(1, 'Components', 1, 'each', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0); 1745INSERT INTO `0_stock_category` VALUES(2, 'Charges', 1, 'each', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0); 1746INSERT INTO `0_stock_category` VALUES(3, 'Systems', 1, 'each', 'M', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0); 1747INSERT INTO `0_stock_category` VALUES(4, 'Services', 1, 'hr', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0); 1748 1749-- -------------------------------------------------------- 1750 1751-- 1752-- Table structure for table `0_stock_master` 1753-- 1754 1755DROP TABLE IF EXISTS `0_stock_master`; 1756CREATE TABLE IF NOT EXISTS `0_stock_master` ( 1757 `stock_id` varchar(20) NOT NULL default '', 1758 `category_id` int(11) NOT NULL default '0', 1759 `tax_type_id` int(11) NOT NULL default '0', 1760 `description` varchar(200) NOT NULL default '', 1761 `long_description` tinytext NOT NULL, 1762 `units` varchar(20) NOT NULL default 'each', 1763 `mb_flag` char(1) NOT NULL default 'B', 1764 `sales_account` varchar(15) NOT NULL default '', 1765 `cogs_account` varchar(15) NOT NULL default '', 1766 `inventory_account` varchar(15) NOT NULL default '', 1767 `adjustment_account` varchar(15) NOT NULL default '', 1768 `assembly_account` varchar(15) NOT NULL default '', 1769 `dimension_id` int(11) default NULL, 1770 `dimension2_id` int(11) default NULL, 1771 `actual_cost` double NOT NULL default '0', 1772 `last_cost` double NOT NULL default '0', 1773 `material_cost` double NOT NULL default '0', 1774 `labour_cost` double NOT NULL default '0', 1775 `overhead_cost` double NOT NULL default '0', 1776 `inactive` tinyint(1) NOT NULL default '0', 1777 `no_sale` tinyint(1) NOT NULL default '0', 1778 `editable` tinyint(1) NOT NULL default '0', 1779 PRIMARY KEY (`stock_id`) 1780) ENGINE=InnoDB; 1781 1782-- 1783-- Dumping data for table `0_stock_master` 1784-- 1785 1786INSERT INTO `0_stock_master` VALUES('102', 1, 1, '17inch VGA Monitor', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 10, 0, 0, 0, 0, 0); 1787INSERT INTO `0_stock_master` VALUES('103', 1, 1, '32MB VGA Card', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 11, 0, 0, 0, 0, 0); 1788INSERT INTO `0_stock_master` VALUES('104', 1, 1, '52x CD Drive', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 12, 0, 0, 0, 0, 0); 1789INSERT INTO `0_stock_master` VALUES('201', 4, 1, 'Assembly Labour', '', 'hr', 'D', '4010', '5010', '5010', '5040', '1530', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 1790INSERT INTO `0_stock_master` VALUES('3400', 3, 1, 'P4 Business System', '', 'each', 'M', '4010', '5010', '1540', '5040', '1530', 0, 0, 0, 0, 33, 3.9999999999999, 2, 0, 0, 0); 1791 1792-- -------------------------------------------------------- 1793 1794-- 1795-- Table structure for table `0_stock_moves` 1796-- 1797 1798DROP TABLE IF EXISTS `0_stock_moves`; 1799CREATE TABLE IF NOT EXISTS `0_stock_moves` ( 1800 `trans_id` int(11) NOT NULL auto_increment, 1801 `trans_no` int(11) NOT NULL default '0', 1802 `stock_id` char(20) NOT NULL default '', 1803 `type` smallint(6) NOT NULL default '0', 1804 `loc_code` char(5) NOT NULL default '', 1805 `tran_date` date NOT NULL default '0000-00-00', 1806 `person_id` int(11) default NULL, 1807 `price` double NOT NULL default '0', 1808 `reference` char(40) NOT NULL default '', 1809 `qty` double NOT NULL default '1', 1810 `discount_percent` double NOT NULL default '0', 1811 `standard_cost` double NOT NULL default '0', 1812 `visible` tinyint(1) NOT NULL default '1', 1813 PRIMARY KEY (`trans_id`), 1814 KEY `type` (`type`,`trans_no`), 1815 KEY `Move` (`stock_id`,`loc_code`,`tran_date`) 1816) ENGINE=InnoDB AUTO_INCREMENT=37 ; 1817 1818-- 1819-- Dumping data for table `0_stock_moves` 1820-- 1821 1822INSERT INTO `0_stock_moves` VALUES(1, 1, '102', 25, 'DEF', '2014-06-21', 2, 10, '', 100, 0, 10, 1); 1823INSERT INTO `0_stock_moves` VALUES(2, 1, '103', 25, 'DEF', '2014-06-21', 2, 11, '', 100, 0, 11, 1); 1824INSERT INTO `0_stock_moves` VALUES(3, 1, '104', 25, 'DEF', '2014-06-21', 2, 12, '', 100, 0, 12, 1); 1825INSERT INTO `0_stock_moves` VALUES(4, 1, '102', 26, 'DEF', '2014-06-21', 0, 0, '1', -10, 0, 0, 1); 1826INSERT INTO `0_stock_moves` VALUES(5, 1, '103', 26, 'DEF', '2014-06-21', 0, 0, '1', -10, 0, 0, 1); 1827INSERT INTO `0_stock_moves` VALUES(6, 1, '104', 26, 'DEF', '2014-06-21', 0, 0, '1', -10, 0, 0, 1); 1828INSERT INTO `0_stock_moves` VALUES(7, 1, '3400', 26, 'DEF', '2014-06-21', 0, 0, '1', 10, 0, 0, 1); 1829INSERT INTO `0_stock_moves` VALUES(8, 2, '102', 13, 'DEF', '2014-06-21', 0, 30.4, '1', -2, 0, 10, 1); 1830INSERT INTO `0_stock_moves` VALUES(9, 3, '102', 13, 'DEF', '2014-06-21', 0, 50, 'auto', -1, 0, 10, 1); 1831INSERT INTO `0_stock_moves` VALUES(10, 4, '102', 13, 'DEF', '2014-06-21', 0, 35.89, 'auto', -1, 0, 10, 1); 1832INSERT INTO `0_stock_moves` VALUES(11, 3, '102', 26, 'DEF', '2014-06-21', 0, 0, '3', -2, 0, 0, 1); 1833INSERT INTO `0_stock_moves` VALUES(12, 3, '103', 26, 'DEF', '2014-06-21', 0, 0, '3', -2, 0, 0, 1); 1834INSERT INTO `0_stock_moves` VALUES(13, 3, '104', 26, 'DEF', '2014-06-21', 0, 0, '3', -2, 0, 0, 1); 1835INSERT INTO `0_stock_moves` VALUES(14, 3, '3400', 26, 'DEF', '2014-06-21', 0, 0, '3', 2, 0, 0, 1); 1836INSERT INTO `0_stock_moves` VALUES(15, 4, '102', 26, 'DEF', '2014-06-21', 0, 0, '4', -4, 0, 0, 1); 1837INSERT INTO `0_stock_moves` VALUES(16, 4, '103', 26, 'DEF', '2014-06-21', 0, 0, '4', -4, 0, 0, 1); 1838INSERT INTO `0_stock_moves` VALUES(17, 4, '104', 26, 'DEF', '2014-06-21', 0, 0, '4', -4, 0, 0, 1); 1839INSERT INTO `0_stock_moves` VALUES(18, 4, '3400', 26, 'DEF', '2014-06-21', 0, 0, '4', 4, 0, 0, 1); 1840INSERT INTO `0_stock_moves` VALUES(19, 2, '102', 26, 'DEF', '2014-06-21', 0, 0, '', -2, 0, 0, 1); 1841INSERT INTO `0_stock_moves` VALUES(20, 2, '103', 26, 'DEF', '2014-06-21', 0, 0, '', -2, 0, 0, 1); 1842INSERT INTO `0_stock_moves` VALUES(21, 2, '104', 26, 'DEF', '2014-06-21', 0, 0, '', -2, 0, 0, 1); 1843INSERT INTO `0_stock_moves` VALUES(22, 1, '3400', 29, 'DEF', '2014-06-21', 0, 0, '', 2, 0, 0, 1); 1844INSERT INTO `0_stock_moves` VALUES(23, 5, '102', 26, 'DEF', '2014-06-21', 0, 0, '5', -5, 0, 0, 1); 1845INSERT INTO `0_stock_moves` VALUES(24, 5, '103', 26, 'DEF', '2014-06-21', 0, 0, '5', -5, 0, 0, 1); 1846INSERT INTO `0_stock_moves` VALUES(25, 5, '104', 26, 'DEF', '2014-06-21', 0, 0, '5', -5, 0, 0, 1); 1847INSERT INTO `0_stock_moves` VALUES(26, 5, '3400', 26, 'DEF', '2014-06-21', 0, 0, '5', 5, 0, 0, 1); 1848INSERT INTO `0_stock_moves` VALUES(27, 6, '102', 26, 'DEF', '2014-06-21', 0, 0, '6', 5, 0, 0, 1); 1849INSERT INTO `0_stock_moves` VALUES(28, 6, '103', 26, 'DEF', '2014-06-21', 0, 0, '6', 5, 0, 0, 1); 1850INSERT INTO `0_stock_moves` VALUES(29, 6, '104', 26, 'DEF', '2014-06-21', 0, 0, '6', 5, 0, 0, 1); 1851INSERT INTO `0_stock_moves` VALUES(30, 6, '3400', 26, 'DEF', '2014-06-21', 0, 0, '6', -5, 0, 0, 1); 1852INSERT INTO `0_stock_moves` VALUES(31, 7, '102', 26, 'DEF', '2014-06-21', 0, 0, '7', 2, 0, 0, 1); 1853INSERT INTO `0_stock_moves` VALUES(32, 7, '103', 26, 'DEF', '2014-06-21', 0, 0, '7', 2, 0, 0, 1); 1854INSERT INTO `0_stock_moves` VALUES(33, 7, '104', 26, 'DEF', '2014-06-21', 0, 0, '7', 2, 0, 0, 1); 1855INSERT INTO `0_stock_moves` VALUES(34, 7, '3400', 26, 'DEF', '2014-06-21', 0, 0, '7', -2, 0, 0, 1); 1856INSERT INTO `0_stock_moves` VALUES(35, 5, '102', 13, 'DEF', '2014-06-21', 0, 50, 'auto', -1, 0, 10, 1); 1857INSERT INTO `0_stock_moves` VALUES(36, 3, '102', 11, 'DEF', '2014-06-21', 0, 37.68, 'Return Ex Inv: 18', 1, 0, 10, 0); 1858 1859-- -------------------------------------------------------- 1860 1861-- 1862-- Table structure for table `0_suppliers` 1863-- 1864 1865DROP TABLE IF EXISTS `0_suppliers`; 1866CREATE TABLE IF NOT EXISTS `0_suppliers` ( 1867 `supplier_id` int(11) NOT NULL auto_increment, 1868 `supp_name` varchar(60) NOT NULL default '', 1869 `supp_ref` varchar(30) NOT NULL default '', 1870 `address` tinytext NOT NULL, 1871 `supp_address` tinytext NOT NULL, 1872 `gst_no` varchar(25) NOT NULL default '', 1873 `contact` varchar(60) NOT NULL default '', 1874 `supp_account_no` varchar(40) NOT NULL default '', 1875 `website` varchar(100) NOT NULL default '', 1876 `bank_account` varchar(60) NOT NULL default '', 1877 `curr_code` char(3) default NULL, 1878 `payment_terms` int(11) default NULL, 1879 `tax_included` tinyint(1) NOT NULL default '0', 1880 `dimension_id` int(11) default '0', 1881 `dimension2_id` int(11) default '0', 1882 `tax_group_id` int(11) default NULL, 1883 `credit_limit` double NOT NULL default '0', 1884 `purchase_account` varchar(15) NOT NULL default '', 1885 `payable_account` varchar(15) NOT NULL default '', 1886 `payment_discount_account` varchar(15) NOT NULL default '', 1887 `notes` tinytext NOT NULL, 1888 `inactive` tinyint(1) NOT NULL default '0', 1889 PRIMARY KEY (`supplier_id`), 1890 KEY `supp_ref` (`supp_ref`) 1891) ENGINE=MyISAM AUTO_INCREMENT=4 ; 1892 1893-- 1894-- Dumping data for table `0_suppliers` 1895-- 1896 1897INSERT 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); 1898INSERT 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); 1899INSERT 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); 1900 1901-- -------------------------------------------------------- 1902 1903-- 1904-- Table structure for table `0_supp_allocations` 1905-- 1906 1907DROP TABLE IF EXISTS `0_supp_allocations`; 1908CREATE TABLE IF NOT EXISTS `0_supp_allocations` ( 1909 `id` int(11) NOT NULL auto_increment, 1910 `amt` double unsigned default NULL, 1911 `date_alloc` date NOT NULL default '0000-00-00', 1912 `trans_no_from` int(11) default NULL, 1913 `trans_type_from` int(11) default NULL, 1914 `trans_no_to` int(11) default NULL, 1915 `trans_type_to` int(11) default NULL, 1916 PRIMARY KEY (`id`), 1917 KEY `From` (`trans_type_from`,`trans_no_from`), 1918 KEY `To` (`trans_type_to`,`trans_no_to`) 1919) ENGINE=InnoDB AUTO_INCREMENT=2 ; 1920 1921-- 1922-- Dumping data for table `0_supp_allocations` 1923-- 1924 1925INSERT INTO `0_supp_allocations` VALUES(1, 3465, '2014-06-21', 4, 22, 7, 20); 1926 1927-- -------------------------------------------------------- 1928 1929-- 1930-- Table structure for table `0_supp_invoice_items` 1931-- 1932 1933DROP TABLE IF EXISTS `0_supp_invoice_items`; 1934CREATE TABLE IF NOT EXISTS `0_supp_invoice_items` ( 1935 `id` int(11) NOT NULL auto_increment, 1936 `supp_trans_no` int(11) default NULL, 1937 `supp_trans_type` int(11) default NULL, 1938 `gl_code` varchar(15) NOT NULL default '', 1939 `grn_item_id` int(11) default NULL, 1940 `po_detail_item_id` int(11) default NULL, 1941 `stock_id` varchar(20) NOT NULL default '', 1942 `description` tinytext, 1943 `quantity` double NOT NULL default '0', 1944 `unit_price` double NOT NULL default '0', 1945 `unit_tax` double NOT NULL default '0', 1946 `memo_` tinytext, 1947 PRIMARY KEY (`id`), 1948 KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`) 1949) ENGINE=InnoDB AUTO_INCREMENT=6 ; 1950 1951-- 1952-- Dumping data for table `0_supp_invoice_items` 1953-- 1954 1955INSERT INTO `0_supp_invoice_items` VALUES(1, 7, 20, '0', 1, 1, '102', '17inch VGA Monitor', 100, 10, 0.5, ''); 1956INSERT INTO `0_supp_invoice_items` VALUES(2, 7, 20, '0', 2, 2, '103', '32MB VGA Card', 100, 11, 0.55, ''); 1957INSERT INTO `0_supp_invoice_items` VALUES(3, 7, 20, '0', 3, 3, '104', '52x CD Drive', 100, 12, 0.6, ''); 1958INSERT INTO `0_supp_invoice_items` VALUES(4, 8, 20, '2150', 0, 0, '', '', 0, 0.95, 0, 'Phone'); 1959INSERT INTO `0_supp_invoice_items` VALUES(5, 8, 20, '5780', 0, 0, '', '', 0, 19.05, 0, 'Phone'); 1960 1961-- -------------------------------------------------------- 1962 1963-- 1964-- Table structure for table `0_supp_trans` 1965-- 1966 1967DROP TABLE IF EXISTS `0_supp_trans`; 1968CREATE TABLE IF NOT EXISTS `0_supp_trans` ( 1969 `trans_no` int(11) unsigned NOT NULL default '0', 1970 `type` smallint(6) unsigned NOT NULL default '0', 1971 `supplier_id` int(11) unsigned default NULL, 1972 `reference` tinytext NOT NULL, 1973 `supp_reference` varchar(60) NOT NULL default '', 1974 `tran_date` date NOT NULL default '0000-00-00', 1975 `due_date` date NOT NULL default '0000-00-00', 1976 `ov_amount` double NOT NULL default '0', 1977 `ov_discount` double NOT NULL default '0', 1978 `ov_gst` double NOT NULL default '0', 1979 `rate` double NOT NULL default '1', 1980 `alloc` double NOT NULL default '0', 1981 `tax_included` tinyint(1) NOT NULL default '0', 1982 PRIMARY KEY (`type`,`trans_no`), 1983 KEY `supplier_id` (`supplier_id`), 1984 KEY `SupplierID_2` (`supplier_id`,`supp_reference`), 1985 KEY `type` (`type`), 1986 KEY `tran_date` (`tran_date`) 1987) ENGINE=InnoDB; 1988 1989-- 1990-- Dumping data for table `0_supp_trans` 1991-- 1992 1993INSERT INTO `0_supp_trans` VALUES(7, 20, 2, '1', '5t', '2014-06-21', '2014-07-01', 3300, 0, 165, 1, 3465, 0); 1994INSERT INTO `0_supp_trans` VALUES(8, 20, 2, '2', 'cc', '2014-06-21', '2014-07-01', 20, 0, 0, 1, 0, 0); 1995INSERT INTO `0_supp_trans` VALUES(4, 22, 2, '1', '', '2014-06-21', '2014-06-21', -3465, 0, 0, 1, 3465, 0); 1996 1997-- -------------------------------------------------------- 1998 1999-- 2000-- Table structure for table `0_sys_prefs` 2001-- 2002 2003DROP TABLE IF EXISTS `0_sys_prefs`; 2004CREATE TABLE IF NOT EXISTS `0_sys_prefs` ( 2005 `name` varchar(35) NOT NULL default '', 2006 `category` varchar(30) default NULL, 2007 `type` varchar(20) NOT NULL default '', 2008 `length` smallint(6) default NULL, 2009 `value` tinytext, 2010 PRIMARY KEY (`name`), 2011 KEY `category` (`category`) 2012) ENGINE=MyISAM; 2013 2014-- 2015-- Dumping data for table `0_sys_prefs` 2016-- 2017 2018INSERT INTO `0_sys_prefs` VALUES('coy_name', 'setup.company', 'varchar', 60, 'Training Co.'); 2019INSERT INTO `0_sys_prefs` VALUES('gst_no', 'setup.company', 'varchar', 25, '9876543'); 2020INSERT INTO `0_sys_prefs` VALUES('coy_no', 'setup.company', 'varchar', 25, '123456789'); 2021INSERT INTO `0_sys_prefs` VALUES('tax_prd', 'setup.company', 'int', 11, '1'); 2022INSERT INTO `0_sys_prefs` VALUES('tax_last', 'setup.company', 'int', 11, '1'); 2023INSERT INTO `0_sys_prefs` VALUES('postal_address', 'setup.company', 'tinytext', 0, 'Address 1\nAddress 2\nAddress 3'); 2024INSERT INTO `0_sys_prefs` VALUES('phone', 'setup.company', 'varchar', 30, '(222) 111.222.333'); 2025INSERT INTO `0_sys_prefs` VALUES('fax', 'setup.company', 'varchar', 30, ''); 2026INSERT INTO `0_sys_prefs` VALUES('email', 'setup.company', 'varchar', 100, 'delta@delta.com'); 2027INSERT INTO `0_sys_prefs` VALUES('coy_logo', 'setup.company', 'varchar', 100, 'logo_frontaccounting.jpg'); 2028INSERT INTO `0_sys_prefs` VALUES('domicile', 'setup.company', 'varchar', 55, ''); 2029INSERT INTO `0_sys_prefs` VALUES('curr_default', 'setup.company', 'char', 3, 'USD'); 2030INSERT INTO `0_sys_prefs` VALUES('use_dimension', 'setup.company', 'tinyint', 1, '1'); 2031INSERT INTO `0_sys_prefs` VALUES('f_year', 'setup.company', 'int', 11, '2'); 2032INSERT INTO `0_sys_prefs` VALUES('no_item_list', 'setup.company', 'tinyint', 1, '0'); 2033INSERT INTO `0_sys_prefs` VALUES('no_customer_list', 'setup.company', 'tinyint', 1, '0'); 2034INSERT INTO `0_sys_prefs` VALUES('no_supplier_list', 'setup.company', 'tinyint', 1, '0'); 2035INSERT INTO `0_sys_prefs` VALUES('base_sales', 'setup.company', 'int', 11, '1'); 2036INSERT INTO `0_sys_prefs` VALUES('time_zone', 'setup.company', 'tinyint', 1, '0'); 2037INSERT INTO `0_sys_prefs` VALUES('add_pct', 'setup.company', 'int', 5, '-1'); 2038INSERT INTO `0_sys_prefs` VALUES('round_to', 'setup.company', 'int', 5, '1'); 2039INSERT INTO `0_sys_prefs` VALUES('login_tout', 'setup.company', 'smallint', 6, '600'); 2040INSERT INTO `0_sys_prefs` VALUES('past_due_days', 'glsetup.general', 'int', 11, '30'); 2041INSERT INTO `0_sys_prefs` VALUES('profit_loss_year_act', 'glsetup.general', 'varchar', 15, '9990'); 2042INSERT INTO `0_sys_prefs` VALUES('retained_earnings_act', 'glsetup.general', 'varchar', 15, '3590'); 2043INSERT INTO `0_sys_prefs` VALUES('bank_charge_act', 'glsetup.general', 'varchar', 15, '5690'); 2044INSERT INTO `0_sys_prefs` VALUES('exchange_diff_act', 'glsetup.general', 'varchar', 15, '4450'); 2045INSERT INTO `0_sys_prefs` VALUES('default_credit_limit', 'glsetup.customer', 'int', 11, '1000'); 2046INSERT INTO `0_sys_prefs` VALUES('accumulate_shipping', 'glsetup.customer', 'tinyint', 1, '0'); 2047INSERT INTO `0_sys_prefs` VALUES('legal_text', 'glsetup.customer', 'tinytext', 0, ''); 2048INSERT INTO `0_sys_prefs` VALUES('freight_act', 'glsetup.customer', 'varchar', 15, '4430'); 2049INSERT INTO `0_sys_prefs` VALUES('debtors_act', 'glsetup.sales', 'varchar', 15, '1200'); 2050INSERT INTO `0_sys_prefs` VALUES('default_sales_act', 'glsetup.sales', 'varchar', 15, '4010'); 2051INSERT INTO `0_sys_prefs` VALUES('default_sales_discount_act', 'glsetup.sales', 'varchar', 15, '4510'); 2052INSERT INTO `0_sys_prefs` VALUES('default_prompt_payment_act', 'glsetup.sales', 'varchar', 15, '4500'); 2053INSERT INTO `0_sys_prefs` VALUES('default_delivery_required', 'glsetup.sales', 'smallint', 6, '1'); 2054INSERT INTO `0_sys_prefs` VALUES('default_dim_required', 'glsetup.dims', 'int', 11, '20'); 2055INSERT INTO `0_sys_prefs` VALUES('pyt_discount_act', 'glsetup.purchase', 'varchar', 15, '5060'); 2056INSERT INTO `0_sys_prefs` VALUES('creditors_act', 'glsetup.purchase', 'varchar', 15, '2100'); 2057INSERT INTO `0_sys_prefs` VALUES('po_over_receive', 'glsetup.purchase', 'int', 11, '10'); 2058INSERT INTO `0_sys_prefs` VALUES('po_over_charge', 'glsetup.purchase', 'int', 11, '10'); 2059INSERT INTO `0_sys_prefs` VALUES('allow_negative_stock', 'glsetup.inventory', 'tinyint', 1, '0'); 2060INSERT INTO `0_sys_prefs` VALUES('default_inventory_act', 'glsetup.items', 'varchar', 15, '1510'); 2061INSERT INTO `0_sys_prefs` VALUES('default_cogs_act', 'glsetup.items', 'varchar', 15, '5010'); 2062INSERT INTO `0_sys_prefs` VALUES('default_adj_act', 'glsetup.items', 'varchar', 15, '5040'); 2063INSERT INTO `0_sys_prefs` VALUES('default_inv_sales_act', 'glsetup.items', 'varchar', 15, '4010'); 2064INSERT INTO `0_sys_prefs` VALUES('default_assembly_act', 'glsetup.items', 'varchar', 15, '1530'); 2065INSERT INTO `0_sys_prefs` VALUES('default_workorder_required', 'glsetup.manuf', 'int', 11, '20'); 2066INSERT INTO `0_sys_prefs` VALUES('version_id', 'system', 'varchar', 11, '2.3rc'); 2067INSERT INTO `0_sys_prefs` VALUES('auto_curr_reval', 'setup.company', 'smallint', 6, '1'); 2068INSERT INTO `0_sys_prefs` VALUES('grn_clearing_act', 'glsetup.purchase', 'varchar', 15, '1550'); 2069INSERT INTO `0_sys_prefs` VALUES('bcc_email', 'setup.company', 'varchar', 100, ''); 2070 2071-- -------------------------------------------------------- 2072 2073-- 2074-- Table structure for table `0_sys_types` 2075-- 2076 2077DROP TABLE IF EXISTS `0_sys_types`; 2078CREATE TABLE IF NOT EXISTS `0_sys_types` ( 2079 `type_id` smallint(6) NOT NULL default '0', 2080 `type_no` int(11) NOT NULL default '1', 2081 `next_reference` varchar(100) NOT NULL default '', 2082 PRIMARY KEY (`type_id`) 2083) ENGINE=InnoDB; 2084 2085-- 2086-- Dumping data for table `0_sys_types` 2087-- 2088 2089INSERT INTO `0_sys_types` VALUES(0, 19, '3'); 2090INSERT INTO `0_sys_types` VALUES(1, 8, '2'); 2091INSERT INTO `0_sys_types` VALUES(2, 5, '2'); 2092INSERT INTO `0_sys_types` VALUES(4, 3, '1'); 2093INSERT INTO `0_sys_types` VALUES(10, 19, '4'); 2094INSERT INTO `0_sys_types` VALUES(11, 3, '2'); 2095INSERT INTO `0_sys_types` VALUES(12, 6, '1'); 2096INSERT INTO `0_sys_types` VALUES(13, 5, '2'); 2097INSERT INTO `0_sys_types` VALUES(16, 2, '1'); 2098INSERT INTO `0_sys_types` VALUES(17, 2, '1'); 2099INSERT INTO `0_sys_types` VALUES(18, 1, '3'); 2100INSERT INTO `0_sys_types` VALUES(20, 8, '3'); 2101INSERT INTO `0_sys_types` VALUES(21, 1, '1'); 2102INSERT INTO `0_sys_types` VALUES(22, 4, '2'); 2103INSERT INTO `0_sys_types` VALUES(25, 1, '2'); 2104INSERT INTO `0_sys_types` VALUES(26, 1, '8'); 2105INSERT INTO `0_sys_types` VALUES(28, 1, '1'); 2106INSERT INTO `0_sys_types` VALUES(29, 1, '2'); 2107INSERT INTO `0_sys_types` VALUES(30, 5, '6'); 2108INSERT INTO `0_sys_types` VALUES(32, 0, '1'); 2109INSERT INTO `0_sys_types` VALUES(35, 1, '1'); 2110INSERT INTO `0_sys_types` VALUES(40, 1, '3'); 2111 2112-- -------------------------------------------------------- 2113 2114-- 2115-- Table structure for table `0_tags` 2116-- 2117 2118DROP TABLE IF EXISTS `0_tags`; 2119CREATE TABLE IF NOT EXISTS `0_tags` ( 2120 `id` int(11) NOT NULL auto_increment, 2121 `type` smallint(6) NOT NULL, 2122 `name` varchar(30) NOT NULL, 2123 `description` varchar(60) default NULL, 2124 `inactive` tinyint(1) NOT NULL default '0', 2125 PRIMARY KEY (`id`), 2126 UNIQUE KEY `type` (`type`,`name`) 2127) ENGINE=MyISAM AUTO_INCREMENT=1 ; 2128 2129-- 2130-- Dumping data for table `0_tags` 2131-- 2132 2133 2134-- -------------------------------------------------------- 2135 2136-- 2137-- Table structure for table `0_tag_associations` 2138-- 2139 2140DROP TABLE IF EXISTS `0_tag_associations`; 2141CREATE TABLE IF NOT EXISTS `0_tag_associations` ( 2142 `record_id` varchar(15) NOT NULL, 2143 `tag_id` int(11) NOT NULL, 2144 UNIQUE KEY `record_id` (`record_id`,`tag_id`) 2145) ENGINE=MyISAM; 2146 2147-- 2148-- Dumping data for table `0_tag_associations` 2149-- 2150 2151 2152-- -------------------------------------------------------- 2153 2154-- 2155-- Table structure for table `0_tax_groups` 2156-- 2157 2158DROP TABLE IF EXISTS `0_tax_groups`; 2159CREATE TABLE IF NOT EXISTS `0_tax_groups` ( 2160 `id` int(11) NOT NULL auto_increment, 2161 `name` varchar(60) NOT NULL default '', 2162 `tax_shipping` tinyint(1) NOT NULL default '0', 2163 `inactive` tinyint(1) NOT NULL default '0', 2164 PRIMARY KEY (`id`), 2165 UNIQUE KEY `name` (`name`) 2166) ENGINE=InnoDB AUTO_INCREMENT=3 ; 2167 2168-- 2169-- Dumping data for table `0_tax_groups` 2170-- 2171 2172INSERT INTO `0_tax_groups` VALUES(1, 'Tax', 0, 0); 2173INSERT INTO `0_tax_groups` VALUES(2, 'Tax Exempt', 0, 0); 2174 2175-- -------------------------------------------------------- 2176 2177-- 2178-- Table structure for table `0_tax_group_items` 2179-- 2180 2181DROP TABLE IF EXISTS `0_tax_group_items`; 2182CREATE TABLE IF NOT EXISTS `0_tax_group_items` ( 2183 `tax_group_id` int(11) NOT NULL default '0', 2184 `tax_type_id` int(11) NOT NULL default '0', 2185 `rate` double NOT NULL default '0', 2186 PRIMARY KEY (`tax_group_id`,`tax_type_id`) 2187) ENGINE=InnoDB; 2188 2189-- 2190-- Dumping data for table `0_tax_group_items` 2191-- 2192 2193INSERT INTO `0_tax_group_items` VALUES(1, 1, 5); 2194 2195-- -------------------------------------------------------- 2196 2197-- 2198-- Table structure for table `0_tax_types` 2199-- 2200 2201DROP TABLE IF EXISTS `0_tax_types`; 2202CREATE TABLE IF NOT EXISTS `0_tax_types` ( 2203 `id` int(11) NOT NULL auto_increment, 2204 `rate` double NOT NULL default '0', 2205 `sales_gl_code` varchar(15) NOT NULL default '', 2206 `purchasing_gl_code` varchar(15) NOT NULL default '', 2207 `name` varchar(60) NOT NULL default '', 2208 `inactive` tinyint(1) NOT NULL default '0', 2209 PRIMARY KEY (`id`) 2210) ENGINE=InnoDB AUTO_INCREMENT=2 ; 2211 2212-- 2213-- Dumping data for table `0_tax_types` 2214-- 2215 2216INSERT INTO `0_tax_types` VALUES(1, 5, '2150', '2150', 'Tax', 0); 2217 2218-- -------------------------------------------------------- 2219 2220-- 2221-- Table structure for table `0_trans_tax_details` 2222-- 2223 2224DROP TABLE IF EXISTS `0_trans_tax_details`; 2225CREATE TABLE IF NOT EXISTS `0_trans_tax_details` ( 2226 `id` int(11) NOT NULL auto_increment, 2227 `trans_type` smallint(6) default NULL, 2228 `trans_no` int(11) default NULL, 2229 `tran_date` date NOT NULL, 2230 `tax_type_id` int(11) NOT NULL default '0', 2231 `rate` double NOT NULL default '0', 2232 `ex_rate` double NOT NULL default '1', 2233 `included_in_price` tinyint(1) NOT NULL default '0', 2234 `net_amount` double NOT NULL default '0', 2235 `amount` double NOT NULL default '0', 2236 `memo` tinytext, 2237 PRIMARY KEY (`id`), 2238 KEY `Type_and_Number` (`trans_type`,`trans_no`), 2239 KEY `tran_date` (`tran_date`) 2240) ENGINE=InnoDB AUTO_INCREMENT=12 ; 2241 2242-- 2243-- Dumping data for table `0_trans_tax_details` 2244-- 2245 2246INSERT INTO `0_trans_tax_details` VALUES(1, 20, 7, '2014-06-21', 1, 5, 1, 0, 3300, 165, '5t'); 2247INSERT INTO `0_trans_tax_details` VALUES(2, 13, 3, '2014-06-21', 1, 5, 1, 0, 50, 2.5, 'auto'); 2248INSERT INTO `0_trans_tax_details` VALUES(3, 10, 17, '2014-06-21', 1, 5, 1, 0, 50, 2.5, '1'); 2249INSERT INTO `0_trans_tax_details` VALUES(4, 13, 4, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, 'auto'); 2250INSERT INTO `0_trans_tax_details` VALUES(5, 10, 18, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, '2'); 2251INSERT INTO `0_trans_tax_details` VALUES(6, 2, 5, '2014-06-21', 1, 5, 1, 0, 95.2, 4.76, ''); 2252INSERT INTO `0_trans_tax_details` VALUES(7, 1, 8, '2014-06-21', 1, 5, 1, 0, -47.6, -2.38, ''); 2253INSERT INTO `0_trans_tax_details` VALUES(8, 20, 8, '2014-06-21', 1, 5, 1, 0, -19, -0.95, 'cc'); 2254INSERT INTO `0_trans_tax_details` VALUES(9, 13, 5, '2014-06-21', 1, 5, 1, 1, 47.619047619048, 2.3809523809524, 'auto'); 2255INSERT INTO `0_trans_tax_details` VALUES(10, 10, 19, '2014-06-21', 1, 5, 1, 1, 47.619047619048, 2.3809523809524, '3'); 2256INSERT INTO `0_trans_tax_details` VALUES(11, 11, 3, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, '1'); 2257 2258-- -------------------------------------------------------- 2259 2260-- 2261-- Table structure for table `0_useronline` 2262-- 2263 2264DROP TABLE IF EXISTS `0_useronline`; 2265CREATE TABLE IF NOT EXISTS `0_useronline` ( 2266 `id` int(11) NOT NULL auto_increment, 2267 `timestamp` int(15) NOT NULL default '0', 2268 `ip` varchar(40) NOT NULL default '', 2269 `file` varchar(100) NOT NULL default '', 2270 PRIMARY KEY (`id`), 2271 KEY `timestamp` (`timestamp`), 2272 KEY `ip` (`ip`) 2273) ENGINE=MyISAM AUTO_INCREMENT=1 ; 2274 2275-- 2276-- Dumping data for table `0_useronline` 2277-- 2278 2279 2280-- -------------------------------------------------------- 2281 2282-- 2283-- Table structure for table `0_users` 2284-- 2285 2286DROP TABLE IF EXISTS `0_users`; 2287CREATE TABLE IF NOT EXISTS `0_users` ( 2288 `id` smallint(6) NOT NULL auto_increment, 2289 `user_id` varchar(60) NOT NULL default '', 2290 `password` varchar(100) NOT NULL default '', 2291 `real_name` varchar(100) NOT NULL default '', 2292 `role_id` int(11) NOT NULL default '1', 2293 `phone` varchar(30) NOT NULL default '', 2294 `email` varchar(100) default NULL, 2295 `language` varchar(20) default NULL, 2296 `date_format` tinyint(1) NOT NULL default '0', 2297 `date_sep` tinyint(1) NOT NULL default '0', 2298 `tho_sep` tinyint(1) NOT NULL default '0', 2299 `dec_sep` tinyint(1) NOT NULL default '0', 2300 `theme` varchar(20) NOT NULL default 'default', 2301 `page_size` varchar(20) NOT NULL default 'A4', 2302 `prices_dec` smallint(6) NOT NULL default '2', 2303 `qty_dec` smallint(6) NOT NULL default '2', 2304 `rates_dec` smallint(6) NOT NULL default '4', 2305 `percent_dec` smallint(6) NOT NULL default '1', 2306 `show_gl` tinyint(1) NOT NULL default '1', 2307 `show_codes` tinyint(1) NOT NULL default '0', 2308 `show_hints` tinyint(1) NOT NULL default '0', 2309 `last_visit_date` datetime default NULL, 2310 `query_size` tinyint(1) unsigned NOT NULL default '10', 2311 `graphic_links` tinyint(1) default '1', 2312 `pos` smallint(6) default '1', 2313 `print_profile` varchar(30) NOT NULL default '', 2314 `rep_popup` tinyint(1) default '1', 2315 `sticky_doc_date` tinyint(1) default '0', 2316 `startup_tab` varchar(20) NOT NULL default '', 2317 `inactive` tinyint(1) NOT NULL default '0', 2318 PRIMARY KEY (`id`), 2319 UNIQUE KEY `user_id` (`user_id`) 2320) ENGINE=MyISAM AUTO_INCREMENT=3 ; 2321 2322-- 2323-- Dumping data for table `0_users` 2324-- 2325 2326INSERT 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, '2014-05-11 23:27:46', 10, 1, 1, '1', 1, 0, 'orders', 0); 2327INSERT 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, '2014-02-06 19:02:35', 10, 1, 1, '1', 1, 0, 'orders', 0); 2328 2329-- -------------------------------------------------------- 2330 2331-- 2332-- Table structure for table `0_voided` 2333-- 2334 2335DROP TABLE IF EXISTS `0_voided`; 2336CREATE TABLE IF NOT EXISTS `0_voided` ( 2337 `type` int(11) NOT NULL default '0', 2338 `id` int(11) NOT NULL default '0', 2339 `date_` date NOT NULL default '0000-00-00', 2340 `memo_` tinytext NOT NULL, 2341 UNIQUE KEY `id` (`type`,`id`) 2342) ENGINE=InnoDB; 2343 2344-- 2345-- Dumping data for table `0_voided` 2346-- 2347 2348 2349-- -------------------------------------------------------- 2350 2351-- 2352-- Table structure for table `0_workcentres` 2353-- 2354 2355DROP TABLE IF EXISTS `0_workcentres`; 2356CREATE TABLE IF NOT EXISTS `0_workcentres` ( 2357 `id` int(11) NOT NULL auto_increment, 2358 `name` char(40) NOT NULL default '', 2359 `description` char(50) NOT NULL default '', 2360 `inactive` tinyint(1) NOT NULL default '0', 2361 PRIMARY KEY (`id`), 2362 UNIQUE KEY `name` (`name`) 2363) ENGINE=MyISAM AUTO_INCREMENT=2 ; 2364 2365-- 2366-- Dumping data for table `0_workcentres` 2367-- 2368 2369INSERT INTO `0_workcentres` VALUES(1, 'Workshop', 'Workshop in Alabama', 0); 2370 2371-- -------------------------------------------------------- 2372 2373-- 2374-- Table structure for table `0_workorders` 2375-- 2376 2377DROP TABLE IF EXISTS `0_workorders`; 2378CREATE TABLE IF NOT EXISTS `0_workorders` ( 2379 `id` int(11) NOT NULL auto_increment, 2380 `wo_ref` varchar(60) NOT NULL default '', 2381 `loc_code` varchar(5) NOT NULL default '', 2382 `units_reqd` double NOT NULL default '1', 2383 `stock_id` varchar(20) NOT NULL default '', 2384 `date_` date NOT NULL default '0000-00-00', 2385 `type` tinyint(4) NOT NULL default '0', 2386 `required_by` date NOT NULL default '0000-00-00', 2387 `released_date` date NOT NULL default '0000-00-00', 2388 `units_issued` double NOT NULL default '0', 2389 `closed` tinyint(1) NOT NULL default '0', 2390 `released` tinyint(1) NOT NULL default '0', 2391 `additional_costs` double NOT NULL default '0', 2392 PRIMARY KEY (`id`), 2393 UNIQUE KEY `wo_ref` (`wo_ref`) 2394) ENGINE=InnoDB AUTO_INCREMENT=8 ; 2395 2396-- 2397-- Dumping data for table `0_workorders` 2398-- 2399 2400INSERT INTO `0_workorders` VALUES(1, '1', 'DEF', 10, '3400', '2014-06-21', 0, '2014-06-21', '2014-06-21', 10, 1, 1, 10); 2401INSERT INTO `0_workorders` VALUES(2, '2', 'DEF', 3, '3400', '2014-06-21', 2, '2014-07-11', '2014-06-21', 2, 0, 1, 0); 2402INSERT INTO `0_workorders` VALUES(3, '3', 'DEF', 2, '3400', '2014-06-21', 0, '2014-06-21', '2014-06-21', 2, 1, 1, 0); 2403INSERT INTO `0_workorders` VALUES(4, '4', 'DEF', 4, '3400', '2014-06-21', 0, '2014-06-21', '2014-06-21', 4, 1, 1, 0); 2404INSERT INTO `0_workorders` VALUES(5, '5', 'DEF', 5, '3400', '2014-06-21', 0, '2014-06-21', '2014-06-21', 5, 1, 1, 10); 2405INSERT INTO `0_workorders` VALUES(6, '6', 'DEF', -5, '3400', '2014-06-21', 1, '2014-06-21', '2014-06-21', -5, 1, 1, 0); 2406INSERT INTO `0_workorders` VALUES(7, '7', 'DEF', -2, '3400', '2014-06-21', 1, '2014-06-21', '2014-06-21', -2, 1, 1, 10); 2407 2408-- -------------------------------------------------------- 2409 2410-- 2411-- Table structure for table `0_wo_issues` 2412-- 2413 2414DROP TABLE IF EXISTS `0_wo_issues`; 2415CREATE TABLE IF NOT EXISTS `0_wo_issues` ( 2416 `issue_no` int(11) NOT NULL auto_increment, 2417 `workorder_id` int(11) NOT NULL default '0', 2418 `reference` varchar(100) default NULL, 2419 `issue_date` date default NULL, 2420 `loc_code` varchar(5) default NULL, 2421 `workcentre_id` int(11) default NULL, 2422 PRIMARY KEY (`issue_no`), 2423 KEY `workorder_id` (`workorder_id`) 2424) ENGINE=InnoDB AUTO_INCREMENT=1 ; 2425 2426-- 2427-- Dumping data for table `0_wo_issues` 2428-- 2429 2430 2431-- -------------------------------------------------------- 2432 2433-- 2434-- Table structure for table `0_wo_issue_items` 2435-- 2436 2437DROP TABLE IF EXISTS `0_wo_issue_items`; 2438CREATE TABLE IF NOT EXISTS `0_wo_issue_items` ( 2439 `id` int(11) NOT NULL auto_increment, 2440 `stock_id` varchar(40) default NULL, 2441 `issue_id` int(11) default NULL, 2442 `qty_issued` double default NULL, 2443 PRIMARY KEY (`id`) 2444) ENGINE=InnoDB AUTO_INCREMENT=1 ; 2445 2446-- 2447-- Dumping data for table `0_wo_issue_items` 2448-- 2449 2450 2451-- -------------------------------------------------------- 2452 2453-- 2454-- Table structure for table `0_wo_manufacture` 2455-- 2456 2457DROP TABLE IF EXISTS `0_wo_manufacture`; 2458CREATE TABLE IF NOT EXISTS `0_wo_manufacture` ( 2459 `id` int(11) NOT NULL auto_increment, 2460 `reference` varchar(100) default NULL, 2461 `workorder_id` int(11) NOT NULL default '0', 2462 `quantity` double NOT NULL default '0', 2463 `date_` date NOT NULL default '0000-00-00', 2464 PRIMARY KEY (`id`), 2465 KEY `workorder_id` (`workorder_id`) 2466) ENGINE=InnoDB AUTO_INCREMENT=2 ; 2467 2468-- 2469-- Dumping data for table `0_wo_manufacture` 2470-- 2471 2472INSERT INTO `0_wo_manufacture` VALUES(1, '1', 2, 2, '2014-06-21'); 2473 2474-- -------------------------------------------------------- 2475 2476-- 2477-- Table structure for table `0_wo_requirements` 2478-- 2479 2480DROP TABLE IF EXISTS `0_wo_requirements`; 2481CREATE TABLE IF NOT EXISTS `0_wo_requirements` ( 2482 `id` int(11) NOT NULL auto_increment, 2483 `workorder_id` int(11) NOT NULL default '0', 2484 `stock_id` char(20) NOT NULL default '', 2485 `workcentre` int(11) NOT NULL default '0', 2486 `units_req` double NOT NULL default '1', 2487 `std_cost` double NOT NULL default '0', 2488 `loc_code` char(5) NOT NULL default '', 2489 `units_issued` double NOT NULL default '0', 2490 PRIMARY KEY (`id`), 2491 KEY `workorder_id` (`workorder_id`) 2492) ENGINE=InnoDB AUTO_INCREMENT=22 ; 2493 2494-- 2495-- Dumping data for table `0_wo_requirements` 2496-- 2497 2498INSERT INTO `0_wo_requirements` VALUES(1, 1, '102', 1, 1, 0, 'DEF', 10); 2499INSERT INTO `0_wo_requirements` VALUES(2, 1, '103', 1, 1, 0, 'DEF', 10); 2500INSERT INTO `0_wo_requirements` VALUES(3, 1, '104', 1, 1, 0, 'DEF', 10); 2501INSERT INTO `0_wo_requirements` VALUES(4, 2, '102', 1, 1, 0, 'DEF', 0); 2502INSERT INTO `0_wo_requirements` VALUES(5, 2, '103', 1, 1, 0, 'DEF', 0); 2503INSERT INTO `0_wo_requirements` VALUES(6, 2, '104', 1, 1, 0, 'DEF', 0); 2504INSERT INTO `0_wo_requirements` VALUES(7, 3, '102', 1, 1, 0, 'DEF', 2); 2505INSERT INTO `0_wo_requirements` VALUES(8, 3, '103', 1, 1, 0, 'DEF', 2); 2506INSERT INTO `0_wo_requirements` VALUES(9, 3, '104', 1, 1, 0, 'DEF', 2); 2507INSERT INTO `0_wo_requirements` VALUES(10, 4, '102', 1, 1, 0, 'DEF', 4); 2508INSERT INTO `0_wo_requirements` VALUES(11, 4, '103', 1, 1, 0, 'DEF', 4); 2509INSERT INTO `0_wo_requirements` VALUES(12, 4, '104', 1, 1, 0, 'DEF', 4); 2510INSERT INTO `0_wo_requirements` VALUES(13, 5, '102', 1, 1, 0, 'DEF', 5); 2511INSERT INTO `0_wo_requirements` VALUES(14, 5, '103', 1, 1, 0, 'DEF', 5); 2512INSERT INTO `0_wo_requirements` VALUES(15, 5, '104', 1, 1, 0, 'DEF', 5); 2513INSERT INTO `0_wo_requirements` VALUES(16, 6, '102', 1, 1, 0, 'DEF', -5); 2514INSERT INTO `0_wo_requirements` VALUES(17, 6, '103', 1, 1, 0, 'DEF', -5); 2515INSERT INTO `0_wo_requirements` VALUES(18, 6, '104', 1, 1, 0, 'DEF', -5); 2516INSERT INTO `0_wo_requirements` VALUES(19, 7, '102', 1, 1, 0, 'DEF', -2); 2517INSERT INTO `0_wo_requirements` VALUES(20, 7, '103', 1, 1, 0, 'DEF', -2); 2518INSERT INTO `0_wo_requirements` VALUES(21, 7, '104', 1, 1, 0, 'DEF', -2); 2519