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