1 -- MySQL dump of database 'en_US-new' on host 'localhost'
2 -- Backup Date and Time: 2019-01-21 11:16
3 -- Built by FrontAccounting 2.5.0
4 -- http://frontaccounting.com
5 -- Company: Training Co.
8 -- Compatibility: 2.5.0
14 -- Structure of table `0_areas` --
16 DROP TABLE IF EXISTS `0_areas`;
18 CREATE TABLE `0_areas` (
19 `area_code` int(11) NOT NULL AUTO_INCREMENT,
20 `description` varchar(60) NOT NULL DEFAULT '',
21 `inactive` tinyint(1) NOT NULL DEFAULT '0',
22 PRIMARY KEY (`area_code`),
23 UNIQUE KEY `description` (`description`)
24 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
26 -- Data of table `0_areas` --
28 INSERT INTO `0_areas` VALUES
31 -- Structure of table `0_attachments` --
33 DROP TABLE IF EXISTS `0_attachments`;
35 CREATE TABLE `0_attachments` (
36 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
37 `description` varchar(60) NOT NULL DEFAULT '',
38 `type_no` int(11) NOT NULL DEFAULT '0',
39 `trans_no` int(11) NOT NULL DEFAULT '0',
40 `unique_name` varchar(60) NOT NULL DEFAULT '',
41 `tran_date` date NOT NULL DEFAULT '0000-00-00',
42 `filename` varchar(60) NOT NULL DEFAULT '',
43 `filesize` int(11) NOT NULL DEFAULT '0',
44 `filetype` varchar(60) NOT NULL DEFAULT '',
46 KEY `type_no` (`type_no`,`trans_no`)
49 -- Data of table `0_attachments` --
51 -- Structure of table `0_audit_trail` --
53 DROP TABLE IF EXISTS `0_audit_trail`;
55 CREATE TABLE `0_audit_trail` (
56 `id` int(11) NOT NULL AUTO_INCREMENT,
57 `type` smallint(6) unsigned NOT NULL DEFAULT '0',
58 `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
59 `user` smallint(6) unsigned NOT NULL DEFAULT '0',
60 `stamp` timestamp NOT NULL,
61 `description` varchar(60) DEFAULT NULL,
62 `fiscal_year` int(11) NOT NULL DEFAULT '0',
63 `gl_date` date NOT NULL DEFAULT '0000-00-00',
64 `gl_seq` int(11) unsigned DEFAULT NULL,
66 KEY `Seq` (`fiscal_year`,`gl_date`,`gl_seq`),
67 KEY `Type_and_Number` (`type`,`trans_no`)
70 -- Data of table `0_audit_trail` --
72 -- Structure of table `0_bank_accounts` --
74 DROP TABLE IF EXISTS `0_bank_accounts`;
76 CREATE TABLE `0_bank_accounts` (
77 `account_code` varchar(15) NOT NULL DEFAULT '',
78 `account_type` smallint(6) NOT NULL DEFAULT '0',
79 `bank_account_name` varchar(60) NOT NULL DEFAULT '',
80 `bank_account_number` varchar(100) NOT NULL DEFAULT '',
81 `bank_name` varchar(60) NOT NULL DEFAULT '',
82 `bank_address` tinytext,
83 `bank_curr_code` char(3) NOT NULL DEFAULT '',
84 `dflt_curr_act` tinyint(1) NOT NULL DEFAULT '0',
85 `id` smallint(6) NOT NULL AUTO_INCREMENT,
86 `bank_charge_act` varchar(15) NOT NULL DEFAULT '',
87 `last_reconciled_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
88 `ending_reconcile_balance` double NOT NULL DEFAULT '0',
89 `inactive` tinyint(1) NOT NULL DEFAULT '0',
91 KEY `bank_account_name` (`bank_account_name`),
92 KEY `bank_account_number` (`bank_account_number`),
93 KEY `account_code` (`account_code`)
94 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
96 -- Data of table `0_bank_accounts` --
98 INSERT INTO `0_bank_accounts` VALUES
99 ('1060', '0', 'Current account', 'N/A', 'N/A', NULL, 'USD', '1', '1', '5690', '0000-00-00 00:00:00', '0', '0'),
100 ('1065', '3', 'Petty Cash account', 'N/A', 'N/A', NULL, 'USD', '0', '2', '5690', '0000-00-00 00:00:00', '0', '0');
102 -- Structure of table `0_bank_trans` --
104 DROP TABLE IF EXISTS `0_bank_trans`;
106 CREATE TABLE `0_bank_trans` (
107 `id` int(11) NOT NULL AUTO_INCREMENT,
108 `type` smallint(6) DEFAULT NULL,
109 `trans_no` int(11) DEFAULT NULL,
110 `bank_act` varchar(15) NOT NULL DEFAULT '',
111 `ref` varchar(40) DEFAULT NULL,
112 `trans_date` date NOT NULL DEFAULT '0000-00-00',
113 `amount` double DEFAULT NULL,
114 `charge` double DEFAULT NULL,
115 `dimension_id` int(11) NOT NULL DEFAULT '0',
116 `dimension2_id` int(11) NOT NULL DEFAULT '0',
117 `person_type_id` int(11) NOT NULL DEFAULT '0',
118 `person_id` tinyblob,
119 `reconciled` date DEFAULT NULL,
121 KEY `bank_act` (`bank_act`,`ref`),
122 KEY `type` (`type`,`trans_no`),
123 KEY `bank_act_2` (`bank_act`,`reconciled`),
124 KEY `bank_act_3` (`bank_act`,`trans_date`)
127 -- Data of table `0_bank_trans` --
129 -- Structure of table `0_bom` --
131 DROP TABLE IF EXISTS `0_bom`;
133 CREATE TABLE `0_bom` (
134 `id` int(11) NOT NULL AUTO_INCREMENT,
135 `parent` char(20) NOT NULL DEFAULT '',
136 `component` char(20) NOT NULL DEFAULT '',
137 `workcentre_added` int(11) NOT NULL DEFAULT '0',
138 `loc_code` char(5) NOT NULL DEFAULT '',
139 `quantity` double NOT NULL DEFAULT '1',
140 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
141 KEY `component` (`component`),
143 KEY `loc_code` (`loc_code`),
144 KEY `parent` (`parent`,`loc_code`),
145 KEY `workcentre_added` (`workcentre_added`)
148 -- Data of table `0_bom` --
150 -- Structure of table `0_budget_trans` --
152 DROP TABLE IF EXISTS `0_budget_trans`;
154 CREATE TABLE `0_budget_trans` (
155 `id` int(11) NOT NULL AUTO_INCREMENT,
156 `tran_date` date NOT NULL DEFAULT '0000-00-00',
157 `account` varchar(15) NOT NULL DEFAULT '',
158 `memo_` tinytext NOT NULL,
159 `amount` double NOT NULL DEFAULT '0',
160 `dimension_id` int(11) DEFAULT '0',
161 `dimension2_id` int(11) DEFAULT '0',
163 KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`)
166 -- Data of table `0_budget_trans` --
168 -- Structure of table `0_chart_class` --
170 DROP TABLE IF EXISTS `0_chart_class`;
172 CREATE TABLE `0_chart_class` (
173 `cid` varchar(3) NOT NULL,
174 `class_name` varchar(60) NOT NULL DEFAULT '',
175 `ctype` tinyint(1) NOT NULL DEFAULT '0',
176 `inactive` tinyint(1) NOT NULL DEFAULT '0',
180 -- Data of table `0_chart_class` --
182 INSERT INTO `0_chart_class` VALUES
183 ('1', 'Assets', '1', '0'),
184 ('2', 'Liabilities', '2', '0'),
185 ('3', 'Income', '4', '0'),
186 ('4', 'Costs', '6', '0');
188 -- Structure of table `0_chart_master` --
190 DROP TABLE IF EXISTS `0_chart_master`;
192 CREATE TABLE `0_chart_master` (
193 `account_code` varchar(15) NOT NULL DEFAULT '',
194 `account_code2` varchar(15) NOT NULL DEFAULT '',
195 `account_name` varchar(60) NOT NULL DEFAULT '',
196 `account_type` varchar(10) NOT NULL DEFAULT '0',
197 `inactive` tinyint(1) NOT NULL DEFAULT '0',
198 PRIMARY KEY (`account_code`),
199 KEY `account_name` (`account_name`),
200 KEY `accounts_by_type` (`account_type`,`account_code`)
203 -- Data of table `0_chart_master` --
205 INSERT INTO `0_chart_master` VALUES
206 ('1060', '', 'Checking Account', '1', '0'),
207 ('1065', '', 'Petty Cash', '1', '0'),
208 ('1200', '', 'Accounts Receivables', '1', '0'),
209 ('1205', '', 'Allowance for doubtful accounts', '1', '0'),
210 ('1510', '', 'Inventory', '2', '0'),
211 ('1520', '', 'Stocks of Raw Materials', '2', '0'),
212 ('1530', '', 'Stocks of Work In Progress', '2', '0'),
213 ('1540', '', 'Stocks of Finished Goods', '2', '0'),
214 ('1550', '', 'Goods Received Clearing account', '2', '0'),
215 ('1820', '', 'Office Furniture & Equipment', '3', '0'),
216 ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0'),
217 ('1840', '', 'Vehicle', '3', '0'),
218 ('1845', '', 'Accum. Amort. -Vehicle', '3', '0'),
219 ('2100', '', 'Accounts Payable', '4', '0'),
220 ('2105', '', 'Deferred Income', '4', '0'),
221 ('2110', '', 'Accrued Income Tax - Federal', '4', '0'),
222 ('2120', '', 'Accrued Income Tax - State', '4', '0'),
223 ('2130', '', 'Accrued Franchise Tax', '4', '0'),
224 ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0'),
225 ('2150', '', 'Sales Tax', '4', '0'),
226 ('2160', '', 'Accrued Use Tax Payable', '4', '0'),
227 ('2210', '', 'Accrued Wages', '4', '0'),
228 ('2220', '', 'Accrued Comp Time', '4', '0'),
229 ('2230', '', 'Accrued Holiday Pay', '4', '0'),
230 ('2240', '', 'Accrued Vacation Pay', '4', '0'),
231 ('2310', '', 'Accr. Benefits - 401K', '4', '0'),
232 ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0'),
233 ('2330', '', 'Accr. Benefits - Med, Den', '4', '0'),
234 ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0'),
235 ('2350', '', 'Accr. Benefits - Credit Union', '4', '0'),
236 ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0'),
237 ('2370', '', 'Accr. Benefits - Garnish', '4', '0'),
238 ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0'),
239 ('2620', '', 'Bank Loans', '5', '0'),
240 ('2680', '', 'Loans from Shareholders', '5', '0'),
241 ('3350', '', 'Common Shares', '6', '0'),
242 ('3590', '', 'Retained Earnings - prior years', '7', '0'),
243 ('4010', '', 'Sales', '8', '0'),
244 ('4430', '', 'Shipping & Handling', '9', '0'),
245 ('4440', '', 'Interest', '9', '0'),
246 ('4450', '', 'Foreign Exchange Gain', '9', '0'),
247 ('4500', '', 'Prompt Payment Discounts', '9', '0'),
248 ('4510', '', 'Discounts Given', '9', '0'),
249 ('5010', '', 'Cost of Goods Sold - Retail', '10', '0'),
250 ('5020', '', 'Material Usage Varaiance', '10', '0'),
251 ('5030', '', 'Consumable Materials', '10', '0'),
252 ('5040', '', 'Purchase price Variance', '10', '0'),
253 ('5050', '', 'Purchases of materials', '10', '0'),
254 ('5060', '', 'Discounts Received', '10', '0'),
255 ('5100', '', 'Freight', '10', '0'),
256 ('5410', '', 'Wages & Salaries', '11', '0'),
257 ('5420', '', 'Wages - Overtime', '11', '0'),
258 ('5430', '', 'Benefits - Comp Time', '11', '0'),
259 ('5440', '', 'Benefits - Payroll Taxes', '11', '0'),
260 ('5450', '', 'Benefits - Workers Comp', '11', '0'),
261 ('5460', '', 'Benefits - Pension', '11', '0'),
262 ('5470', '', 'Benefits - General Benefits', '11', '0'),
263 ('5510', '', 'Inc Tax Exp - Federal', '11', '0'),
264 ('5520', '', 'Inc Tax Exp - State', '11', '0'),
265 ('5530', '', 'Taxes - Real Estate', '11', '0'),
266 ('5540', '', 'Taxes - Personal Property', '11', '0'),
267 ('5550', '', 'Taxes - Franchise', '11', '0'),
268 ('5560', '', 'Taxes - Foreign Withholding', '11', '0'),
269 ('5610', '', 'Accounting & Legal', '12', '0'),
270 ('5615', '', 'Advertising & Promotions', '12', '0'),
271 ('5620', '', 'Bad Debts', '12', '0'),
272 ('5660', '', 'Amortization Expense', '12', '0'),
273 ('5685', '', 'Insurance', '12', '0'),
274 ('5690', '', 'Interest & Bank Charges', '12', '0'),
275 ('5700', '', 'Office Supplies', '12', '0'),
276 ('5760', '', 'Rent', '12', '0'),
277 ('5765', '', 'Repair & Maintenance', '12', '0'),
278 ('5780', '', 'Telephone', '12', '0'),
279 ('5785', '', 'Travel & Entertainment', '12', '0'),
280 ('5790', '', 'Utilities', '12', '0'),
281 ('5795', '', 'Registrations', '12', '0'),
282 ('5800', '', 'Licenses', '12', '0'),
283 ('5810', '', 'Foreign Exchange Loss', '12', '0'),
284 ('9990', '', 'Year Profit/Loss', '12', '0');
286 -- Structure of table `0_chart_types` --
288 DROP TABLE IF EXISTS `0_chart_types`;
290 CREATE TABLE `0_chart_types` (
291 `id` varchar(10) NOT NULL,
292 `name` varchar(60) NOT NULL DEFAULT '',
293 `class_id` varchar(3) NOT NULL DEFAULT '',
294 `parent` varchar(10) NOT NULL DEFAULT '-1',
295 `inactive` tinyint(1) NOT NULL DEFAULT '0',
298 KEY `class_id` (`class_id`)
301 -- Data of table `0_chart_types` --
303 INSERT INTO `0_chart_types` VALUES
304 ('1', 'Current Assets', '1', '', '0'),
305 ('2', 'Inventory Assets', '1', '', '0'),
306 ('3', 'Capital Assets', '1', '', '0'),
307 ('4', 'Current Liabilities', '2', '', '0'),
308 ('5', 'Long Term Liabilities', '2', '', '0'),
309 ('6', 'Share Capital', '2', '', '0'),
310 ('7', 'Retained Earnings', '2', '', '0'),
311 ('8', 'Sales Revenue', '3', '', '0'),
312 ('9', 'Other Revenue', '3', '', '0'),
313 ('10', 'Cost of Goods Sold', '4', '', '0'),
314 ('11', 'Payroll Expenses', '4', '', '0'),
315 ('12', 'General & Administrative expenses', '4', '', '0');
317 -- Structure of table `0_comments` --
319 DROP TABLE IF EXISTS `0_comments`;
321 CREATE TABLE `0_comments` (
322 `type` int(11) NOT NULL DEFAULT '0',
323 `id` int(11) NOT NULL DEFAULT '0',
324 `date_` date DEFAULT '0000-00-00',
326 KEY `type_and_id` (`type`,`id`)
329 -- Data of table `0_comments` --
331 -- Structure of table `0_credit_status` --
333 DROP TABLE IF EXISTS `0_credit_status`;
335 CREATE TABLE `0_credit_status` (
336 `id` int(11) NOT NULL AUTO_INCREMENT,
337 `reason_description` char(100) NOT NULL DEFAULT '',
338 `dissallow_invoices` tinyint(1) NOT NULL DEFAULT '0',
339 `inactive` tinyint(1) NOT NULL DEFAULT '0',
341 UNIQUE KEY `reason_description` (`reason_description`)
342 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
344 -- Data of table `0_credit_status` --
346 INSERT INTO `0_credit_status` VALUES
347 ('1', 'Good History', '0', '0'),
348 ('3', 'No more work until payment received', '1', '0'),
349 ('4', 'In liquidation', '1', '0');
351 -- Structure of table `0_crm_categories` --
353 DROP TABLE IF EXISTS `0_crm_categories`;
355 CREATE TABLE `0_crm_categories` (
356 `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pure technical key',
357 `type` varchar(20) NOT NULL COMMENT 'contact type e.g. customer',
358 `action` varchar(20) NOT NULL COMMENT 'detailed usage e.g. department',
359 `name` varchar(30) NOT NULL COMMENT 'for category selector',
360 `description` tinytext NOT NULL COMMENT 'usage description',
361 `system` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'nonzero for core system usage',
362 `inactive` tinyint(1) NOT NULL DEFAULT '0',
364 UNIQUE KEY `type` (`type`,`action`),
365 UNIQUE KEY `type_2` (`type`,`name`)
366 ) ENGINE=InnoDB AUTO_INCREMENT=13 ;
368 -- Data of table `0_crm_categories` --
370 INSERT INTO `0_crm_categories` VALUES
371 ('1', 'cust_branch', 'general', 'General', 'General contact data for customer branch (overrides company setting)', '1', '0'),
372 ('2', 'cust_branch', 'invoice', 'Invoices', 'Invoice posting (overrides company setting)', '1', '0'),
373 ('3', 'cust_branch', 'order', 'Orders', 'Order confirmation (overrides company setting)', '1', '0'),
374 ('4', 'cust_branch', 'delivery', 'Deliveries', 'Delivery coordination (overrides company setting)', '1', '0'),
375 ('5', 'customer', 'general', 'General', 'General contact data for customer', '1', '0'),
376 ('6', 'customer', 'order', 'Orders', 'Order confirmation', '1', '0'),
377 ('7', 'customer', 'delivery', 'Deliveries', 'Delivery coordination', '1', '0'),
378 ('8', 'customer', 'invoice', 'Invoices', 'Invoice posting', '1', '0'),
379 ('9', 'supplier', 'general', 'General', 'General contact data for supplier', '1', '0'),
380 ('10', 'supplier', 'order', 'Orders', 'Order confirmation', '1', '0'),
381 ('11', 'supplier', 'delivery', 'Deliveries', 'Delivery coordination', '1', '0'),
382 ('12', 'supplier', 'invoice', 'Invoices', 'Invoice posting', '1', '0');
384 -- Structure of table `0_crm_contacts` --
386 DROP TABLE IF EXISTS `0_crm_contacts`;
388 CREATE TABLE `0_crm_contacts` (
389 `id` int(11) NOT NULL AUTO_INCREMENT,
390 `person_id` int(11) NOT NULL DEFAULT '0' COMMENT 'foreign key to crm_persons',
391 `type` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
392 `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
393 `entity_id` varchar(11) DEFAULT NULL COMMENT 'entity id in related class table',
395 KEY `type` (`type`,`action`)
398 -- Data of table `0_crm_contacts` --
400 -- Structure of table `0_crm_persons` --
402 DROP TABLE IF EXISTS `0_crm_persons`;
404 CREATE TABLE `0_crm_persons` (
405 `id` int(11) NOT NULL AUTO_INCREMENT,
406 `ref` varchar(30) NOT NULL,
407 `name` varchar(60) NOT NULL,
408 `name2` varchar(60) DEFAULT NULL,
410 `phone` varchar(30) DEFAULT NULL,
411 `phone2` varchar(30) DEFAULT NULL,
412 `fax` varchar(30) DEFAULT NULL,
413 `email` varchar(100) DEFAULT NULL,
414 `lang` char(5) DEFAULT NULL,
415 `notes` tinytext NOT NULL,
416 `inactive` tinyint(1) NOT NULL DEFAULT '0',
421 -- Data of table `0_crm_persons` --
423 -- Structure of table `0_currencies` --
425 DROP TABLE IF EXISTS `0_currencies`;
427 CREATE TABLE `0_currencies` (
428 `currency` varchar(60) NOT NULL DEFAULT '',
429 `curr_abrev` char(3) NOT NULL DEFAULT '',
430 `curr_symbol` varchar(10) NOT NULL DEFAULT '',
431 `country` varchar(100) NOT NULL DEFAULT '',
432 `hundreds_name` varchar(15) NOT NULL DEFAULT '',
433 `auto_update` tinyint(1) NOT NULL DEFAULT '1',
434 `inactive` tinyint(1) NOT NULL DEFAULT '0',
435 PRIMARY KEY (`curr_abrev`)
438 -- Data of table `0_currencies` --
440 INSERT INTO `0_currencies` VALUES
441 ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0'),
442 ('Euro', 'EUR', '€', 'Europe', 'Cents', '1', '0'),
443 ('Pounds', 'GBP', '£', 'England', 'Pence', '1', '0'),
444 ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0');
446 -- Structure of table `0_cust_allocations` --
448 DROP TABLE IF EXISTS `0_cust_allocations`;
450 CREATE TABLE `0_cust_allocations` (
451 `id` int(11) NOT NULL AUTO_INCREMENT,
452 `person_id` int(11) DEFAULT NULL,
453 `amt` double unsigned DEFAULT NULL,
454 `discount` double unsigned DEFAULT '0',
455 `date_alloc` date NOT NULL DEFAULT '0000-00-00',
456 `trans_no_from` int(11) DEFAULT NULL,
457 `trans_type_from` int(11) DEFAULT NULL,
458 `trans_no_to` int(11) DEFAULT NULL,
459 `trans_type_to` int(11) DEFAULT NULL,
461 UNIQUE KEY `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
462 KEY `From` (`trans_type_from`,`trans_no_from`),
463 KEY `To` (`trans_type_to`,`trans_no_to`)
466 -- Data of table `0_cust_allocations` --
468 -- Structure of table `0_cust_branch` --
470 DROP TABLE IF EXISTS `0_cust_branch`;
472 CREATE TABLE `0_cust_branch` (
473 `branch_code` int(11) NOT NULL AUTO_INCREMENT,
474 `debtor_no` int(11) NOT NULL DEFAULT '0',
475 `br_name` varchar(60) NOT NULL DEFAULT '',
476 `branch_ref` varchar(30) NOT NULL DEFAULT '',
477 `br_address` tinytext NOT NULL,
478 `area` int(11) DEFAULT NULL,
479 `salesman` int(11) NOT NULL DEFAULT '0',
480 `default_location` varchar(5) NOT NULL DEFAULT '',
481 `tax_group_id` int(11) DEFAULT NULL,
482 `sales_account` varchar(15) NOT NULL DEFAULT '',
483 `sales_discount_account` varchar(15) NOT NULL DEFAULT '',
484 `receivables_account` varchar(15) NOT NULL DEFAULT '',
485 `payment_discount_account` varchar(15) NOT NULL DEFAULT '',
486 `default_ship_via` varchar(20) NOT NULL DEFAULT '',
487 `br_post_address` tinytext NOT NULL,
488 `group_no` int(11) NOT NULL DEFAULT '0',
489 `notes` tinytext NOT NULL,
490 `bank_account` varchar(60) DEFAULT NULL,
491 `inactive` tinyint(1) NOT NULL DEFAULT '0',
492 PRIMARY KEY (`branch_code`,`debtor_no`),
493 KEY `branch_ref` (`branch_ref`),
494 KEY `group_no` (`group_no`)
497 -- Data of table `0_cust_branch` --
499 DROP TABLE IF EXISTS `0_sql_trail`;
500 CREATE TABLE `0_db_trail` (
501 `id` int(11) NOT NULL AUTO_INCREMENT,
502 `stamp` timestamp DEFAULT CURRENT_TIMESTAMP,
503 `user` tinyint(3) unsigned NOT NULL DEFAULT '0',
504 `msg` varchar(255) DEFAULT '',
505 `entry` varchar(255) DEFAULT '',
506 `data` text DEFAULT NULL,
510 -- Structure of table `0_debtor_trans` --
512 DROP TABLE IF EXISTS `0_debtor_trans`;
514 CREATE TABLE `0_debtor_trans` (
515 `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
516 `type` smallint(6) unsigned NOT NULL DEFAULT '0',
517 `version` tinyint(1) unsigned NOT NULL DEFAULT '0',
518 `debtor_no` int(11) unsigned NOT NULL,
519 `branch_code` int(11) NOT NULL DEFAULT '-1',
520 `tran_date` date NOT NULL DEFAULT '0000-00-00',
521 `due_date` date NOT NULL DEFAULT '0000-00-00',
522 `reference` varchar(60) NOT NULL DEFAULT '',
523 `tpe` int(11) NOT NULL DEFAULT '0',
524 `order_` int(11) NOT NULL DEFAULT '0',
525 `ov_amount` double NOT NULL DEFAULT '0',
526 `ov_gst` double NOT NULL DEFAULT '0',
527 `ov_freight` double NOT NULL DEFAULT '0',
528 `ov_freight_tax` double NOT NULL DEFAULT '0',
529 `ov_discount` double NOT NULL DEFAULT '0',
530 `alloc` double NOT NULL DEFAULT '0',
531 `prep_amount` double NOT NULL DEFAULT '0',
532 `rate` double NOT NULL DEFAULT '1',
533 `ship_via` varchar(20) NOT NULL DEFAULT '',
534 `dimension_id` int(11) NOT NULL DEFAULT '0',
535 `dimension2_id` int(11) NOT NULL DEFAULT '0',
536 `payment_terms` int(11) DEFAULT NULL,
537 `tax_included` tinyint(1) unsigned NOT NULL DEFAULT '0',
538 PRIMARY KEY (`type`,`trans_no`,`debtor_no`),
539 KEY `debtor_no` (`debtor_no`,`branch_code`),
540 KEY `tran_date` (`tran_date`),
541 KEY `order_` (`order_`)
544 -- Data of table `0_debtor_trans` --
546 -- Structure of table `0_debtor_trans_details` --
548 DROP TABLE IF EXISTS `0_debtor_trans_details`;
550 CREATE TABLE `0_debtor_trans_details` (
551 `id` int(11) NOT NULL AUTO_INCREMENT,
552 `debtor_trans_no` int(11) DEFAULT NULL,
553 `debtor_trans_type` int(11) DEFAULT NULL,
554 `stock_id` varchar(20) NOT NULL DEFAULT '',
555 `description` tinytext,
556 `unit_price` double NOT NULL DEFAULT '0',
557 `unit_tax` double NOT NULL DEFAULT '0',
558 `quantity` double NOT NULL DEFAULT '0',
559 `discount_percent` double NOT NULL DEFAULT '0',
560 `unit_cost` double NOT NULL DEFAULT '0',
561 `qty_done` double NOT NULL DEFAULT '0',
562 `src_id` int(11) NOT NULL,
564 KEY `Transaction` (`debtor_trans_type`,`debtor_trans_no`),
565 KEY `src_id` (`src_id`)
568 -- Data of table `0_debtor_trans_details` --
570 -- Structure of table `0_debtors_master` --
572 DROP TABLE IF EXISTS `0_debtors_master`;
574 CREATE TABLE `0_debtors_master` (
575 `debtor_no` int(11) NOT NULL AUTO_INCREMENT,
576 `name` varchar(100) NOT NULL DEFAULT '',
577 `debtor_ref` varchar(30) NOT NULL,
579 `tax_id` varchar(55) NOT NULL DEFAULT '',
580 `curr_code` char(3) NOT NULL DEFAULT '',
581 `sales_type` int(11) NOT NULL DEFAULT '1',
582 `dimension_id` int(11) NOT NULL DEFAULT '0',
583 `dimension2_id` int(11) NOT NULL DEFAULT '0',
584 `credit_status` int(11) NOT NULL DEFAULT '0',
585 `payment_terms` int(11) DEFAULT NULL,
586 `discount` double NOT NULL DEFAULT '0',
587 `credit_limit` float NOT NULL DEFAULT '1000',
588 `notes` tinytext NOT NULL,
589 `inactive` tinyint(1) NOT NULL DEFAULT '0',
590 PRIMARY KEY (`debtor_no`),
591 UNIQUE KEY `debtor_ref` (`debtor_ref`),
595 -- Data of table `0_debtors_master` --
597 -- Structure of table `0_dimensions` --
599 DROP TABLE IF EXISTS `0_dimensions`;
601 CREATE TABLE `0_dimensions` (
602 `id` int(11) NOT NULL AUTO_INCREMENT,
603 `reference` varchar(60) NOT NULL DEFAULT '',
604 `name` varchar(60) NOT NULL DEFAULT '',
605 `type_` tinyint(1) NOT NULL DEFAULT '1',
606 `closed` tinyint(1) NOT NULL DEFAULT '0',
607 `date_` date NOT NULL DEFAULT '0000-00-00',
608 `due_date` date NOT NULL DEFAULT '0000-00-00',
610 UNIQUE KEY `reference` (`reference`),
611 KEY `date_` (`date_`),
612 KEY `due_date` (`due_date`),
613 KEY `type_` (`type_`)
616 -- Data of table `0_dimensions` --
618 -- Structure of table `0_exchange_rates` --
620 DROP TABLE IF EXISTS `0_exchange_rates`;
622 CREATE TABLE `0_exchange_rates` (
623 `id` int(11) NOT NULL AUTO_INCREMENT,
624 `curr_code` char(3) NOT NULL DEFAULT '',
625 `rate_buy` double NOT NULL DEFAULT '0',
626 `rate_sell` double NOT NULL DEFAULT '0',
627 `date_` date NOT NULL DEFAULT '0000-00-00',
629 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
632 -- Data of table `0_exchange_rates` --
634 -- Structure of table `0_fiscal_year` --
636 DROP TABLE IF EXISTS `0_fiscal_year`;
638 CREATE TABLE `0_fiscal_year` (
639 `id` int(11) NOT NULL AUTO_INCREMENT,
640 `begin` date DEFAULT '0000-00-00',
641 `end` date DEFAULT '0000-00-00',
642 `closed` tinyint(1) NOT NULL DEFAULT '0',
644 UNIQUE KEY `begin` (`begin`),
645 UNIQUE KEY `end` (`end`)
646 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
648 -- Data of table `0_fiscal_year` --
650 INSERT INTO `0_fiscal_year` VALUES
651 ('1', '2018-01-01', '2018-12-31', '1');
653 -- Structure of table `0_gl_trans` --
655 DROP TABLE IF EXISTS `0_gl_trans`;
657 CREATE TABLE `0_gl_trans` (
658 `counter` int(11) NOT NULL AUTO_INCREMENT,
659 `type` smallint(6) NOT NULL DEFAULT '0',
660 `type_no` int(11) NOT NULL DEFAULT '0',
661 `tran_date` date NOT NULL DEFAULT '0000-00-00',
662 `account` varchar(15) NOT NULL DEFAULT '',
663 `memo_` tinytext NOT NULL,
664 `amount` double NOT NULL DEFAULT '0',
665 `dimension_id` int(11) NOT NULL DEFAULT '0',
666 `dimension2_id` int(11) NOT NULL DEFAULT '0',
667 `person_type_id` int(11) DEFAULT NULL,
668 `person_id` tinyblob,
669 PRIMARY KEY (`counter`),
670 KEY `Type_and_Number` (`type`,`type_no`),
671 KEY `dimension_id` (`dimension_id`),
672 KEY `dimension2_id` (`dimension2_id`),
673 KEY `tran_date` (`tran_date`),
674 KEY `account_and_tran_date` (`account`,`tran_date`)
677 -- Data of table `0_gl_trans` --
679 -- Structure of table `0_grn_batch` --
681 DROP TABLE IF EXISTS `0_grn_batch`;
683 CREATE TABLE `0_grn_batch` (
684 `id` int(11) NOT NULL AUTO_INCREMENT,
685 `supplier_id` int(11) NOT NULL DEFAULT '0',
686 `purch_order_no` int(11) DEFAULT NULL,
687 `reference` varchar(60) NOT NULL DEFAULT '',
688 `delivery_date` date NOT NULL DEFAULT '0000-00-00',
689 `loc_code` varchar(5) DEFAULT NULL,
690 `rate` double DEFAULT '1',
692 KEY `delivery_date` (`delivery_date`),
693 KEY `purch_order_no` (`purch_order_no`)
696 -- Data of table `0_grn_batch` --
698 -- Structure of table `0_grn_items` --
700 DROP TABLE IF EXISTS `0_grn_items`;
702 CREATE TABLE `0_grn_items` (
703 `id` int(11) NOT NULL AUTO_INCREMENT,
704 `grn_batch_id` int(11) DEFAULT NULL,
705 `po_detail_item` int(11) NOT NULL DEFAULT '0',
706 `item_code` varchar(20) NOT NULL DEFAULT '',
707 `description` tinytext,
708 `qty_recd` double NOT NULL DEFAULT '0',
709 `quantity_inv` double NOT NULL DEFAULT '0',
711 KEY `grn_batch_id` (`grn_batch_id`)
714 -- Data of table `0_grn_items` --
716 -- Structure of table `0_groups` --
718 DROP TABLE IF EXISTS `0_groups`;
720 CREATE TABLE `0_groups` (
721 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
722 `description` varchar(60) NOT NULL DEFAULT '',
723 `inactive` tinyint(1) NOT NULL DEFAULT '0',
725 UNIQUE KEY `description` (`description`)
726 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
728 -- Data of table `0_groups` --
730 INSERT INTO `0_groups` VALUES
732 ('2', 'Medium', '0'),
735 -- Structure of table `0_item_codes` --
737 DROP TABLE IF EXISTS `0_item_codes`;
739 CREATE TABLE `0_item_codes` (
740 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
741 `item_code` varchar(20) NOT NULL,
742 `stock_id` varchar(20) NOT NULL,
743 `description` varchar(200) NOT NULL DEFAULT '',
744 `category_id` smallint(6) unsigned NOT NULL,
745 `quantity` double NOT NULL DEFAULT '1',
746 `is_foreign` tinyint(1) NOT NULL DEFAULT '0',
747 `inactive` tinyint(1) NOT NULL DEFAULT '0',
749 UNIQUE KEY `stock_id` (`stock_id`,`item_code`),
750 KEY `item_code` (`item_code`)
753 -- Data of table `0_item_codes` --
755 -- Structure of table `0_item_tax_type_exemptions` --
757 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
759 CREATE TABLE `0_item_tax_type_exemptions` (
760 `item_tax_type_id` int(11) NOT NULL DEFAULT '0',
761 `tax_type_id` int(11) NOT NULL DEFAULT '0',
762 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
765 -- Data of table `0_item_tax_type_exemptions` --
767 -- Structure of table `0_item_tax_types` --
769 DROP TABLE IF EXISTS `0_item_tax_types`;
771 CREATE TABLE `0_item_tax_types` (
772 `id` int(11) NOT NULL AUTO_INCREMENT,
773 `name` varchar(60) NOT NULL DEFAULT '',
774 `exempt` tinyint(1) NOT NULL DEFAULT '0',
775 `inactive` tinyint(1) NOT NULL DEFAULT '0',
777 UNIQUE KEY `name` (`name`)
778 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
780 -- Data of table `0_item_tax_types` --
782 INSERT INTO `0_item_tax_types` VALUES
783 ('1', 'Regular', '0', '0');
785 -- Structure of table `0_item_units` --
787 DROP TABLE IF EXISTS `0_item_units`;
789 CREATE TABLE `0_item_units` (
790 `abbr` varchar(20) NOT NULL,
791 `name` varchar(40) NOT NULL,
792 `decimals` tinyint(2) NOT NULL,
793 `inactive` tinyint(1) NOT NULL DEFAULT '0',
794 PRIMARY KEY (`abbr`),
795 UNIQUE KEY `name` (`name`)
798 -- Data of table `0_item_units` --
800 INSERT INTO `0_item_units` VALUES
801 ('each', 'Each', '0', '0'),
802 ('hr', 'Hours', '0', '0');
804 -- Structure of table `0_journal` --
806 DROP TABLE IF EXISTS `0_journal`;
808 CREATE TABLE `0_journal` (
809 `type` smallint(6) NOT NULL DEFAULT '0',
810 `trans_no` int(11) NOT NULL DEFAULT '0',
811 `tran_date` date DEFAULT '0000-00-00',
812 `reference` varchar(60) NOT NULL DEFAULT '',
813 `source_ref` varchar(60) NOT NULL DEFAULT '',
814 `event_date` date DEFAULT '0000-00-00',
815 `doc_date` date NOT NULL DEFAULT '0000-00-00',
816 `currency` char(3) NOT NULL DEFAULT '',
817 `amount` double NOT NULL DEFAULT '0',
818 `rate` double NOT NULL DEFAULT '1',
819 PRIMARY KEY (`type`,`trans_no`),
820 KEY `tran_date` (`tran_date`)
823 -- Data of table `0_journal` --
825 -- Structure of table `0_loc_stock` --
827 DROP TABLE IF EXISTS `0_loc_stock`;
829 CREATE TABLE `0_loc_stock` (
830 `loc_code` char(5) NOT NULL DEFAULT '',
831 `stock_id` char(20) NOT NULL DEFAULT '',
832 `reorder_level` double NOT NULL DEFAULT '0',
833 PRIMARY KEY (`loc_code`,`stock_id`),
834 KEY `stock_id` (`stock_id`)
837 -- Data of table `0_loc_stock` --
839 -- Structure of table `0_locations` --
841 DROP TABLE IF EXISTS `0_locations`;
843 CREATE TABLE `0_locations` (
844 `loc_code` varchar(5) NOT NULL DEFAULT '',
845 `location_name` varchar(60) NOT NULL DEFAULT '',
846 `delivery_address` tinytext NOT NULL,
847 `phone` varchar(30) NOT NULL DEFAULT '',
848 `phone2` varchar(30) NOT NULL DEFAULT '',
849 `fax` varchar(30) NOT NULL DEFAULT '',
850 `email` varchar(100) NOT NULL DEFAULT '',
851 `contact` varchar(30) NOT NULL DEFAULT '',
852 `fixed_asset` tinyint(1) NOT NULL DEFAULT '0',
853 `inactive` tinyint(1) NOT NULL DEFAULT '0',
854 PRIMARY KEY (`loc_code`)
857 -- Data of table `0_locations` --
859 INSERT INTO `0_locations` VALUES
860 ('DEF', 'Default', 'N/A', '', '', '', '', '', '0', '0');
862 -- Structure of table `0_payment_terms` --
864 DROP TABLE IF EXISTS `0_payment_terms`;
866 CREATE TABLE `0_payment_terms` (
867 `id` int(11) NOT NULL AUTO_INCREMENT,
868 `terms` char(80) NOT NULL DEFAULT '',
869 `type` tinyint(1) NOT NULL DEFAULT '1'
870 `days` int(11) NOT NULL DEFAULT '0'
871 `early_discount` double NOT NULL DEFAULT '0'
872 `early_days` double NOT NULL DEFAULT '0',
873 `inactive` tinyint(1) NOT NULL DEFAULT '0',
875 UNIQUE KEY `terms` (`terms`)
876 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
878 -- Data of table `0_payment_terms` --
880 INSERT INTO `0_payment_terms` VALUES
881 ('1', 'Due 15th Of the Following Month', '4', '17', '0', '0', '0'),
882 ('2', 'Due By End Of The Following Month', '4', '31', '0', '0', '0'),
883 ('3', 'Payment due within 10 days', '3', '10', '0', '0', '0'),
884 ('4', 'Cash Only', '2', '0', '0', '0', '0'),
885 ('5', 'Prepaid', '1', '0', '0', '0', '0');
887 -- Structure of table `0_prices` --
889 DROP TABLE IF EXISTS `0_prices`;
891 CREATE TABLE `0_prices` (
892 `id` int(11) NOT NULL AUTO_INCREMENT,
893 `stock_id` varchar(20) NOT NULL DEFAULT '',
894 `sales_type_id` int(11) NOT NULL DEFAULT '0',
895 `curr_abrev` char(3) NOT NULL DEFAULT '',
896 `price` double NOT NULL DEFAULT '0',
898 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
901 -- Data of table `0_prices` --
903 -- Structure of table `0_print_profiles` --
905 DROP TABLE IF EXISTS `0_print_profiles`;
907 CREATE TABLE `0_print_profiles` (
908 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
909 `profile` varchar(30) NOT NULL,
910 `report` varchar(5) DEFAULT NULL,
911 `printer` tinyint(3) unsigned DEFAULT NULL,
913 UNIQUE KEY `profile` (`profile`,`report`)
914 ) ENGINE=InnoDB AUTO_INCREMENT=10 ;
916 -- Data of table `0_print_profiles` --
918 INSERT INTO `0_print_profiles` VALUES
919 ('1', 'Out of office', NULL, '0'),
920 ('2', 'Sales Department', NULL, '0'),
921 ('3', 'Central', NULL, '2'),
922 ('4', 'Sales Department', '104', '2'),
923 ('5', 'Sales Department', '105', '2'),
924 ('6', 'Sales Department', '107', '2'),
925 ('7', 'Sales Department', '109', '2'),
926 ('8', 'Sales Department', '110', '2'),
927 ('9', 'Sales Department', '201', '2');
929 -- Structure of table `0_printers` --
931 DROP TABLE IF EXISTS `0_printers`;
933 CREATE TABLE `0_printers` (
934 `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
935 `name` varchar(20) NOT NULL,
936 `description` varchar(60) NOT NULL,
937 `queue` varchar(20) NOT NULL,
938 `host` varchar(40) NOT NULL,
939 `port` smallint(11) unsigned NOT NULL,
940 `timeout` tinyint(3) unsigned NOT NULL,
942 UNIQUE KEY `name` (`name`)
943 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
945 -- Data of table `0_printers` --
947 INSERT INTO `0_printers` VALUES
948 ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20'),
949 ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5'),
950 ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
952 -- Structure of table `0_purch_data` --
954 DROP TABLE IF EXISTS `0_purch_data`;
956 CREATE TABLE `0_purch_data` (
957 `supplier_id` int(11) NOT NULL DEFAULT '0',
958 `stock_id` char(20) NOT NULL DEFAULT '',
959 `price` double NOT NULL DEFAULT '0',
960 `suppliers_uom` char(50) NOT NULL DEFAULT '',
961 `conversion_factor` double NOT NULL DEFAULT '1',
962 `supplier_description` char(50) NOT NULL DEFAULT '',
963 PRIMARY KEY (`supplier_id`,`stock_id`)
966 -- Data of table `0_purch_data` --
968 -- Structure of table `0_purch_order_details` --
970 DROP TABLE IF EXISTS `0_purch_order_details`;
972 CREATE TABLE `0_purch_order_details` (
973 `po_detail_item` int(11) NOT NULL AUTO_INCREMENT,
974 `order_no` int(11) NOT NULL DEFAULT '0',
975 `item_code` varchar(20) NOT NULL DEFAULT '',
976 `description` tinytext,
977 `delivery_date` date NOT NULL DEFAULT '0000-00-00',
978 `qty_invoiced` double NOT NULL DEFAULT '0',
979 `unit_price` double NOT NULL DEFAULT '0',
980 `act_price` double NOT NULL DEFAULT '0',
981 `std_cost_unit` double NOT NULL DEFAULT '0',
982 `quantity_ordered` double NOT NULL DEFAULT '0',
983 `quantity_received` double NOT NULL DEFAULT '0',
984 PRIMARY KEY (`po_detail_item`),
985 KEY `order` (`order_no`,`po_detail_item`),
986 KEY `itemcode` (`item_code`)
989 -- Data of table `0_purch_order_details` --
991 -- Structure of table `0_purch_orders` --
993 DROP TABLE IF EXISTS `0_purch_orders`;
995 CREATE TABLE `0_purch_orders` (
996 `order_no` int(11) NOT NULL AUTO_INCREMENT,
997 `supplier_id` int(11) NOT NULL DEFAULT '0',
999 `ord_date` date NOT NULL DEFAULT '0000-00-00',
1000 `reference` tinytext NOT NULL,
1001 `supp_reference` tinytext,
1002 `into_stock_location` varchar(5) NOT NULL DEFAULT '',
1003 `delivery_address` tinytext NOT NULL,
1004 `total` double NOT NULL DEFAULT '0',
1005 `prep_amount` double NOT NULL DEFAULT '0',
1006 `alloc` double NOT NULL DEFAULT '0',
1007 `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1008 PRIMARY KEY (`order_no`),
1009 KEY `ord_date` (`ord_date`)
1012 -- Data of table `0_purch_orders` --
1014 -- Structure of table `0_quick_entries` --
1016 DROP TABLE IF EXISTS `0_quick_entries`;
1018 CREATE TABLE `0_quick_entries` (
1019 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1020 `type` tinyint(1) NOT NULL DEFAULT '0',
1021 `description` varchar(60) NOT NULL,
1022 `usage` varchar(120) DEFAULT NULL,
1023 `base_amount` double NOT NULL DEFAULT '0',
1024 `base_desc` varchar(60) DEFAULT NULL,
1025 `bal_type` tinyint(1) NOT NULL DEFAULT '0',
1027 KEY `description` (`description`)
1028 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1030 -- Data of table `0_quick_entries` --
1032 INSERT INTO `0_quick_entries` VALUES
1033 ('1', '1', 'Maintenance', NULL, '0', 'Amount', '0'),
1034 ('2', '4', 'Phone', NULL, '0', 'Amount', '0'),
1035 ('3', '2', 'Cash Sales', 'Retail sales without invoice', '0', 'Amount', '0');
1037 -- Structure of table `0_quick_entry_lines` --
1039 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1041 CREATE TABLE `0_quick_entry_lines` (
1042 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1043 `qid` smallint(6) unsigned NOT NULL,
1044 `amount` double DEFAULT '0',
1045 `memo` tinytext NOT NULL,
1046 `action` varchar(2) NOT NULL,
1047 `dest_id` varchar(15) NOT NULL DEFAULT '',
1048 `dimension_id` smallint(6) unsigned DEFAULT NULL,
1049 `dimension2_id` smallint(6) unsigned DEFAULT NULL,
1052 ) ENGINE=InnoDB AUTO_INCREMENT=7 ;
1054 -- Data of table `0_quick_entry_lines` --
1056 INSERT INTO `0_quick_entry_lines` VALUES
1057 ('1', '1', '0', '', 't-', '1', '0', '0'),
1058 ('2', '2', '0', '', 't-', '1', '0', '0'),
1059 ('3', '3', '0', '', 't-', '1', '0', '0'),
1060 ('4', '3', '0', '', '=', '4010', '0', '0'),
1061 ('5', '1', '0', '', '=', '5765', '0', '0'),
1062 ('6', '2', '0', '', '=', '5780', '0', '0');
1064 -- Structure of table `0_recurrent_invoices` --
1066 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1068 CREATE TABLE `0_recurrent_invoices` (
1069 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1070 `description` varchar(60) NOT NULL DEFAULT '',
1071 `order_no` int(11) unsigned NOT NULL,
1072 `debtor_no` int(11) unsigned DEFAULT NULL,
1073 `group_no` smallint(6) unsigned DEFAULT NULL,
1074 `days` int(11) NOT NULL DEFAULT '0',
1075 `monthly` int(11) NOT NULL DEFAULT '0',
1076 `begin` date NOT NULL DEFAULT '0000-00-00',
1077 `end` date NOT NULL DEFAULT '0000-00-00',
1078 `last_sent` date NOT NULL DEFAULT '0000-00-00',
1080 UNIQUE KEY `description` (`description`)
1083 -- Data of table `0_recurrent_invoices` --
1085 -- Structure of table `0_reflines` --
1087 DROP TABLE IF EXISTS `0_reflines`;
1089 CREATE TABLE `0_reflines` (
1090 `id` int(11) NOT NULL AUTO_INCREMENT,
1091 `trans_type` int(11) NOT NULL,
1092 `prefix` char(5) NOT NULL DEFAULT '',
1093 `pattern` varchar(35) NOT NULL DEFAULT '1',
1094 `description` varchar(60) NOT NULL DEFAULT '',
1095 `default` tinyint(1) NOT NULL DEFAULT '0',
1096 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1098 UNIQUE KEY `prefix` (`trans_type`,`prefix`)
1099 ) ENGINE=InnoDB AUTO_INCREMENT=23 ;
1101 -- Data of table `0_reflines` --
1103 INSERT INTO `0_reflines` VALUES
1104 ('1', '0', '', '{001}/{YYYY}', '', '1', '0'),
1105 ('2', '1', '', '{001}/{YYYY}', '', '1', '0'),
1106 ('3', '2', '', '{001}/{YYYY}', '', '1', '0'),
1107 ('4', '4', '', '{001}/{YYYY}', '', '1', '0'),
1108 ('5', '10', '', '{001}/{YYYY}', '', '1', '0'),
1109 ('6', '11', '', '{001}/{YYYY}', '', '1', '0'),
1110 ('7', '12', '', '{001}/{YYYY}', '', '1', '0'),
1111 ('8', '13', '', '{001}/{YYYY}', '', '1', '0'),
1112 ('9', '16', '', '{001}/{YYYY}', '', '1', '0'),
1113 ('10', '17', '', '{001}/{YYYY}', '', '1', '0'),
1114 ('11', '18', '', '{001}/{YYYY}', '', '1', '0'),
1115 ('12', '20', '', '{001}/{YYYY}', '', '1', '0'),
1116 ('13', '21', '', '{001}/{YYYY}', '', '1', '0'),
1117 ('14', '22', '', '{001}/{YYYY}', '', '1', '0'),
1118 ('15', '25', '', '{001}/{YYYY}', '', '1', '0'),
1119 ('16', '26', '', '{001}/{YYYY}', '', '1', '0'),
1120 ('17', '28', '', '{001}/{YYYY}', '', '1', '0'),
1121 ('18', '29', '', '{001}/{YYYY}', '', '1', '0'),
1122 ('19', '30', '', '{001}/{YYYY}', '', '1', '0'),
1123 ('20', '32', '', '{001}/{YYYY}', '', '1', '0'),
1124 ('21', '35', '', '{001}/{YYYY}', '', '1', '0'),
1125 ('22', '40', '', '{001}/{YYYY}', '', '1', '0');
1127 -- Structure of table `0_refs` --
1129 DROP TABLE IF EXISTS `0_refs`;
1131 CREATE TABLE `0_refs` (
1132 `id` int(11) NOT NULL DEFAULT '0',
1133 `type` int(11) NOT NULL DEFAULT '0',
1134 `reference` varchar(100) NOT NULL DEFAULT '',
1135 PRIMARY KEY (`id`,`type`),
1136 KEY `Type_and_Reference` (`type`,`reference`)
1139 -- Data of table `0_refs` --
1141 -- Structure of table `0_sales_order_details` --
1143 DROP TABLE IF EXISTS `0_sales_order_details`;
1145 CREATE TABLE `0_sales_order_details` (
1146 `id` int(11) NOT NULL AUTO_INCREMENT,
1147 `order_no` int(11) NOT NULL DEFAULT '0',
1148 `trans_type` smallint(6) NOT NULL DEFAULT '30',
1149 `stk_code` varchar(20) NOT NULL DEFAULT '',
1150 `description` tinytext,
1151 `qty_sent` double NOT NULL DEFAULT '0',
1152 `unit_price` double NOT NULL DEFAULT '0',
1153 `quantity` double NOT NULL DEFAULT '0',
1154 `invoiced` double NOT NULL DEFAULT '0',
1155 `discount_percent` double NOT NULL DEFAULT '0',
1157 KEY `sorder` (`trans_type`,`order_no`),
1158 KEY `stkcode` (`stk_code`)
1161 -- Data of table `0_sales_order_details` --
1163 -- Structure of table `0_sales_orders` --
1165 DROP TABLE IF EXISTS `0_sales_orders`;
1167 CREATE TABLE `0_sales_orders` (
1168 `order_no` int(11) NOT NULL,
1169 `trans_type` smallint(6) NOT NULL DEFAULT '30',
1170 `version` tinyint(1) unsigned NOT NULL DEFAULT '0',
1171 `type` tinyint(1) NOT NULL DEFAULT '0',
1172 `debtor_no` int(11) NOT NULL DEFAULT '0',
1173 `branch_code` int(11) NOT NULL DEFAULT '0',
1174 `reference` varchar(100) NOT NULL DEFAULT '',
1175 `customer_ref` tinytext NOT NULL,
1176 `comments` tinytext,
1177 `ord_date` date NOT NULL DEFAULT '0000-00-00',
1178 `order_type` int(11) NOT NULL DEFAULT '0',
1179 `ship_via` varchar(20) NOT NULL DEFAULT '',
1180 `delivery_address` tinytext NOT NULL,
1181 `contact_phone` varchar(30) DEFAULT NULL,
1182 `contact_email` varchar(100) DEFAULT NULL,
1183 `deliver_to` tinytext NOT NULL,
1184 `freight_cost` double NOT NULL DEFAULT '0',
1185 `from_stk_loc` varchar(5) NOT NULL DEFAULT '',
1186 `delivery_date` date NOT NULL DEFAULT '0000-00-00',
1187 `payment_terms` int(11) DEFAULT NULL,
1188 `total` double NOT NULL DEFAULT '0',
1189 `prep_amount` double NOT NULL DEFAULT '0',
1190 `alloc` double NOT NULL DEFAULT '0',
1191 PRIMARY KEY (`trans_type`,`order_no`)
1194 -- Data of table `0_sales_orders` --
1196 -- Structure of table `0_sales_pos` --
1198 DROP TABLE IF EXISTS `0_sales_pos`;
1200 CREATE TABLE `0_sales_pos` (
1201 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1202 `pos_name` varchar(30) NOT NULL,
1203 `cash_sale` tinyint(1) NOT NULL,
1204 `credit_sale` tinyint(1) NOT NULL,
1205 `pos_location` varchar(5) NOT NULL,
1206 `pos_account` smallint(6) unsigned NOT NULL,
1207 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1209 UNIQUE KEY `pos_name` (`pos_name`)
1210 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1212 -- Data of table `0_sales_pos` --
1214 INSERT INTO `0_sales_pos` VALUES
1215 ('1', 'Default', '1', '1', 'DEF', '2', '0');
1217 -- Structure of table `0_sales_types` --
1219 DROP TABLE IF EXISTS `0_sales_types`;
1221 CREATE TABLE `0_sales_types` (
1222 `id` int(11) NOT NULL AUTO_INCREMENT,
1223 `sales_type` char(50) NOT NULL DEFAULT '',
1224 `tax_included` int(1) NOT NULL DEFAULT '0',
1225 `factor` double NOT NULL DEFAULT '1',
1226 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1228 UNIQUE KEY `sales_type` (`sales_type`)
1229 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1231 -- Data of table `0_sales_types` --
1233 INSERT INTO `0_sales_types` VALUES
1234 ('1', 'Retail', '1', '1', '0'),
1235 ('2', 'Wholesale', '0', '0.7', '0');
1237 -- Structure of table `0_salesman` --
1239 DROP TABLE IF EXISTS `0_salesman`;
1241 CREATE TABLE `0_salesman` (
1242 `salesman_code` int(11) NOT NULL AUTO_INCREMENT,
1243 `salesman_name` char(60) NOT NULL DEFAULT '',
1244 `salesman_phone` char(30) NOT NULL DEFAULT '',
1245 `salesman_fax` char(30) NOT NULL DEFAULT '',
1246 `salesman_email` varchar(100) NOT NULL DEFAULT '',
1247 `provision` double NOT NULL DEFAULT '0',
1248 `break_pt` double NOT NULL DEFAULT '0',
1249 `provision2` double NOT NULL DEFAULT '0',
1250 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1251 PRIMARY KEY (`salesman_code`),
1252 UNIQUE KEY `salesman_name` (`salesman_name`)
1253 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1255 -- Data of table `0_salesman` --
1257 INSERT INTO `0_salesman` VALUES
1258 ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1260 -- Structure of table `0_security_roles` --
1262 DROP TABLE IF EXISTS `0_security_roles`;
1264 CREATE TABLE `0_security_roles` (
1265 `id` int(11) NOT NULL AUTO_INCREMENT,
1266 `role` varchar(30) NOT NULL,
1267 `description` varchar(50) DEFAULT NULL,
1270 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1272 UNIQUE KEY `role` (`role`)
1273 ) ENGINE=InnoDB AUTO_INCREMENT=11 ;
1275 -- Data of table `0_security_roles` --
1277 INSERT INTO `0_security_roles` VALUES
1278 ('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;775', '0'),
1279 ('2', 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;9472;9728;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;9217;9218;9220;9473;9474;9475;9476;9729;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;775', '0'),
1280 ('3', 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873;775', '0'),
1281 ('4', 'Stock Manager', 'Stock Manager', '768;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;775', '0'),
1282 ('5', 'Production Manager', 'Production Manager', '512;768;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;775', '0'),
1283 ('6', 'Purchase Officer', 'Purchase Officer', '512;768;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;775', '0'),
1284 ('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;775', '0'),
1285 ('8', 'AP Officer', 'AP Officer', '512;768;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;775', '0'),
1286 ('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;775', '0'),
1287 ('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;775', '0');
1289 -- Structure of table `0_shippers` --
1291 DROP TABLE IF EXISTS `0_shippers`;
1293 CREATE TABLE `0_shippers` (
1294 `shipper_id` int(11) NOT NULL AUTO_INCREMENT,
1295 `shipper_name` varchar(60) NOT NULL DEFAULT '',
1296 `phone` varchar(30) NOT NULL DEFAULT '',
1297 `phone2` varchar(30) NOT NULL DEFAULT '',
1298 `contact` tinytext NOT NULL,
1299 `address` tinytext NOT NULL,
1300 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1301 PRIMARY KEY (`shipper_id`),
1302 UNIQUE KEY `name` (`shipper_name`)
1303 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1305 -- Data of table `0_shippers` --
1307 INSERT INTO `0_shippers` VALUES
1308 ('1', 'Default', '', '', '', '', '0');
1310 -- Structure of table `0_stock_category` --
1312 DROP TABLE IF EXISTS `0_stock_category`;
1314 CREATE TABLE `0_stock_category` (
1315 `category_id` int(11) NOT NULL AUTO_INCREMENT,
1316 `description` varchar(60) NOT NULL DEFAULT '',
1317 `dflt_tax_type` int(11) NOT NULL DEFAULT '1',
1318 `dflt_units` varchar(20) NOT NULL DEFAULT 'each',
1319 `dflt_mb_flag` char(1) NOT NULL DEFAULT 'B',
1320 `dflt_sales_act` varchar(15) NOT NULL DEFAULT '',
1321 `dflt_cogs_act` varchar(15) NOT NULL DEFAULT '',
1322 `dflt_inventory_act` varchar(15) NOT NULL DEFAULT '',
1323 `dflt_adjustment_act` varchar(15) NOT NULL DEFAULT '',
1324 `dflt_wip_act` varchar(15) NOT NULL DEFAULT '',
1325 `dflt_dim1` int(11) DEFAULT NULL,
1326 `dflt_dim2` int(11) DEFAULT NULL,
1327 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1328 `dflt_no_sale` tinyint(1) NOT NULL DEFAULT '0',
1329 `dflt_no_purchase` tinyint(1) NOT NULL DEFAULT '0',
1330 `vat_category` tinyint(1) NOT NULL DEFAULT '0',
1331 PRIMARY KEY (`category_id`),
1332 UNIQUE KEY `description` (`description`)
1333 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
1335 -- Data of table `0_stock_category` --
1337 INSERT INTO `0_stock_category` VALUES
1338 ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0'),
1339 ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0'),
1340 ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0'),
1341 ('4', 'Services', '1', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0'),
1342 ('5', 'Shipping', '1', 'each', 'T', '4430', '5010', '', '', '', '0', '0', '0', '1', '0', '0');
1344 -- Structure of table `0_stock_fa_class` --
1346 DROP TABLE IF EXISTS `0_stock_fa_class`;
1348 CREATE TABLE `0_stock_fa_class` (
1349 `fa_class_id` varchar(20) NOT NULL DEFAULT '',
1350 `parent_id` varchar(20) NOT NULL DEFAULT '',
1351 `description` varchar(200) NOT NULL DEFAULT '',
1352 `long_description` tinytext NOT NULL,
1353 `depreciation_rate` double NOT NULL DEFAULT '0',
1354 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1355 PRIMARY KEY (`fa_class_id`)
1358 -- Data of table `0_stock_fa_class` --
1360 -- Structure of table `0_stock_master` --
1362 DROP TABLE IF EXISTS `0_stock_master`;
1364 CREATE TABLE `0_stock_master` (
1365 `stock_id` varchar(20) NOT NULL DEFAULT '',
1366 `category_id` int(11) NOT NULL DEFAULT '0',
1367 `tax_type_id` int(11) NOT NULL DEFAULT '0',
1368 `description` varchar(200) NOT NULL DEFAULT '',
1369 `long_description` tinytext NOT NULL,
1370 `units` varchar(20) NOT NULL DEFAULT 'each',
1371 `mb_flag` char(1) NOT NULL DEFAULT 'B',
1372 `sales_account` varchar(15) NOT NULL DEFAULT '',
1373 `cogs_account` varchar(15) NOT NULL DEFAULT '',
1374 `inventory_account` varchar(15) NOT NULL DEFAULT '',
1375 `adjustment_account` varchar(15) NOT NULL DEFAULT '',
1376 `wip_account` varchar(15) NOT NULL DEFAULT '',
1377 `dimension_id` int(11) DEFAULT NULL,
1378 `dimension2_id` int(11) DEFAULT NULL,
1379 `purchase_cost` double NOT NULL DEFAULT '0',
1380 `material_cost` double NOT NULL DEFAULT '0',
1381 `labour_cost` double NOT NULL DEFAULT '0',
1382 `overhead_cost` double NOT NULL DEFAULT '0',
1383 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1384 `no_sale` tinyint(1) NOT NULL DEFAULT '0',
1385 `no_purchase` tinyint(1) NOT NULL DEFAULT '0',
1386 `editable` tinyint(1) NOT NULL DEFAULT '0',
1387 `depreciation_method` char(1) NOT NULL DEFAULT 'S',
1388 `depreciation_rate` double NOT NULL DEFAULT '0',
1389 `depreciation_factor` double NOT NULL DEFAULT '1',
1390 `depreciation_start` date NOT NULL DEFAULT '0000-00-00',
1391 `depreciation_date` date NOT NULL DEFAULT '0000-00-00',
1392 `fa_class_id` varchar(20) NOT NULL DEFAULT '',
1393 `vat_category` tinyint(1) NOT NULL DEFAULT '0',
1394 `shipper_id` int(11) NOT NULL DEFAULT '0',
1395 PRIMARY KEY (`stock_id`)
1398 -- Data of table `0_stock_master` --
1399 INSERT INTO `0_stock_master` VALUES
1400 ('post-std', '5', '1', 'Standard post package', '', 'each', 'T', '4430', '5010', '', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', '', '0', '0');
1401 -- Structure of table `0_stock_moves` --
1403 DROP TABLE IF EXISTS `0_stock_moves`;
1405 CREATE TABLE `0_stock_moves` (
1406 `trans_id` int(11) NOT NULL AUTO_INCREMENT,
1407 `trans_no` int(11) NOT NULL DEFAULT '0',
1408 `stock_id` char(20) NOT NULL DEFAULT '',
1409 `type` smallint(6) NOT NULL DEFAULT '0',
1410 `loc_code` char(5) NOT NULL DEFAULT '',
1411 `tran_date` date NOT NULL DEFAULT '0000-00-00',
1412 `price` double NOT NULL DEFAULT '0',
1413 `reference` char(40) NOT NULL DEFAULT '',
1414 `qty` double NOT NULL DEFAULT '1',
1415 `unit_cost` double NOT NULL DEFAULT '0',
1416 PRIMARY KEY (`trans_id`),
1417 KEY `type` (`type`,`trans_no`),
1418 KEY `Move` (`stock_id`,`loc_code`,`tran_date`)
1421 -- Data of table `0_stock_moves` --
1423 -- Structure of table `0_supp_allocations` --
1425 DROP TABLE IF EXISTS `0_supp_allocations`;
1427 CREATE TABLE `0_supp_allocations` (
1428 `id` int(11) NOT NULL AUTO_INCREMENT,
1429 `person_id` int(11) DEFAULT NULL,
1430 `amt` double unsigned DEFAULT NULL,
1431 `discount` double unsigned DEFAULT '0',
1432 `date_alloc` date NOT NULL DEFAULT '0000-00-00',
1433 `trans_no_from` int(11) DEFAULT NULL,
1434 `trans_type_from` int(11) DEFAULT NULL,
1435 `trans_no_to` int(11) DEFAULT NULL,
1436 `trans_type_to` int(11) DEFAULT NULL,
1438 UNIQUE KEY `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
1439 KEY `From` (`trans_type_from`,`trans_no_from`),
1440 KEY `To` (`trans_type_to`,`trans_no_to`)
1443 -- Data of table `0_supp_allocations` --
1445 -- Structure of table `0_supp_invoice_items` --
1447 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1449 CREATE TABLE `0_supp_invoice_items` (
1450 `id` int(11) NOT NULL AUTO_INCREMENT,
1451 `supp_trans_no` int(11) DEFAULT NULL,
1452 `supp_trans_type` int(11) DEFAULT NULL,
1453 `gl_code` varchar(15) NOT NULL DEFAULT '',
1454 `grn_item_id` int(11) DEFAULT NULL,
1455 `po_detail_item_id` int(11) DEFAULT NULL,
1456 `stock_id` varchar(20) NOT NULL DEFAULT '',
1457 `description` tinytext,
1458 `quantity` double NOT NULL DEFAULT '0',
1459 `unit_price` double NOT NULL DEFAULT '0',
1460 `unit_tax` double NOT NULL DEFAULT '0',
1462 `dimension_id` int(11) NOT NULL DEFAULT '0',
1463 `dimension2_id` int(11) NOT NULL DEFAULT '0',
1465 KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`)
1468 -- Data of table `0_supp_invoice_items` --
1470 -- Structure of table `0_supp_trans` --
1472 DROP TABLE IF EXISTS `0_supp_trans`;
1474 CREATE TABLE `0_supp_trans` (
1475 `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
1476 `type` smallint(6) unsigned NOT NULL DEFAULT '0',
1477 `supplier_id` int(11) unsigned NOT NULL,
1478 `reference` tinytext NOT NULL,
1479 `supp_reference` varchar(60) NOT NULL DEFAULT '',
1480 `tran_date` date NOT NULL DEFAULT '0000-00-00',
1481 `due_date` date NOT NULL DEFAULT '0000-00-00',
1482 `ov_amount` double NOT NULL DEFAULT '0',
1483 `ov_discount` double NOT NULL DEFAULT '0',
1484 `ov_gst` double NOT NULL DEFAULT '0',
1485 `rate` double NOT NULL DEFAULT '1',
1486 `alloc` double NOT NULL DEFAULT '0',
1487 `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1488 PRIMARY KEY (`type`,`trans_no`,`supplier_id`),
1489 KEY `supplier_id` (`supplier_id`),
1490 KEY `tran_date` (`tran_date`)
1493 -- Data of table `0_supp_trans` --
1495 -- Structure of table `0_suppliers` --
1497 DROP TABLE IF EXISTS `0_suppliers`;
1499 CREATE TABLE `0_suppliers` (
1500 `supplier_id` int(11) NOT NULL AUTO_INCREMENT,
1501 `supp_name` varchar(60) NOT NULL DEFAULT '',
1502 `supp_ref` varchar(30) NOT NULL DEFAULT '',
1503 `address` tinytext NOT NULL,
1504 `supp_address` tinytext NOT NULL,
1505 `gst_no` varchar(25) NOT NULL DEFAULT '',
1506 `contact` varchar(60) NOT NULL DEFAULT '',
1507 `supp_account_no` varchar(40) NOT NULL DEFAULT '',
1508 `website` varchar(100) NOT NULL DEFAULT '',
1509 `bank_account` varchar(60) NOT NULL DEFAULT '',
1510 `curr_code` char(3) DEFAULT NULL,
1511 `payment_terms` int(11) DEFAULT NULL,
1512 `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1513 `dimension_id` int(11) DEFAULT '0',
1514 `dimension2_id` int(11) DEFAULT '0',
1515 `tax_group_id` int(11) DEFAULT NULL,
1516 `credit_limit` double NOT NULL DEFAULT '0',
1517 `purchase_account` varchar(15) NOT NULL DEFAULT '',
1518 `payable_account` varchar(15) NOT NULL DEFAULT '',
1519 `payment_discount_account` varchar(15) NOT NULL DEFAULT '',
1520 `notes` tinytext NOT NULL,
1521 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1522 PRIMARY KEY (`supplier_id`),
1523 KEY `supp_ref` (`supp_ref`)
1526 -- Data of table `0_suppliers` --
1528 -- Structure of table `0_sys_prefs` --
1530 DROP TABLE IF EXISTS `0_sys_prefs`;
1532 CREATE TABLE `0_sys_prefs` (
1533 `name` varchar(35) NOT NULL DEFAULT '',
1534 `category` varchar(30) DEFAULT NULL,
1535 `type` varchar(20) NOT NULL DEFAULT '',
1536 `length` smallint(6) DEFAULT NULL,
1537 `value` text NOT NULL,
1538 PRIMARY KEY (`name`),
1539 KEY `category` (`category`)
1542 -- Data of table `0_sys_prefs` --
1544 INSERT INTO `0_sys_prefs` VALUES
1545 ('coy_name', 'setup.company', 'varchar', 60, 'Company name'),
1546 ('gst_no', 'setup.company', 'varchar', 25, ''),
1547 ('coy_no', 'setup.company', 'varchar', 25, ''),
1548 ('tax_prd', 'setup.company', 'int', 11, '1'),
1549 ('tax_last', 'setup.company', 'int', 11, '1'),
1550 ('postal_address', 'setup.company', 'tinytext', 0, 'N/A'),
1551 ('phone', 'setup.company', 'varchar', 30, ''),
1552 ('fax', 'setup.company', 'varchar', 30, ''),
1553 ('email', 'setup.company', 'varchar', 100, ''),
1554 ('coy_logo', 'setup.company', 'varchar', 100, ''),
1555 ('domicile', 'setup.company', 'varchar', 55, ''),
1556 ('curr_default', 'setup.company', 'char', 3, 'USD'),
1557 ('use_dimension', 'setup.company', 'tinyint', 1, '1'),
1558 ('f_year', 'setup.company', 'int', 11, '1'),
1559 ('shortname_name_in_list','setup.company', 'tinyint', 1, '0'),
1560 ('no_item_list', 'setup.company', 'tinyint', 1, '0'),
1561 ('no_customer_list', 'setup.company', 'tinyint', 1, '0'),
1562 ('no_supplier_list', 'setup.company', 'tinyint', 1, '0'),
1563 ('base_sales', 'setup.company', 'int', 11, '1'),
1564 ('time_zone', 'setup.company', 'tinyint', 1, '0'),
1565 ('add_pct', 'setup.company', 'int', 5, '-1'),
1566 ('round_to', 'setup.company', 'int', 5, '1'),
1567 ('login_tout', 'setup.company', 'smallint', 6, '600'),
1568 ('past_due_days', 'glsetup.general', 'int', 11, '30'),
1569 ('profit_loss_year_act', 'glsetup.general', 'varchar', 15, '9990'),
1570 ('retained_earnings_act', 'glsetup.general', 'varchar', 15, '3590'),
1571 ('bank_charge_act', 'glsetup.general', 'varchar', 15, '5690'),
1572 ('exchange_diff_act', 'glsetup.general', 'varchar', 15, '4450'),
1573 ('tax_algorithm', 'glsetup.customer', 'tinyint', 1, '1'),
1574 ('default_credit_limit', 'glsetup.customer', 'int', 11, '1000'),
1575 ('accumulate_shipping', 'glsetup.customer', 'tinyint', 1, '0'),
1576 ('legal_text', 'glsetup.customer', 'tinytext', 0, ''),
1577 ('freight_act', 'glsetup.customer', 'varchar', 15, '4430'),
1578 ('debtors_act', 'glsetup.sales', 'varchar', 15, '1200'),
1579 ('default_sales_act', 'glsetup.sales', 'varchar', 15, '4010'),
1580 ('default_sales_discount_act', 'glsetup.sales', 'varchar', 15, '4510'),
1581 ('default_prompt_payment_act', 'glsetup.sales', 'varchar', 15, '4500'),
1582 ('default_delivery_required', 'glsetup.sales', 'smallint', 6, '1'),
1583 ('default_receival_required', 'glsetup.purchase', 'smallint', 6, '10'),
1584 ('default_quote_valid_days', 'glsetup.sales', 'smallint', 6, '30'),
1585 ('default_dim_required', 'glsetup.dims', 'int', 11, '20'),
1586 ('pyt_discount_act', 'glsetup.purchase', 'varchar', 15, '5060'),
1587 ('creditors_act', 'glsetup.purchase', 'varchar', 15, '2100'),
1588 ('po_over_receive', 'glsetup.purchase', 'int', 11, '10'),
1589 ('po_over_charge', 'glsetup.purchase', 'int', 11, '10'),
1590 ('allow_negative_stock', 'glsetup.inventory', 'tinyint', 1, '0'),
1591 ('default_inventory_act', 'glsetup.items', 'varchar', 15, '1510'),
1592 ('default_cogs_act', 'glsetup.items', 'varchar', 15, '5010'),
1593 ('default_adj_act', 'glsetup.items', 'varchar', 15, '5040'),
1594 ('default_inv_sales_act', 'glsetup.items', 'varchar', 15, '4010'),
1595 ('default_wip_act', 'glsetup.items', 'varchar', 15, '1530'),
1596 ('default_workorder_required', 'glsetup.manuf', 'int', 11, '20'),
1597 ('version_id', 'system', 'varchar', 11, '2.5.0'),
1598 ('auto_curr_reval', 'setup.company', 'smallint', 6, '1'),
1599 ('grn_clearing_act', 'glsetup.purchase', 'varchar', 15, '1550'),
1600 ('bcc_email', 'setup.company', 'varchar', 100, ''),
1601 ('deferred_income_act', 'glsetup.sales', 'varchar', '15', '2105'),
1602 ('gl_closing_date','setup.closing_date', 'date', 8, ''),
1603 ('alternative_tax_include_on_docs','setup.company', 'tinyint', 1, '0'),
1604 ('no_zero_lines_amount','glsetup.sales', 'tinyint', 1, '1'),
1605 ('show_po_item_codes','glsetup.purchase', 'tinyint', 1, '0'),
1606 ('accounts_alpha','glsetup.general', 'tinyint', 1, '0'),
1607 ('loc_notification','glsetup.inventory', 'tinyint', 1, '0'),
1608 ('print_invoice_no','glsetup.sales', 'tinyint', 1, '0'),
1609 ('allow_negative_prices','glsetup.inventory', 'tinyint', 1, '1'),
1610 ('print_item_images_on_quote','glsetup.inventory', 'tinyint', 1, '0'),
1611 ('suppress_tax_rates','setup.company', 'tinyint', 1, '0'),
1612 ('company_logo_report','setup.company', 'tinyint', 1, '0'),
1613 ('barcodes_on_stock','setup.company', 'tinyint', 1, '0'),
1614 ('print_dialog_direct','setup.company', 'tinyint', 1, '0'),
1615 ('ref_no_auto_increase','setup.company', 'tinyint', 1, '0'),
1616 ('default_loss_on_asset_disposal_act', 'glsetup.items', 'varchar', '15', '5660'),
1617 ('depreciation_period', 'glsetup.company', 'tinyint', '1', '1'),
1618 ('use_manufacturing','setup.company', 'tinyint', 1, '1'),
1619 ('use_fixed_assets','setup.company', 'tinyint', 1, '1');
1621 -- Structure of table `0_tag_associations` --
1623 DROP TABLE IF EXISTS `0_tag_associations`;
1625 CREATE TABLE `0_tag_associations` (
1626 `record_id` varchar(15) NOT NULL,
1627 `tag_id` int(11) NOT NULL,
1628 PRIMARY KEY (`record_id`,`tag_id`)
1631 -- Data of table `0_tag_associations` --
1633 -- Structure of table `0_tags` --
1635 DROP TABLE IF EXISTS `0_tags`;
1637 CREATE TABLE `0_tags` (
1638 `id` int(11) NOT NULL AUTO_INCREMENT,
1639 `type` smallint(6) NOT NULL,
1640 `name` varchar(30) NOT NULL,
1641 `description` varchar(60) DEFAULT NULL,
1642 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1644 UNIQUE KEY `type` (`type`,`name`)
1647 -- Data of table `0_tags` --
1649 -- Structure of table `0_tax_group_items` --
1651 DROP TABLE IF EXISTS `0_tax_group_items`;
1653 CREATE TABLE `0_tax_group_items` (
1654 `tax_group_id` int(11) NOT NULL DEFAULT '0',
1655 `tax_type_id` int(11) NOT NULL DEFAULT '0',
1656 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1659 -- Data of table `0_tax_group_items` --
1661 INSERT INTO `0_tax_group_items` VALUES
1664 -- Structure of table `0_tax_groups` --
1666 DROP TABLE IF EXISTS `0_tax_groups`;
1668 CREATE TABLE `0_tax_groups` (
1669 `id` int(11) NOT NULL AUTO_INCREMENT,
1670 `name` varchar(60) NOT NULL DEFAULT '',
1671 `tax_area` tinyint(1) NOT NULL DEFAULT '0',
1672 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1674 UNIQUE KEY `name` (`name`)
1675 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1677 -- Data of table `0_tax_groups` --
1679 INSERT INTO `0_tax_groups` VALUES
1680 ('1', 'Tax', '0', '0'),
1681 ('2', 'Export/Import', '1', '0');
1683 -- Structure of table `0_tax_types` --
1685 DROP TABLE IF EXISTS `0_tax_types`;
1687 CREATE TABLE `0_tax_types` (
1688 `id` int(11) NOT NULL AUTO_INCREMENT,
1689 `rate` double NOT NULL DEFAULT '0',
1690 `sales_gl_code` varchar(15) NOT NULL DEFAULT '',
1691 `purchasing_gl_code` varchar(15) NOT NULL DEFAULT '',
1692 `name` varchar(60) NOT NULL DEFAULT '',
1693 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1695 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1697 -- Data of table `0_tax_types` --
1699 INSERT INTO `0_tax_types` VALUES
1700 ('1', '5', '2150', '2150', 'Tax', '0');
1702 -- Structure of table `0_trans_tax_details` --
1704 DROP TABLE IF EXISTS `0_trans_tax_details`;
1706 CREATE TABLE `0_trans_tax_details` (
1707 `id` int(11) NOT NULL AUTO_INCREMENT,
1708 `trans_type` smallint(6) DEFAULT NULL,
1709 `trans_no` int(11) DEFAULT NULL,
1710 `tran_date` date NOT NULL,
1711 `tax_type_id` int(11) NOT NULL DEFAULT '0',
1712 `rate` double NOT NULL DEFAULT '0',
1713 `ex_rate` double NOT NULL DEFAULT '1',
1714 `included_in_price` tinyint(1) NOT NULL DEFAULT '0',
1715 `net_amount` double NOT NULL DEFAULT '0',
1716 `amount` double NOT NULL DEFAULT '0',
1718 `reg_type` tinyint(1) DEFAULT NULL,
1719 `vat_category` int(11) NOT NULL DEFAULT '0',
1720 `tax_group_id` tinyint(2) DEFAULT NULL,
1722 KEY `Type_and_Number` (`trans_type`,`trans_no`),
1723 KEY `tran_date` (`tran_date`)
1726 -- Data of table `0_trans_tax_details` --
1728 -- Structure of table `0_useronline` --
1730 DROP TABLE IF EXISTS `0_useronline`;
1732 CREATE TABLE `0_useronline` (
1733 `id` int(11) NOT NULL AUTO_INCREMENT,
1734 `timestamp` int(15) NOT NULL DEFAULT '0',
1735 `ip` varchar(40) NOT NULL DEFAULT '',
1736 `file` varchar(100) NOT NULL DEFAULT '',
1738 KEY `timestamp` (`timestamp`),
1742 -- Data of table `0_useronline` --
1745 -- Structure of table `0_users` --
1747 DROP TABLE IF EXISTS `0_users`;
1749 CREATE TABLE `0_users` (
1750 `id` smallint(6) NOT NULL AUTO_INCREMENT,
1751 `user_id` varchar(60) NOT NULL DEFAULT '',
1752 `password` varchar(100) NOT NULL DEFAULT '',
1753 `real_name` varchar(100) NOT NULL DEFAULT '',
1754 `role_id` int(11) NOT NULL DEFAULT '1',
1755 `phone` varchar(30) NOT NULL DEFAULT '',
1756 `email` varchar(100) DEFAULT NULL,
1757 `language` varchar(20) DEFAULT NULL,
1758 `date_format` tinyint(1) NOT NULL DEFAULT '0',
1759 `date_sep` tinyint(1) NOT NULL DEFAULT '0',
1760 `tho_sep` tinyint(1) NOT NULL DEFAULT '0',
1761 `dec_sep` tinyint(1) NOT NULL DEFAULT '0',
1762 `theme` varchar(20) NOT NULL DEFAULT 'default',
1763 `page_size` varchar(20) NOT NULL DEFAULT 'A4',
1764 `prices_dec` smallint(6) NOT NULL DEFAULT '2',
1765 `qty_dec` smallint(6) NOT NULL DEFAULT '2',
1766 `rates_dec` smallint(6) NOT NULL DEFAULT '4',
1767 `percent_dec` smallint(6) NOT NULL DEFAULT '1',
1768 `show_gl` tinyint(1) NOT NULL DEFAULT '1',
1769 `show_codes` tinyint(1) NOT NULL DEFAULT '0',
1770 `show_hints` tinyint(1) NOT NULL DEFAULT '0',
1771 `last_visit_date` datetime DEFAULT NULL,
1772 `query_size` tinyint(1) unsigned NOT NULL DEFAULT '10',
1773 `graphic_links` tinyint(1) DEFAULT '1',
1774 `pos` smallint(6) DEFAULT '1',
1775 `print_profile` varchar(30) NOT NULL DEFAULT '',
1776 `rep_popup` tinyint(1) DEFAULT '1',
1777 `sticky_doc_date` tinyint(1) DEFAULT '0',
1778 `startup_tab` varchar(20) NOT NULL DEFAULT '',
1779 `transaction_days` smallint(6) NOT NULL DEFAULT '30',
1780 `save_report_selections` smallint(6) NOT NULL DEFAULT '0',
1781 `use_date_picker` tinyint(1) NOT NULL DEFAULT '1',
1782 `def_print_destination` tinyint(1) NOT NULL DEFAULT '0',
1783 `def_print_orientation` tinyint(1) NOT NULL DEFAULT '0',
1784 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1786 UNIQUE KEY `user_id` (`user_id`)
1787 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1789 -- Data of table `0_users` --
1791 INSERT INTO `0_users` VALUES
1792 ('1', 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', '2', '', 'adm@example.com', 'C', '0', '0', '0', '0', 'default', 'Letter', '2', '2', '4', '1', '1', '0', '0', '2018-05-07 13:58:33', '10', '1', '1', '1', '1', '0', 'orders', '30', '0', '1', '0', '0', '0');
1794 -- Structure of table `0_voided` --
1796 DROP TABLE IF EXISTS `0_voided`;
1798 CREATE TABLE `0_voided` (
1799 `type` int(11) NOT NULL DEFAULT '0',
1800 `id` int(11) NOT NULL DEFAULT '0',
1801 `date_` date NOT NULL DEFAULT '0000-00-00',
1802 `memo_` tinytext NOT NULL,
1803 UNIQUE KEY `id` (`type`,`id`)
1806 -- Data of table `0_voided` --
1809 -- Structure of table `0_wo_costing` --
1811 DROP TABLE IF EXISTS `0_wo_costing`;
1813 CREATE TABLE `0_wo_costing` (
1814 `id` int(11) NOT NULL AUTO_INCREMENT,
1815 `workorder_id` int(11) NOT NULL DEFAULT '0',
1816 `cost_type` tinyint(1) NOT NULL DEFAULT '0',
1817 `trans_type` int(11) NOT NULL DEFAULT '0',
1818 `trans_no` int(11) NOT NULL DEFAULT '0',
1819 `factor` double NOT NULL DEFAULT '1',
1823 -- Data of table `0_wo_costing` --
1825 -- Structure of table `0_wo_issue_items` --
1827 DROP TABLE IF EXISTS `0_wo_issue_items`;
1829 CREATE TABLE `0_wo_issue_items` (
1830 `id` int(11) NOT NULL AUTO_INCREMENT,
1831 `stock_id` varchar(40) DEFAULT NULL,
1832 `issue_id` int(11) DEFAULT NULL,
1833 `qty_issued` double DEFAULT NULL,
1834 `unit_cost` double NOT NULL DEFAULT '0',
1838 -- Data of table `0_wo_issue_items` --
1841 -- Structure of table `0_wo_issues` --
1843 DROP TABLE IF EXISTS `0_wo_issues`;
1845 CREATE TABLE `0_wo_issues` (
1846 `issue_no` int(11) NOT NULL AUTO_INCREMENT,
1847 `workorder_id` int(11) NOT NULL DEFAULT '0',
1848 `reference` varchar(100) DEFAULT NULL,
1849 `issue_date` date DEFAULT NULL,
1850 `loc_code` varchar(5) DEFAULT NULL,
1851 `workcentre_id` int(11) DEFAULT NULL,
1852 PRIMARY KEY (`issue_no`),
1853 KEY `workorder_id` (`workorder_id`)
1856 -- Data of table `0_wo_issues` --
1858 -- Structure of table `0_wo_manufacture` --
1860 DROP TABLE IF EXISTS `0_wo_manufacture`;
1862 CREATE TABLE `0_wo_manufacture` (
1863 `id` int(11) NOT NULL AUTO_INCREMENT,
1864 `reference` varchar(100) DEFAULT NULL,
1865 `workorder_id` int(11) NOT NULL DEFAULT '0',
1866 `quantity` double NOT NULL DEFAULT '0',
1867 `date_` date NOT NULL DEFAULT '0000-00-00',
1869 KEY `workorder_id` (`workorder_id`)
1872 -- Data of table `0_wo_manufacture` --
1874 -- Structure of table `0_wo_requirements` --
1876 DROP TABLE IF EXISTS `0_wo_requirements`;
1878 CREATE TABLE `0_wo_requirements` (
1879 `id` int(11) NOT NULL AUTO_INCREMENT,
1880 `workorder_id` int(11) NOT NULL DEFAULT '0',
1881 `stock_id` char(20) NOT NULL DEFAULT '',
1882 `workcentre` int(11) NOT NULL DEFAULT '0',
1883 `units_req` double NOT NULL DEFAULT '1',
1884 `unit_cost` double NOT NULL DEFAULT '0',
1885 `loc_code` char(5) NOT NULL DEFAULT '',
1886 `units_issued` double NOT NULL DEFAULT '0',
1888 KEY `workorder_id` (`workorder_id`)
1891 -- Data of table `0_wo_requirements` --
1893 -- Structure of table `0_workcentres` --
1895 DROP TABLE IF EXISTS `0_workcentres`;
1897 CREATE TABLE `0_workcentres` (
1898 `id` int(11) NOT NULL AUTO_INCREMENT,
1899 `name` char(40) NOT NULL DEFAULT '',
1900 `description` char(50) NOT NULL DEFAULT '',
1901 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1903 UNIQUE KEY `name` (`name`)
1904 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1906 -- Data of table `0_workcentres` --
1908 INSERT INTO `0_workcentres` VALUES
1909 ('1', 'Work Centre', '', '0');
1911 -- Structure of table `0_workorders` --
1913 DROP TABLE IF EXISTS `0_workorders`;
1915 CREATE TABLE `0_workorders` (
1916 `id` int(11) NOT NULL AUTO_INCREMENT,
1917 `wo_ref` varchar(60) NOT NULL DEFAULT '',
1918 `loc_code` varchar(5) NOT NULL DEFAULT '',
1919 `units_reqd` double NOT NULL DEFAULT '1',
1920 `stock_id` varchar(20) NOT NULL DEFAULT '',
1921 `date_` date NOT NULL DEFAULT '0000-00-00',
1922 `type` tinyint(4) NOT NULL DEFAULT '0',
1923 `required_by` date NOT NULL DEFAULT '0000-00-00',
1924 `released_date` date NOT NULL DEFAULT '0000-00-00',
1925 `units_issued` double NOT NULL DEFAULT '0',
1926 `closed` tinyint(1) NOT NULL DEFAULT '0',
1927 `released` tinyint(1) NOT NULL DEFAULT '0',
1929 KEY `wo_ref` (`wo_ref`)
1932 -- Data of table `0_workorders` --