2 -- version 2.11.8.1deb5
3 -- http://www.phpmyadmin.net
6 -- Generation Time: May 11, 2010 at 11:37 PM
7 -- Server version: 5.0.51
8 -- PHP Version: 5.2.6-1+lenny2
14 -- --------------------------------------------------------
17 -- Table structure for table `0_areas`
20 DROP TABLE IF EXISTS `0_areas`;
21 CREATE 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 ;
30 -- Dumping data for table `0_areas`
33 INSERT INTO `0_areas` VALUES(1, 'Global', 0);
35 -- --------------------------------------------------------
38 -- Table structure for table `0_attachments`
41 DROP TABLE IF EXISTS `0_attachments`;
42 CREATE 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 '',
53 KEY `type_no` (`type_no`,`trans_no`)
54 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
57 -- Dumping data for table `0_attachments`
61 -- --------------------------------------------------------
64 -- Table structure for table `0_audit_trail`
67 DROP TABLE IF EXISTS `0_audit_trail`;
68 CREATE 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,
79 KEY `Seq` (`fiscal_year`,`gl_date`,`gl_seq`),
80 KEY `Type_and_Number` (`type`,`trans_no`)
81 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
84 -- Dumping data for table `0_audit_trail`
88 -- --------------------------------------------------------
91 -- Table structure for table `0_bank_accounts`
94 DROP TABLE IF EXISTS `0_bank_accounts`;
95 CREATE 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 `bank_charge_act` varchar(15) NOT NULL default '',
106 `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00',
107 `ending_reconcile_balance` double NOT NULL default '0',
108 `inactive` tinyint(1) NOT NULL default '0',
110 KEY `bank_account_name` (`bank_account_name`),
111 KEY `bank_account_number` (`bank_account_number`),
112 KEY `account_code` (`account_code`)
113 ) ENGINE=MyISAM AUTO_INCREMENT=3 ;
116 -- Dumping data for table `0_bank_accounts`
119 INSERT INTO `0_bank_accounts` VALUES('1060', 0, 'Current account', 'N/A', 'N/A', '', 'USD', 1, 1, '5690', '0000-00-00 00:00:00', 0, 0);
120 INSERT INTO `0_bank_accounts` VALUES('1065', 3, 'Petty Cash account', 'N/A', 'N/A', '', 'USD', 0, 2, '5690', '0000-00-00 00:00:00', 0, 0);
122 -- --------------------------------------------------------
125 -- Table structure for table `0_bank_trans`
128 DROP TABLE IF EXISTS `0_bank_trans`;
129 CREATE TABLE IF NOT EXISTS `0_bank_trans` (
130 `id` int(11) NOT NULL auto_increment,
131 `type` smallint(6) default NULL,
132 `trans_no` int(11) default NULL,
133 `bank_act` varchar(15) NOT NULL default '',
134 `ref` varchar(40) default NULL,
135 `trans_date` date NOT NULL default '0000-00-00',
136 `amount` double default NULL,
137 `dimension_id` int(11) NOT NULL default '0',
138 `dimension2_id` int(11) NOT NULL default '0',
139 `person_type_id` int(11) NOT NULL default '0',
140 `person_id` tinyblob,
141 `reconciled` date default NULL,
143 KEY `bank_act` (`bank_act`,`ref`),
144 KEY `type` (`type`,`trans_no`),
145 KEY `bank_act_2` (`bank_act`,`reconciled`),
146 KEY `bank_act_3` (`bank_act`,`trans_date`)
147 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
150 -- Dumping data for table `0_bank_trans`
154 -- --------------------------------------------------------
157 -- Table structure for table `0_bom`
160 DROP TABLE IF EXISTS `0_bom`;
161 CREATE TABLE IF NOT EXISTS `0_bom` (
162 `id` int(11) NOT NULL auto_increment,
163 `parent` char(20) NOT NULL default '',
164 `component` char(20) NOT NULL default '',
165 `workcentre_added` int(11) NOT NULL default '0',
166 `loc_code` char(5) NOT NULL default '',
167 `quantity` double NOT NULL default '1',
168 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
169 KEY `component` (`component`),
171 KEY `loc_code` (`loc_code`),
172 KEY `parent` (`parent`,`loc_code`),
173 KEY `workcentre_added` (`workcentre_added`)
174 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
177 -- Dumping data for table `0_bom`
181 -- --------------------------------------------------------
184 -- Table structure for table `0_budget_trans`
187 DROP TABLE IF EXISTS `0_budget_trans`;
188 CREATE TABLE IF NOT EXISTS `0_budget_trans` (
189 `counter` int(11) NOT NULL auto_increment,
190 `type` smallint(6) NOT NULL default '0',
191 `type_no` bigint(16) NOT NULL default '1',
192 `tran_date` date NOT NULL default '0000-00-00',
193 `account` varchar(15) NOT NULL default '',
194 `memo_` tinytext NOT NULL,
195 `amount` double NOT NULL default '0',
196 `dimension_id` int(11) default '0',
197 `dimension2_id` int(11) default '0',
198 `person_type_id` int(11) default NULL,
199 `person_id` tinyblob,
200 PRIMARY KEY (`counter`),
201 KEY `Type_and_Number` (`type`,`type_no`),
202 KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`)
203 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
206 -- Dumping data for table `0_budget_trans`
210 -- --------------------------------------------------------
213 -- Table structure for table `0_chart_class`
216 DROP TABLE IF EXISTS `0_chart_class`;
217 CREATE TABLE IF NOT EXISTS `0_chart_class` (
218 `cid` varchar(3) NOT NULL,
219 `class_name` varchar(60) NOT NULL default '',
220 `ctype` tinyint(1) NOT NULL default '0',
221 `inactive` tinyint(1) NOT NULL default '0',
226 -- Dumping data for table `0_chart_class`
229 INSERT INTO `0_chart_class` VALUES('1', 'Assets', 1, 0);
230 INSERT INTO `0_chart_class` VALUES('2', 'Liabilities', 2, 0);
231 INSERT INTO `0_chart_class` VALUES('3', 'Income', 4, 0);
232 INSERT INTO `0_chart_class` VALUES('4', 'Costs', 6, 0);
234 -- --------------------------------------------------------
237 -- Table structure for table `0_chart_master`
240 DROP TABLE IF EXISTS `0_chart_master`;
241 CREATE TABLE IF NOT EXISTS `0_chart_master` (
242 `account_code` varchar(15) NOT NULL default '',
243 `account_code2` varchar(15) NOT NULL default '',
244 `account_name` varchar(60) NOT NULL default '',
245 `account_type` varchar(10) NOT NULL default '0',
246 `inactive` tinyint(1) NOT NULL default '0',
247 PRIMARY KEY (`account_code`),
248 KEY `account_name` (`account_name`),
249 KEY `accounts_by_type` (`account_type`,`account_code`)
253 -- Dumping data for table `0_chart_master`
256 INSERT INTO `0_chart_master` VALUES('1060', '', 'Checking Account', '1', 0);
257 INSERT INTO `0_chart_master` VALUES('1065', '', 'Petty Cash', '1', 0);
258 INSERT INTO `0_chart_master` VALUES('1200', '', 'Accounts Receivables', '1', 0);
259 INSERT INTO `0_chart_master` VALUES('1205', '', 'Allowance for doubtful accounts', '1', 0);
260 INSERT INTO `0_chart_master` VALUES('1510', '', 'Inventory', '2', 0);
261 INSERT INTO `0_chart_master` VALUES('1520', '', 'Stocks of Raw Materials', '2', 0);
262 INSERT INTO `0_chart_master` VALUES('1530', '', 'Stocks of Work In Progress', '2', 0);
263 INSERT INTO `0_chart_master` VALUES('1540', '', 'Stocks of Finsihed Goods', '2', 0);
264 INSERT INTO `0_chart_master` VALUES('1550', '', 'Goods Received Clearing account', '2', 0);
265 INSERT INTO `0_chart_master` VALUES('1820', '', 'Office Furniture & Equipment', '3', 0);
266 INSERT INTO `0_chart_master` VALUES('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', 0);
267 INSERT INTO `0_chart_master` VALUES('1840', '', 'Vehicle', '3', 0);
268 INSERT INTO `0_chart_master` VALUES('1845', '', 'Accum. Amort. -Vehicle', '3', 0);
269 INSERT INTO `0_chart_master` VALUES('2100', '', 'Accounts Payable', '4', 0);
270 INSERT INTO `0_chart_master` VALUES('2110', '', 'Accrued Income Tax - Federal', '4', 0);
271 INSERT INTO `0_chart_master` VALUES('2120', '', 'Accrued Income Tax - State', '4', 0);
272 INSERT INTO `0_chart_master` VALUES('2130', '', 'Accrued Franchise Tax', '4', 0);
273 INSERT INTO `0_chart_master` VALUES('2140', '', 'Accrued Real & Personal Prop Tax', '4', 0);
274 INSERT INTO `0_chart_master` VALUES('2150', '', 'Sales Tax', '4', 0);
275 INSERT INTO `0_chart_master` VALUES('2160', '', 'Accrued Use Tax Payable', '4', 0);
276 INSERT INTO `0_chart_master` VALUES('2210', '', 'Accrued Wages', '4', 0);
277 INSERT INTO `0_chart_master` VALUES('2220', '', 'Accrued Comp Time', '4', 0);
278 INSERT INTO `0_chart_master` VALUES('2230', '', 'Accrued Holiday Pay', '4', 0);
279 INSERT INTO `0_chart_master` VALUES('2240', '', 'Accrued Vacation Pay', '4', 0);
280 INSERT INTO `0_chart_master` VALUES('2310', '', 'Accr. Benefits - 401K', '4', 0);
281 INSERT INTO `0_chart_master` VALUES('2320', '', 'Accr. Benefits - Stock Purchase', '4', 0);
282 INSERT INTO `0_chart_master` VALUES('2330', '', 'Accr. Benefits - Med, Den', '4', 0);
283 INSERT INTO `0_chart_master` VALUES('2340', '', 'Accr. Benefits - Payroll Taxes', '4', 0);
284 INSERT INTO `0_chart_master` VALUES('2350', '', 'Accr. Benefits - Credit Union', '4', 0);
285 INSERT INTO `0_chart_master` VALUES('2360', '', 'Accr. Benefits - Savings Bond', '4', 0);
286 INSERT INTO `0_chart_master` VALUES('2370', '', 'Accr. Benefits - Garnish', '4', 0);
287 INSERT INTO `0_chart_master` VALUES('2380', '', 'Accr. Benefits - Charity Cont.', '4', 0);
288 INSERT INTO `0_chart_master` VALUES('2620', '', 'Bank Loans', '5', 0);
289 INSERT INTO `0_chart_master` VALUES('2680', '', 'Loans from Shareholders', '5', 0);
290 INSERT INTO `0_chart_master` VALUES('3350', '', 'Common Shares', '6', 0);
291 INSERT INTO `0_chart_master` VALUES('3590', '', 'Retained Earnings - prior years', '7', 0);
292 INSERT INTO `0_chart_master` VALUES('4010', '', 'Sales', '8', 0);
293 INSERT INTO `0_chart_master` VALUES('4430', '', 'Shipping & Handling', '9', 0);
294 INSERT INTO `0_chart_master` VALUES('4440', '', 'Interest', '9', 0);
295 INSERT INTO `0_chart_master` VALUES('4450', '', 'Foreign Exchange Gain', '9', 0);
296 INSERT INTO `0_chart_master` VALUES('4500', '', 'Prompt Payment Discounts', '9', 0);
297 INSERT INTO `0_chart_master` VALUES('4510', '', 'Discounts Given', '9', 0);
298 INSERT INTO `0_chart_master` VALUES('5010', '', 'Cost of Goods Sold - Retail', '10', 0);
299 INSERT INTO `0_chart_master` VALUES('5020', '', 'Material Usage Varaiance', '10', 0);
300 INSERT INTO `0_chart_master` VALUES('5030', '', 'Consumable Materials', '10', 0);
301 INSERT INTO `0_chart_master` VALUES('5040', '', 'Purchase price Variance', '10', 0);
302 INSERT INTO `0_chart_master` VALUES('5050', '', 'Purchases of materials', '10', 0);
303 INSERT INTO `0_chart_master` VALUES('5060', '', 'Discounts Received', '10', 0);
304 INSERT INTO `0_chart_master` VALUES('5100', '', 'Freight', '10', 0);
305 INSERT INTO `0_chart_master` VALUES('5410', '', 'Wages & Salaries', '11', 0);
306 INSERT INTO `0_chart_master` VALUES('5420', '', 'Wages - Overtime', '11', 0);
307 INSERT INTO `0_chart_master` VALUES('5430', '', 'Benefits - Comp Time', '11', 0);
308 INSERT INTO `0_chart_master` VALUES('5440', '', 'Benefits - Payroll Taxes', '11', 0);
309 INSERT INTO `0_chart_master` VALUES('5450', '', 'Benefits - Workers Comp', '11', 0);
310 INSERT INTO `0_chart_master` VALUES('5460', '', 'Benefits - Pension', '11', 0);
311 INSERT INTO `0_chart_master` VALUES('5470', '', 'Benefits - General Benefits', '11', 0);
312 INSERT INTO `0_chart_master` VALUES('5510', '', 'Inc Tax Exp - Federal', '11', 0);
313 INSERT INTO `0_chart_master` VALUES('5520', '', 'Inc Tax Exp - State', '11', 0);
314 INSERT INTO `0_chart_master` VALUES('5530', '', 'Taxes - Real Estate', '11', 0);
315 INSERT INTO `0_chart_master` VALUES('5540', '', 'Taxes - Personal Property', '11', 0);
316 INSERT INTO `0_chart_master` VALUES('5550', '', 'Taxes - Franchise', '11', 0);
317 INSERT INTO `0_chart_master` VALUES('5560', '', 'Taxes - Foreign Withholding', '11', 0);
318 INSERT INTO `0_chart_master` VALUES('5610', '', 'Accounting & Legal', '12', 0);
319 INSERT INTO `0_chart_master` VALUES('5615', '', 'Advertising & Promotions', '12', 0);
320 INSERT INTO `0_chart_master` VALUES('5620', '', 'Bad Debts', '12', 0);
321 INSERT INTO `0_chart_master` VALUES('5660', '', 'Amortization Expense', '12', 0);
322 INSERT INTO `0_chart_master` VALUES('5685', '', 'Insurance', '12', 0);
323 INSERT INTO `0_chart_master` VALUES('5690', '', 'Interest & Bank Charges', '12', 0);
324 INSERT INTO `0_chart_master` VALUES('5700', '', 'Office Supplies', '12', 0);
325 INSERT INTO `0_chart_master` VALUES('5760', '', 'Rent', '12', 0);
326 INSERT INTO `0_chart_master` VALUES('5765', '', 'Repair & Maintenance', '12', 0);
327 INSERT INTO `0_chart_master` VALUES('5780', '', 'Telephone', '12', 0);
328 INSERT INTO `0_chart_master` VALUES('5785', '', 'Travel & Entertainment', '12', 0);
329 INSERT INTO `0_chart_master` VALUES('5790', '', 'Utilities', '12', 0);
330 INSERT INTO `0_chart_master` VALUES('5795', '', 'Registrations', '12', 0);
331 INSERT INTO `0_chart_master` VALUES('5800', '', 'Licenses', '12', 0);
332 INSERT INTO `0_chart_master` VALUES('5810', '', 'Foreign Exchange Loss', '12', 0);
333 INSERT INTO `0_chart_master` VALUES('9990', '', 'Year Profit/Loss', '12', 0);
335 -- --------------------------------------------------------
338 -- Table structure for table `0_chart_types`
341 DROP TABLE IF EXISTS `0_chart_types`;
342 CREATE TABLE IF NOT EXISTS `0_chart_types` (
343 `id` varchar(10) NOT NULL,
344 `name` varchar(60) NOT NULL default '',
345 `class_id` varchar(3) NOT NULL default '',
346 `parent` varchar(10) NOT NULL default '-1',
347 `inactive` tinyint(1) NOT NULL default '0',
350 KEY `class_id` (`class_id`)
354 -- Dumping data for table `0_chart_types`
357 INSERT INTO `0_chart_types` VALUES('1', 'Current Assets', '1', '', 0);
358 INSERT INTO `0_chart_types` VALUES('2', 'Inventory Assets', '1', '', 0);
359 INSERT INTO `0_chart_types` VALUES('3', 'Capital Assets', '1', '', 0);
360 INSERT INTO `0_chart_types` VALUES('4', 'Current Liabilities', '2', '', 0);
361 INSERT INTO `0_chart_types` VALUES('5', 'Long Term Liabilities', '2', '', 0);
362 INSERT INTO `0_chart_types` VALUES('6', 'Share Capital', '2', '', 0);
363 INSERT INTO `0_chart_types` VALUES('7', 'Retained Earnings', '2', '', 0);
364 INSERT INTO `0_chart_types` VALUES('8', 'Sales Revenue', '3', '', 0);
365 INSERT INTO `0_chart_types` VALUES('9', 'Other Revenue', '3', '', 0);
366 INSERT INTO `0_chart_types` VALUES('10', 'Cost of Goods Sold', '4', '', 0);
367 INSERT INTO `0_chart_types` VALUES('11', 'Payroll Expenses', '4', '', 0);
368 INSERT INTO `0_chart_types` VALUES('12', 'General & Administrative expenses', '4', '', 0);
370 -- --------------------------------------------------------
373 -- Table structure for table `0_comments`
376 DROP TABLE IF EXISTS `0_comments`;
377 CREATE TABLE IF NOT EXISTS `0_comments` (
378 `type` int(11) NOT NULL default '0',
379 `id` int(11) NOT NULL default '0',
380 `date_` date default '0000-00-00',
382 KEY `type_and_id` (`type`,`id`)
386 -- Dumping data for table `0_comments`
390 -- --------------------------------------------------------
393 -- Table structure for table `0_credit_status`
396 DROP TABLE IF EXISTS `0_credit_status`;
397 CREATE TABLE IF NOT EXISTS `0_credit_status` (
398 `id` int(11) NOT NULL auto_increment,
399 `reason_description` char(100) NOT NULL default '',
400 `dissallow_invoices` tinyint(1) NOT NULL default '0',
401 `inactive` tinyint(1) NOT NULL default '0',
403 UNIQUE KEY `reason_description` (`reason_description`)
404 ) ENGINE=MyISAM AUTO_INCREMENT=5 ;
407 -- Dumping data for table `0_credit_status`
410 INSERT INTO `0_credit_status` VALUES(1, 'Good History', 0, 0);
411 INSERT INTO `0_credit_status` VALUES(3, 'No more work until payment received', 1, 0);
412 INSERT INTO `0_credit_status` VALUES(4, 'In liquidation', 1, 0);
414 -- --------------------------------------------------------
417 -- Table structure for table `0_crm_categories`
420 DROP TABLE IF EXISTS `0_crm_categories`;
421 CREATE TABLE IF NOT EXISTS `0_crm_categories` (
422 `id` int(11) NOT NULL auto_increment COMMENT 'pure technical key',
423 `type` varchar(20) NOT NULL COMMENT 'contact type e.g. customer',
424 `action` varchar(20) NOT NULL COMMENT 'detailed usage e.g. department',
425 `name` varchar(30) NOT NULL COMMENT 'for category selector',
426 `description` tinytext NOT NULL COMMENT 'usage description',
427 `system` tinyint(1) NOT NULL default '0' COMMENT 'nonzero for core system usage',
428 `inactive` tinyint(1) NOT NULL default '0',
430 UNIQUE KEY `type` (`type`,`action`),
431 UNIQUE KEY `type_2` (`type`,`name`)
432 ) ENGINE=InnoDB AUTO_INCREMENT=13 ;
435 -- Dumping data for table `0_crm_categories`
438 INSERT INTO `0_crm_categories` VALUES(1, 'cust_branch', 'general', 'General', 'General contact data for customer branch (overrides company setting)', 1, 0);
439 INSERT INTO `0_crm_categories` VALUES(2, 'cust_branch', 'invoice', 'Invoices', 'Invoice posting (overrides company setting)', 1, 0);
440 INSERT INTO `0_crm_categories` VALUES(3, 'cust_branch', 'order', 'Orders', 'Order confirmation (overrides company setting)', 1, 0);
441 INSERT INTO `0_crm_categories` VALUES(4, 'cust_branch', 'delivery', 'Deliveries', 'Delivery coordination (overrides company setting)', 1, 0);
442 INSERT INTO `0_crm_categories` VALUES(5, 'customer', 'general', 'General', 'General contact data for customer', 1, 0);
443 INSERT INTO `0_crm_categories` VALUES(6, 'customer', 'order', 'Orders', 'Order confirmation', 1, 0);
444 INSERT INTO `0_crm_categories` VALUES(7, 'customer', 'delivery', 'Deliveries', 'Delivery coordination', 1, 0);
445 INSERT INTO `0_crm_categories` VALUES(8, 'customer', 'invoice', 'Invoices', 'Invoice posting', 1, 0);
446 INSERT INTO `0_crm_categories` VALUES(9, 'supplier', 'general', 'General', 'General contact data for supplier', 1, 0);
447 INSERT INTO `0_crm_categories` VALUES(10, 'supplier', 'order', 'Orders', 'Order confirmation', 1, 0);
448 INSERT INTO `0_crm_categories` VALUES(11, 'supplier', 'delivery', 'Deliveries', 'Delivery coordination', 1, 0);
449 INSERT INTO `0_crm_categories` VALUES(12, 'supplier', 'invoice', 'Invoices', 'Invoice posting', 1, 0);
451 -- --------------------------------------------------------
454 -- Table structure for table `0_crm_contacts`
457 DROP TABLE IF EXISTS `0_crm_contacts`;
458 CREATE TABLE IF NOT EXISTS `0_crm_contacts` (
459 `id` int(11) NOT NULL auto_increment,
460 `person_id` int(11) NOT NULL default '0' COMMENT 'foreign key to crm_contacts',
461 `type` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
462 `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
463 `entity_id` varchar(11) default NULL COMMENT 'entity id in related class table',
465 KEY `type` (`type`,`action`)
466 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
469 -- Dumping data for table `0_crm_contacts`
472 -- --------------------------------------------------------
475 -- Table structure for table `0_crm_persons`
478 DROP TABLE IF EXISTS `0_crm_persons`;
479 CREATE TABLE IF NOT EXISTS `0_crm_persons` (
480 `id` int(11) NOT NULL auto_increment,
481 `ref` varchar(30) NOT NULL,
482 `name` varchar(60) NOT NULL,
483 `name2` varchar(60) default NULL,
485 `phone` varchar(30) default NULL,
486 `phone2` varchar(30) default NULL,
487 `fax` varchar(30) default NULL,
488 `email` varchar(100) default NULL,
489 `lang` char(5) default NULL,
490 `notes` tinytext NOT NULL,
491 `inactive` tinyint(1) NOT NULL default '0',
494 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
497 -- Dumping data for table `0_crm_persons`
501 -- --------------------------------------------------------
504 -- Table structure for table `0_currencies`
507 DROP TABLE IF EXISTS `0_currencies`;
508 CREATE TABLE IF NOT EXISTS `0_currencies` (
509 `currency` varchar(60) NOT NULL default '',
510 `curr_abrev` char(3) NOT NULL default '',
511 `curr_symbol` varchar(10) NOT NULL default '',
512 `country` varchar(100) NOT NULL default '',
513 `hundreds_name` varchar(15) NOT NULL default '',
514 `auto_update` tinyint(1) NOT NULL default '1',
515 `inactive` tinyint(1) NOT NULL default '0',
516 PRIMARY KEY (`curr_abrev`)
520 -- Dumping data for table `0_currencies`
523 INSERT INTO `0_currencies` VALUES('US Dollars', 'USD', '$', 'United States', 'Cents', 1, 0);
524 INSERT INTO `0_currencies` VALUES('CA Dollars', 'CAD', '$', 'Canada', 'Cents', 1, 0);
525 INSERT INTO `0_currencies` VALUES('Euro', 'EUR', '?', 'Europe', 'Cents', 1, 0);
526 INSERT INTO `0_currencies` VALUES('Pounds', 'GBP', '?', 'England', 'Pence', 1, 0);
528 -- --------------------------------------------------------
531 -- Table structure for table `0_cust_allocations`
534 DROP TABLE IF EXISTS `0_cust_allocations`;
535 CREATE TABLE IF NOT EXISTS `0_cust_allocations` (
536 `id` int(11) NOT NULL auto_increment,
537 `amt` double unsigned default NULL,
538 `date_alloc` date NOT NULL default '0000-00-00',
539 `trans_no_from` int(11) default NULL,
540 `trans_type_from` int(11) default NULL,
541 `trans_no_to` int(11) default NULL,
542 `trans_type_to` int(11) default NULL,
544 UNIQUE KEY(`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
545 KEY `From` (`trans_type_from`,`trans_no_from`),
546 KEY `To` (`trans_type_to`,`trans_no_to`)
547 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
550 -- Dumping data for table `0_cust_allocations`
554 -- --------------------------------------------------------
557 -- Table structure for table `0_cust_branch`
560 DROP TABLE IF EXISTS `0_cust_branch`;
561 CREATE TABLE IF NOT EXISTS `0_cust_branch` (
562 `branch_code` int(11) NOT NULL auto_increment,
563 `debtor_no` int(11) NOT NULL default '0',
564 `br_name` varchar(60) NOT NULL default '',
565 `branch_ref` varchar(30) NOT NULL default '',
566 `br_address` tinytext NOT NULL,
567 `area` int(11) default NULL,
568 `salesman` int(11) NOT NULL default '0',
569 `contact_name` varchar(60) NOT NULL default '',
570 `default_location` varchar(5) NOT NULL default '',
571 `tax_group_id` int(11) default NULL,
572 `sales_account` varchar(15) NOT NULL default '',
573 `sales_discount_account` varchar(15) NOT NULL default '',
574 `receivables_account` varchar(15) NOT NULL default '',
575 `payment_discount_account` varchar(15) NOT NULL default '',
576 `default_ship_via` int(11) NOT NULL default '1',
577 `disable_trans` tinyint(4) NOT NULL default '0',
578 `br_post_address` tinytext NOT NULL,
579 `group_no` int(11) NOT NULL default '0',
580 `notes` tinytext NOT NULL,
581 `bank_account` varchar(60) DEFAULT NULL,
582 `inactive` tinyint(1) NOT NULL default '0',
583 PRIMARY KEY (`branch_code`,`debtor_no`),
584 KEY `branch_code` (`branch_code`),
585 KEY `branch_ref` (`branch_ref`),
586 KEY `group_no` (`group_no`)
587 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
590 -- Dumping data for table `0_cust_branch`
594 -- --------------------------------------------------------
597 -- Table structure for table `0_debtors_master`
600 DROP TABLE IF EXISTS `0_debtors_master`;
601 CREATE TABLE IF NOT EXISTS `0_debtors_master` (
602 `debtor_no` int(11) NOT NULL auto_increment,
603 `name` varchar(100) NOT NULL default '',
604 `debtor_ref` varchar(30) NOT NULL,
606 `tax_id` varchar(55) NOT NULL default '',
607 `curr_code` char(3) NOT NULL default '',
608 `sales_type` int(11) NOT NULL default '1',
609 `dimension_id` int(11) NOT NULL default '0',
610 `dimension2_id` int(11) NOT NULL default '0',
611 `credit_status` int(11) NOT NULL default '0',
612 `payment_terms` int(11) default NULL,
613 `discount` double NOT NULL default '0',
614 `pymt_discount` double NOT NULL default '0',
615 `credit_limit` float NOT NULL default '1000',
616 `notes` tinytext NOT NULL,
617 `inactive` tinyint(1) NOT NULL default '0',
618 PRIMARY KEY (`debtor_no`),
620 UNIQUE KEY `debtor_ref` (`debtor_ref`)
621 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
624 -- Dumping data for table `0_debtors_master`
628 -- --------------------------------------------------------
631 -- Table structure for table `0_debtor_trans`
634 DROP TABLE IF EXISTS `0_debtor_trans`;
635 CREATE TABLE IF NOT EXISTS `0_debtor_trans` (
636 `trans_no` int(11) unsigned NOT NULL default '0',
637 `type` smallint(6) unsigned NOT NULL default '0',
638 `version` tinyint(1) unsigned NOT NULL default '0',
639 `debtor_no` int(11) unsigned default NULL,
640 `branch_code` int(11) NOT NULL default '-1',
641 `tran_date` date NOT NULL default '0000-00-00',
642 `due_date` date NOT NULL default '0000-00-00',
643 `reference` varchar(60) NOT NULL default '',
644 `tpe` int(11) NOT NULL default '0',
645 `order_` int(11) NOT NULL default '0',
646 `ov_amount` double NOT NULL default '0',
647 `ov_gst` double NOT NULL default '0',
648 `ov_freight` double NOT NULL default '0',
649 `ov_freight_tax` double NOT NULL default '0',
650 `ov_discount` double NOT NULL default '0',
651 `alloc` double NOT NULL default '0',
652 `prep_amount` double NOT NULL DEFAULT '0',
653 `rate` double NOT NULL default '1',
654 `ship_via` int(11) default NULL,
655 `dimension_id` int(11) NOT NULL default '0',
656 `dimension2_id` int(11) NOT NULL default '0',
657 `payment_terms` int(11) default NULL,
658 `tax_included` tinyint(1) unsigned NOT NULL default '0',
659 PRIMARY KEY (`type`,`trans_no`),
660 KEY `debtor_no` (`debtor_no`,`branch_code`),
661 KEY `tran_date` (`tran_date`)
665 -- Dumping data for table `0_debtor_trans`
669 -- --------------------------------------------------------
672 -- Table structure for table `0_debtor_trans_details`
675 DROP TABLE IF EXISTS `0_debtor_trans_details`;
676 CREATE TABLE IF NOT EXISTS `0_debtor_trans_details` (
677 `id` int(11) NOT NULL auto_increment,
678 `debtor_trans_no` int(11) default NULL,
679 `debtor_trans_type` int(11) default NULL,
680 `stock_id` varchar(20) NOT NULL default '',
681 `description` tinytext,
682 `unit_price` double NOT NULL default '0',
683 `unit_tax` double NOT NULL default '0',
684 `quantity` double NOT NULL default '0',
685 `discount_percent` double NOT NULL default '0',
686 `standard_cost` double NOT NULL default '0',
687 `qty_done` double NOT NULL default '0',
688 `src_id` int(11) NOT NULL,
690 KEY `Transaction` (`debtor_trans_type`,`debtor_trans_no`),
692 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
695 -- Dumping data for table `0_debtor_trans_details`
699 -- --------------------------------------------------------
702 -- Table structure for table `0_dimensions`
705 DROP TABLE IF EXISTS `0_dimensions`;
706 CREATE TABLE IF NOT EXISTS `0_dimensions` (
707 `id` int(11) NOT NULL auto_increment,
708 `reference` varchar(60) NOT NULL default '',
709 `name` varchar(60) NOT NULL default '',
710 `type_` tinyint(1) NOT NULL default '1',
711 `closed` tinyint(1) NOT NULL default '0',
712 `date_` date NOT NULL default '0000-00-00',
713 `due_date` date NOT NULL default '0000-00-00',
715 UNIQUE KEY `reference` (`reference`),
716 KEY `date_` (`date_`),
717 KEY `due_date` (`due_date`),
718 KEY `type_` (`type_`)
719 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
722 -- Dumping data for table `0_dimensions`
726 -- --------------------------------------------------------
729 -- Table structure for table `0_exchange_rates`
732 DROP TABLE IF EXISTS `0_exchange_rates`;
733 CREATE TABLE IF NOT EXISTS `0_exchange_rates` (
734 `id` int(11) NOT NULL auto_increment,
735 `curr_code` char(3) NOT NULL default '',
736 `rate_buy` double NOT NULL default '0',
737 `rate_sell` double NOT NULL default '0',
738 `date_` date NOT NULL default '0000-00-00',
740 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
741 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
744 -- Dumping data for table `0_exchange_rates`
748 -- --------------------------------------------------------
751 -- Table structure for table `0_fiscal_year`
754 DROP TABLE IF EXISTS `0_fiscal_year`;
755 CREATE TABLE IF NOT EXISTS `0_fiscal_year` (
756 `id` int(11) NOT NULL auto_increment,
757 `begin` date default '0000-00-00',
758 `end` date default '0000-00-00',
759 `closed` tinyint(1) NOT NULL default '0',
761 UNIQUE KEY `begin` (`begin`),
762 UNIQUE KEY `end` (`end`)
763 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
766 -- Dumping data for table `0_fiscal_year`
769 INSERT INTO `0_fiscal_year` VALUES(1, '2008-01-01', '2008-12-31', 0);
770 INSERT INTO `0_fiscal_year` VALUES(2, '2009-01-01', '2009-12-31', 0);
771 INSERT INTO `0_fiscal_year` VALUES(3, '2010-01-01', '2010-12-31', 0);
772 INSERT INTO `0_fiscal_year` VALUES(4, '2011-01-01', '2011-12-31', 0);
775 -- Table structure for table `0_gl_trans`
778 DROP TABLE IF EXISTS `0_gl_trans`;
779 CREATE TABLE IF NOT EXISTS `0_gl_trans` (
780 `counter` int(11) NOT NULL auto_increment,
781 `type` smallint(6) NOT NULL default '0',
782 `type_no` bigint(16) NOT NULL default '1',
783 `tran_date` date NOT NULL default '0000-00-00',
784 `account` varchar(15) NOT NULL default '',
785 `memo_` tinytext NOT NULL,
786 `amount` double NOT NULL default '0',
787 `dimension_id` int(11) NOT NULL default '0',
788 `dimension2_id` int(11) NOT NULL default '0',
789 `person_type_id` int(11) default NULL,
790 `person_id` tinyblob,
791 PRIMARY KEY (`counter`),
792 KEY `Type_and_Number` (`type`,`type_no`),
793 KEY `dimension_id` (`dimension_id`),
794 KEY `dimension2_id` (`dimension2_id`),
795 KEY `tran_date` (`tran_date`),
796 KEY `account_and_tran_date` (`account`,`tran_date`)
797 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
800 -- Dumping data for table `0_gl_trans`
804 -- --------------------------------------------------------
807 -- Table structure for table `0_grn_batch`
810 DROP TABLE IF EXISTS `0_grn_batch`;
811 CREATE TABLE IF NOT EXISTS `0_grn_batch` (
812 `id` int(11) NOT NULL auto_increment,
813 `supplier_id` int(11) NOT NULL default '0',
814 `purch_order_no` int(11) default NULL,
815 `reference` varchar(60) NOT NULL default '',
816 `delivery_date` date NOT NULL default '0000-00-00',
817 `loc_code` varchar(5) default NULL,
819 KEY `delivery_date` (`delivery_date`),
820 KEY `purch_order_no` (`purch_order_no`)
821 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
824 -- Dumping data for table `0_grn_batch`
828 -- --------------------------------------------------------
831 -- Table structure for table `0_grn_items`
834 DROP TABLE IF EXISTS `0_grn_items`;
835 CREATE TABLE IF NOT EXISTS `0_grn_items` (
836 `id` int(11) NOT NULL auto_increment,
837 `grn_batch_id` int(11) default NULL,
838 `po_detail_item` int(11) NOT NULL default '0',
839 `item_code` varchar(20) NOT NULL default '',
840 `description` tinytext,
841 `qty_recd` double NOT NULL default '0',
842 `quantity_inv` double NOT NULL default '0',
844 KEY `grn_batch_id` (`grn_batch_id`)
845 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
848 -- Dumping data for table `0_grn_items`
852 -- --------------------------------------------------------
855 -- Table structure for table `0_groups`
858 DROP TABLE IF EXISTS `0_groups`;
859 CREATE TABLE IF NOT EXISTS `0_groups` (
860 `id` smallint(6) unsigned NOT NULL auto_increment,
861 `description` varchar(60) NOT NULL default '',
862 `inactive` tinyint(1) NOT NULL default '0',
864 UNIQUE KEY `description` (`description`)
865 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
868 -- Dumping data for table `0_groups`
871 INSERT INTO `0_groups` VALUES(1, 'Small', 0);
872 INSERT INTO `0_groups` VALUES(2, 'Medium', 0);
873 INSERT INTO `0_groups` VALUES(3, 'Large', 0);
875 -- --------------------------------------------------------
878 -- Table structure for table `0_item_codes`
881 DROP TABLE IF EXISTS `0_item_codes`;
882 CREATE TABLE IF NOT EXISTS `0_item_codes` (
883 `id` int(11) unsigned NOT NULL auto_increment,
884 `item_code` varchar(20) NOT NULL,
885 `stock_id` varchar(20) NOT NULL,
886 `description` varchar(200) NOT NULL default '',
887 `category_id` smallint(6) unsigned NOT NULL,
888 `quantity` double NOT NULL default '1',
889 `is_foreign` tinyint(1) NOT NULL default '0',
890 `inactive` tinyint(1) NOT NULL default '0',
892 UNIQUE KEY `stock_id` (`stock_id`,`item_code`),
893 KEY `item_code` (`item_code`)
894 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
897 -- Dumping data for table `0_item_codes`
901 -- --------------------------------------------------------
904 -- Table structure for table `0_item_tax_types`
907 DROP TABLE IF EXISTS `0_item_tax_types`;
908 CREATE TABLE IF NOT EXISTS `0_item_tax_types` (
909 `id` int(11) NOT NULL auto_increment,
910 `name` varchar(60) NOT NULL default '',
911 `exempt` tinyint(1) NOT NULL default '0',
912 `inactive` tinyint(1) NOT NULL default '0',
914 UNIQUE KEY `name` (`name`)
915 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
918 -- Dumping data for table `0_item_tax_types`
921 INSERT INTO `0_item_tax_types` VALUES(1, 'Regular', 0, 0);
923 -- --------------------------------------------------------
926 -- Table structure for table `0_item_tax_type_exemptions`
929 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
930 CREATE TABLE IF NOT EXISTS `0_item_tax_type_exemptions` (
931 `item_tax_type_id` int(11) NOT NULL default '0',
932 `tax_type_id` int(11) NOT NULL default '0',
933 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
937 -- Dumping data for table `0_item_tax_type_exemptions`
941 -- --------------------------------------------------------
944 -- Table structure for table `0_item_units`
947 DROP TABLE IF EXISTS `0_item_units`;
948 CREATE TABLE IF NOT EXISTS `0_item_units` (
949 `abbr` varchar(20) NOT NULL,
950 `name` varchar(40) NOT NULL,
951 `decimals` tinyint(2) NOT NULL,
952 `inactive` tinyint(1) NOT NULL default '0',
953 PRIMARY KEY (`abbr`),
954 UNIQUE KEY `name` (`name`)
958 -- Dumping data for table `0_item_units`
961 INSERT INTO `0_item_units` VALUES('ea.', 'Each', 0, 0);
963 -- --------------------------------------------------------
966 -- Table structure for table `0_locations`
969 DROP TABLE IF EXISTS `0_locations`;
970 CREATE TABLE IF NOT EXISTS `0_locations` (
971 `loc_code` varchar(5) NOT NULL default '',
972 `location_name` varchar(60) NOT NULL default '',
973 `delivery_address` tinytext NOT NULL,
974 `phone` varchar(30) NOT NULL default '',
975 `phone2` varchar(30) NOT NULL default '',
976 `fax` varchar(30) NOT NULL default '',
977 `email` varchar(100) NOT NULL default '',
978 `contact` varchar(30) NOT NULL default '',
979 `inactive` tinyint(1) NOT NULL default '0',
980 PRIMARY KEY (`loc_code`)
984 -- Dumping data for table `0_locations`
987 INSERT INTO `0_locations` VALUES('DEF', 'Default', 'N/A', '', '', '', '', '', 0);
989 -- --------------------------------------------------------
992 -- Table structure for table `0_loc_stock`
995 DROP TABLE IF EXISTS `0_loc_stock`;
996 CREATE TABLE IF NOT EXISTS `0_loc_stock` (
997 `loc_code` char(5) NOT NULL default '',
998 `stock_id` char(20) NOT NULL default '',
999 `reorder_level` bigint(20) NOT NULL default '0',
1000 PRIMARY KEY (`loc_code`,`stock_id`),
1001 KEY `stock_id` (`stock_id`)
1005 -- Dumping data for table `0_loc_stock`
1009 -- --------------------------------------------------------
1012 -- Table structure for table `0_movement_types`
1015 DROP TABLE IF EXISTS `0_movement_types`;
1016 CREATE TABLE IF NOT EXISTS `0_movement_types` (
1017 `id` int(11) NOT NULL auto_increment,
1018 `name` varchar(60) NOT NULL default '',
1019 `inactive` tinyint(1) NOT NULL default '0',
1021 UNIQUE KEY `name` (`name`)
1022 ) ENGINE=MyISAM AUTO_INCREMENT=2 ;
1025 -- Dumping data for table `0_movement_types`
1028 INSERT INTO `0_movement_types` VALUES(1, 'Adjustment', 0);
1030 -- --------------------------------------------------------
1033 -- Table structure for table `0_payment_terms`
1036 DROP TABLE IF EXISTS `0_payment_terms`;
1037 CREATE TABLE IF NOT EXISTS `0_payment_terms` (
1038 `terms_indicator` int(11) NOT NULL auto_increment,
1039 `terms` char(80) NOT NULL default '',
1040 `days_before_due` smallint(6) NOT NULL default '0',
1041 `day_in_following_month` smallint(6) NOT NULL default '0',
1042 `inactive` tinyint(1) NOT NULL default '0',
1043 PRIMARY KEY (`terms_indicator`),
1044 UNIQUE KEY `terms` (`terms`)
1045 ) ENGINE=MyISAM AUTO_INCREMENT=5 ;
1048 -- Dumping data for table `0_payment_terms`
1051 INSERT INTO `0_payment_terms` VALUES(1, 'Due 15th Of the Following Month', 0, 17, 0);
1052 INSERT INTO `0_payment_terms` VALUES(2, 'Due By End Of The Following Month', 0, 30, 0);
1053 INSERT INTO `0_payment_terms` VALUES(3, 'Payment due within 10 days', 10, 0, 0);
1054 INSERT INTO `0_payment_terms` VALUES(4, 'Cash Only', 0, 0, 0);
1056 -- --------------------------------------------------------
1059 -- Table structure for table `0_prices`
1062 DROP TABLE IF EXISTS `0_prices`;
1063 CREATE TABLE IF NOT EXISTS `0_prices` (
1064 `id` int(11) NOT NULL auto_increment,
1065 `stock_id` varchar(20) NOT NULL default '',
1066 `sales_type_id` int(11) NOT NULL default '0',
1067 `curr_abrev` char(3) NOT NULL default '',
1068 `price` double NOT NULL default '0',
1070 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
1071 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1074 -- Dumping data for table `0_prices`
1078 -- --------------------------------------------------------
1081 -- Table structure for table `0_printers`
1084 DROP TABLE IF EXISTS `0_printers`;
1085 CREATE TABLE IF NOT EXISTS `0_printers` (
1086 `id` tinyint(3) unsigned NOT NULL auto_increment,
1087 `name` varchar(20) NOT NULL,
1088 `description` varchar(60) NOT NULL,
1089 `queue` varchar(20) NOT NULL,
1090 `host` varchar(40) NOT NULL,
1091 `port` smallint(11) unsigned NOT NULL,
1092 `timeout` tinyint(3) unsigned NOT NULL,
1094 UNIQUE KEY `name` (`name`)
1095 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
1098 -- Dumping data for table `0_printers`
1101 INSERT INTO `0_printers` VALUES(1, 'QL500', 'Label printer', 'QL500', 'server', 127, 20);
1102 INSERT INTO `0_printers` VALUES(2, 'Samsung', 'Main network printer', 'scx4521F', 'server', 515, 5);
1103 INSERT INTO `0_printers` VALUES(3, 'Local', 'Local print server at user IP', 'lp', '', 515, 10);
1105 -- --------------------------------------------------------
1108 -- Table structure for table `0_print_profiles`
1111 DROP TABLE IF EXISTS `0_print_profiles`;
1112 CREATE TABLE IF NOT EXISTS `0_print_profiles` (
1113 `id` smallint(6) unsigned NOT NULL auto_increment,
1114 `profile` varchar(30) NOT NULL,
1115 `report` varchar(5) default NULL,
1116 `printer` tinyint(3) unsigned default NULL,
1118 UNIQUE KEY `profile` (`profile`,`report`)
1119 ) ENGINE=MyISAM AUTO_INCREMENT=10 ;
1122 -- Dumping data for table `0_print_profiles`
1125 INSERT INTO `0_print_profiles` VALUES(1, 'Out of office', '', 0);
1126 INSERT INTO `0_print_profiles` VALUES(2, 'Sales Department', '', 0);
1127 INSERT INTO `0_print_profiles` VALUES(3, 'Central', '', 2);
1128 INSERT INTO `0_print_profiles` VALUES(4, 'Sales Department', '104', 2);
1129 INSERT INTO `0_print_profiles` VALUES(5, 'Sales Department', '105', 2);
1130 INSERT INTO `0_print_profiles` VALUES(6, 'Sales Department', '107', 2);
1131 INSERT INTO `0_print_profiles` VALUES(7, 'Sales Department', '109', 2);
1132 INSERT INTO `0_print_profiles` VALUES(8, 'Sales Department', '110', 2);
1133 INSERT INTO `0_print_profiles` VALUES(9, 'Sales Department', '201', 2);
1135 -- --------------------------------------------------------
1138 -- Table structure for table `0_purch_data`
1141 DROP TABLE IF EXISTS `0_purch_data`;
1142 CREATE TABLE IF NOT EXISTS `0_purch_data` (
1143 `supplier_id` int(11) NOT NULL default '0',
1144 `stock_id` char(20) NOT NULL default '',
1145 `price` double NOT NULL default '0',
1146 `suppliers_uom` char(50) NOT NULL default '',
1147 `conversion_factor` double NOT NULL default '1',
1148 `supplier_description` char(50) NOT NULL default '',
1149 PRIMARY KEY (`supplier_id`,`stock_id`)
1153 -- Dumping data for table `0_purch_data`
1157 -- --------------------------------------------------------
1160 -- Table structure for table `0_purch_orders`
1163 DROP TABLE IF EXISTS `0_purch_orders`;
1164 CREATE TABLE IF NOT EXISTS `0_purch_orders` (
1165 `order_no` int(11) NOT NULL auto_increment,
1166 `supplier_id` int(11) NOT NULL default '0',
1167 `comments` tinytext,
1168 `ord_date` date NOT NULL default '0000-00-00',
1169 `reference` tinytext NOT NULL,
1170 `requisition_no` tinytext,
1171 `into_stock_location` varchar(5) NOT NULL default '',
1172 `delivery_address` tinytext NOT NULL,
1173 `total` double NOT NULL default '0',
1174 `prep_amount` double NOT NULL DEFAULT '0',
1175 `alloc` double NOT NULL DEFAULT '0',
1176 `tax_included` tinyint(1) NOT NULL default '0',
1177 PRIMARY KEY (`order_no`),
1178 KEY `ord_date` (`ord_date`)
1179 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
1182 -- Dumping data for table `0_purch_orders`
1186 -- --------------------------------------------------------
1189 -- Table structure for table `0_purch_order_details`
1192 DROP TABLE IF EXISTS `0_purch_order_details`;
1193 CREATE TABLE IF NOT EXISTS `0_purch_order_details` (
1194 `po_detail_item` int(11) NOT NULL auto_increment,
1195 `order_no` int(11) NOT NULL default '0',
1196 `item_code` varchar(20) NOT NULL default '',
1197 `description` tinytext,
1198 `delivery_date` date NOT NULL default '0000-00-00',
1199 `qty_invoiced` double NOT NULL default '0',
1200 `unit_price` double NOT NULL default '0',
1201 `act_price` double NOT NULL default '0',
1202 `std_cost_unit` double NOT NULL default '0',
1203 `quantity_ordered` double NOT NULL default '0',
1204 `quantity_received` double NOT NULL default '0',
1205 PRIMARY KEY (`po_detail_item`),
1206 KEY `order` (`order_no`,`po_detail_item`),
1207 KEY `itemcode` (`item_code`)
1208 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
1211 -- Dumping data for table `0_purch_order_details`
1215 -- --------------------------------------------------------
1218 -- Table structure for table `0_quick_entries`
1221 DROP TABLE IF EXISTS `0_quick_entries`;
1222 CREATE TABLE IF NOT EXISTS `0_quick_entries` (
1223 `id` smallint(6) unsigned NOT NULL auto_increment,
1224 `type` tinyint(1) NOT NULL default '0',
1225 `description` varchar(60) NOT NULL,
1226 `base_amount` double NOT NULL default '0',
1227 `base_desc` varchar(60) default NULL,
1228 `bal_type` tinyint(1) NOT NULL default '0',
1230 KEY `description` (`description`)
1231 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
1234 -- Dumping data for table `0_quick_entries`
1237 INSERT INTO `0_quick_entries` VALUES(1, 1, 'Maintenance', 0, 'Amount', 0);
1238 INSERT INTO `0_quick_entries` VALUES(2, 4, 'Phone', 0, 'Amount', 0);
1239 INSERT INTO `0_quick_entries` VALUES(3, 2, 'Cash Sales', 0, 'Amount', 0);
1241 -- --------------------------------------------------------
1244 -- Table structure for table `0_quick_entry_lines`
1247 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1248 CREATE TABLE IF NOT EXISTS `0_quick_entry_lines` (
1249 `id` smallint(6) unsigned NOT NULL auto_increment,
1250 `qid` smallint(6) unsigned NOT NULL,
1251 `amount` double default '0',
1252 `action` varchar(2) NOT NULL,
1253 `dest_id` varchar(15) NOT NULL default '',
1254 `dimension_id` smallint(6) unsigned default NULL,
1255 `dimension2_id` smallint(6) unsigned default NULL,
1258 ) ENGINE=MyISAM AUTO_INCREMENT=7 ;
1261 -- Dumping data for table `0_quick_entry_lines`
1264 INSERT INTO `0_quick_entry_lines` VALUES(1, 1, 0, 't-', '1', 0, 0);
1265 INSERT INTO `0_quick_entry_lines` VALUES(2, 2, 0, 't-', '1', 0, 0);
1266 INSERT INTO `0_quick_entry_lines` VALUES(3, 3, 0, 't-', '1', 0, 0);
1267 INSERT INTO `0_quick_entry_lines` VALUES(4, 3, 0, '=', '4010', 0, 0);
1268 INSERT INTO `0_quick_entry_lines` VALUES(5, 1, 0, '=', '5765', 0, 0);
1269 INSERT INTO `0_quick_entry_lines` VALUES(6, 2, 0, '=', '5780', 0, 0);
1271 -- --------------------------------------------------------
1274 -- Table structure for table `0_recurrent_invoices`
1277 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1278 CREATE TABLE IF NOT EXISTS `0_recurrent_invoices` (
1279 `id` smallint(6) unsigned NOT NULL auto_increment,
1280 `description` varchar(60) NOT NULL default '',
1281 `order_no` int(11) unsigned NOT NULL,
1282 `debtor_no` int(11) unsigned default NULL,
1283 `group_no` smallint(6) unsigned default NULL,
1284 `days` int(11) NOT NULL default '0',
1285 `monthly` int(11) NOT NULL default '0',
1286 `begin` date NOT NULL default '0000-00-00',
1287 `end` date NOT NULL default '0000-00-00',
1288 `last_sent` date NOT NULL default '0000-00-00',
1290 UNIQUE KEY `description` (`description`)
1291 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
1294 -- Dumping data for table `0_recurrent_invoices`
1298 -- --------------------------------------------------------
1301 -- Table structure for table `0_refs`
1304 DROP TABLE IF EXISTS `0_refs`;
1305 CREATE TABLE IF NOT EXISTS `0_refs` (
1306 `id` int(11) NOT NULL default '0',
1307 `type` int(11) NOT NULL default '0',
1308 `reference` varchar(100) NOT NULL default '',
1309 PRIMARY KEY (`id`,`type`),
1310 KEY `Type_and_Reference` (`type`,`reference`)
1314 -- Dumping data for table `0_refs`
1318 -- --------------------------------------------------------
1321 -- Table structure for table `0_salesman`
1324 DROP TABLE IF EXISTS `0_salesman`;
1325 CREATE TABLE IF NOT EXISTS `0_salesman` (
1326 `salesman_code` int(11) NOT NULL auto_increment,
1327 `salesman_name` char(60) NOT NULL default '',
1328 `salesman_phone` char(30) NOT NULL default '',
1329 `salesman_fax` char(30) NOT NULL default '',
1330 `salesman_email` varchar(100) NOT NULL default '',
1331 `provision` double NOT NULL default '0',
1332 `break_pt` double NOT NULL default '0',
1333 `provision2` double NOT NULL default '0',
1334 `inactive` tinyint(1) NOT NULL default '0',
1335 PRIMARY KEY (`salesman_code`),
1336 UNIQUE KEY `salesman_name` (`salesman_name`)
1337 ) ENGINE=MyISAM AUTO_INCREMENT=2 ;
1340 -- Dumping data for table `0_salesman`
1343 INSERT INTO `0_salesman` VALUES(1, 'Sales Person', '', '', '', 5, 1000, 4, 0);
1345 -- --------------------------------------------------------
1348 -- Table structure for table `0_sales_orders`
1351 DROP TABLE IF EXISTS `0_sales_orders`;
1352 CREATE TABLE IF NOT EXISTS `0_sales_orders` (
1353 `order_no` int(11) NOT NULL,
1354 `trans_type` smallint(6) NOT NULL default '30',
1355 `version` tinyint(1) unsigned NOT NULL default '0',
1356 `type` tinyint(1) NOT NULL default '0',
1357 `debtor_no` int(11) NOT NULL default '0',
1358 `branch_code` int(11) NOT NULL default '0',
1359 `reference` varchar(100) NOT NULL default '',
1360 `customer_ref` tinytext NOT NULL,
1361 `comments` tinytext,
1362 `ord_date` date NOT NULL default '0000-00-00',
1363 `order_type` int(11) NOT NULL default '0',
1364 `ship_via` int(11) NOT NULL default '0',
1365 `delivery_address` tinytext NOT NULL,
1366 `contact_phone` varchar(30) default NULL,
1367 `contact_email` varchar(100) default NULL,
1368 `deliver_to` tinytext NOT NULL,
1369 `freight_cost` double NOT NULL default '0',
1370 `from_stk_loc` varchar(5) NOT NULL default '',
1371 `delivery_date` date NOT NULL default '0000-00-00',
1372 `payment_terms` int(11) default NULL,
1373 `total` double NOT NULL default '0',
1374 `prep_amount` double NOT NULL DEFAULT '0',
1375 `alloc` double NOT NULL DEFAULT '0',
1376 PRIMARY KEY (`trans_type`,`order_no`)
1380 -- Dumping data for table `0_sales_orders`
1384 -- --------------------------------------------------------
1387 -- Table structure for table `0_sales_order_details`
1390 DROP TABLE IF EXISTS `0_sales_order_details`;
1391 CREATE TABLE IF NOT EXISTS `0_sales_order_details` (
1392 `id` int(11) NOT NULL auto_increment,
1393 `order_no` int(11) NOT NULL default '0',
1394 `trans_type` smallint(6) NOT NULL default '30',
1395 `stk_code` varchar(20) NOT NULL default '',
1396 `description` tinytext,
1397 `qty_sent` double NOT NULL default '0',
1398 `unit_price` double NOT NULL default '0',
1399 `quantity` double NOT NULL default '0',
1400 `discount_percent` double NOT NULL default '0',
1402 KEY `sorder` (`trans_type`,`order_no`),
1403 KEY `stkcode` (`stk_code`)
1404 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
1407 -- Dumping data for table `0_sales_order_details`
1411 -- --------------------------------------------------------
1414 -- Table structure for table `0_sales_pos`
1417 DROP TABLE IF EXISTS `0_sales_pos`;
1418 CREATE TABLE IF NOT EXISTS `0_sales_pos` (
1419 `id` smallint(6) unsigned NOT NULL auto_increment,
1420 `pos_name` varchar(30) NOT NULL,
1421 `cash_sale` tinyint(1) NOT NULL,
1422 `credit_sale` tinyint(1) NOT NULL,
1423 `pos_location` varchar(5) NOT NULL,
1424 `pos_account` smallint(6) unsigned NOT NULL,
1425 `inactive` tinyint(1) NOT NULL default '0',
1427 UNIQUE KEY `pos_name` (`pos_name`)
1428 ) ENGINE=MyISAM AUTO_INCREMENT=2 ;
1431 -- Dumping data for table `0_sales_pos`
1434 INSERT INTO `0_sales_pos` VALUES(1, 'Default', 1, 1, 'DEF', 2, 0);
1436 -- --------------------------------------------------------
1439 -- Table structure for table `0_sales_types`
1442 DROP TABLE IF EXISTS `0_sales_types`;
1443 CREATE TABLE IF NOT EXISTS `0_sales_types` (
1444 `id` int(11) NOT NULL auto_increment,
1445 `sales_type` char(50) NOT NULL default '',
1446 `tax_included` int(1) NOT NULL default '0',
1447 `factor` double NOT NULL default '1',
1448 `inactive` tinyint(1) NOT NULL default '0',
1450 UNIQUE KEY `sales_type` (`sales_type`)
1451 ) ENGINE=MyISAM AUTO_INCREMENT=3 ;
1454 -- Dumping data for table `0_sales_types`
1457 INSERT INTO `0_sales_types` VALUES(1, 'Retail', 1, 1, 0);
1458 INSERT INTO `0_sales_types` VALUES(2, 'Wholesale', 0, 0.7, 0);
1460 -- --------------------------------------------------------
1463 -- Table structure for table `0_security_roles`
1466 DROP TABLE IF EXISTS `0_security_roles`;
1467 CREATE TABLE IF NOT EXISTS `0_security_roles` (
1468 `id` int(11) NOT NULL auto_increment,
1469 `role` varchar(30) NOT NULL,
1470 `description` varchar(50) default NULL,
1473 `inactive` tinyint(1) NOT NULL default '0',
1475 UNIQUE KEY `role` (`role`)
1476 ) ENGINE=MyISAM AUTO_INCREMENT=11 ;
1479 -- Dumping data for table `0_security_roles`
1482 INSERT INTO `0_security_roles` VALUES(1, 'Inquiries', 'Inquiries', '768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;773;774;2822;3073;3075;3076;3077;3329;3330;3331;3332;3333;3334;3335;5377;5633;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8450;8451;10497;10753;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15622;15623;15624;15625;15626;15873;15882;16129;16130;16131;16132', 0);
1483 INSERT INTO `0_security_roles` VALUES(2, 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;10496;10752;11008;13056;13312;15616;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;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);
1484 INSERT INTO `0_security_roles` VALUES(3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873', 0);
1485 INSERT INTO `0_security_roles` VALUES(4, 'Stock Manager', 'Stock Manager', '2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '2818;2822;3073;3076;3077;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5889;5890;5891;8193;8194;8450;8451;10753;11009;11010;11012;13313;13315;15882;16129;16130;16131;16132', 0);
1486 INSERT INTO `0_security_roles` VALUES(5, 'Production Manager', 'Production Manager', '512;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5640;5889;5890;5891;8193;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0);
1487 INSERT INTO `0_security_roles` VALUES(6, 'Purchase Officer', 'Purchase Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5377;5633;5635;5640;5640;5889;5890;5891;8193;8194;8196;8197;8449;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0);
1488 INSERT INTO `0_security_roles` VALUES(7, 'AR Officer', 'AR Officer', '512;768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;771;773;774;2818;2819;2820;2821;2822;2823;3073;3073;3074;3075;3076;3077;3078;3079;3080;3081;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5633;5634;5637;5638;5639;5640;5640;5889;5890;5891;8193;8194;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0);
1489 INSERT INTO `0_security_roles` VALUES(8, 'AP Officer', 'AP Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;769;770;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5635;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0);
1490 INSERT INTO `0_security_roles` VALUES(9, 'Accountant', 'New Accountant', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0);
1491 INSERT INTO `0_security_roles` VALUES(10, 'Sub Admin', 'Sub Admin', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15873;15874;15876;15877;15878;15879;15880;15882;16129;16130;16131;16132', 0);
1493 -- --------------------------------------------------------
1496 -- Table structure for table `0_shippers`
1499 DROP TABLE IF EXISTS `0_shippers`;
1500 CREATE TABLE IF NOT EXISTS `0_shippers` (
1501 `shipper_id` int(11) NOT NULL auto_increment,
1502 `shipper_name` varchar(60) NOT NULL default '',
1503 `phone` varchar(30) NOT NULL default '',
1504 `phone2` varchar(30) NOT NULL default '',
1505 `contact` tinytext NOT NULL,
1506 `address` tinytext NOT NULL,
1507 `inactive` tinyint(1) NOT NULL default '0',
1508 PRIMARY KEY (`shipper_id`),
1509 UNIQUE KEY `name` (`shipper_name`)
1510 ) ENGINE=MyISAM AUTO_INCREMENT=2 ;
1513 -- Dumping data for table `0_shippers`
1516 INSERT INTO `0_shippers` VALUES(1, 'Default', '', '', '', '', 0);
1518 -- --------------------------------------------------------
1521 -- Table structure for table `0_sql_trail`
1524 DROP TABLE IF EXISTS `0_sql_trail`;
1525 CREATE TABLE IF NOT EXISTS `0_sql_trail` (
1526 `id` int(11) unsigned NOT NULL auto_increment,
1527 `sql` text NOT NULL,
1528 `result` tinyint(1) NOT NULL,
1529 `msg` varchar(255) NOT NULL,
1531 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1534 -- Dumping data for table `0_sql_trail`
1538 -- --------------------------------------------------------
1541 -- Table structure for table `0_stock_category`
1544 DROP TABLE IF EXISTS `0_stock_category`;
1545 CREATE TABLE IF NOT EXISTS `0_stock_category` (
1546 `category_id` int(11) NOT NULL auto_increment,
1547 `description` varchar(60) NOT NULL default '',
1548 `dflt_tax_type` int(11) NOT NULL default '1',
1549 `dflt_units` varchar(20) NOT NULL default 'each',
1550 `dflt_mb_flag` char(1) NOT NULL default 'B',
1551 `dflt_sales_act` varchar(15) NOT NULL default '',
1552 `dflt_cogs_act` varchar(15) NOT NULL default '',
1553 `dflt_inventory_act` varchar(15) NOT NULL default '',
1554 `dflt_adjustment_act` varchar(15) NOT NULL default '',
1555 `dflt_assembly_act` varchar(15) NOT NULL default '',
1556 `dflt_dim1` int(11) default NULL,
1557 `dflt_dim2` int(11) default NULL,
1558 `inactive` tinyint(1) NOT NULL default '0',
1559 `dflt_no_sale` tinyint(1) NOT NULL default '0',
1560 PRIMARY KEY (`category_id`),
1561 UNIQUE KEY `description` (`description`)
1562 ) ENGINE=MyISAM AUTO_INCREMENT=5 ;
1565 -- Dumping data for table `0_stock_category`
1568 INSERT INTO `0_stock_category` VALUES(1, 'Components', 1, 'each', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0);
1569 INSERT INTO `0_stock_category` VALUES(2, 'Charges', 1, 'each', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0);
1570 INSERT INTO `0_stock_category` VALUES(3, 'Systems', 1, 'each', 'M', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0);
1571 INSERT INTO `0_stock_category` VALUES(4, 'Services', 1, 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0);
1573 -- --------------------------------------------------------
1576 -- Table structure for table `0_stock_master`
1579 DROP TABLE IF EXISTS `0_stock_master`;
1580 CREATE TABLE IF NOT EXISTS `0_stock_master` (
1581 `stock_id` varchar(20) NOT NULL default '',
1582 `category_id` int(11) NOT NULL default '0',
1583 `tax_type_id` int(11) NOT NULL default '0',
1584 `description` varchar(200) NOT NULL default '',
1585 `long_description` tinytext NOT NULL,
1586 `units` varchar(20) NOT NULL default 'each',
1587 `mb_flag` char(1) NOT NULL default 'B',
1588 `sales_account` varchar(15) NOT NULL default '',
1589 `cogs_account` varchar(15) NOT NULL default '',
1590 `inventory_account` varchar(15) NOT NULL default '',
1591 `adjustment_account` varchar(15) NOT NULL default '',
1592 `assembly_account` varchar(15) NOT NULL default '',
1593 `dimension_id` int(11) default NULL,
1594 `dimension2_id` int(11) default NULL,
1595 `actual_cost` double NOT NULL default '0',
1596 `last_cost` double NOT NULL default '0',
1597 `material_cost` double NOT NULL default '0',
1598 `labour_cost` double NOT NULL default '0',
1599 `overhead_cost` double NOT NULL default '0',
1600 `inactive` tinyint(1) NOT NULL default '0',
1601 `no_sale` tinyint(1) NOT NULL default '0',
1602 `editable` tinyint(1) NOT NULL default '0',
1603 PRIMARY KEY (`stock_id`)
1607 -- Dumping data for table `0_stock_master`
1611 -- --------------------------------------------------------
1614 -- Table structure for table `0_stock_moves`
1617 DROP TABLE IF EXISTS `0_stock_moves`;
1618 CREATE TABLE IF NOT EXISTS `0_stock_moves` (
1619 `trans_id` int(11) NOT NULL auto_increment,
1620 `trans_no` int(11) NOT NULL default '0',
1621 `stock_id` char(20) NOT NULL default '',
1622 `type` smallint(6) NOT NULL default '0',
1623 `loc_code` char(5) NOT NULL default '',
1624 `tran_date` date NOT NULL default '0000-00-00',
1625 `person_id` int(11) default NULL,
1626 `price` double NOT NULL default '0',
1627 `reference` char(40) NOT NULL default '',
1628 `qty` double NOT NULL default '1',
1629 `discount_percent` double NOT NULL default '0',
1630 `standard_cost` double NOT NULL default '0',
1631 `visible` tinyint(1) NOT NULL default '1',
1632 PRIMARY KEY (`trans_id`),
1633 KEY `type` (`type`,`trans_no`),
1634 KEY `Move` (`stock_id`,`loc_code`,`tran_date`)
1635 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
1638 -- Dumping data for table `0_stock_moves`
1642 -- --------------------------------------------------------
1645 -- Table structure for table `0_suppliers`
1648 DROP TABLE IF EXISTS `0_suppliers`;
1649 CREATE TABLE IF NOT EXISTS `0_suppliers` (
1650 `supplier_id` int(11) NOT NULL auto_increment,
1651 `supp_name` varchar(60) NOT NULL default '',
1652 `supp_ref` varchar(30) NOT NULL default '',
1653 `address` tinytext NOT NULL,
1654 `supp_address` tinytext NOT NULL,
1655 `gst_no` varchar(25) NOT NULL default '',
1656 `contact` varchar(60) NOT NULL default '',
1657 `supp_account_no` varchar(40) NOT NULL default '',
1658 `website` varchar(100) NOT NULL default '',
1659 `bank_account` varchar(60) NOT NULL default '',
1660 `curr_code` char(3) default NULL,
1661 `payment_terms` int(11) default NULL,
1662 `tax_included` tinyint(1) NOT NULL default '0',
1663 `tax_algorithm` tinyint(1) NOT NULL default '1',
1664 `dimension_id` int(11) default '0',
1665 `dimension2_id` int(11) default '0',
1666 `tax_group_id` int(11) default NULL,
1667 `credit_limit` double NOT NULL default '0',
1668 `purchase_account` varchar(15) NOT NULL default '',
1669 `payable_account` varchar(15) NOT NULL default '',
1670 `payment_discount_account` varchar(15) NOT NULL default '',
1671 `notes` tinytext NOT NULL,
1672 `inactive` tinyint(1) NOT NULL default '0',
1673 PRIMARY KEY (`supplier_id`),
1674 KEY `supp_ref` (`supp_ref`)
1675 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1678 -- Dumping data for table `0_suppliers`
1682 -- --------------------------------------------------------
1685 -- Table structure for table `0_supp_allocations`
1688 DROP TABLE IF EXISTS `0_supp_allocations`;
1689 CREATE TABLE IF NOT EXISTS `0_supp_allocations` (
1690 `id` int(11) NOT NULL auto_increment,
1691 `amt` double unsigned default NULL,
1692 `date_alloc` date NOT NULL default '0000-00-00',
1693 `trans_no_from` int(11) default NULL,
1694 `trans_type_from` int(11) default NULL,
1695 `trans_no_to` int(11) default NULL,
1696 `trans_type_to` int(11) default NULL,
1698 UNIQUE KEY(`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
1699 KEY `From` (`trans_type_from`,`trans_no_from`),
1700 KEY `To` (`trans_type_to`,`trans_no_to`)
1701 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
1704 -- Dumping data for table `0_supp_allocations`
1708 -- --------------------------------------------------------
1711 -- Table structure for table `0_supp_invoice_items`
1714 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1715 CREATE TABLE IF NOT EXISTS `0_supp_invoice_items` (
1716 `id` int(11) NOT NULL auto_increment,
1717 `supp_trans_no` int(11) default NULL,
1718 `supp_trans_type` int(11) default NULL,
1719 `gl_code` varchar(15) NOT NULL default '',
1720 `grn_item_id` int(11) default NULL,
1721 `po_detail_item_id` int(11) default NULL,
1722 `stock_id` varchar(20) NOT NULL default '',
1723 `description` tinytext,
1724 `quantity` double NOT NULL default '0',
1725 `unit_price` double NOT NULL default '0',
1726 `unit_tax` double NOT NULL default '0',
1729 KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`)
1730 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
1733 -- Dumping data for table `0_supp_invoice_items`
1737 -- --------------------------------------------------------
1740 -- Table structure for table `0_supp_trans`
1743 DROP TABLE IF EXISTS `0_supp_trans`;
1744 CREATE TABLE IF NOT EXISTS `0_supp_trans` (
1745 `trans_no` int(11) unsigned NOT NULL default '0',
1746 `type` smallint(6) unsigned NOT NULL default '0',
1747 `supplier_id` int(11) unsigned default NULL,
1748 `reference` tinytext NOT NULL,
1749 `supp_reference` varchar(60) NOT NULL default '',
1750 `tran_date` date NOT NULL default '0000-00-00',
1751 `due_date` date NOT NULL default '0000-00-00',
1752 `ov_amount` double NOT NULL default '0',
1753 `ov_discount` double NOT NULL default '0',
1754 `ov_gst` double NOT NULL default '0',
1755 `rate` double NOT NULL default '1',
1756 `alloc` double NOT NULL default '0',
1757 `tax_included` tinyint(1) NOT NULL default '0',
1758 `tax_algorihm` tinyint(1) NOT NULL default '1',
1759 PRIMARY KEY (`type`,`trans_no`),
1760 KEY `supplier_id` (`supplier_id`),
1761 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1762 KEY `type` (`type`),
1763 KEY `tran_date` (`tran_date`)
1767 -- Dumping data for table `0_supp_trans`
1771 -- --------------------------------------------------------
1774 -- Table structure for table `0_sys_prefs`
1777 DROP TABLE IF EXISTS `0_sys_prefs`;
1778 CREATE TABLE IF NOT EXISTS `0_sys_prefs` (
1779 `name` varchar(35) NOT NULL default '',
1780 `category` varchar(30) default NULL,
1781 `type` varchar(20) NOT NULL default '',
1782 `length` smallint(6) default NULL,
1784 PRIMARY KEY (`name`),
1785 KEY `category` (`category`)
1789 -- Dumping data for table `0_sys_prefs`
1792 INSERT INTO `0_sys_prefs` VALUES('coy_name', 'setup.company', 'varchar', 60, 'Company name');
1793 INSERT INTO `0_sys_prefs` VALUES('gst_no', 'setup.company', 'varchar', 25, '');
1794 INSERT INTO `0_sys_prefs` VALUES('coy_no', 'setup.company', 'varchar', 25, '');
1795 INSERT INTO `0_sys_prefs` VALUES('tax_prd', 'setup.company', 'int', 11, '1');
1796 INSERT INTO `0_sys_prefs` VALUES('tax_last', 'setup.company', 'int', 11, '1');
1797 INSERT INTO `0_sys_prefs` VALUES('postal_address', 'setup.company', 'tinytext', 0, 'N/A');
1798 INSERT INTO `0_sys_prefs` VALUES('phone', 'setup.company', 'varchar', 30, '');
1799 INSERT INTO `0_sys_prefs` VALUES('fax', 'setup.company', 'varchar', 30, '');
1800 INSERT INTO `0_sys_prefs` VALUES('email', 'setup.company', 'varchar', 100, '');
1801 INSERT INTO `0_sys_prefs` VALUES('coy_logo', 'setup.company', 'varchar', 100, '');
1802 INSERT INTO `0_sys_prefs` VALUES('domicile', 'setup.company', 'varchar', 55, '');
1803 INSERT INTO `0_sys_prefs` VALUES('curr_default', 'setup.company', 'char', 3, 'USD');
1804 INSERT INTO `0_sys_prefs` VALUES('use_dimension', 'setup.company', 'tinyint', 1, '1');
1805 INSERT INTO `0_sys_prefs` VALUES('f_year', 'setup.company', 'int', 11, '3');
1806 INSERT INTO `0_sys_prefs` VALUES('no_item_list', 'setup.company', 'tinyint', 1, '0');
1807 INSERT INTO `0_sys_prefs` VALUES('no_customer_list', 'setup.company', 'tinyint', 1, '0');
1808 INSERT INTO `0_sys_prefs` VALUES('no_supplier_list', 'setup.company', 'tinyint', 1, '0');
1809 INSERT INTO `0_sys_prefs` VALUES('base_sales', 'setup.company', 'int', 11, '1');
1810 INSERT INTO `0_sys_prefs` VALUES('time_zone', 'setup.company', 'tinyint', 1, '0');
1811 INSERT INTO `0_sys_prefs` VALUES('add_pct', 'setup.company', 'int', 5, '-1');
1812 INSERT INTO `0_sys_prefs` VALUES('round_to', 'setup.company', 'int', 5, '1');
1813 INSERT INTO `0_sys_prefs` VALUES('login_tout', 'setup.company', 'smallint', 6, '600');
1814 INSERT INTO `0_sys_prefs` VALUES('past_due_days', 'glsetup.general', 'int', 11, '30');
1815 INSERT INTO `0_sys_prefs` VALUES('profit_loss_year_act', 'glsetup.general', 'varchar', 15, '9990');
1816 INSERT INTO `0_sys_prefs` VALUES('retained_earnings_act', 'glsetup.general', 'varchar', 15, '3590');
1817 INSERT INTO `0_sys_prefs` VALUES('bank_charge_act', 'glsetup.general', 'varchar', 15, '5690');
1818 INSERT INTO `0_sys_prefs` VALUES('exchange_diff_act', 'glsetup.general', 'varchar', 15, '4450');
1819 INSERT INTO `0_sys_prefs` VALUES('tax_algorithm', 'glsetup.general', 'tinyint', 1, '1');
1820 INSERT INTO `0_sys_prefs` VALUES('default_credit_limit', 'glsetup.customer', 'int', 11, '1000');
1821 INSERT INTO `0_sys_prefs` VALUES('accumulate_shipping', 'glsetup.customer', 'tinyint', 1, '0');
1822 INSERT INTO `0_sys_prefs` VALUES('legal_text', 'glsetup.customer', 'tinytext', 0, '');
1823 INSERT INTO `0_sys_prefs` VALUES('freight_act', 'glsetup.customer', 'varchar', 15, '4430');
1824 INSERT INTO `0_sys_prefs` VALUES('debtors_act', 'glsetup.sales', 'varchar', 15, '1200');
1825 INSERT INTO `0_sys_prefs` VALUES('default_sales_act', 'glsetup.sales', 'varchar', 15, '4010');
1826 INSERT INTO `0_sys_prefs` VALUES('default_sales_discount_act', 'glsetup.sales', 'varchar', 15, '4510');
1827 INSERT INTO `0_sys_prefs` VALUES('default_prompt_payment_act', 'glsetup.sales', 'varchar', 15, '4500');
1828 INSERT INTO `0_sys_prefs` VALUES('default_delivery_required', 'glsetup.sales', 'smallint', 6, '1');
1829 INSERT INTO `0_sys_prefs` VALUES('default_receival_required', 'glsetup.purchase', 'smallint', 6, '10');
1830 INSERT INTO `0_sys_prefs` VALUES('default_dim_required', 'glsetup.dims', 'int', 11, '20');
1831 INSERT INTO `0_sys_prefs` VALUES('pyt_discount_act', 'glsetup.purchase', 'varchar', 15, '5060');
1832 INSERT INTO `0_sys_prefs` VALUES('creditors_act', 'glsetup.purchase', 'varchar', 15, '2100');
1833 INSERT INTO `0_sys_prefs` VALUES('po_over_receive', 'glsetup.purchase', 'int', 11, '10');
1834 INSERT INTO `0_sys_prefs` VALUES('po_over_charge', 'glsetup.purchase', 'int', 11, '10');
1835 INSERT INTO `0_sys_prefs` VALUES('allow_negative_stock', 'glsetup.inventory', 'tinyint', 1, '0');
1836 INSERT INTO `0_sys_prefs` VALUES('default_inventory_act', 'glsetup.items', 'varchar', 15, '1510');
1837 INSERT INTO `0_sys_prefs` VALUES('default_cogs_act', 'glsetup.items', 'varchar', 15, '5010');
1838 INSERT INTO `0_sys_prefs` VALUES('default_adj_act', 'glsetup.items', 'varchar', 15, '5040');
1839 INSERT INTO `0_sys_prefs` VALUES('default_inv_sales_act', 'glsetup.items', 'varchar', 15, '4010');
1840 INSERT INTO `0_sys_prefs` VALUES('default_assembly_act', 'glsetup.items', 'varchar', 15, '1530');
1841 INSERT INTO `0_sys_prefs` VALUES('default_workorder_required', 'glsetup.manuf', 'int', 11, '20');
1842 INSERT INTO `0_sys_prefs` VALUES('version_id', 'system', 'varchar', 11, '2.3rc');
1843 INSERT INTO `0_sys_prefs` VALUES('auto_curr_reval', 'setup.company', 'smallint', 6, '1');
1844 INSERT INTO `0_sys_prefs` VALUES('grn_clearing_act', 'glsetup.purchase', 'varchar', 15, '1550');
1845 INSERT INTO `0_sys_prefs` VALUES('deferred_income_act', 'glsetup.sales', 'varchar', '15', '');
1847 -- --------------------------------------------------------
1850 -- Table structure for table `0_sys_types`
1853 DROP TABLE IF EXISTS `0_sys_types`;
1854 CREATE TABLE IF NOT EXISTS `0_sys_types` (
1855 `type_id` smallint(6) NOT NULL default '0',
1856 `type_no` int(11) NOT NULL default '1',
1857 `next_reference` varchar(100) NOT NULL default '',
1858 PRIMARY KEY (`type_id`)
1862 -- Dumping data for table `0_sys_types`
1865 INSERT INTO `0_sys_types` VALUES(0, 17, '1');
1866 INSERT INTO `0_sys_types` VALUES(1, 7, '1');
1867 INSERT INTO `0_sys_types` VALUES(2, 4, '1');
1868 INSERT INTO `0_sys_types` VALUES(4, 3, '1');
1869 INSERT INTO `0_sys_types` VALUES(10, 16, '1');
1870 INSERT INTO `0_sys_types` VALUES(11, 2, '1');
1871 INSERT INTO `0_sys_types` VALUES(12, 6, '1');
1872 INSERT INTO `0_sys_types` VALUES(13, 1, '1');
1873 INSERT INTO `0_sys_types` VALUES(16, 2, '1');
1874 INSERT INTO `0_sys_types` VALUES(17, 2, '1');
1875 INSERT INTO `0_sys_types` VALUES(18, 1, '1');
1876 INSERT INTO `0_sys_types` VALUES(20, 6, '1');
1877 INSERT INTO `0_sys_types` VALUES(21, 1, '1');
1878 INSERT INTO `0_sys_types` VALUES(22, 3, '1');
1879 INSERT INTO `0_sys_types` VALUES(25, 1, '1');
1880 INSERT INTO `0_sys_types` VALUES(26, 1, '1');
1881 INSERT INTO `0_sys_types` VALUES(28, 1, '1');
1882 INSERT INTO `0_sys_types` VALUES(29, 1, '1');
1883 INSERT INTO `0_sys_types` VALUES(30, 0, '1');
1884 INSERT INTO `0_sys_types` VALUES(32, 0, '1');
1885 INSERT INTO `0_sys_types` VALUES(35, 1, '1');
1886 INSERT INTO `0_sys_types` VALUES(40, 1, '1');
1888 -- --------------------------------------------------------
1891 -- Table structure for table `0_tags`
1894 DROP TABLE IF EXISTS `0_tags`;
1895 CREATE TABLE IF NOT EXISTS `0_tags` (
1896 `id` int(11) NOT NULL auto_increment,
1897 `type` smallint(6) NOT NULL,
1898 `name` varchar(30) NOT NULL,
1899 `description` varchar(60) default NULL,
1900 `inactive` tinyint(1) NOT NULL default '0',
1902 UNIQUE KEY `type` (`type`,`name`)
1903 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1906 -- Dumping data for table `0_tags`
1910 -- --------------------------------------------------------
1913 -- Table structure for table `0_tag_associations`
1916 DROP TABLE IF EXISTS `0_tag_associations`;
1917 CREATE TABLE IF NOT EXISTS `0_tag_associations` (
1918 `record_id` varchar(15) NOT NULL,
1919 `tag_id` int(11) NOT NULL,
1920 UNIQUE KEY `record_id` (`record_id`,`tag_id`)
1924 -- Dumping data for table `0_tag_associations`
1928 -- --------------------------------------------------------
1931 -- Table structure for table `0_tax_groups`
1934 DROP TABLE IF EXISTS `0_tax_groups`;
1935 CREATE TABLE IF NOT EXISTS `0_tax_groups` (
1936 `id` int(11) NOT NULL auto_increment,
1937 `name` varchar(60) NOT NULL default '',
1938 `inactive` tinyint(1) NOT NULL default '0',
1940 UNIQUE KEY `name` (`name`)
1941 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1944 -- Dumping data for table `0_tax_groups`
1947 INSERT INTO `0_tax_groups` VALUES(1, 'Tax', 0);
1948 INSERT INTO `0_tax_groups` VALUES(2, 'Tax Exempt', 0);
1950 -- --------------------------------------------------------
1953 -- Table structure for table `0_tax_group_items`
1956 DROP TABLE IF EXISTS `0_tax_group_items`;
1957 CREATE TABLE IF NOT EXISTS `0_tax_group_items` (
1958 `tax_group_id` int(11) NOT NULL default '0',
1959 `tax_type_id` int(11) NOT NULL default '0',
1960 `tax_shipping` tinyint(1) NOT NULL default '0',
1961 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1965 -- Dumping data for table `0_tax_group_items`
1968 INSERT INTO `0_tax_group_items` VALUES(1, 1, 5, 1);
1970 -- --------------------------------------------------------
1973 -- Table structure for table `0_tax_types`
1976 DROP TABLE IF EXISTS `0_tax_types`;
1977 CREATE TABLE IF NOT EXISTS `0_tax_types` (
1978 `id` int(11) NOT NULL auto_increment,
1979 `rate` double NOT NULL default '0',
1980 `sales_gl_code` varchar(15) NOT NULL default '',
1981 `purchasing_gl_code` varchar(15) NOT NULL default '',
1982 `name` varchar(60) NOT NULL default '',
1983 `inactive` tinyint(1) NOT NULL default '0',
1985 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1988 -- Dumping data for table `0_tax_types`
1991 INSERT INTO `0_tax_types` VALUES(1, 5, '2150', '2150', 'Tax', 0);
1993 -- --------------------------------------------------------
1996 -- Table structure for table `0_trans_tax_details`
1999 DROP TABLE IF EXISTS `0_trans_tax_details`;
2000 CREATE TABLE IF NOT EXISTS `0_trans_tax_details` (
2001 `id` int(11) NOT NULL auto_increment,
2002 `trans_type` smallint(6) default NULL,
2003 `trans_no` int(11) default NULL,
2004 `tran_date` date NOT NULL,
2005 `tax_type_id` int(11) NOT NULL default '0',
2006 `rate` double NOT NULL default '0',
2007 `ex_rate` double NOT NULL default '1',
2008 `included_in_price` tinyint(1) NOT NULL default '0',
2009 `net_amount` double NOT NULL default '0',
2010 `amount` double NOT NULL default '0',
2013 KEY `Type_and_Number` (`trans_type`,`trans_no`),
2014 KEY `tran_date` (`tran_date`)
2015 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
2018 -- Dumping data for table `0_trans_tax_details`
2022 -- --------------------------------------------------------
2025 -- Table structure for table `0_useronline`
2028 DROP TABLE IF EXISTS `0_useronline`;
2029 CREATE TABLE IF NOT EXISTS `0_useronline` (
2030 `id` int(11) NOT NULL auto_increment,
2031 `timestamp` int(15) NOT NULL default '0',
2032 `ip` varchar(40) NOT NULL default '',
2033 `file` varchar(100) NOT NULL default '',
2035 KEY `timestamp` (`timestamp`),
2037 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2040 -- Dumping data for table `0_useronline`
2044 -- --------------------------------------------------------
2047 -- Table structure for table `0_users`
2050 DROP TABLE IF EXISTS `0_users`;
2051 CREATE TABLE IF NOT EXISTS `0_users` (
2052 `id` smallint(6) NOT NULL auto_increment,
2053 `user_id` varchar(60) NOT NULL default '',
2054 `password` varchar(100) NOT NULL default '',
2055 `real_name` varchar(100) NOT NULL default '',
2056 `role_id` int(11) NOT NULL default '1',
2057 `phone` varchar(30) NOT NULL default '',
2058 `email` varchar(100) default NULL,
2059 `language` varchar(20) default NULL,
2060 `date_format` tinyint(1) NOT NULL default '0',
2061 `date_sep` tinyint(1) NOT NULL default '0',
2062 `tho_sep` tinyint(1) NOT NULL default '0',
2063 `dec_sep` tinyint(1) NOT NULL default '0',
2064 `theme` varchar(20) NOT NULL default 'default',
2065 `page_size` varchar(20) NOT NULL default 'A4',
2066 `prices_dec` smallint(6) NOT NULL default '2',
2067 `qty_dec` smallint(6) NOT NULL default '2',
2068 `rates_dec` smallint(6) NOT NULL default '4',
2069 `percent_dec` smallint(6) NOT NULL default '1',
2070 `show_gl` tinyint(1) NOT NULL default '1',
2071 `show_codes` tinyint(1) NOT NULL default '0',
2072 `show_hints` tinyint(1) NOT NULL default '0',
2073 `last_visit_date` datetime default NULL,
2074 `query_size` tinyint(1) default '10',
2075 `graphic_links` tinyint(1) default '1',
2076 `pos` smallint(6) default '1',
2077 `print_profile` varchar(30) NOT NULL default '1',
2078 `rep_popup` tinyint(1) default '1',
2079 `sticky_doc_date` tinyint(1) default '0',
2080 `startup_tab` varchar(20) NOT NULL default '',
2081 `transaction_days` smallint(6) NOT NULL default '0',
2082 `inactive` tinyint(1) NOT NULL default '0',
2084 UNIQUE KEY `user_id` (`user_id`)
2085 ) ENGINE=MyISAM AUTO_INCREMENT=2 ;
2088 -- Dumping data for table `0_users`
2091 INSERT INTO `0_users` VALUES(1, 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', 2, '', 'adm@adm.com', 'en_US', 0, 0, 0, 0, 'default', 'Letter', 2, 2, 4, 1, 1, 0, 0, '2008-04-04 12:34:29', 10, 1, 1, '1', 1, 0, 'orders', 0);
2093 -- --------------------------------------------------------
2096 -- Table structure for table `0_voided`
2099 DROP TABLE IF EXISTS `0_voided`;
2100 CREATE TABLE IF NOT EXISTS `0_voided` (
2101 `type` int(11) NOT NULL default '0',
2102 `id` int(11) NOT NULL default '0',
2103 `date_` date NOT NULL default '0000-00-00',
2104 `memo_` tinytext NOT NULL,
2105 UNIQUE KEY `id` (`type`,`id`)
2109 -- Dumping data for table `0_voided`
2113 -- --------------------------------------------------------
2116 -- Table structure for table `0_workcentres`
2119 DROP TABLE IF EXISTS `0_workcentres`;
2120 CREATE TABLE IF NOT EXISTS `0_workcentres` (
2121 `id` int(11) NOT NULL auto_increment,
2122 `name` char(40) NOT NULL default '',
2123 `description` char(50) NOT NULL default '',
2124 `inactive` tinyint(1) NOT NULL default '0',
2126 UNIQUE KEY `name` (`name`)
2127 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2130 -- Dumping data for table `0_workcentres`
2134 -- --------------------------------------------------------
2137 -- Table structure for table `0_workorders`
2140 DROP TABLE IF EXISTS `0_workorders`;
2141 CREATE TABLE IF NOT EXISTS `0_workorders` (
2142 `id` int(11) NOT NULL auto_increment,
2143 `wo_ref` varchar(60) NOT NULL default '',
2144 `loc_code` varchar(5) NOT NULL default '',
2145 `units_reqd` double NOT NULL default '1',
2146 `stock_id` varchar(20) NOT NULL default '',
2147 `date_` date NOT NULL default '0000-00-00',
2148 `type` tinyint(4) NOT NULL default '0',
2149 `required_by` date NOT NULL default '0000-00-00',
2150 `released_date` date NOT NULL default '0000-00-00',
2151 `units_issued` double NOT NULL default '0',
2152 `closed` tinyint(1) NOT NULL default '0',
2153 `released` tinyint(1) NOT NULL default '0',
2154 `additional_costs` double NOT NULL default '0',
2156 UNIQUE KEY `wo_ref` (`wo_ref`)
2157 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
2160 -- Dumping data for table `0_workorders`
2164 -- --------------------------------------------------------
2167 -- Table structure for table `0_wo_issues`
2170 DROP TABLE IF EXISTS `0_wo_issues`;
2171 CREATE TABLE IF NOT EXISTS `0_wo_issues` (
2172 `issue_no` int(11) NOT NULL auto_increment,
2173 `workorder_id` int(11) NOT NULL default '0',
2174 `reference` varchar(100) default NULL,
2175 `issue_date` date default NULL,
2176 `loc_code` varchar(5) default NULL,
2177 `workcentre_id` int(11) default NULL,
2178 PRIMARY KEY (`issue_no`),
2179 KEY `workorder_id` (`workorder_id`)
2180 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
2183 -- Dumping data for table `0_wo_issues`
2187 -- --------------------------------------------------------
2190 -- Table structure for table `0_wo_issue_items`
2193 DROP TABLE IF EXISTS `0_wo_issue_items`;
2194 CREATE TABLE IF NOT EXISTS `0_wo_issue_items` (
2195 `id` int(11) NOT NULL auto_increment,
2196 `stock_id` varchar(40) default NULL,
2197 `issue_id` int(11) default NULL,
2198 `qty_issued` double default NULL,
2200 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
2203 -- Dumping data for table `0_wo_issue_items`
2207 -- --------------------------------------------------------
2210 -- Table structure for table `0_wo_manufacture`
2213 DROP TABLE IF EXISTS `0_wo_manufacture`;
2214 CREATE TABLE IF NOT EXISTS `0_wo_manufacture` (
2215 `id` int(11) NOT NULL auto_increment,
2216 `reference` varchar(100) default NULL,
2217 `workorder_id` int(11) NOT NULL default '0',
2218 `quantity` double NOT NULL default '0',
2219 `date_` date NOT NULL default '0000-00-00',
2221 KEY `workorder_id` (`workorder_id`)
2222 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
2225 -- Dumping data for table `0_wo_manufacture`
2229 -- --------------------------------------------------------
2232 -- Table structure for table `0_wo_requirements`
2235 DROP TABLE IF EXISTS `0_wo_requirements`;
2236 CREATE TABLE IF NOT EXISTS `0_wo_requirements` (
2237 `id` int(11) NOT NULL auto_increment,
2238 `workorder_id` int(11) NOT NULL default '0',
2239 `stock_id` char(20) NOT NULL default '',
2240 `workcentre` int(11) NOT NULL default '0',
2241 `units_req` double NOT NULL default '1',
2242 `std_cost` double NOT NULL default '0',
2243 `loc_code` char(5) NOT NULL default '',
2244 `units_issued` double NOT NULL default '0',
2246 KEY `workorder_id` (`workorder_id`)
2247 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
2250 -- Dumping data for table `0_wo_requirements`