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 `dimension_id` int(11) NOT NULL DEFAULT '0',
115 `dimension2_id` int(11) NOT NULL DEFAULT '0',
116 `person_type_id` int(11) NOT NULL DEFAULT '0',
117 `person_id` tinyblob,
118 `reconciled` date DEFAULT NULL,
120 KEY `bank_act` (`bank_act`,`ref`),
121 KEY `type` (`type`,`trans_no`),
122 KEY `bank_act_2` (`bank_act`,`reconciled`),
123 KEY `bank_act_3` (`bank_act`,`trans_date`)
126 -- Data of table `0_bank_trans` --
128 -- Structure of table `0_bom` --
130 DROP TABLE IF EXISTS `0_bom`;
132 CREATE TABLE `0_bom` (
133 `id` int(11) NOT NULL AUTO_INCREMENT,
134 `parent` char(20) NOT NULL DEFAULT '',
135 `component` char(20) NOT NULL DEFAULT '',
136 `workcentre_added` int(11) NOT NULL DEFAULT '0',
137 `loc_code` char(5) NOT NULL DEFAULT '',
138 `quantity` double NOT NULL DEFAULT '1',
139 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
140 KEY `component` (`component`),
142 KEY `loc_code` (`loc_code`),
143 KEY `parent` (`parent`,`loc_code`),
144 KEY `workcentre_added` (`workcentre_added`)
147 -- Data of table `0_bom` --
149 -- Structure of table `0_budget_trans` --
151 DROP TABLE IF EXISTS `0_budget_trans`;
153 CREATE TABLE `0_budget_trans` (
154 `id` int(11) NOT NULL AUTO_INCREMENT,
155 `tran_date` date NOT NULL DEFAULT '0000-00-00',
156 `account` varchar(15) NOT NULL DEFAULT '',
157 `memo_` tinytext NOT NULL,
158 `amount` double NOT NULL DEFAULT '0',
159 `dimension_id` int(11) DEFAULT '0',
160 `dimension2_id` int(11) DEFAULT '0',
162 KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`)
165 -- Data of table `0_budget_trans` --
167 -- Structure of table `0_chart_class` --
169 DROP TABLE IF EXISTS `0_chart_class`;
171 CREATE TABLE `0_chart_class` (
172 `cid` varchar(3) NOT NULL,
173 `class_name` varchar(60) NOT NULL DEFAULT '',
174 `ctype` tinyint(1) NOT NULL DEFAULT '0',
175 `inactive` tinyint(1) NOT NULL DEFAULT '0',
179 -- Data of table `0_chart_class` --
181 INSERT INTO `0_chart_class` VALUES
182 ('1', 'Assets', '1', '0'),
183 ('2', 'Liabilities', '2', '0'),
184 ('3', 'Income', '4', '0'),
185 ('4', 'Costs', '6', '0');
187 -- Structure of table `0_chart_master` --
189 DROP TABLE IF EXISTS `0_chart_master`;
191 CREATE TABLE `0_chart_master` (
192 `account_code` varchar(15) NOT NULL DEFAULT '',
193 `account_code2` varchar(15) NOT NULL DEFAULT '',
194 `account_name` varchar(60) NOT NULL DEFAULT '',
195 `account_type` varchar(10) NOT NULL DEFAULT '0',
196 `inactive` tinyint(1) NOT NULL DEFAULT '0',
197 PRIMARY KEY (`account_code`),
198 KEY `account_name` (`account_name`),
199 KEY `accounts_by_type` (`account_type`,`account_code`)
202 -- Data of table `0_chart_master` --
204 INSERT INTO `0_chart_master` VALUES
205 ('1060', '', 'Checking Account', '1', '0'),
206 ('1065', '', 'Petty Cash', '1', '0'),
207 ('1200', '', 'Accounts Receivables', '1', '0'),
208 ('1205', '', 'Allowance for doubtful accounts', '1', '0'),
209 ('1510', '', 'Inventory', '2', '0'),
210 ('1520', '', 'Stocks of Raw Materials', '2', '0'),
211 ('1530', '', 'Stocks of Work In Progress', '2', '0'),
212 ('1540', '', 'Stocks of Finished Goods', '2', '0'),
213 ('1550', '', 'Goods Received Clearing account', '2', '0'),
214 ('1820', '', 'Office Furniture & Equipment', '3', '0'),
215 ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0'),
216 ('1840', '', 'Vehicle', '3', '0'),
217 ('1845', '', 'Accum. Amort. -Vehicle', '3', '0'),
218 ('2100', '', 'Accounts Payable', '4', '0'),
219 ('2105', '', 'Deferred Income', '4', '0'),
220 ('2110', '', 'Accrued Income Tax - Federal', '4', '0'),
221 ('2120', '', 'Accrued Income Tax - State', '4', '0'),
222 ('2130', '', 'Accrued Franchise Tax', '4', '0'),
223 ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0'),
224 ('2150', '', 'Sales Tax', '4', '0'),
225 ('2160', '', 'Accrued Use Tax Payable', '4', '0'),
226 ('2210', '', 'Accrued Wages', '4', '0'),
227 ('2220', '', 'Accrued Comp Time', '4', '0'),
228 ('2230', '', 'Accrued Holiday Pay', '4', '0'),
229 ('2240', '', 'Accrued Vacation Pay', '4', '0'),
230 ('2310', '', 'Accr. Benefits - 401K', '4', '0'),
231 ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0'),
232 ('2330', '', 'Accr. Benefits - Med, Den', '4', '0'),
233 ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0'),
234 ('2350', '', 'Accr. Benefits - Credit Union', '4', '0'),
235 ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0'),
236 ('2370', '', 'Accr. Benefits - Garnish', '4', '0'),
237 ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0'),
238 ('2620', '', 'Bank Loans', '5', '0'),
239 ('2680', '', 'Loans from Shareholders', '5', '0'),
240 ('3350', '', 'Common Shares', '6', '0'),
241 ('3590', '', 'Retained Earnings - prior years', '7', '0'),
242 ('4010', '', 'Sales', '8', '0'),
243 ('4430', '', 'Shipping & Handling', '9', '0'),
244 ('4440', '', 'Interest', '9', '0'),
245 ('4450', '', 'Foreign Exchange Gain', '9', '0'),
246 ('4500', '', 'Prompt Payment Discounts', '9', '0'),
247 ('4510', '', 'Discounts Given', '9', '0'),
248 ('5010', '', 'Cost of Goods Sold - Retail', '10', '0'),
249 ('5020', '', 'Material Usage Varaiance', '10', '0'),
250 ('5030', '', 'Consumable Materials', '10', '0'),
251 ('5040', '', 'Purchase price Variance', '10', '0'),
252 ('5050', '', 'Purchases of materials', '10', '0'),
253 ('5060', '', 'Discounts Received', '10', '0'),
254 ('5100', '', 'Freight', '10', '0'),
255 ('5410', '', 'Wages & Salaries', '11', '0'),
256 ('5420', '', 'Wages - Overtime', '11', '0'),
257 ('5430', '', 'Benefits - Comp Time', '11', '0'),
258 ('5440', '', 'Benefits - Payroll Taxes', '11', '0'),
259 ('5450', '', 'Benefits - Workers Comp', '11', '0'),
260 ('5460', '', 'Benefits - Pension', '11', '0'),
261 ('5470', '', 'Benefits - General Benefits', '11', '0'),
262 ('5510', '', 'Inc Tax Exp - Federal', '11', '0'),
263 ('5520', '', 'Inc Tax Exp - State', '11', '0'),
264 ('5530', '', 'Taxes - Real Estate', '11', '0'),
265 ('5540', '', 'Taxes - Personal Property', '11', '0'),
266 ('5550', '', 'Taxes - Franchise', '11', '0'),
267 ('5560', '', 'Taxes - Foreign Withholding', '11', '0'),
268 ('5610', '', 'Accounting & Legal', '12', '0'),
269 ('5615', '', 'Advertising & Promotions', '12', '0'),
270 ('5620', '', 'Bad Debts', '12', '0'),
271 ('5660', '', 'Amortization Expense', '12', '0'),
272 ('5685', '', 'Insurance', '12', '0'),
273 ('5690', '', 'Interest & Bank Charges', '12', '0'),
274 ('5700', '', 'Office Supplies', '12', '0'),
275 ('5760', '', 'Rent', '12', '0'),
276 ('5765', '', 'Repair & Maintenance', '12', '0'),
277 ('5780', '', 'Telephone', '12', '0'),
278 ('5785', '', 'Travel & Entertainment', '12', '0'),
279 ('5790', '', 'Utilities', '12', '0'),
280 ('5795', '', 'Registrations', '12', '0'),
281 ('5800', '', 'Licenses', '12', '0'),
282 ('5810', '', 'Foreign Exchange Loss', '12', '0'),
283 ('9990', '', 'Year Profit/Loss', '12', '0');
285 -- Structure of table `0_chart_types` --
287 DROP TABLE IF EXISTS `0_chart_types`;
289 CREATE TABLE `0_chart_types` (
290 `id` varchar(10) NOT NULL,
291 `name` varchar(60) NOT NULL DEFAULT '',
292 `class_id` varchar(3) NOT NULL DEFAULT '',
293 `parent` varchar(10) NOT NULL DEFAULT '-1',
294 `inactive` tinyint(1) NOT NULL DEFAULT '0',
297 KEY `class_id` (`class_id`)
300 -- Data of table `0_chart_types` --
302 INSERT INTO `0_chart_types` VALUES
303 ('1', 'Current Assets', '1', '', '0'),
304 ('2', 'Inventory Assets', '1', '', '0'),
305 ('3', 'Capital Assets', '1', '', '0'),
306 ('4', 'Current Liabilities', '2', '', '0'),
307 ('5', 'Long Term Liabilities', '2', '', '0'),
308 ('6', 'Share Capital', '2', '', '0'),
309 ('7', 'Retained Earnings', '2', '', '0'),
310 ('8', 'Sales Revenue', '3', '', '0'),
311 ('9', 'Other Revenue', '3', '', '0'),
312 ('10', 'Cost of Goods Sold', '4', '', '0'),
313 ('11', 'Payroll Expenses', '4', '', '0'),
314 ('12', 'General & Administrative expenses', '4', '', '0');
316 -- Structure of table `0_comments` --
318 DROP TABLE IF EXISTS `0_comments`;
320 CREATE TABLE `0_comments` (
321 `type` int(11) NOT NULL DEFAULT '0',
322 `id` int(11) NOT NULL DEFAULT '0',
323 `date_` date DEFAULT '0000-00-00',
325 KEY `type_and_id` (`type`,`id`)
328 -- Data of table `0_comments` --
330 -- Structure of table `0_credit_status` --
332 DROP TABLE IF EXISTS `0_credit_status`;
334 CREATE TABLE `0_credit_status` (
335 `id` int(11) NOT NULL AUTO_INCREMENT,
336 `reason_description` char(100) NOT NULL DEFAULT '',
337 `dissallow_invoices` tinyint(1) NOT NULL DEFAULT '0',
338 `inactive` tinyint(1) NOT NULL DEFAULT '0',
340 UNIQUE KEY `reason_description` (`reason_description`)
341 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
343 -- Data of table `0_credit_status` --
345 INSERT INTO `0_credit_status` VALUES
346 ('1', 'Good History', '0', '0'),
347 ('3', 'No more work until payment received', '1', '0'),
348 ('4', 'In liquidation', '1', '0');
350 -- Structure of table `0_crm_categories` --
352 DROP TABLE IF EXISTS `0_crm_categories`;
354 CREATE TABLE `0_crm_categories` (
355 `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pure technical key',
356 `type` varchar(20) NOT NULL COMMENT 'contact type e.g. customer',
357 `action` varchar(20) NOT NULL COMMENT 'detailed usage e.g. department',
358 `name` varchar(30) NOT NULL COMMENT 'for category selector',
359 `description` tinytext NOT NULL COMMENT 'usage description',
360 `system` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'nonzero for core system usage',
361 `inactive` tinyint(1) NOT NULL DEFAULT '0',
363 UNIQUE KEY `type` (`type`,`action`),
364 UNIQUE KEY `type_2` (`type`,`name`)
365 ) ENGINE=InnoDB AUTO_INCREMENT=13 ;
367 -- Data of table `0_crm_categories` --
369 INSERT INTO `0_crm_categories` VALUES
370 ('1', 'cust_branch', 'general', 'General', 'General contact data for customer branch (overrides company setting)', '1', '0'),
371 ('2', 'cust_branch', 'invoice', 'Invoices', 'Invoice posting (overrides company setting)', '1', '0'),
372 ('3', 'cust_branch', 'order', 'Orders', 'Order confirmation (overrides company setting)', '1', '0'),
373 ('4', 'cust_branch', 'delivery', 'Deliveries', 'Delivery coordination (overrides company setting)', '1', '0'),
374 ('5', 'customer', 'general', 'General', 'General contact data for customer', '1', '0'),
375 ('6', 'customer', 'order', 'Orders', 'Order confirmation', '1', '0'),
376 ('7', 'customer', 'delivery', 'Deliveries', 'Delivery coordination', '1', '0'),
377 ('8', 'customer', 'invoice', 'Invoices', 'Invoice posting', '1', '0'),
378 ('9', 'supplier', 'general', 'General', 'General contact data for supplier', '1', '0'),
379 ('10', 'supplier', 'order', 'Orders', 'Order confirmation', '1', '0'),
380 ('11', 'supplier', 'delivery', 'Deliveries', 'Delivery coordination', '1', '0'),
381 ('12', 'supplier', 'invoice', 'Invoices', 'Invoice posting', '1', '0');
383 -- Structure of table `0_crm_contacts` --
385 DROP TABLE IF EXISTS `0_crm_contacts`;
387 CREATE TABLE `0_crm_contacts` (
388 `id` int(11) NOT NULL AUTO_INCREMENT,
389 `person_id` int(11) NOT NULL DEFAULT '0' COMMENT 'foreign key to crm_persons',
390 `type` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
391 `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
392 `entity_id` varchar(11) DEFAULT NULL COMMENT 'entity id in related class table',
394 KEY `type` (`type`,`action`)
397 -- Data of table `0_crm_contacts` --
399 -- Structure of table `0_crm_persons` --
401 DROP TABLE IF EXISTS `0_crm_persons`;
403 CREATE TABLE `0_crm_persons` (
404 `id` int(11) NOT NULL AUTO_INCREMENT,
405 `ref` varchar(30) NOT NULL,
406 `name` varchar(60) NOT NULL,
407 `name2` varchar(60) DEFAULT NULL,
409 `phone` varchar(30) DEFAULT NULL,
410 `phone2` varchar(30) DEFAULT NULL,
411 `fax` varchar(30) DEFAULT NULL,
412 `email` varchar(100) DEFAULT NULL,
413 `lang` char(5) DEFAULT NULL,
414 `notes` tinytext NOT NULL,
415 `inactive` tinyint(1) NOT NULL DEFAULT '0',
420 -- Data of table `0_crm_persons` --
422 -- Structure of table `0_currencies` --
424 DROP TABLE IF EXISTS `0_currencies`;
426 CREATE TABLE `0_currencies` (
427 `currency` varchar(60) NOT NULL DEFAULT '',
428 `curr_abrev` char(3) NOT NULL DEFAULT '',
429 `curr_symbol` varchar(10) NOT NULL DEFAULT '',
430 `country` varchar(100) NOT NULL DEFAULT '',
431 `hundreds_name` varchar(15) NOT NULL DEFAULT '',
432 `auto_update` tinyint(1) NOT NULL DEFAULT '1',
433 `inactive` tinyint(1) NOT NULL DEFAULT '0',
434 PRIMARY KEY (`curr_abrev`)
437 -- Data of table `0_currencies` --
439 INSERT INTO `0_currencies` VALUES
440 ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0'),
441 ('Euro', 'EUR', '€', 'Europe', 'Cents', '1', '0'),
442 ('Pounds', 'GBP', '£', 'England', 'Pence', '1', '0'),
443 ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0');
445 -- Structure of table `0_cust_allocations` --
447 DROP TABLE IF EXISTS `0_cust_allocations`;
449 CREATE TABLE `0_cust_allocations` (
450 `id` int(11) NOT NULL AUTO_INCREMENT,
451 `person_id` int(11) DEFAULT NULL,
452 `amt` double unsigned DEFAULT NULL,
453 `discount` double unsigned DEFAULT '0',
454 `date_alloc` date NOT NULL DEFAULT '0000-00-00',
455 `trans_no_from` int(11) DEFAULT NULL,
456 `trans_type_from` int(11) DEFAULT NULL,
457 `trans_no_to` int(11) DEFAULT NULL,
458 `trans_type_to` int(11) DEFAULT NULL,
460 UNIQUE KEY `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
461 KEY `From` (`trans_type_from`,`trans_no_from`),
462 KEY `To` (`trans_type_to`,`trans_no_to`)
465 -- Data of table `0_cust_allocations` --
467 -- Structure of table `0_cust_branch` --
469 DROP TABLE IF EXISTS `0_cust_branch`;
471 CREATE TABLE `0_cust_branch` (
472 `branch_code` int(11) NOT NULL AUTO_INCREMENT,
473 `debtor_no` int(11) NOT NULL DEFAULT '0',
474 `br_name` varchar(60) NOT NULL DEFAULT '',
475 `branch_ref` varchar(30) NOT NULL DEFAULT '',
476 `br_address` tinytext NOT NULL,
477 `area` int(11) DEFAULT NULL,
478 `salesman` int(11) NOT NULL DEFAULT '0',
479 `default_location` varchar(5) NOT NULL DEFAULT '',
480 `tax_group_id` int(11) DEFAULT NULL,
481 `sales_account` varchar(15) NOT NULL DEFAULT '',
482 `sales_discount_account` varchar(15) NOT NULL DEFAULT '',
483 `receivables_account` varchar(15) NOT NULL DEFAULT '',
484 `payment_discount_account` varchar(15) NOT NULL DEFAULT '',
485 `default_ship_via` varchar(20) NOT NULL DEFAULT '',
486 `br_post_address` tinytext NOT NULL,
487 `group_no` int(11) NOT NULL DEFAULT '0',
488 `notes` tinytext NOT NULL,
489 `bank_account` varchar(60) DEFAULT NULL,
490 `inactive` tinyint(1) NOT NULL DEFAULT '0',
491 PRIMARY KEY (`branch_code`,`debtor_no`),
492 KEY `branch_ref` (`branch_ref`),
493 KEY `group_no` (`group_no`)
496 -- Data of table `0_cust_branch` --
498 DROP TABLE IF EXISTS `0_sql_trail`;
499 CREATE TABLE `0_db_trail` (
500 `id` int(11) NOT NULL AUTO_INCREMENT,
501 `stamp` timestamp DEFAULT CURRENT_TIMESTAMP,
502 `user` tinyint(3) unsigned NOT NULL DEFAULT '0',
503 `msg` varchar(255) DEFAULT '',
504 `entry` varchar(255) DEFAULT '',
505 `data` text DEFAULT NULL,
509 -- Structure of table `0_debtor_trans` --
511 DROP TABLE IF EXISTS `0_debtor_trans`;
513 CREATE TABLE `0_debtor_trans` (
514 `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
515 `type` smallint(6) unsigned NOT NULL DEFAULT '0',
516 `version` tinyint(1) unsigned NOT NULL DEFAULT '0',
517 `debtor_no` int(11) unsigned NOT NULL,
518 `branch_code` int(11) NOT NULL DEFAULT '-1',
519 `tran_date` date NOT NULL DEFAULT '0000-00-00',
520 `due_date` date NOT NULL DEFAULT '0000-00-00',
521 `reference` varchar(60) NOT NULL DEFAULT '',
522 `tpe` int(11) NOT NULL DEFAULT '0',
523 `order_` int(11) NOT NULL DEFAULT '0',
524 `ov_amount` double NOT NULL DEFAULT '0',
525 `ov_gst` double NOT NULL DEFAULT '0',
526 `ov_freight` double NOT NULL DEFAULT '0',
527 `ov_freight_tax` double NOT NULL DEFAULT '0',
528 `ov_discount` double NOT NULL DEFAULT '0',
529 `alloc` double NOT NULL DEFAULT '0',
530 `prep_amount` double NOT NULL DEFAULT '0',
531 `rate` double NOT NULL DEFAULT '1',
532 `ship_via` varchar(20) NOT NULL DEFAULT '',
533 `dimension_id` int(11) NOT NULL DEFAULT '0',
534 `dimension2_id` int(11) NOT NULL DEFAULT '0',
535 `payment_terms` int(11) DEFAULT NULL,
536 `tax_included` tinyint(1) unsigned NOT NULL DEFAULT '0',
537 PRIMARY KEY (`type`,`trans_no`,`debtor_no`),
538 KEY `debtor_no` (`debtor_no`,`branch_code`),
539 KEY `tran_date` (`tran_date`),
540 KEY `order_` (`order_`)
543 -- Data of table `0_debtor_trans` --
545 -- Structure of table `0_debtor_trans_details` --
547 DROP TABLE IF EXISTS `0_debtor_trans_details`;
549 CREATE TABLE `0_debtor_trans_details` (
550 `id` int(11) NOT NULL AUTO_INCREMENT,
551 `debtor_trans_no` int(11) DEFAULT NULL,
552 `debtor_trans_type` int(11) DEFAULT NULL,
553 `stock_id` varchar(20) NOT NULL DEFAULT '',
554 `description` tinytext,
555 `unit_price` double NOT NULL DEFAULT '0',
556 `unit_tax` double NOT NULL DEFAULT '0',
557 `quantity` double NOT NULL DEFAULT '0',
558 `discount_percent` double NOT NULL DEFAULT '0',
559 `unit_cost` double NOT NULL DEFAULT '0',
560 `qty_done` double NOT NULL DEFAULT '0',
561 `src_id` int(11) NOT NULL,
563 KEY `Transaction` (`debtor_trans_type`,`debtor_trans_no`),
564 KEY `src_id` (`src_id`)
567 -- Data of table `0_debtor_trans_details` --
569 -- Structure of table `0_debtors_master` --
571 DROP TABLE IF EXISTS `0_debtors_master`;
573 CREATE TABLE `0_debtors_master` (
574 `debtor_no` int(11) NOT NULL AUTO_INCREMENT,
575 `name` varchar(100) NOT NULL DEFAULT '',
576 `debtor_ref` varchar(30) NOT NULL,
578 `tax_id` varchar(55) NOT NULL DEFAULT '',
579 `curr_code` char(3) NOT NULL DEFAULT '',
580 `sales_type` int(11) NOT NULL DEFAULT '1',
581 `dimension_id` int(11) NOT NULL DEFAULT '0',
582 `dimension2_id` int(11) NOT NULL DEFAULT '0',
583 `credit_status` int(11) NOT NULL DEFAULT '0',
584 `payment_terms` int(11) DEFAULT NULL,
585 `discount` double NOT NULL DEFAULT '0',
586 `credit_limit` float NOT NULL DEFAULT '1000',
587 `notes` tinytext NOT NULL,
588 `inactive` tinyint(1) NOT NULL DEFAULT '0',
589 PRIMARY KEY (`debtor_no`),
590 UNIQUE KEY `debtor_ref` (`debtor_ref`),
594 -- Data of table `0_debtors_master` --
596 -- Structure of table `0_dimensions` --
598 DROP TABLE IF EXISTS `0_dimensions`;
600 CREATE TABLE `0_dimensions` (
601 `id` int(11) NOT NULL AUTO_INCREMENT,
602 `reference` varchar(60) NOT NULL DEFAULT '',
603 `name` varchar(60) NOT NULL DEFAULT '',
604 `type_` tinyint(1) NOT NULL DEFAULT '1',
605 `closed` tinyint(1) NOT NULL DEFAULT '0',
606 `date_` date NOT NULL DEFAULT '0000-00-00',
607 `due_date` date NOT NULL DEFAULT '0000-00-00',
609 UNIQUE KEY `reference` (`reference`),
610 KEY `date_` (`date_`),
611 KEY `due_date` (`due_date`),
612 KEY `type_` (`type_`)
615 -- Data of table `0_dimensions` --
617 -- Structure of table `0_exchange_rates` --
619 DROP TABLE IF EXISTS `0_exchange_rates`;
621 CREATE TABLE `0_exchange_rates` (
622 `id` int(11) NOT NULL AUTO_INCREMENT,
623 `curr_code` char(3) NOT NULL DEFAULT '',
624 `rate_buy` double NOT NULL DEFAULT '0',
625 `rate_sell` double NOT NULL DEFAULT '0',
626 `date_` date NOT NULL DEFAULT '0000-00-00',
628 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
631 -- Data of table `0_exchange_rates` --
633 -- Structure of table `0_fiscal_year` --
635 DROP TABLE IF EXISTS `0_fiscal_year`;
637 CREATE TABLE `0_fiscal_year` (
638 `id` int(11) NOT NULL AUTO_INCREMENT,
639 `begin` date DEFAULT '0000-00-00',
640 `end` date DEFAULT '0000-00-00',
641 `closed` tinyint(1) NOT NULL DEFAULT '0',
643 UNIQUE KEY `begin` (`begin`),
644 UNIQUE KEY `end` (`end`)
645 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
647 -- Data of table `0_fiscal_year` --
649 INSERT INTO `0_fiscal_year` VALUES
650 ('1', '2018-01-01', '2018-12-31', '1');
652 -- Structure of table `0_gl_trans` --
654 DROP TABLE IF EXISTS `0_gl_trans`;
656 CREATE TABLE `0_gl_trans` (
657 `counter` int(11) NOT NULL AUTO_INCREMENT,
658 `type` smallint(6) NOT NULL DEFAULT '0',
659 `type_no` int(11) NOT NULL DEFAULT '0',
660 `tran_date` date NOT NULL DEFAULT '0000-00-00',
661 `account` varchar(15) NOT NULL DEFAULT '',
662 `memo_` tinytext NOT NULL,
663 `amount` double NOT NULL DEFAULT '0',
664 `dimension_id` int(11) NOT NULL DEFAULT '0',
665 `dimension2_id` int(11) NOT NULL DEFAULT '0',
666 `person_type_id` int(11) DEFAULT NULL,
667 `person_id` tinyblob,
668 PRIMARY KEY (`counter`),
669 KEY `Type_and_Number` (`type`,`type_no`),
670 KEY `dimension_id` (`dimension_id`),
671 KEY `dimension2_id` (`dimension2_id`),
672 KEY `tran_date` (`tran_date`),
673 KEY `account_and_tran_date` (`account`,`tran_date`)
676 -- Data of table `0_gl_trans` --
678 -- Structure of table `0_grn_batch` --
680 DROP TABLE IF EXISTS `0_grn_batch`;
682 CREATE TABLE `0_grn_batch` (
683 `id` int(11) NOT NULL AUTO_INCREMENT,
684 `supplier_id` int(11) NOT NULL DEFAULT '0',
685 `purch_order_no` int(11) DEFAULT NULL,
686 `reference` varchar(60) NOT NULL DEFAULT '',
687 `delivery_date` date NOT NULL DEFAULT '0000-00-00',
688 `loc_code` varchar(5) DEFAULT NULL,
689 `rate` double DEFAULT '1',
691 KEY `delivery_date` (`delivery_date`),
692 KEY `purch_order_no` (`purch_order_no`)
695 -- Data of table `0_grn_batch` --
697 -- Structure of table `0_grn_items` --
699 DROP TABLE IF EXISTS `0_grn_items`;
701 CREATE TABLE `0_grn_items` (
702 `id` int(11) NOT NULL AUTO_INCREMENT,
703 `grn_batch_id` int(11) DEFAULT NULL,
704 `po_detail_item` int(11) NOT NULL DEFAULT '0',
705 `item_code` varchar(20) NOT NULL DEFAULT '',
706 `description` tinytext,
707 `qty_recd` double NOT NULL DEFAULT '0',
708 `quantity_inv` double NOT NULL DEFAULT '0',
710 KEY `grn_batch_id` (`grn_batch_id`)
713 -- Data of table `0_grn_items` --
715 -- Structure of table `0_groups` --
717 DROP TABLE IF EXISTS `0_groups`;
719 CREATE TABLE `0_groups` (
720 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
721 `description` varchar(60) NOT NULL DEFAULT '',
722 `inactive` tinyint(1) NOT NULL DEFAULT '0',
724 UNIQUE KEY `description` (`description`)
725 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
727 -- Data of table `0_groups` --
729 INSERT INTO `0_groups` VALUES
731 ('2', 'Medium', '0'),
734 -- Structure of table `0_item_codes` --
736 DROP TABLE IF EXISTS `0_item_codes`;
738 CREATE TABLE `0_item_codes` (
739 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
740 `item_code` varchar(20) NOT NULL,
741 `stock_id` varchar(20) NOT NULL,
742 `description` varchar(200) NOT NULL DEFAULT '',
743 `category_id` smallint(6) unsigned NOT NULL,
744 `quantity` double NOT NULL DEFAULT '1',
745 `is_foreign` tinyint(1) NOT NULL DEFAULT '0',
746 `inactive` tinyint(1) NOT NULL DEFAULT '0',
748 UNIQUE KEY `stock_id` (`stock_id`,`item_code`),
749 KEY `item_code` (`item_code`)
752 -- Data of table `0_item_codes` --
754 -- Structure of table `0_item_tax_type_exemptions` --
756 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
758 CREATE TABLE `0_item_tax_type_exemptions` (
759 `item_tax_type_id` int(11) NOT NULL DEFAULT '0',
760 `tax_type_id` int(11) NOT NULL DEFAULT '0',
761 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
764 -- Data of table `0_item_tax_type_exemptions` --
766 -- Structure of table `0_item_tax_types` --
768 DROP TABLE IF EXISTS `0_item_tax_types`;
770 CREATE TABLE `0_item_tax_types` (
771 `id` int(11) NOT NULL AUTO_INCREMENT,
772 `name` varchar(60) NOT NULL DEFAULT '',
773 `exempt` tinyint(1) NOT NULL DEFAULT '0',
774 `inactive` tinyint(1) NOT NULL DEFAULT '0',
776 UNIQUE KEY `name` (`name`)
777 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
779 -- Data of table `0_item_tax_types` --
781 INSERT INTO `0_item_tax_types` VALUES
782 ('1', 'Regular', '0', '0');
784 -- Structure of table `0_item_units` --
786 DROP TABLE IF EXISTS `0_item_units`;
788 CREATE TABLE `0_item_units` (
789 `abbr` varchar(20) NOT NULL,
790 `name` varchar(40) NOT NULL,
791 `decimals` tinyint(2) NOT NULL,
792 `inactive` tinyint(1) NOT NULL DEFAULT '0',
793 PRIMARY KEY (`abbr`),
794 UNIQUE KEY `name` (`name`)
797 -- Data of table `0_item_units` --
799 INSERT INTO `0_item_units` VALUES
800 ('each', 'Each', '0', '0'),
801 ('hr', 'Hours', '0', '0');
803 -- Structure of table `0_journal` --
805 DROP TABLE IF EXISTS `0_journal`;
807 CREATE TABLE `0_journal` (
808 `type` smallint(6) NOT NULL DEFAULT '0',
809 `trans_no` int(11) NOT NULL DEFAULT '0',
810 `tran_date` date DEFAULT '0000-00-00',
811 `reference` varchar(60) NOT NULL DEFAULT '',
812 `source_ref` varchar(60) NOT NULL DEFAULT '',
813 `event_date` date DEFAULT '0000-00-00',
814 `doc_date` date NOT NULL DEFAULT '0000-00-00',
815 `currency` char(3) NOT NULL DEFAULT '',
816 `amount` double NOT NULL DEFAULT '0',
817 `rate` double NOT NULL DEFAULT '1',
818 PRIMARY KEY (`type`,`trans_no`),
819 KEY `tran_date` (`tran_date`)
822 -- Data of table `0_journal` --
824 -- Structure of table `0_loc_stock` --
826 DROP TABLE IF EXISTS `0_loc_stock`;
828 CREATE TABLE `0_loc_stock` (
829 `loc_code` char(5) NOT NULL DEFAULT '',
830 `stock_id` char(20) NOT NULL DEFAULT '',
831 `reorder_level` double NOT NULL DEFAULT '0',
832 PRIMARY KEY (`loc_code`,`stock_id`),
833 KEY `stock_id` (`stock_id`)
836 -- Data of table `0_loc_stock` --
838 -- Structure of table `0_locations` --
840 DROP TABLE IF EXISTS `0_locations`;
842 CREATE TABLE `0_locations` (
843 `loc_code` varchar(5) NOT NULL DEFAULT '',
844 `location_name` varchar(60) NOT NULL DEFAULT '',
845 `delivery_address` tinytext NOT NULL,
846 `phone` varchar(30) NOT NULL DEFAULT '',
847 `phone2` varchar(30) NOT NULL DEFAULT '',
848 `fax` varchar(30) NOT NULL DEFAULT '',
849 `email` varchar(100) NOT NULL DEFAULT '',
850 `contact` varchar(30) NOT NULL DEFAULT '',
851 `fixed_asset` tinyint(1) NOT NULL DEFAULT '0',
852 `inactive` tinyint(1) NOT NULL DEFAULT '0',
853 PRIMARY KEY (`loc_code`)
856 -- Data of table `0_locations` --
858 INSERT INTO `0_locations` VALUES
859 ('DEF', 'Default', 'N/A', '', '', '', '', '', '0', '0');
861 -- Structure of table `0_payment_terms` --
863 DROP TABLE IF EXISTS `0_payment_terms`;
865 CREATE TABLE `0_payment_terms` (
866 `id` int(11) NOT NULL AUTO_INCREMENT,
867 `terms` char(80) NOT NULL DEFAULT '',
868 `type` tinyint(1) NOT NULL DEFAULT '1'
869 `days` int(11) NOT NULL DEFAULT '0'
870 `early_discount` double NOT NULL DEFAULT '0'
871 `early_days` double NOT NULL DEFAULT '0',
872 `inactive` tinyint(1) NOT NULL DEFAULT '0',
874 UNIQUE KEY `terms` (`terms`)
875 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
877 -- Data of table `0_payment_terms` --
879 INSERT INTO `0_payment_terms` VALUES
880 ('1', 'Due 15th Of the Following Month', '4', '17', '0', '0', '0'),
881 ('2', 'Due By End Of The Following Month', '4', '31', '0', '0', '0'),
882 ('3', 'Payment due within 10 days', '3', '10', '0', '0', '0'),
883 ('4', 'Cash Only', '2', '0', '0', '0', '0'),
884 ('5', 'Prepaid', '1', '0', '0', '0', '0');
886 -- Structure of table `0_prices` --
888 DROP TABLE IF EXISTS `0_prices`;
890 CREATE TABLE `0_prices` (
891 `id` int(11) NOT NULL AUTO_INCREMENT,
892 `stock_id` varchar(20) NOT NULL DEFAULT '',
893 `sales_type_id` int(11) NOT NULL DEFAULT '0',
894 `curr_abrev` char(3) NOT NULL DEFAULT '',
895 `price` double NOT NULL DEFAULT '0',
897 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
900 -- Data of table `0_prices` --
902 -- Structure of table `0_print_profiles` --
904 DROP TABLE IF EXISTS `0_print_profiles`;
906 CREATE TABLE `0_print_profiles` (
907 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
908 `profile` varchar(30) NOT NULL,
909 `report` varchar(5) DEFAULT NULL,
910 `printer` tinyint(3) unsigned DEFAULT NULL,
912 UNIQUE KEY `profile` (`profile`,`report`)
913 ) ENGINE=InnoDB AUTO_INCREMENT=10 ;
915 -- Data of table `0_print_profiles` --
917 INSERT INTO `0_print_profiles` VALUES
918 ('1', 'Out of office', NULL, '0'),
919 ('2', 'Sales Department', NULL, '0'),
920 ('3', 'Central', NULL, '2'),
921 ('4', 'Sales Department', '104', '2'),
922 ('5', 'Sales Department', '105', '2'),
923 ('6', 'Sales Department', '107', '2'),
924 ('7', 'Sales Department', '109', '2'),
925 ('8', 'Sales Department', '110', '2'),
926 ('9', 'Sales Department', '201', '2');
928 -- Structure of table `0_printers` --
930 DROP TABLE IF EXISTS `0_printers`;
932 CREATE TABLE `0_printers` (
933 `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
934 `name` varchar(20) NOT NULL,
935 `description` varchar(60) NOT NULL,
936 `queue` varchar(20) NOT NULL,
937 `host` varchar(40) NOT NULL,
938 `port` smallint(11) unsigned NOT NULL,
939 `timeout` tinyint(3) unsigned NOT NULL,
941 UNIQUE KEY `name` (`name`)
942 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
944 -- Data of table `0_printers` --
946 INSERT INTO `0_printers` VALUES
947 ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20'),
948 ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5'),
949 ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
951 -- Structure of table `0_purch_data` --
953 DROP TABLE IF EXISTS `0_purch_data`;
955 CREATE TABLE `0_purch_data` (
956 `supplier_id` int(11) NOT NULL DEFAULT '0',
957 `stock_id` char(20) NOT NULL DEFAULT '',
958 `price` double NOT NULL DEFAULT '0',
959 `suppliers_uom` char(50) NOT NULL DEFAULT '',
960 `conversion_factor` double NOT NULL DEFAULT '1',
961 `supplier_description` char(50) NOT NULL DEFAULT '',
962 PRIMARY KEY (`supplier_id`,`stock_id`)
965 -- Data of table `0_purch_data` --
967 -- Structure of table `0_purch_order_details` --
969 DROP TABLE IF EXISTS `0_purch_order_details`;
971 CREATE TABLE `0_purch_order_details` (
972 `po_detail_item` int(11) NOT NULL AUTO_INCREMENT,
973 `order_no` int(11) NOT NULL DEFAULT '0',
974 `item_code` varchar(20) NOT NULL DEFAULT '',
975 `description` tinytext,
976 `delivery_date` date NOT NULL DEFAULT '0000-00-00',
977 `qty_invoiced` double NOT NULL DEFAULT '0',
978 `unit_price` double NOT NULL DEFAULT '0',
979 `act_price` double NOT NULL DEFAULT '0',
980 `std_cost_unit` double NOT NULL DEFAULT '0',
981 `quantity_ordered` double NOT NULL DEFAULT '0',
982 `quantity_received` double NOT NULL DEFAULT '0',
983 PRIMARY KEY (`po_detail_item`),
984 KEY `order` (`order_no`,`po_detail_item`),
985 KEY `itemcode` (`item_code`)
988 -- Data of table `0_purch_order_details` --
990 -- Structure of table `0_purch_orders` --
992 DROP TABLE IF EXISTS `0_purch_orders`;
994 CREATE TABLE `0_purch_orders` (
995 `order_no` int(11) NOT NULL AUTO_INCREMENT,
996 `supplier_id` int(11) NOT NULL DEFAULT '0',
998 `ord_date` date NOT NULL DEFAULT '0000-00-00',
999 `reference` tinytext NOT NULL,
1000 `supp_reference` tinytext,
1001 `into_stock_location` varchar(5) NOT NULL DEFAULT '',
1002 `delivery_address` tinytext NOT NULL,
1003 `total` double NOT NULL DEFAULT '0',
1004 `prep_amount` double NOT NULL DEFAULT '0',
1005 `alloc` double NOT NULL DEFAULT '0',
1006 `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1007 PRIMARY KEY (`order_no`),
1008 KEY `ord_date` (`ord_date`)
1011 -- Data of table `0_purch_orders` --
1013 -- Structure of table `0_quick_entries` --
1015 DROP TABLE IF EXISTS `0_quick_entries`;
1017 CREATE TABLE `0_quick_entries` (
1018 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1019 `type` tinyint(1) NOT NULL DEFAULT '0',
1020 `description` varchar(60) NOT NULL,
1021 `usage` varchar(120) DEFAULT NULL,
1022 `base_amount` double NOT NULL DEFAULT '0',
1023 `base_desc` varchar(60) DEFAULT NULL,
1024 `bal_type` tinyint(1) NOT NULL DEFAULT '0',
1026 KEY `description` (`description`)
1027 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1029 -- Data of table `0_quick_entries` --
1031 INSERT INTO `0_quick_entries` VALUES
1032 ('1', '1', 'Maintenance', NULL, '0', 'Amount', '0'),
1033 ('2', '4', 'Phone', NULL, '0', 'Amount', '0'),
1034 ('3', '2', 'Cash Sales', 'Retail sales without invoice', '0', 'Amount', '0');
1036 -- Structure of table `0_quick_entry_lines` --
1038 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1040 CREATE TABLE `0_quick_entry_lines` (
1041 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1042 `qid` smallint(6) unsigned NOT NULL,
1043 `amount` double DEFAULT '0',
1044 `memo` tinytext NOT NULL,
1045 `action` varchar(2) NOT NULL,
1046 `dest_id` varchar(15) NOT NULL DEFAULT '',
1047 `dimension_id` smallint(6) unsigned DEFAULT NULL,
1048 `dimension2_id` smallint(6) unsigned DEFAULT NULL,
1051 ) ENGINE=InnoDB AUTO_INCREMENT=7 ;
1053 -- Data of table `0_quick_entry_lines` --
1055 INSERT INTO `0_quick_entry_lines` VALUES
1056 ('1', '1', '0', '', 't-', '1', '0', '0'),
1057 ('2', '2', '0', '', 't-', '1', '0', '0'),
1058 ('3', '3', '0', '', 't-', '1', '0', '0'),
1059 ('4', '3', '0', '', '=', '4010', '0', '0'),
1060 ('5', '1', '0', '', '=', '5765', '0', '0'),
1061 ('6', '2', '0', '', '=', '5780', '0', '0');
1063 -- Structure of table `0_recurrent_invoices` --
1065 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1067 CREATE TABLE `0_recurrent_invoices` (
1068 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1069 `description` varchar(60) NOT NULL DEFAULT '',
1070 `order_no` int(11) unsigned NOT NULL,
1071 `debtor_no` int(11) unsigned DEFAULT NULL,
1072 `group_no` smallint(6) unsigned DEFAULT NULL,
1073 `days` int(11) NOT NULL DEFAULT '0',
1074 `monthly` int(11) NOT NULL DEFAULT '0',
1075 `begin` date NOT NULL DEFAULT '0000-00-00',
1076 `end` date NOT NULL DEFAULT '0000-00-00',
1077 `last_sent` date NOT NULL DEFAULT '0000-00-00',
1079 UNIQUE KEY `description` (`description`)
1082 -- Data of table `0_recurrent_invoices` --
1084 -- Structure of table `0_reflines` --
1086 DROP TABLE IF EXISTS `0_reflines`;
1088 CREATE TABLE `0_reflines` (
1089 `id` int(11) NOT NULL AUTO_INCREMENT,
1090 `trans_type` int(11) NOT NULL,
1091 `prefix` char(5) NOT NULL DEFAULT '',
1092 `pattern` varchar(35) NOT NULL DEFAULT '1',
1093 `description` varchar(60) NOT NULL DEFAULT '',
1094 `default` tinyint(1) NOT NULL DEFAULT '0',
1095 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1097 UNIQUE KEY `prefix` (`trans_type`,`prefix`)
1098 ) ENGINE=InnoDB AUTO_INCREMENT=23 ;
1100 -- Data of table `0_reflines` --
1102 INSERT INTO `0_reflines` VALUES
1103 ('1', '0', '', '{001}/{YYYY}', '', '1', '0'),
1104 ('2', '1', '', '{001}/{YYYY}', '', '1', '0'),
1105 ('3', '2', '', '{001}/{YYYY}', '', '1', '0'),
1106 ('4', '4', '', '{001}/{YYYY}', '', '1', '0'),
1107 ('5', '10', '', '{001}/{YYYY}', '', '1', '0'),
1108 ('6', '11', '', '{001}/{YYYY}', '', '1', '0'),
1109 ('7', '12', '', '{001}/{YYYY}', '', '1', '0'),
1110 ('8', '13', '', '{001}/{YYYY}', '', '1', '0'),
1111 ('9', '16', '', '{001}/{YYYY}', '', '1', '0'),
1112 ('10', '17', '', '{001}/{YYYY}', '', '1', '0'),
1113 ('11', '18', '', '{001}/{YYYY}', '', '1', '0'),
1114 ('12', '20', '', '{001}/{YYYY}', '', '1', '0'),
1115 ('13', '21', '', '{001}/{YYYY}', '', '1', '0'),
1116 ('14', '22', '', '{001}/{YYYY}', '', '1', '0'),
1117 ('15', '25', '', '{001}/{YYYY}', '', '1', '0'),
1118 ('16', '26', '', '{001}/{YYYY}', '', '1', '0'),
1119 ('17', '28', '', '{001}/{YYYY}', '', '1', '0'),
1120 ('18', '29', '', '{001}/{YYYY}', '', '1', '0'),
1121 ('19', '30', '', '{001}/{YYYY}', '', '1', '0'),
1122 ('20', '32', '', '{001}/{YYYY}', '', '1', '0'),
1123 ('21', '35', '', '{001}/{YYYY}', '', '1', '0'),
1124 ('22', '40', '', '{001}/{YYYY}', '', '1', '0');
1126 -- Structure of table `0_refs` --
1128 DROP TABLE IF EXISTS `0_refs`;
1130 CREATE TABLE `0_refs` (
1131 `id` int(11) NOT NULL DEFAULT '0',
1132 `type` int(11) NOT NULL DEFAULT '0',
1133 `reference` varchar(100) NOT NULL DEFAULT '',
1134 PRIMARY KEY (`id`,`type`),
1135 KEY `Type_and_Reference` (`type`,`reference`)
1138 -- Data of table `0_refs` --
1140 -- Structure of table `0_sales_order_details` --
1142 DROP TABLE IF EXISTS `0_sales_order_details`;
1144 CREATE TABLE `0_sales_order_details` (
1145 `id` int(11) NOT NULL AUTO_INCREMENT,
1146 `order_no` int(11) NOT NULL DEFAULT '0',
1147 `trans_type` smallint(6) NOT NULL DEFAULT '30',
1148 `stk_code` varchar(20) NOT NULL DEFAULT '',
1149 `description` tinytext,
1150 `qty_sent` double NOT NULL DEFAULT '0',
1151 `unit_price` double NOT NULL DEFAULT '0',
1152 `quantity` double NOT NULL DEFAULT '0',
1153 `invoiced` double NOT NULL DEFAULT '0',
1154 `discount_percent` double NOT NULL DEFAULT '0',
1156 KEY `sorder` (`trans_type`,`order_no`),
1157 KEY `stkcode` (`stk_code`)
1160 -- Data of table `0_sales_order_details` --
1162 -- Structure of table `0_sales_orders` --
1164 DROP TABLE IF EXISTS `0_sales_orders`;
1166 CREATE TABLE `0_sales_orders` (
1167 `order_no` int(11) NOT NULL,
1168 `trans_type` smallint(6) NOT NULL DEFAULT '30',
1169 `version` tinyint(1) unsigned NOT NULL DEFAULT '0',
1170 `type` tinyint(1) NOT NULL DEFAULT '0',
1171 `debtor_no` int(11) NOT NULL DEFAULT '0',
1172 `branch_code` int(11) NOT NULL DEFAULT '0',
1173 `reference` varchar(100) NOT NULL DEFAULT '',
1174 `customer_ref` tinytext NOT NULL,
1175 `comments` tinytext,
1176 `ord_date` date NOT NULL DEFAULT '0000-00-00',
1177 `order_type` int(11) NOT NULL DEFAULT '0',
1178 `ship_via` varchar(20) NOT NULL DEFAULT '',
1179 `delivery_address` tinytext NOT NULL,
1180 `contact_phone` varchar(30) DEFAULT NULL,
1181 `contact_email` varchar(100) DEFAULT NULL,
1182 `deliver_to` tinytext NOT NULL,
1183 `freight_cost` double NOT NULL DEFAULT '0',
1184 `from_stk_loc` varchar(5) NOT NULL DEFAULT '',
1185 `delivery_date` date NOT NULL DEFAULT '0000-00-00',
1186 `payment_terms` int(11) DEFAULT NULL,
1187 `total` double NOT NULL DEFAULT '0',
1188 `prep_amount` double NOT NULL DEFAULT '0',
1189 `alloc` double NOT NULL DEFAULT '0',
1190 PRIMARY KEY (`trans_type`,`order_no`)
1193 -- Data of table `0_sales_orders` --
1195 -- Structure of table `0_sales_pos` --
1197 DROP TABLE IF EXISTS `0_sales_pos`;
1199 CREATE TABLE `0_sales_pos` (
1200 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1201 `pos_name` varchar(30) NOT NULL,
1202 `cash_sale` tinyint(1) NOT NULL,
1203 `credit_sale` tinyint(1) NOT NULL,
1204 `pos_location` varchar(5) NOT NULL,
1205 `pos_account` smallint(6) unsigned NOT NULL,
1206 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1208 UNIQUE KEY `pos_name` (`pos_name`)
1209 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1211 -- Data of table `0_sales_pos` --
1213 INSERT INTO `0_sales_pos` VALUES
1214 ('1', 'Default', '1', '1', 'DEF', '2', '0');
1216 -- Structure of table `0_sales_types` --
1218 DROP TABLE IF EXISTS `0_sales_types`;
1220 CREATE TABLE `0_sales_types` (
1221 `id` int(11) NOT NULL AUTO_INCREMENT,
1222 `sales_type` char(50) NOT NULL DEFAULT '',
1223 `tax_included` int(1) NOT NULL DEFAULT '0',
1224 `factor` double NOT NULL DEFAULT '1',
1225 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1227 UNIQUE KEY `sales_type` (`sales_type`)
1228 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1230 -- Data of table `0_sales_types` --
1232 INSERT INTO `0_sales_types` VALUES
1233 ('1', 'Retail', '1', '1', '0'),
1234 ('2', 'Wholesale', '0', '0.7', '0');
1236 -- Structure of table `0_salesman` --
1238 DROP TABLE IF EXISTS `0_salesman`;
1240 CREATE TABLE `0_salesman` (
1241 `salesman_code` int(11) NOT NULL AUTO_INCREMENT,
1242 `salesman_name` char(60) NOT NULL DEFAULT '',
1243 `salesman_phone` char(30) NOT NULL DEFAULT '',
1244 `salesman_fax` char(30) NOT NULL DEFAULT '',
1245 `salesman_email` varchar(100) NOT NULL DEFAULT '',
1246 `provision` double NOT NULL DEFAULT '0',
1247 `break_pt` double NOT NULL DEFAULT '0',
1248 `provision2` double NOT NULL DEFAULT '0',
1249 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1250 PRIMARY KEY (`salesman_code`),
1251 UNIQUE KEY `salesman_name` (`salesman_name`)
1252 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1254 -- Data of table `0_salesman` --
1256 INSERT INTO `0_salesman` VALUES
1257 ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1259 -- Structure of table `0_security_roles` --
1261 DROP TABLE IF EXISTS `0_security_roles`;
1263 CREATE TABLE `0_security_roles` (
1264 `id` int(11) NOT NULL AUTO_INCREMENT,
1265 `role` varchar(30) NOT NULL,
1266 `description` varchar(50) DEFAULT NULL,
1269 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1271 UNIQUE KEY `role` (`role`)
1272 ) ENGINE=InnoDB AUTO_INCREMENT=11 ;
1274 -- Data of table `0_security_roles` --
1276 INSERT INTO `0_security_roles` VALUES
1277 ('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'),
1278 ('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'),
1279 ('3', 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873;775', '0'),
1280 ('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'),
1281 ('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'),
1282 ('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'),
1283 ('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'),
1284 ('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'),
1285 ('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'),
1286 ('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');
1288 -- Structure of table `0_shippers` --
1290 DROP TABLE IF EXISTS `0_shippers`;
1292 CREATE TABLE `0_shippers` (
1293 `shipper_id` int(11) NOT NULL AUTO_INCREMENT,
1294 `shipper_name` varchar(60) NOT NULL DEFAULT '',
1295 `phone` varchar(30) NOT NULL DEFAULT '',
1296 `phone2` varchar(30) NOT NULL DEFAULT '',
1297 `contact` tinytext NOT NULL,
1298 `address` tinytext NOT NULL,
1299 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1300 PRIMARY KEY (`shipper_id`),
1301 UNIQUE KEY `name` (`shipper_name`)
1302 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1304 -- Data of table `0_shippers` --
1306 INSERT INTO `0_shippers` VALUES
1307 ('1', 'Default', '', '', '', '', '0');
1309 -- Structure of table `0_stock_category` --
1311 DROP TABLE IF EXISTS `0_stock_category`;
1313 CREATE TABLE `0_stock_category` (
1314 `category_id` int(11) NOT NULL AUTO_INCREMENT,
1315 `description` varchar(60) NOT NULL DEFAULT '',
1316 `dflt_tax_type` int(11) NOT NULL DEFAULT '1',
1317 `dflt_units` varchar(20) NOT NULL DEFAULT 'each',
1318 `dflt_mb_flag` char(1) NOT NULL DEFAULT 'B',
1319 `dflt_sales_act` varchar(15) NOT NULL DEFAULT '',
1320 `dflt_cogs_act` varchar(15) NOT NULL DEFAULT '',
1321 `dflt_inventory_act` varchar(15) NOT NULL DEFAULT '',
1322 `dflt_adjustment_act` varchar(15) NOT NULL DEFAULT '',
1323 `dflt_wip_act` varchar(15) NOT NULL DEFAULT '',
1324 `dflt_dim1` int(11) DEFAULT NULL,
1325 `dflt_dim2` int(11) DEFAULT NULL,
1326 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1327 `dflt_no_sale` tinyint(1) NOT NULL DEFAULT '0',
1328 `dflt_no_purchase` tinyint(1) NOT NULL DEFAULT '0',
1329 `vat_category` tinyint(1) NOT NULL DEFAULT '0',
1330 PRIMARY KEY (`category_id`),
1331 UNIQUE KEY `description` (`description`)
1332 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
1334 -- Data of table `0_stock_category` --
1336 INSERT INTO `0_stock_category` VALUES
1337 ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0'),
1338 ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0'),
1339 ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0'),
1340 ('4', 'Services', '1', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0'),
1341 ('5', 'Shipping', '1', 'each', 'T', '4430', '5010', '', '', '', '0', '0', '0', '1', '0', '0');
1343 -- Structure of table `0_stock_fa_class` --
1345 DROP TABLE IF EXISTS `0_stock_fa_class`;
1347 CREATE TABLE `0_stock_fa_class` (
1348 `fa_class_id` varchar(20) NOT NULL DEFAULT '',
1349 `parent_id` varchar(20) NOT NULL DEFAULT '',
1350 `description` varchar(200) NOT NULL DEFAULT '',
1351 `long_description` tinytext NOT NULL,
1352 `depreciation_rate` double NOT NULL DEFAULT '0',
1353 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1354 PRIMARY KEY (`fa_class_id`)
1357 -- Data of table `0_stock_fa_class` --
1359 -- Structure of table `0_stock_master` --
1361 DROP TABLE IF EXISTS `0_stock_master`;
1363 CREATE TABLE `0_stock_master` (
1364 `stock_id` varchar(20) NOT NULL DEFAULT '',
1365 `category_id` int(11) NOT NULL DEFAULT '0',
1366 `tax_type_id` int(11) NOT NULL DEFAULT '0',
1367 `description` varchar(200) NOT NULL DEFAULT '',
1368 `long_description` tinytext NOT NULL,
1369 `units` varchar(20) NOT NULL DEFAULT 'each',
1370 `mb_flag` char(1) NOT NULL DEFAULT 'B',
1371 `sales_account` varchar(15) NOT NULL DEFAULT '',
1372 `cogs_account` varchar(15) NOT NULL DEFAULT '',
1373 `inventory_account` varchar(15) NOT NULL DEFAULT '',
1374 `adjustment_account` varchar(15) NOT NULL DEFAULT '',
1375 `wip_account` varchar(15) NOT NULL DEFAULT '',
1376 `dimension_id` int(11) DEFAULT NULL,
1377 `dimension2_id` int(11) DEFAULT NULL,
1378 `purchase_cost` double NOT NULL DEFAULT '0',
1379 `material_cost` double NOT NULL DEFAULT '0',
1380 `labour_cost` double NOT NULL DEFAULT '0',
1381 `overhead_cost` double NOT NULL DEFAULT '0',
1382 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1383 `no_sale` tinyint(1) NOT NULL DEFAULT '0',
1384 `no_purchase` tinyint(1) NOT NULL DEFAULT '0',
1385 `editable` tinyint(1) NOT NULL DEFAULT '0',
1386 `depreciation_method` char(1) NOT NULL DEFAULT 'S',
1387 `depreciation_rate` double NOT NULL DEFAULT '0',
1388 `depreciation_factor` double NOT NULL DEFAULT '1',
1389 `depreciation_start` date NOT NULL DEFAULT '0000-00-00',
1390 `depreciation_date` date NOT NULL DEFAULT '0000-00-00',
1391 `fa_class_id` varchar(20) NOT NULL DEFAULT '',
1392 `vat_category` tinyint(1) NOT NULL DEFAULT '0',
1393 `shipper_id` int(11) NOT NULL DEFAULT '0',
1394 PRIMARY KEY (`stock_id`)
1397 -- Data of table `0_stock_master` --
1398 INSERT INTO `0_stock_master` VALUES
1399 ('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');
1400 -- Structure of table `0_stock_moves` --
1402 DROP TABLE IF EXISTS `0_stock_moves`;
1404 CREATE TABLE `0_stock_moves` (
1405 `trans_id` int(11) NOT NULL AUTO_INCREMENT,
1406 `trans_no` int(11) NOT NULL DEFAULT '0',
1407 `stock_id` char(20) NOT NULL DEFAULT '',
1408 `type` smallint(6) NOT NULL DEFAULT '0',
1409 `loc_code` char(5) NOT NULL DEFAULT '',
1410 `tran_date` date NOT NULL DEFAULT '0000-00-00',
1411 `price` double NOT NULL DEFAULT '0',
1412 `reference` char(40) NOT NULL DEFAULT '',
1413 `qty` double NOT NULL DEFAULT '1',
1414 `unit_cost` double NOT NULL DEFAULT '0',
1415 PRIMARY KEY (`trans_id`),
1416 KEY `type` (`type`,`trans_no`),
1417 KEY `Move` (`stock_id`,`loc_code`,`tran_date`)
1420 -- Data of table `0_stock_moves` --
1422 -- Structure of table `0_supp_allocations` --
1424 DROP TABLE IF EXISTS `0_supp_allocations`;
1426 CREATE TABLE `0_supp_allocations` (
1427 `id` int(11) NOT NULL AUTO_INCREMENT,
1428 `person_id` int(11) DEFAULT NULL,
1429 `amt` double unsigned DEFAULT NULL,
1430 `discount` double unsigned DEFAULT '0',
1431 `date_alloc` date NOT NULL DEFAULT '0000-00-00',
1432 `trans_no_from` int(11) DEFAULT NULL,
1433 `trans_type_from` int(11) DEFAULT NULL,
1434 `trans_no_to` int(11) DEFAULT NULL,
1435 `trans_type_to` int(11) DEFAULT NULL,
1437 UNIQUE KEY `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
1438 KEY `From` (`trans_type_from`,`trans_no_from`),
1439 KEY `To` (`trans_type_to`,`trans_no_to`)
1442 -- Data of table `0_supp_allocations` --
1444 -- Structure of table `0_supp_invoice_items` --
1446 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1448 CREATE TABLE `0_supp_invoice_items` (
1449 `id` int(11) NOT NULL AUTO_INCREMENT,
1450 `supp_trans_no` int(11) DEFAULT NULL,
1451 `supp_trans_type` int(11) DEFAULT NULL,
1452 `gl_code` varchar(15) NOT NULL DEFAULT '',
1453 `grn_item_id` int(11) DEFAULT NULL,
1454 `po_detail_item_id` int(11) DEFAULT NULL,
1455 `stock_id` varchar(20) NOT NULL DEFAULT '',
1456 `description` tinytext,
1457 `quantity` double NOT NULL DEFAULT '0',
1458 `unit_price` double NOT NULL DEFAULT '0',
1459 `unit_tax` double NOT NULL DEFAULT '0',
1461 `dimension_id` int(11) NOT NULL DEFAULT '0',
1462 `dimension2_id` int(11) NOT NULL DEFAULT '0',
1464 KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`)
1467 -- Data of table `0_supp_invoice_items` --
1469 -- Structure of table `0_supp_trans` --
1471 DROP TABLE IF EXISTS `0_supp_trans`;
1473 CREATE TABLE `0_supp_trans` (
1474 `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
1475 `type` smallint(6) unsigned NOT NULL DEFAULT '0',
1476 `supplier_id` int(11) unsigned NOT NULL,
1477 `reference` tinytext NOT NULL,
1478 `supp_reference` varchar(60) NOT NULL DEFAULT '',
1479 `tran_date` date NOT NULL DEFAULT '0000-00-00',
1480 `due_date` date NOT NULL DEFAULT '0000-00-00',
1481 `ov_amount` double NOT NULL DEFAULT '0',
1482 `ov_discount` double NOT NULL DEFAULT '0',
1483 `ov_gst` double NOT NULL DEFAULT '0',
1484 `rate` double NOT NULL DEFAULT '1',
1485 `alloc` double NOT NULL DEFAULT '0',
1486 `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1487 PRIMARY KEY (`type`,`trans_no`,`supplier_id`),
1488 KEY `supplier_id` (`supplier_id`),
1489 KEY `tran_date` (`tran_date`)
1492 -- Data of table `0_supp_trans` --
1494 -- Structure of table `0_suppliers` --
1496 DROP TABLE IF EXISTS `0_suppliers`;
1498 CREATE TABLE `0_suppliers` (
1499 `supplier_id` int(11) NOT NULL AUTO_INCREMENT,
1500 `supp_name` varchar(60) NOT NULL DEFAULT '',
1501 `supp_ref` varchar(30) NOT NULL DEFAULT '',
1502 `address` tinytext NOT NULL,
1503 `supp_address` tinytext NOT NULL,
1504 `gst_no` varchar(25) NOT NULL DEFAULT '',
1505 `contact` varchar(60) NOT NULL DEFAULT '',
1506 `supp_account_no` varchar(40) NOT NULL DEFAULT '',
1507 `website` varchar(100) NOT NULL DEFAULT '',
1508 `bank_account` varchar(60) NOT NULL DEFAULT '',
1509 `curr_code` char(3) DEFAULT NULL,
1510 `payment_terms` int(11) DEFAULT NULL,
1511 `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1512 `dimension_id` int(11) DEFAULT '0',
1513 `dimension2_id` int(11) DEFAULT '0',
1514 `tax_group_id` int(11) DEFAULT NULL,
1515 `credit_limit` double NOT NULL DEFAULT '0',
1516 `purchase_account` varchar(15) NOT NULL DEFAULT '',
1517 `payable_account` varchar(15) NOT NULL DEFAULT '',
1518 `payment_discount_account` varchar(15) NOT NULL DEFAULT '',
1519 `notes` tinytext NOT NULL,
1520 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1521 PRIMARY KEY (`supplier_id`),
1522 KEY `supp_ref` (`supp_ref`)
1525 -- Data of table `0_suppliers` --
1527 -- Structure of table `0_sys_prefs` --
1529 DROP TABLE IF EXISTS `0_sys_prefs`;
1531 CREATE TABLE `0_sys_prefs` (
1532 `name` varchar(35) NOT NULL DEFAULT '',
1533 `category` varchar(30) DEFAULT NULL,
1534 `type` varchar(20) NOT NULL DEFAULT '',
1535 `length` smallint(6) DEFAULT NULL,
1536 `value` text NOT NULL,
1537 PRIMARY KEY (`name`),
1538 KEY `category` (`category`)
1541 -- Data of table `0_sys_prefs` --
1543 INSERT INTO `0_sys_prefs` VALUES
1544 ('coy_name', 'setup.company', 'varchar', 60, 'Company name'),
1545 ('gst_no', 'setup.company', 'varchar', 25, ''),
1546 ('coy_no', 'setup.company', 'varchar', 25, ''),
1547 ('tax_prd', 'setup.company', 'int', 11, '1'),
1548 ('tax_last', 'setup.company', 'int', 11, '1'),
1549 ('postal_address', 'setup.company', 'tinytext', 0, 'N/A'),
1550 ('phone', 'setup.company', 'varchar', 30, ''),
1551 ('fax', 'setup.company', 'varchar', 30, ''),
1552 ('email', 'setup.company', 'varchar', 100, ''),
1553 ('coy_logo', 'setup.company', 'varchar', 100, ''),
1554 ('domicile', 'setup.company', 'varchar', 55, ''),
1555 ('curr_default', 'setup.company', 'char', 3, 'USD'),
1556 ('use_dimension', 'setup.company', 'tinyint', 1, '1'),
1557 ('f_year', 'setup.company', 'int', 11, '1'),
1558 ('shortname_name_in_list','setup.company', 'tinyint', 1, '0'),
1559 ('no_item_list', 'setup.company', 'tinyint', 1, '0'),
1560 ('no_customer_list', 'setup.company', 'tinyint', 1, '0'),
1561 ('no_supplier_list', 'setup.company', 'tinyint', 1, '0'),
1562 ('base_sales', 'setup.company', 'int', 11, '1'),
1563 ('time_zone', 'setup.company', 'tinyint', 1, '0'),
1564 ('add_pct', 'setup.company', 'int', 5, '-1'),
1565 ('round_to', 'setup.company', 'int', 5, '1'),
1566 ('login_tout', 'setup.company', 'smallint', 6, '600'),
1567 ('past_due_days', 'glsetup.general', 'int', 11, '30'),
1568 ('profit_loss_year_act', 'glsetup.general', 'varchar', 15, '9990'),
1569 ('retained_earnings_act', 'glsetup.general', 'varchar', 15, '3590'),
1570 ('bank_charge_act', 'glsetup.general', 'varchar', 15, '5690'),
1571 ('exchange_diff_act', 'glsetup.general', 'varchar', 15, '4450'),
1572 ('tax_algorithm', 'glsetup.customer', 'tinyint', 1, '1'),
1573 ('default_credit_limit', 'glsetup.customer', 'int', 11, '1000'),
1574 ('accumulate_shipping', 'glsetup.customer', 'tinyint', 1, '0'),
1575 ('legal_text', 'glsetup.customer', 'tinytext', 0, ''),
1576 ('freight_act', 'glsetup.customer', 'varchar', 15, '4430'),
1577 ('debtors_act', 'glsetup.sales', 'varchar', 15, '1200'),
1578 ('default_sales_act', 'glsetup.sales', 'varchar', 15, '4010'),
1579 ('default_sales_discount_act', 'glsetup.sales', 'varchar', 15, '4510'),
1580 ('default_prompt_payment_act', 'glsetup.sales', 'varchar', 15, '4500'),
1581 ('default_delivery_required', 'glsetup.sales', 'smallint', 6, '1'),
1582 ('default_receival_required', 'glsetup.purchase', 'smallint', 6, '10'),
1583 ('default_quote_valid_days', 'glsetup.sales', 'smallint', 6, '30'),
1584 ('default_dim_required', 'glsetup.dims', 'int', 11, '20'),
1585 ('pyt_discount_act', 'glsetup.purchase', 'varchar', 15, '5060'),
1586 ('creditors_act', 'glsetup.purchase', 'varchar', 15, '2100'),
1587 ('po_over_receive', 'glsetup.purchase', 'int', 11, '10'),
1588 ('po_over_charge', 'glsetup.purchase', 'int', 11, '10'),
1589 ('allow_negative_stock', 'glsetup.inventory', 'tinyint', 1, '0'),
1590 ('default_inventory_act', 'glsetup.items', 'varchar', 15, '1510'),
1591 ('default_cogs_act', 'glsetup.items', 'varchar', 15, '5010'),
1592 ('default_adj_act', 'glsetup.items', 'varchar', 15, '5040'),
1593 ('default_inv_sales_act', 'glsetup.items', 'varchar', 15, '4010'),
1594 ('default_wip_act', 'glsetup.items', 'varchar', 15, '1530'),
1595 ('default_workorder_required', 'glsetup.manuf', 'int', 11, '20'),
1596 ('version_id', 'system', 'varchar', 11, '2.5.0'),
1597 ('auto_curr_reval', 'setup.company', 'smallint', 6, '1'),
1598 ('grn_clearing_act', 'glsetup.purchase', 'varchar', 15, '1550'),
1599 ('bcc_email', 'setup.company', 'varchar', 100, ''),
1600 ('deferred_income_act', 'glsetup.sales', 'varchar', '15', '2105'),
1601 ('gl_closing_date','setup.closing_date', 'date', 8, ''),
1602 ('alternative_tax_include_on_docs','setup.company', 'tinyint', 1, '0'),
1603 ('no_zero_lines_amount','glsetup.sales', 'tinyint', 1, '1'),
1604 ('show_po_item_codes','glsetup.purchase', 'tinyint', 1, '0'),
1605 ('accounts_alpha','glsetup.general', 'tinyint', 1, '0'),
1606 ('loc_notification','glsetup.inventory', 'tinyint', 1, '0'),
1607 ('print_invoice_no','glsetup.sales', 'tinyint', 1, '0'),
1608 ('allow_negative_prices','glsetup.inventory', 'tinyint', 1, '1'),
1609 ('print_item_images_on_quote','glsetup.inventory', 'tinyint', 1, '0'),
1610 ('suppress_tax_rates','setup.company', 'tinyint', 1, '0'),
1611 ('company_logo_report','setup.company', 'tinyint', 1, '0'),
1612 ('barcodes_on_stock','setup.company', 'tinyint', 1, '0'),
1613 ('print_dialog_direct','setup.company', 'tinyint', 1, '0'),
1614 ('ref_no_auto_increase','setup.company', 'tinyint', 1, '0'),
1615 ('default_loss_on_asset_disposal_act', 'glsetup.items', 'varchar', '15', '5660'),
1616 ('depreciation_period', 'glsetup.company', 'tinyint', '1', '1'),
1617 ('use_manufacturing','setup.company', 'tinyint', 1, '1'),
1618 ('use_fixed_assets','setup.company', 'tinyint', 1, '1');
1620 -- Structure of table `0_tag_associations` --
1622 DROP TABLE IF EXISTS `0_tag_associations`;
1624 CREATE TABLE `0_tag_associations` (
1625 `record_id` varchar(15) NOT NULL,
1626 `tag_id` int(11) NOT NULL,
1627 PRIMARY KEY (`record_id`,`tag_id`)
1630 -- Data of table `0_tag_associations` --
1632 -- Structure of table `0_tags` --
1634 DROP TABLE IF EXISTS `0_tags`;
1636 CREATE TABLE `0_tags` (
1637 `id` int(11) NOT NULL AUTO_INCREMENT,
1638 `type` smallint(6) NOT NULL,
1639 `name` varchar(30) NOT NULL,
1640 `description` varchar(60) DEFAULT NULL,
1641 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1643 UNIQUE KEY `type` (`type`,`name`)
1646 -- Data of table `0_tags` --
1648 -- Structure of table `0_tax_group_items` --
1650 DROP TABLE IF EXISTS `0_tax_group_items`;
1652 CREATE TABLE `0_tax_group_items` (
1653 `tax_group_id` int(11) NOT NULL DEFAULT '0',
1654 `tax_type_id` int(11) NOT NULL DEFAULT '0',
1655 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1658 -- Data of table `0_tax_group_items` --
1660 INSERT INTO `0_tax_group_items` VALUES
1663 -- Structure of table `0_tax_groups` --
1665 DROP TABLE IF EXISTS `0_tax_groups`;
1667 CREATE TABLE `0_tax_groups` (
1668 `id` int(11) NOT NULL AUTO_INCREMENT,
1669 `name` varchar(60) NOT NULL DEFAULT '',
1670 `tax_area` tinyint(1) NOT NULL DEFAULT '0',
1671 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1673 UNIQUE KEY `name` (`name`)
1674 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1676 -- Data of table `0_tax_groups` --
1678 INSERT INTO `0_tax_groups` VALUES
1679 ('1', 'Tax', '0', '0'),
1680 ('2', 'Export/Import', '1', '0');
1682 -- Structure of table `0_tax_types` --
1684 DROP TABLE IF EXISTS `0_tax_types`;
1686 CREATE TABLE `0_tax_types` (
1687 `id` int(11) NOT NULL AUTO_INCREMENT,
1688 `rate` double NOT NULL DEFAULT '0',
1689 `sales_gl_code` varchar(15) NOT NULL DEFAULT '',
1690 `purchasing_gl_code` varchar(15) NOT NULL DEFAULT '',
1691 `name` varchar(60) NOT NULL DEFAULT '',
1692 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1694 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1696 -- Data of table `0_tax_types` --
1698 INSERT INTO `0_tax_types` VALUES
1699 ('1', '5', '2150', '2150', 'Tax', '0');
1701 -- Structure of table `0_trans_tax_details` --
1703 DROP TABLE IF EXISTS `0_trans_tax_details`;
1705 CREATE TABLE `0_trans_tax_details` (
1706 `id` int(11) NOT NULL AUTO_INCREMENT,
1707 `trans_type` smallint(6) DEFAULT NULL,
1708 `trans_no` int(11) DEFAULT NULL,
1709 `tran_date` date NOT NULL,
1710 `tax_type_id` int(11) NOT NULL DEFAULT '0',
1711 `rate` double NOT NULL DEFAULT '0',
1712 `ex_rate` double NOT NULL DEFAULT '1',
1713 `included_in_price` tinyint(1) NOT NULL DEFAULT '0',
1714 `net_amount` double NOT NULL DEFAULT '0',
1715 `amount` double NOT NULL DEFAULT '0',
1717 `reg_type` tinyint(1) DEFAULT NULL,
1718 `vat_category` int(11) NOT NULL DEFAULT '0',
1719 `tax_group_id` tinyint(2) DEFAULT NULL,
1721 KEY `Type_and_Number` (`trans_type`,`trans_no`),
1722 KEY `tran_date` (`tran_date`)
1725 -- Data of table `0_trans_tax_details` --
1727 -- Structure of table `0_useronline` --
1729 DROP TABLE IF EXISTS `0_useronline`;
1731 CREATE TABLE `0_useronline` (
1732 `id` int(11) NOT NULL AUTO_INCREMENT,
1733 `timestamp` int(15) NOT NULL DEFAULT '0',
1734 `ip` varchar(40) NOT NULL DEFAULT '',
1735 `file` varchar(100) NOT NULL DEFAULT '',
1737 KEY `timestamp` (`timestamp`),
1741 -- Data of table `0_useronline` --
1744 -- Structure of table `0_users` --
1746 DROP TABLE IF EXISTS `0_users`;
1748 CREATE TABLE `0_users` (
1749 `id` smallint(6) NOT NULL AUTO_INCREMENT,
1750 `user_id` varchar(60) NOT NULL DEFAULT '',
1751 `password` varchar(100) NOT NULL DEFAULT '',
1752 `real_name` varchar(100) NOT NULL DEFAULT '',
1753 `role_id` int(11) NOT NULL DEFAULT '1',
1754 `phone` varchar(30) NOT NULL DEFAULT '',
1755 `email` varchar(100) DEFAULT NULL,
1756 `language` varchar(20) DEFAULT NULL,
1757 `date_format` tinyint(1) NOT NULL DEFAULT '0',
1758 `date_sep` tinyint(1) NOT NULL DEFAULT '0',
1759 `tho_sep` tinyint(1) NOT NULL DEFAULT '0',
1760 `dec_sep` tinyint(1) NOT NULL DEFAULT '0',
1761 `theme` varchar(20) NOT NULL DEFAULT 'default',
1762 `page_size` varchar(20) NOT NULL DEFAULT 'A4',
1763 `prices_dec` smallint(6) NOT NULL DEFAULT '2',
1764 `qty_dec` smallint(6) NOT NULL DEFAULT '2',
1765 `rates_dec` smallint(6) NOT NULL DEFAULT '4',
1766 `percent_dec` smallint(6) NOT NULL DEFAULT '1',
1767 `show_gl` tinyint(1) NOT NULL DEFAULT '1',
1768 `show_codes` tinyint(1) NOT NULL DEFAULT '0',
1769 `show_hints` tinyint(1) NOT NULL DEFAULT '0',
1770 `last_visit_date` datetime DEFAULT NULL,
1771 `query_size` tinyint(1) unsigned NOT NULL DEFAULT '10',
1772 `graphic_links` tinyint(1) DEFAULT '1',
1773 `pos` smallint(6) DEFAULT '1',
1774 `print_profile` varchar(30) NOT NULL DEFAULT '',
1775 `rep_popup` tinyint(1) DEFAULT '1',
1776 `sticky_doc_date` tinyint(1) DEFAULT '0',
1777 `startup_tab` varchar(20) NOT NULL DEFAULT '',
1778 `transaction_days` smallint(6) NOT NULL DEFAULT '30',
1779 `save_report_selections` smallint(6) NOT NULL DEFAULT '0',
1780 `use_date_picker` tinyint(1) NOT NULL DEFAULT '1',
1781 `def_print_destination` tinyint(1) NOT NULL DEFAULT '0',
1782 `def_print_orientation` tinyint(1) NOT NULL DEFAULT '0',
1783 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1785 UNIQUE KEY `user_id` (`user_id`)
1786 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1788 -- Data of table `0_users` --
1790 INSERT INTO `0_users` VALUES
1791 ('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');
1793 -- Structure of table `0_voided` --
1795 DROP TABLE IF EXISTS `0_voided`;
1797 CREATE TABLE `0_voided` (
1798 `type` int(11) NOT NULL DEFAULT '0',
1799 `id` int(11) NOT NULL DEFAULT '0',
1800 `date_` date NOT NULL DEFAULT '0000-00-00',
1801 `memo_` tinytext NOT NULL,
1802 UNIQUE KEY `id` (`type`,`id`)
1805 -- Data of table `0_voided` --
1808 -- Structure of table `0_wo_costing` --
1810 DROP TABLE IF EXISTS `0_wo_costing`;
1812 CREATE TABLE `0_wo_costing` (
1813 `id` int(11) NOT NULL AUTO_INCREMENT,
1814 `workorder_id` int(11) NOT NULL DEFAULT '0',
1815 `cost_type` tinyint(1) NOT NULL DEFAULT '0',
1816 `trans_type` int(11) NOT NULL DEFAULT '0',
1817 `trans_no` int(11) NOT NULL DEFAULT '0',
1818 `factor` double NOT NULL DEFAULT '1',
1822 -- Data of table `0_wo_costing` --
1824 -- Structure of table `0_wo_issue_items` --
1826 DROP TABLE IF EXISTS `0_wo_issue_items`;
1828 CREATE TABLE `0_wo_issue_items` (
1829 `id` int(11) NOT NULL AUTO_INCREMENT,
1830 `stock_id` varchar(40) DEFAULT NULL,
1831 `issue_id` int(11) DEFAULT NULL,
1832 `qty_issued` double DEFAULT NULL,
1833 `unit_cost` double NOT NULL DEFAULT '0',
1837 -- Data of table `0_wo_issue_items` --
1840 -- Structure of table `0_wo_issues` --
1842 DROP TABLE IF EXISTS `0_wo_issues`;
1844 CREATE TABLE `0_wo_issues` (
1845 `issue_no` int(11) NOT NULL AUTO_INCREMENT,
1846 `workorder_id` int(11) NOT NULL DEFAULT '0',
1847 `reference` varchar(100) DEFAULT NULL,
1848 `issue_date` date DEFAULT NULL,
1849 `loc_code` varchar(5) DEFAULT NULL,
1850 `workcentre_id` int(11) DEFAULT NULL,
1851 PRIMARY KEY (`issue_no`),
1852 KEY `workorder_id` (`workorder_id`)
1855 -- Data of table `0_wo_issues` --
1857 -- Structure of table `0_wo_manufacture` --
1859 DROP TABLE IF EXISTS `0_wo_manufacture`;
1861 CREATE TABLE `0_wo_manufacture` (
1862 `id` int(11) NOT NULL AUTO_INCREMENT,
1863 `reference` varchar(100) DEFAULT NULL,
1864 `workorder_id` int(11) NOT NULL DEFAULT '0',
1865 `quantity` double NOT NULL DEFAULT '0',
1866 `date_` date NOT NULL DEFAULT '0000-00-00',
1868 KEY `workorder_id` (`workorder_id`)
1871 -- Data of table `0_wo_manufacture` --
1873 -- Structure of table `0_wo_requirements` --
1875 DROP TABLE IF EXISTS `0_wo_requirements`;
1877 CREATE TABLE `0_wo_requirements` (
1878 `id` int(11) NOT NULL AUTO_INCREMENT,
1879 `workorder_id` int(11) NOT NULL DEFAULT '0',
1880 `stock_id` char(20) NOT NULL DEFAULT '',
1881 `workcentre` int(11) NOT NULL DEFAULT '0',
1882 `units_req` double NOT NULL DEFAULT '1',
1883 `unit_cost` double NOT NULL DEFAULT '0',
1884 `loc_code` char(5) NOT NULL DEFAULT '',
1885 `units_issued` double NOT NULL DEFAULT '0',
1887 KEY `workorder_id` (`workorder_id`)
1890 -- Data of table `0_wo_requirements` --
1892 -- Structure of table `0_workcentres` --
1894 DROP TABLE IF EXISTS `0_workcentres`;
1896 CREATE TABLE `0_workcentres` (
1897 `id` int(11) NOT NULL AUTO_INCREMENT,
1898 `name` char(40) NOT NULL DEFAULT '',
1899 `description` char(50) NOT NULL DEFAULT '',
1900 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1902 UNIQUE KEY `name` (`name`)
1903 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1905 -- Data of table `0_workcentres` --
1907 INSERT INTO `0_workcentres` VALUES
1908 ('1', 'Work Centre', '', '0');
1910 -- Structure of table `0_workorders` --
1912 DROP TABLE IF EXISTS `0_workorders`;
1914 CREATE TABLE `0_workorders` (
1915 `id` int(11) NOT NULL AUTO_INCREMENT,
1916 `wo_ref` varchar(60) NOT NULL DEFAULT '',
1917 `loc_code` varchar(5) NOT NULL DEFAULT '',
1918 `units_reqd` double NOT NULL DEFAULT '1',
1919 `stock_id` varchar(20) NOT NULL DEFAULT '',
1920 `date_` date NOT NULL DEFAULT '0000-00-00',
1921 `type` tinyint(4) NOT NULL DEFAULT '0',
1922 `required_by` date NOT NULL DEFAULT '0000-00-00',
1923 `released_date` date NOT NULL DEFAULT '0000-00-00',
1924 `units_issued` double NOT NULL DEFAULT '0',
1925 `closed` tinyint(1) NOT NULL DEFAULT '0',
1926 `released` tinyint(1) NOT NULL DEFAULT '0',
1928 KEY `wo_ref` (`wo_ref`)
1931 -- Data of table `0_workorders` --