1 # Built by FrontAccounting 2.1.2
2 # http://frontaccounting.net
3 # Company: Company name
8 ### Structure of table `0_areas` ###
10 DROP TABLE IF EXISTS `0_areas`;
12 CREATE TABLE `0_areas` (
13 `area_code` int(11) NOT NULL auto_increment,
14 `description` varchar(60) NOT NULL default '',
15 `inactive` tinyint(1) NOT NULL default '0',
16 PRIMARY KEY (`area_code`),
17 UNIQUE KEY `description` (`description`)
18 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
21 ### Data of table `0_areas` ###
23 INSERT INTO `0_areas` VALUES ('1', 'Global', '0');
26 ### Structure of table `0_attachments` ###
28 DROP TABLE IF EXISTS `0_attachments`;
30 CREATE TABLE `0_attachments` (
31 `id` int(11) unsigned NOT NULL auto_increment,
32 `description` varchar(60) NOT NULL default '',
33 `type_no` int(11) NOT NULL default '0',
34 `trans_no` int(11) NOT NULL default '0',
35 `unique_name` varchar(60) NOT NULL default '',
36 `tran_date` date NOT NULL default '0000-00-00',
37 `filename` varchar(60) NOT NULL default '',
38 `filesize` int(11) NOT NULL default '0',
39 `filetype` varchar(60) NOT NULL default '',
41 KEY `type_no` (`type_no`,`trans_no`)
42 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
45 ### Data of table `0_attachments` ###
49 ### Structure of table `0_bank_accounts` ###
51 DROP TABLE IF EXISTS `0_bank_accounts`;
53 CREATE TABLE `0_bank_accounts` (
54 `account_code` varchar(11) NOT NULL default '',
55 `account_type` smallint(6) NOT NULL default '0',
56 `bank_account_name` varchar(60) NOT NULL default '',
57 `bank_account_number` varchar(100) NOT NULL default '',
58 `bank_name` varchar(60) NOT NULL default '',
59 `bank_address` tinytext,
60 `bank_curr_code` char(3) NOT NULL default '',
61 `id` smallint(6) NOT NULL auto_increment,
62 `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00',
63 `ending_reconcile_balance` double NOT NULL default '0',
64 `inactive` tinyint(1) NOT NULL default '0',
66 KEY `bank_account_name` (`bank_account_name`),
67 KEY `bank_account_number` (`bank_account_number`)
68 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
71 ### Data of table `0_bank_accounts` ###
73 INSERT INTO `0_bank_accounts` VALUES ('1060', '0', 'Current account', 'N/A', 'N/A', '', 'USD', '1', '0000-00-00 00:00:00', '0', '0');
74 INSERT INTO `0_bank_accounts` VALUES ('1065', '3', 'Petty Cash account', 'N/A', 'N/A', '', 'USD', '2', '0000-00-00 00:00:00', '0', '0');
77 ### Structure of table `0_bank_trans` ###
79 DROP TABLE IF EXISTS `0_bank_trans`;
81 CREATE TABLE `0_bank_trans` (
82 `id` int(11) NOT NULL auto_increment,
83 `type` smallint(6) default NULL,
84 `trans_no` int(11) default NULL,
85 `bank_act` varchar(11) default NULL,
86 `ref` varchar(40) default NULL,
87 `trans_date` date NOT NULL default '0000-00-00',
88 `bank_trans_type_id` int(10) unsigned default NULL,
89 `amount` double default NULL,
90 `dimension_id` int(11) NOT NULL default '0',
91 `dimension2_id` int(11) NOT NULL default '0',
92 `person_type_id` int(11) NOT NULL default '0',
94 `reconciled` date default NULL,
96 KEY `bank_act` (`bank_act`,`ref`),
97 KEY `type` (`type`,`trans_no`)
98 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
101 ### Data of table `0_bank_trans` ###
105 ### Structure of table `0_bom` ###
107 DROP TABLE IF EXISTS `0_bom`;
109 CREATE TABLE `0_bom` (
110 `id` int(11) NOT NULL auto_increment,
111 `parent` char(20) NOT NULL default '',
112 `component` char(20) NOT NULL default '',
113 `workcentre_added` int(11) NOT NULL default '0',
114 `loc_code` char(5) NOT NULL default '',
115 `quantity` double NOT NULL default '1',
116 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
117 KEY `component` (`component`),
119 KEY `loc_code` (`loc_code`),
120 KEY `parent` (`parent`,`loc_code`),
121 KEY `Parent_2` (`parent`),
122 KEY `workcentre_added` (`workcentre_added`)
123 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
126 ### Data of table `0_bom` ###
130 ### Structure of table `0_budget_trans` ###
132 DROP TABLE IF EXISTS `0_budget_trans`;
134 CREATE TABLE `0_budget_trans` (
135 `counter` int(11) NOT NULL auto_increment,
136 `type` smallint(6) NOT NULL default '0',
137 `type_no` bigint(16) NOT NULL default '1',
138 `tran_date` date NOT NULL default '0000-00-00',
139 `account` varchar(11) NOT NULL default '',
140 `memo_` tinytext NOT NULL,
141 `amount` double NOT NULL default '0',
142 `dimension_id` int(11) default '0',
143 `dimension2_id` int(11) default '0',
144 `person_type_id` int(11) default NULL,
145 `person_id` tinyblob,
146 PRIMARY KEY (`counter`),
147 KEY `Type_and_Number` (`type`,`type_no`)
148 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
151 ### Data of table `0_budget_trans` ###
155 ### Structure of table `0_chart_class` ###
157 DROP TABLE IF EXISTS `0_chart_class`;
159 CREATE TABLE `0_chart_class` (
160 `cid` int(11) NOT NULL default '0',
161 `class_name` varchar(60) NOT NULL default '',
162 `balance_sheet` tinyint(1) NOT NULL default '0',
167 ### Data of table `0_chart_class` ###
169 INSERT INTO `0_chart_class` VALUES ('1', 'Assets', '1');
170 INSERT INTO `0_chart_class` VALUES ('2', 'Liabilities', '2');
171 INSERT INTO `0_chart_class` VALUES ('3', 'Income', '4');
172 INSERT INTO `0_chart_class` VALUES ('4', 'Costs', '6');
175 ### Structure of table `0_chart_master` ###
177 DROP TABLE IF EXISTS `0_chart_master`;
179 CREATE TABLE `0_chart_master` (
180 `account_code` varchar(11) NOT NULL default '',
181 `account_code2` varchar(11) default '',
182 `account_name` varchar(60) NOT NULL default '',
183 `account_type` int(11) NOT NULL default '0',
184 `inactive` tinyint(1) NOT NULL default '0',
185 PRIMARY KEY (`account_code`),
186 KEY `account_code` (`account_code`),
187 KEY `account_name` (`account_name`)
191 ### Data of table `0_chart_master` ###
193 INSERT INTO `0_chart_master` VALUES ('1060', '', 'Checking Account', '1', '0');
194 INSERT INTO `0_chart_master` VALUES ('1065', '', 'Petty Cash', '1', '0');
195 INSERT INTO `0_chart_master` VALUES ('1200', '', 'Accounts Receivables', '1', '0');
196 INSERT INTO `0_chart_master` VALUES ('1205', '', 'Allowance for doubtful accounts', '1', '0');
197 INSERT INTO `0_chart_master` VALUES ('1510', '', 'Inventory', '2', '0');
198 INSERT INTO `0_chart_master` VALUES ('1520', '', 'Stocks of Raw Materials', '2', '0');
199 INSERT INTO `0_chart_master` VALUES ('1530', '', 'Stocks of Work In Progress', '2', '0');
200 INSERT INTO `0_chart_master` VALUES ('1540', '', 'Stocks of Finsihed Goods', '2', '0');
201 INSERT INTO `0_chart_master` VALUES ('1550', '', 'Goods Received Clearing account', '2', '0');
202 INSERT INTO `0_chart_master` VALUES ('1820', '', 'Office Furniture & Equipment', '3', '0');
203 INSERT INTO `0_chart_master` VALUES ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0');
204 INSERT INTO `0_chart_master` VALUES ('1840', '', 'Vehicle', '3', '0');
205 INSERT INTO `0_chart_master` VALUES ('1845', '', 'Accum. Amort. -Vehicle', '3', '0');
206 INSERT INTO `0_chart_master` VALUES ('2100', '', 'Accounts Payable', '4', '0');
207 INSERT INTO `0_chart_master` VALUES ('2110', '', 'Accrued Income Tax - Federal', '4', '0');
208 INSERT INTO `0_chart_master` VALUES ('2120', '', 'Accrued Income Tax - State', '4', '0');
209 INSERT INTO `0_chart_master` VALUES ('2130', '', 'Accrued Franchise Tax', '4', '0');
210 INSERT INTO `0_chart_master` VALUES ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0');
211 INSERT INTO `0_chart_master` VALUES ('2150', '', 'Sales Tax', '4', '0');
212 INSERT INTO `0_chart_master` VALUES ('2160', '', 'Accrued Use Tax Payable', '4', '0');
213 INSERT INTO `0_chart_master` VALUES ('2210', '', 'Accrued Wages', '4', '0');
214 INSERT INTO `0_chart_master` VALUES ('2220', '', 'Accrued Comp Time', '4', '0');
215 INSERT INTO `0_chart_master` VALUES ('2230', '', 'Accrued Holiday Pay', '4', '0');
216 INSERT INTO `0_chart_master` VALUES ('2240', '', 'Accrued Vacation Pay', '4', '0');
217 INSERT INTO `0_chart_master` VALUES ('2310', '', 'Accr. Benefits - 401K', '4', '0');
218 INSERT INTO `0_chart_master` VALUES ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0');
219 INSERT INTO `0_chart_master` VALUES ('2330', '', 'Accr. Benefits - Med, Den', '4', '0');
220 INSERT INTO `0_chart_master` VALUES ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0');
221 INSERT INTO `0_chart_master` VALUES ('2350', '', 'Accr. Benefits - Credit Union', '4', '0');
222 INSERT INTO `0_chart_master` VALUES ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0');
223 INSERT INTO `0_chart_master` VALUES ('2370', '', 'Accr. Benefits - Garnish', '4', '0');
224 INSERT INTO `0_chart_master` VALUES ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0');
225 INSERT INTO `0_chart_master` VALUES ('2620', '', 'Bank Loans', '5', '0');
226 INSERT INTO `0_chart_master` VALUES ('2680', '', 'Loans from Shareholders', '5', '0');
227 INSERT INTO `0_chart_master` VALUES ('3350', '', 'Common Shares', '6', '0');
228 INSERT INTO `0_chart_master` VALUES ('3590', '', 'Retained Earnings - prior years', '7', '0');
229 INSERT INTO `0_chart_master` VALUES ('4010', '', 'Sales', '8', '0');
230 INSERT INTO `0_chart_master` VALUES ('4430', '', 'Shipping & Handling', '9', '0');
231 INSERT INTO `0_chart_master` VALUES ('4440', '', 'Interest', '9', '0');
232 INSERT INTO `0_chart_master` VALUES ('4450', '', 'Foreign Exchange Gain', '9', '0');
233 INSERT INTO `0_chart_master` VALUES ('4500', '', 'Prompt Payment Discounts', '9', '0');
234 INSERT INTO `0_chart_master` VALUES ('4510', '', 'Discounts Given', '9', '0');
235 INSERT INTO `0_chart_master` VALUES ('5010', '', 'Cost of Goods Sold - Retail', '10', '0');
236 INSERT INTO `0_chart_master` VALUES ('5020', '', 'Material Usage Varaiance', '10', '0');
237 INSERT INTO `0_chart_master` VALUES ('5030', '', 'Consumable Materials', '10', '0');
238 INSERT INTO `0_chart_master` VALUES ('5040', '', 'Purchase price Variance', '10', '0');
239 INSERT INTO `0_chart_master` VALUES ('5050', '', 'Purchases of materials', '10', '0');
240 INSERT INTO `0_chart_master` VALUES ('5060', '', 'Discounts Received', '10', '0');
241 INSERT INTO `0_chart_master` VALUES ('5100', '', 'Freight', '10', '0');
242 INSERT INTO `0_chart_master` VALUES ('5410', '', 'Wages & Salaries', '11', '0');
243 INSERT INTO `0_chart_master` VALUES ('5420', '', 'Wages - Overtime', '11', '0');
244 INSERT INTO `0_chart_master` VALUES ('5430', '', 'Benefits - Comp Time', '11', '0');
245 INSERT INTO `0_chart_master` VALUES ('5440', '', 'Benefits - Payroll Taxes', '11', '0');
246 INSERT INTO `0_chart_master` VALUES ('5450', '', 'Benefits - Workers Comp', '11', '0');
247 INSERT INTO `0_chart_master` VALUES ('5460', '', 'Benefits - Pension', '11', '0');
248 INSERT INTO `0_chart_master` VALUES ('5470', '', 'Benefits - General Benefits', '11', '0');
249 INSERT INTO `0_chart_master` VALUES ('5510', '', 'Inc Tax Exp - Federal', '11', '0');
250 INSERT INTO `0_chart_master` VALUES ('5520', '', 'Inc Tax Exp - State', '11', '0');
251 INSERT INTO `0_chart_master` VALUES ('5530', '', 'Taxes - Real Estate', '11', '0');
252 INSERT INTO `0_chart_master` VALUES ('5540', '', 'Taxes - Personal Property', '11', '0');
253 INSERT INTO `0_chart_master` VALUES ('5550', '', 'Taxes - Franchise', '11', '0');
254 INSERT INTO `0_chart_master` VALUES ('5560', '', 'Taxes - Foreign Withholding', '11', '0');
255 INSERT INTO `0_chart_master` VALUES ('5610', '', 'Accounting & Legal', '12', '0');
256 INSERT INTO `0_chart_master` VALUES ('5615', '', 'Advertising & Promotions', '12', '0');
257 INSERT INTO `0_chart_master` VALUES ('5620', '', 'Bad Debts', '12', '0');
258 INSERT INTO `0_chart_master` VALUES ('5660', '', 'Amortization Expense', '12', '0');
259 INSERT INTO `0_chart_master` VALUES ('5685', '', 'Insurance', '12', '0');
260 INSERT INTO `0_chart_master` VALUES ('5690', '', 'Interest & Bank Charges', '12', '0');
261 INSERT INTO `0_chart_master` VALUES ('5700', '', 'Office Supplies', '12', '0');
262 INSERT INTO `0_chart_master` VALUES ('5760', '', 'Rent', '12', '0');
263 INSERT INTO `0_chart_master` VALUES ('5765', '', 'Repair & Maintenance', '12', '0');
264 INSERT INTO `0_chart_master` VALUES ('5780', '', 'Telephone', '12', '0');
265 INSERT INTO `0_chart_master` VALUES ('5785', '', 'Travel & Entertainment', '12', '0');
266 INSERT INTO `0_chart_master` VALUES ('5790', '', 'Utilities', '12', '0');
267 INSERT INTO `0_chart_master` VALUES ('5795', '', 'Registrations', '12', '0');
268 INSERT INTO `0_chart_master` VALUES ('5800', '', 'Licenses', '12', '0');
269 INSERT INTO `0_chart_master` VALUES ('5810', '', 'Foreign Exchange Loss', '12', '0');
270 INSERT INTO `0_chart_master` VALUES ('9990', '', 'Year Profit/Loss', '12', '0');
273 ### Structure of table `0_chart_types` ###
275 DROP TABLE IF EXISTS `0_chart_types`;
277 CREATE TABLE `0_chart_types` (
278 `id` int(11) NOT NULL auto_increment,
279 `name` varchar(60) NOT NULL default '',
280 `class_id` tinyint(1) NOT NULL default '0',
281 `parent` int(11) NOT NULL default '-1',
284 ) TYPE=MyISAM AUTO_INCREMENT=13 ;
287 ### Data of table `0_chart_types` ###
289 INSERT INTO `0_chart_types` VALUES ('1', 'Current Assets', '1', '0');
290 INSERT INTO `0_chart_types` VALUES ('2', 'Inventory Assets', '1', '0');
291 INSERT INTO `0_chart_types` VALUES ('3', 'Capital Assets', '1', '0');
292 INSERT INTO `0_chart_types` VALUES ('4', 'Current Liabilities', '2', '0');
293 INSERT INTO `0_chart_types` VALUES ('5', 'Long Term Liabilities', '2', '0');
294 INSERT INTO `0_chart_types` VALUES ('6', 'Share Capital', '2', '0');
295 INSERT INTO `0_chart_types` VALUES ('7', 'Retained Earnings', '2', '0');
296 INSERT INTO `0_chart_types` VALUES ('8', 'Sales Revenue', '3', '0');
297 INSERT INTO `0_chart_types` VALUES ('9', 'Other Revenue', '3', '0');
298 INSERT INTO `0_chart_types` VALUES ('10', 'Cost of Goods Sold', '4', '0');
299 INSERT INTO `0_chart_types` VALUES ('11', 'Payroll Expenses', '4', '0');
300 INSERT INTO `0_chart_types` VALUES ('12', 'General & Administrative expenses', '4', '0');
303 ### Structure of table `0_comments` ###
305 DROP TABLE IF EXISTS `0_comments`;
307 CREATE TABLE `0_comments` (
308 `type` int(11) NOT NULL default '0',
309 `id` int(11) NOT NULL default '0',
310 `date_` date default '0000-00-00',
315 ### Data of table `0_comments` ###
319 ### Structure of table `0_company` ###
321 DROP TABLE IF EXISTS `0_company`;
323 CREATE TABLE `0_company` (
324 `coy_code` int(11) NOT NULL default '1',
325 `coy_name` varchar(60) NOT NULL default '',
326 `gst_no` varchar(25) NOT NULL default '',
327 `coy_no` varchar(25) NOT NULL default '0',
328 `tax_prd` int(11) NOT NULL default '1',
329 `tax_last` int(11) NOT NULL default '1',
330 `postal_address` tinytext NOT NULL,
331 `phone` varchar(30) NOT NULL default '',
332 `fax` varchar(30) NOT NULL default '',
333 `email` varchar(100) NOT NULL default '',
334 `coy_logo` varchar(100) NOT NULL default '',
335 `domicile` varchar(55) NOT NULL default '',
336 `curr_default` char(3) NOT NULL default '',
337 `debtors_act` varchar(11) NOT NULL default '',
338 `pyt_discount_act` varchar(11) NOT NULL default '',
339 `creditors_act` varchar(11) NOT NULL default '',
340 `grn_act` varchar(11) NOT NULL default '',
341 `exchange_diff_act` varchar(11) NOT NULL default '',
342 `purch_exchange_diff_act` varchar(11) NOT NULL default '',
343 `retained_earnings_act` varchar(11) NOT NULL default '',
344 `freight_act` varchar(11) NOT NULL default '',
345 `default_sales_act` varchar(11) NOT NULL default '',
346 `default_sales_discount_act` varchar(11) NOT NULL default '',
347 `default_prompt_payment_act` varchar(11) NOT NULL default '',
348 `default_inventory_act` varchar(11) NOT NULL default '',
349 `default_cogs_act` varchar(11) NOT NULL default '',
350 `default_adj_act` varchar(11) NOT NULL default '',
351 `default_inv_sales_act` varchar(11) NOT NULL default '',
352 `default_assembly_act` varchar(11) NOT NULL default '',
353 `payroll_act` varchar(11) NOT NULL default '',
354 `custom1_name` varchar(60) NOT NULL default '',
355 `custom2_name` varchar(60) NOT NULL default '',
356 `custom3_name` varchar(60) NOT NULL default '',
357 `custom1_value` varchar(100) NOT NULL default '',
358 `custom2_value` varchar(100) NOT NULL default '',
359 `custom3_value` varchar(100) NOT NULL default '',
360 `allow_negative_stock` tinyint(1) NOT NULL default '0',
361 `po_over_receive` int(11) NOT NULL default '10',
362 `po_over_charge` int(11) NOT NULL default '10',
363 `default_credit_limit` int(11) NOT NULL default '1000',
364 `default_workorder_required` int(11) NOT NULL default '20',
365 `default_dim_required` int(11) NOT NULL default '20',
366 `past_due_days` int(11) NOT NULL default '30',
367 `use_dimension` tinyint(1) default '0',
368 `f_year` int(11) NOT NULL default '1',
369 `no_item_list` tinyint(1) NOT NULL default '0',
370 `no_customer_list` tinyint(1) NOT NULL default '0',
371 `no_supplier_list` tinyint(1) NOT NULL default '0',
372 `base_sales` int(11) NOT NULL default '-1',
373 `foreign_codes` tinyint(1) NOT NULL default '0',
374 `accumulate_shipping` tinyint(1) NOT NULL default '0',
375 `legal_text` tinytext NOT NULL,
376 PRIMARY KEY (`coy_code`)
380 ### Data of table `0_company` ###
382 INSERT INTO `0_company` VALUES ('1', 'Company name', '', '', '1', '1', 'N/A', '', '', '', '', '', 'USD', '1200', '5060', '2100', '1430', '4450', '4220', '2050', '4430', '4010', '4510', '4500', '1510', '5010', '5040', '4010', '1530', '5000', '', '', '', '', '', '', '0', '10', '10', '1000', '20', '20', '30', '1', '1', '0', '0', '0', '1', '0', '0', '');
385 ### Structure of table `0_credit_status` ###
387 DROP TABLE IF EXISTS `0_credit_status`;
389 CREATE TABLE `0_credit_status` (
390 `id` int(11) NOT NULL auto_increment,
391 `reason_description` char(100) NOT NULL default '',
392 `dissallow_invoices` tinyint(1) NOT NULL default '0',
393 `inactive` tinyint(1) NOT NULL default '0',
395 UNIQUE KEY `reason_description` (`reason_description`)
396 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
399 ### Data of table `0_credit_status` ###
401 INSERT INTO `0_credit_status` VALUES ('1', 'Good History', '0', '0');
402 INSERT INTO `0_credit_status` VALUES ('3', 'No more work until payment received', '1', '0');
403 INSERT INTO `0_credit_status` VALUES ('4', 'In liquidation', '1', '0');
406 ### Structure of table `0_currencies` ###
408 DROP TABLE IF EXISTS `0_currencies`;
410 CREATE TABLE `0_currencies` (
411 `currency` varchar(60) NOT NULL default '',
412 `curr_abrev` char(3) NOT NULL default '',
413 `curr_symbol` varchar(10) NOT NULL default '',
414 `country` varchar(100) NOT NULL default '',
415 `hundreds_name` varchar(15) NOT NULL default '',
416 `inactive` tinyint(1) NOT NULL default '0',
417 PRIMARY KEY (`curr_abrev`)
421 ### Data of table `0_currencies` ###
423 INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents', '0');
424 INSERT INTO `0_currencies` VALUES ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '0');
425 INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents', '0');
426 INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence', '0');
429 ### Structure of table `0_cust_allocations` ###
431 DROP TABLE IF EXISTS `0_cust_allocations`;
433 CREATE TABLE `0_cust_allocations` (
434 `id` int(11) NOT NULL auto_increment,
435 `amt` double unsigned default NULL,
436 `date_alloc` date NOT NULL default '0000-00-00',
437 `trans_no_from` int(11) default NULL,
438 `trans_type_from` int(11) default NULL,
439 `trans_no_to` int(11) default NULL,
440 `trans_type_to` int(11) default NULL,
442 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
445 ### Data of table `0_cust_allocations` ###
449 ### Structure of table `0_cust_branch` ###
451 DROP TABLE IF EXISTS `0_cust_branch`;
453 CREATE TABLE `0_cust_branch` (
454 `branch_code` int(11) NOT NULL auto_increment,
455 `debtor_no` int(11) NOT NULL default '0',
456 `br_name` varchar(60) NOT NULL default '',
457 `br_address` tinytext NOT NULL,
458 `area` int(11) default NULL,
459 `salesman` int(11) NOT NULL default '0',
460 `phone` varchar(30) NOT NULL default '',
461 `fax` varchar(30) NOT NULL default '',
462 `contact_name` varchar(60) NOT NULL default '',
463 `email` varchar(100) NOT NULL default '',
464 `default_location` varchar(5) NOT NULL default '',
465 `tax_group_id` int(11) default NULL,
466 `sales_account` varchar(11) default NULL,
467 `sales_discount_account` varchar(11) default NULL,
468 `receivables_account` varchar(11) default NULL,
469 `payment_discount_account` varchar(11) default NULL,
470 `default_ship_via` int(11) NOT NULL default '1',
471 `disable_trans` tinyint(4) NOT NULL default '0',
472 `br_post_address` tinytext NOT NULL,
473 `group_no` int(11) NOT NULL default '0',
474 PRIMARY KEY (`branch_code`,`debtor_no`),
475 KEY `branch_code` (`branch_code`),
476 KEY `br_name` (`br_name`)
477 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
480 ### Data of table `0_cust_branch` ###
484 ### Structure of table `0_debtor_trans` ###
486 DROP TABLE IF EXISTS `0_debtor_trans`;
488 CREATE TABLE `0_debtor_trans` (
489 `trans_no` int(11) unsigned NOT NULL default '0',
490 `type` smallint(6) unsigned NOT NULL default '0',
491 `version` tinyint(1) unsigned NOT NULL default '0',
492 `debtor_no` int(11) unsigned default NULL,
493 `branch_code` int(11) NOT NULL default '-1',
494 `tran_date` date NOT NULL default '0000-00-00',
495 `due_date` date NOT NULL default '0000-00-00',
496 `reference` varchar(60) NOT NULL default '',
497 `tpe` int(11) NOT NULL default '0',
498 `order_` int(11) NOT NULL default '0',
499 `ov_amount` double NOT NULL default '0',
500 `ov_gst` double NOT NULL default '0',
501 `ov_freight` double NOT NULL default '0',
502 `ov_freight_tax` double NOT NULL default '0',
503 `ov_discount` double NOT NULL default '0',
504 `alloc` double NOT NULL default '0',
505 `rate` double NOT NULL default '1',
506 `ship_via` int(11) default NULL,
507 `trans_link` int(11) NOT NULL default '0',
508 `dimension_id` int(11) NOT NULL default '0',
509 `dimension2_id` int(11) NOT NULL default '0',
510 PRIMARY KEY (`trans_no`,`type`),
511 KEY `debtor_no` (`debtor_no`,`branch_code`)
515 ### Data of table `0_debtor_trans` ###
519 ### Structure of table `0_debtor_trans_details` ###
521 DROP TABLE IF EXISTS `0_debtor_trans_details`;
523 CREATE TABLE `0_debtor_trans_details` (
524 `id` int(11) NOT NULL auto_increment,
525 `debtor_trans_no` int(11) default NULL,
526 `debtor_trans_type` int(11) default NULL,
527 `stock_id` varchar(20) NOT NULL default '',
528 `description` tinytext,
529 `unit_price` double NOT NULL default '0',
530 `unit_tax` double NOT NULL default '0',
531 `quantity` double NOT NULL default '0',
532 `discount_percent` double NOT NULL default '0',
533 `standard_cost` double NOT NULL default '0',
534 `qty_done` double NOT NULL default '0',
536 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
539 ### Data of table `0_debtor_trans_details` ###
543 ### Structure of table `0_debtors_master` ###
545 DROP TABLE IF EXISTS `0_debtors_master`;
547 CREATE TABLE `0_debtors_master` (
548 `debtor_no` int(11) NOT NULL auto_increment,
549 `name` varchar(60) NOT NULL default '',
551 `email` varchar(100) NOT NULL default '',
552 `tax_id` varchar(55) NOT NULL default '',
553 `curr_code` char(3) NOT NULL default '',
554 `sales_type` int(11) NOT NULL default '1',
555 `dimension_id` int(11) NOT NULL default '0',
556 `dimension2_id` int(11) NOT NULL default '0',
557 `credit_status` int(11) NOT NULL default '0',
558 `payment_terms` int(11) default NULL,
559 `discount` double NOT NULL default '0',
560 `pymt_discount` double NOT NULL default '0',
561 `credit_limit` float NOT NULL default '1000',
562 `inactive` tinyint(1) NOT NULL default '0',
563 PRIMARY KEY (`debtor_no`),
564 UNIQUE KEY `name` (`name`)
565 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
568 ### Data of table `0_debtors_master` ###
572 ### Structure of table `0_dimensions` ###
574 DROP TABLE IF EXISTS `0_dimensions`;
576 CREATE TABLE `0_dimensions` (
577 `id` int(11) NOT NULL auto_increment,
578 `reference` varchar(60) NOT NULL default '',
579 `name` varchar(60) NOT NULL default '',
580 `type_` tinyint(1) NOT NULL default '1',
581 `closed` tinyint(1) NOT NULL default '0',
582 `date_` date NOT NULL default '0000-00-00',
583 `due_date` date NOT NULL default '0000-00-00',
585 UNIQUE KEY `reference` (`reference`)
586 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
589 ### Data of table `0_dimensions` ###
593 ### Structure of table `0_exchange_rates` ###
595 DROP TABLE IF EXISTS `0_exchange_rates`;
597 CREATE TABLE `0_exchange_rates` (
598 `id` int(11) NOT NULL auto_increment,
599 `curr_code` char(3) NOT NULL default '',
600 `rate_buy` double NOT NULL default '0',
601 `rate_sell` double NOT NULL default '0',
602 `date_` date NOT NULL default '0000-00-00',
604 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
605 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
608 ### Data of table `0_exchange_rates` ###
612 ### Structure of table `0_fiscal_year` ###
614 DROP TABLE IF EXISTS `0_fiscal_year`;
616 CREATE TABLE `0_fiscal_year` (
617 `id` int(11) NOT NULL auto_increment,
618 `begin` date default '0000-00-00',
619 `end` date default '0000-00-00',
620 `closed` tinyint(1) NOT NULL default '0',
622 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
625 ### Data of table `0_fiscal_year` ###
627 INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0');
630 ### Structure of table `0_gl_trans` ###
632 DROP TABLE IF EXISTS `0_gl_trans`;
634 CREATE TABLE `0_gl_trans` (
635 `counter` int(11) NOT NULL auto_increment,
636 `type` smallint(6) NOT NULL default '0',
637 `type_no` bigint(16) NOT NULL default '1',
638 `tran_date` date NOT NULL default '0000-00-00',
639 `account` varchar(11) NOT NULL default '',
640 `memo_` tinytext NOT NULL,
641 `amount` double NOT NULL default '0',
642 `dimension_id` int(11) NOT NULL default '0',
643 `dimension2_id` int(11) NOT NULL default '0',
644 `person_type_id` int(11) default NULL,
645 `person_id` tinyblob,
646 PRIMARY KEY (`counter`),
647 KEY `Type_and_Number` (`type`,`type_no`)
648 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
651 ### Data of table `0_gl_trans` ###
655 ### Structure of table `0_grn_batch` ###
657 DROP TABLE IF EXISTS `0_grn_batch`;
659 CREATE TABLE `0_grn_batch` (
660 `id` int(11) NOT NULL auto_increment,
661 `supplier_id` int(11) NOT NULL default '0',
662 `purch_order_no` int(11) default NULL,
663 `reference` varchar(60) NOT NULL default '',
664 `delivery_date` date NOT NULL default '0000-00-00',
665 `loc_code` varchar(5) default NULL,
667 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
670 ### Data of table `0_grn_batch` ###
674 ### Structure of table `0_grn_items` ###
676 DROP TABLE IF EXISTS `0_grn_items`;
678 CREATE TABLE `0_grn_items` (
679 `id` int(11) NOT NULL auto_increment,
680 `grn_batch_id` int(11) default NULL,
681 `po_detail_item` int(11) NOT NULL default '0',
682 `item_code` varchar(20) NOT NULL default '',
683 `description` tinytext,
684 `qty_recd` double NOT NULL default '0',
685 `quantity_inv` double NOT NULL default '0',
687 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
690 ### Data of table `0_grn_items` ###
694 ### Structure of table `0_groups` ###
696 DROP TABLE IF EXISTS `0_groups`;
698 CREATE TABLE `0_groups` (
699 `id` smallint(6) unsigned NOT NULL auto_increment,
700 `description` varchar(60) NOT NULL default '',
701 `inactive` tinyint(1) NOT NULL default '0',
703 UNIQUE KEY `description` (`description`)
704 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
707 ### Data of table `0_groups` ###
709 INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
710 INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
711 INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
714 ### Structure of table `0_item_codes` ###
716 DROP TABLE IF EXISTS `0_item_codes`;
718 CREATE TABLE `0_item_codes` (
719 `id` int(11) unsigned NOT NULL auto_increment,
720 `item_code` varchar(20) NOT NULL,
721 `stock_id` varchar(20) NOT NULL,
722 `description` varchar(200) NOT NULL default '',
723 `category_id` smallint(6) unsigned NOT NULL,
724 `quantity` double NOT NULL default '1',
725 `is_foreign` tinyint(1) NOT NULL default '0',
726 `inactive` tinyint(1) NOT NULL default '0',
728 UNIQUE KEY `stock_id` (`stock_id`,`item_code`)
729 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
732 ### Data of table `0_item_codes` ###
736 ### Structure of table `0_item_tax_type_exemptions` ###
738 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
740 CREATE TABLE `0_item_tax_type_exemptions` (
741 `item_tax_type_id` int(11) NOT NULL default '0',
742 `tax_type_id` int(11) NOT NULL default '0',
743 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
747 ### Data of table `0_item_tax_type_exemptions` ###
751 ### Structure of table `0_item_tax_types` ###
753 DROP TABLE IF EXISTS `0_item_tax_types`;
755 CREATE TABLE `0_item_tax_types` (
756 `id` int(11) NOT NULL auto_increment,
757 `name` varchar(60) NOT NULL default '',
758 `exempt` tinyint(1) NOT NULL default '0',
760 UNIQUE KEY `name` (`name`)
761 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
764 ### Data of table `0_item_tax_types` ###
766 INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0');
769 ### Structure of table `0_item_units` ###
771 DROP TABLE IF EXISTS `0_item_units`;
773 CREATE TABLE `0_item_units` (
774 `abbr` varchar(20) NOT NULL,
775 `name` varchar(40) NOT NULL,
776 `decimals` tinyint(2) NOT NULL,
777 `inactive` tinyint(1) NOT NULL default '0',
778 PRIMARY KEY (`abbr`),
779 UNIQUE KEY `name` (`name`)
783 ### Data of table `0_item_units` ###
785 INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0');
788 ### Structure of table `0_loc_stock` ###
790 DROP TABLE IF EXISTS `0_loc_stock`;
792 CREATE TABLE `0_loc_stock` (
793 `loc_code` char(5) NOT NULL default '',
794 `stock_id` char(20) NOT NULL default '',
795 `reorder_level` bigint(20) NOT NULL default '0',
796 PRIMARY KEY (`loc_code`,`stock_id`),
797 KEY `stock_id` (`stock_id`)
801 ### Data of table `0_loc_stock` ###
805 ### Structure of table `0_locations` ###
807 DROP TABLE IF EXISTS `0_locations`;
809 CREATE TABLE `0_locations` (
810 `loc_code` varchar(5) NOT NULL default '',
811 `location_name` varchar(60) NOT NULL default '',
812 `delivery_address` tinytext NOT NULL,
813 `phone` varchar(30) NOT NULL default '',
814 `fax` varchar(30) NOT NULL default '',
815 `email` varchar(100) NOT NULL default '',
816 `contact` varchar(30) NOT NULL default '',
817 `inactive` tinyint(1) NOT NULL default '0',
818 PRIMARY KEY (`loc_code`)
822 ### Data of table `0_locations` ###
824 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '0');
827 ### Structure of table `0_movement_types` ###
829 DROP TABLE IF EXISTS `0_movement_types`;
831 CREATE TABLE `0_movement_types` (
832 `id` int(11) NOT NULL auto_increment,
833 `name` varchar(60) NOT NULL default '',
835 UNIQUE KEY `name` (`name`)
836 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
839 ### Data of table `0_movement_types` ###
841 INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment');
844 ### Structure of table `0_payment_terms` ###
846 DROP TABLE IF EXISTS `0_payment_terms`;
848 CREATE TABLE `0_payment_terms` (
849 `terms_indicator` int(11) NOT NULL auto_increment,
850 `terms` char(80) NOT NULL default '',
851 `days_before_due` smallint(6) NOT NULL default '0',
852 `day_in_following_month` smallint(6) NOT NULL default '0',
853 `inactive` tinyint(1) NOT NULL default '0',
854 PRIMARY KEY (`terms_indicator`),
855 UNIQUE KEY `terms` (`terms`)
856 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
859 ### Data of table `0_payment_terms` ###
861 INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0');
862 INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0');
863 INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0');
864 INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0');
867 ### Structure of table `0_prices` ###
869 DROP TABLE IF EXISTS `0_prices`;
871 CREATE TABLE `0_prices` (
872 `id` int(11) NOT NULL auto_increment,
873 `stock_id` varchar(20) NOT NULL default '',
874 `sales_type_id` int(11) NOT NULL default '0',
875 `curr_abrev` char(3) NOT NULL default '',
876 `price` double NOT NULL default '0',
878 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
879 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
882 ### Data of table `0_prices` ###
886 ### Structure of table `0_print_profiles` ###
888 DROP TABLE IF EXISTS `0_print_profiles`;
890 CREATE TABLE `0_print_profiles` (
891 `id` smallint(6) unsigned NOT NULL auto_increment,
892 `profile` varchar(30) NOT NULL,
893 `report` varchar(5) default NULL,
894 `printer` tinyint(3) unsigned default NULL,
896 UNIQUE KEY `profile` (`profile`,`report`)
897 ) TYPE=MyISAM AUTO_INCREMENT=10 ;
900 ### Data of table `0_print_profiles` ###
902 INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0');
903 INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0');
904 INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2');
905 INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2');
906 INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2');
907 INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2');
908 INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2');
909 INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2');
910 INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2');
913 ### Structure of table `0_printers` ###
915 DROP TABLE IF EXISTS `0_printers`;
917 CREATE TABLE `0_printers` (
918 `id` tinyint(3) unsigned NOT NULL auto_increment,
919 `name` varchar(20) NOT NULL,
920 `description` varchar(60) NOT NULL,
921 `queue` varchar(20) NOT NULL,
922 `host` varchar(40) NOT NULL,
923 `port` smallint(11) unsigned NOT NULL,
924 `timeout` tinyint(3) unsigned NOT NULL,
926 UNIQUE KEY `name` (`name`)
927 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
930 ### Data of table `0_printers` ###
932 INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20');
933 INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5');
934 INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
937 ### Structure of table `0_purch_data` ###
939 DROP TABLE IF EXISTS `0_purch_data`;
941 CREATE TABLE `0_purch_data` (
942 `supplier_id` int(11) NOT NULL default '0',
943 `stock_id` char(20) NOT NULL default '',
944 `price` double NOT NULL default '0',
945 `suppliers_uom` char(50) NOT NULL default '',
946 `conversion_factor` double NOT NULL default '1',
947 `supplier_description` char(50) NOT NULL default '',
948 PRIMARY KEY (`supplier_id`,`stock_id`)
952 ### Data of table `0_purch_data` ###
956 ### Structure of table `0_purch_order_details` ###
958 DROP TABLE IF EXISTS `0_purch_order_details`;
960 CREATE TABLE `0_purch_order_details` (
961 `po_detail_item` int(11) NOT NULL auto_increment,
962 `order_no` int(11) NOT NULL default '0',
963 `item_code` varchar(20) NOT NULL default '',
964 `description` tinytext,
965 `delivery_date` date NOT NULL default '0000-00-00',
966 `qty_invoiced` double NOT NULL default '0',
967 `unit_price` double NOT NULL default '0',
968 `act_price` double NOT NULL default '0',
969 `std_cost_unit` double NOT NULL default '0',
970 `quantity_ordered` double NOT NULL default '0',
971 `quantity_received` double NOT NULL default '0',
972 PRIMARY KEY (`po_detail_item`)
973 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
976 ### Data of table `0_purch_order_details` ###
980 ### Structure of table `0_purch_orders` ###
982 DROP TABLE IF EXISTS `0_purch_orders`;
984 CREATE TABLE `0_purch_orders` (
985 `order_no` int(11) NOT NULL auto_increment,
986 `supplier_id` int(11) NOT NULL default '0',
988 `ord_date` date NOT NULL default '0000-00-00',
989 `reference` tinytext NOT NULL,
990 `requisition_no` tinytext,
991 `into_stock_location` varchar(5) NOT NULL default '',
992 `delivery_address` tinytext NOT NULL,
993 PRIMARY KEY (`order_no`)
994 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
997 ### Data of table `0_purch_orders` ###
1001 ### Structure of table `0_quick_entries` ###
1003 DROP TABLE IF EXISTS `0_quick_entries`;
1005 CREATE TABLE `0_quick_entries` (
1006 `id` smallint(6) unsigned NOT NULL auto_increment,
1007 `type` tinyint(1) NOT NULL default '0',
1008 `description` varchar(60) NOT NULL,
1009 `base_amount` double NOT NULL default '0',
1010 `base_desc` varchar(60) default NULL,
1012 KEY `description` (`description`)
1013 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
1016 ### Data of table `0_quick_entries` ###
1018 INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount');
1019 INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount');
1020 INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount');
1023 ### Structure of table `0_quick_entry_lines` ###
1025 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1027 CREATE TABLE `0_quick_entry_lines` (
1028 `id` smallint(6) unsigned NOT NULL auto_increment,
1029 `qid` smallint(6) unsigned NOT NULL,
1030 `amount` double default '0',
1031 `action` varchar(2) NOT NULL,
1032 `dest_id` varchar(11) NOT NULL,
1033 `dimension_id` smallint(6) unsigned default NULL,
1034 `dimension2_id` smallint(6) unsigned default NULL,
1037 ) TYPE=MyISAM AUTO_INCREMENT=7 ;
1040 ### Data of table `0_quick_entry_lines` ###
1042 INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', 't-', '1', '0', '0');
1043 INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', 't-', '1', '0', '0');
1044 INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', 't-', '1', '0', '0');
1045 INSERT INTO `0_quick_entry_lines` VALUES ('4', '3', '0', '=', '4010', '0', '0');
1046 INSERT INTO `0_quick_entry_lines` VALUES ('5', '1', '0', '=', '5765', '0', '0');
1047 INSERT INTO `0_quick_entry_lines` VALUES ('6', '2', '0', '=', '5780', '0', '0');
1050 ### Structure of table `0_recurrent_invoices` ###
1052 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1054 CREATE TABLE `0_recurrent_invoices` (
1055 `id` smallint(6) unsigned NOT NULL auto_increment,
1056 `description` varchar(60) NOT NULL default '',
1057 `order_no` int(11) unsigned NOT NULL,
1058 `debtor_no` int(11) unsigned default NULL,
1059 `group_no` smallint(6) unsigned default NULL,
1060 `days` int(11) NOT NULL default '0',
1061 `monthly` int(11) NOT NULL default '0',
1062 `begin` date NOT NULL default '0000-00-00',
1063 `end` date NOT NULL default '0000-00-00',
1064 `last_sent` date NOT NULL default '0000-00-00',
1066 UNIQUE KEY `description` (`description`)
1067 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1070 ### Data of table `0_recurrent_invoices` ###
1074 ### Structure of table `0_refs` ###
1076 DROP TABLE IF EXISTS `0_refs`;
1078 CREATE TABLE `0_refs` (
1079 `id` int(11) NOT NULL default '0',
1080 `type` int(11) NOT NULL default '0',
1081 `reference` varchar(100) NOT NULL default '',
1082 PRIMARY KEY (`id`,`type`)
1086 ### Data of table `0_refs` ###
1090 ### Structure of table `0_sales_order_details` ###
1092 DROP TABLE IF EXISTS `0_sales_order_details`;
1094 CREATE TABLE `0_sales_order_details` (
1095 `id` int(11) NOT NULL auto_increment,
1096 `order_no` int(11) NOT NULL default '0',
1097 `stk_code` varchar(20) NOT NULL default '',
1098 `description` tinytext,
1099 `qty_sent` double NOT NULL default '0',
1100 `unit_price` double NOT NULL default '0',
1101 `quantity` double NOT NULL default '0',
1102 `discount_percent` double NOT NULL default '0',
1104 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1107 ### Data of table `0_sales_order_details` ###
1111 ### Structure of table `0_sales_orders` ###
1113 DROP TABLE IF EXISTS `0_sales_orders`;
1115 CREATE TABLE `0_sales_orders` (
1116 `order_no` int(11) NOT NULL auto_increment,
1117 `version` tinyint(1) unsigned NOT NULL default '0',
1118 `type` tinyint(1) NOT NULL default '0',
1119 `debtor_no` int(11) NOT NULL default '0',
1120 `branch_code` int(11) NOT NULL default '0',
1121 `customer_ref` tinytext NOT NULL,
1122 `comments` tinytext,
1123 `ord_date` date NOT NULL default '0000-00-00',
1124 `order_type` int(11) NOT NULL default '0',
1125 `ship_via` int(11) NOT NULL default '0',
1126 `delivery_address` tinytext NOT NULL,
1127 `contact_phone` varchar(30) default NULL,
1128 `contact_email` varchar(100) default NULL,
1129 `deliver_to` tinytext NOT NULL,
1130 `freight_cost` double NOT NULL default '0',
1131 `from_stk_loc` varchar(5) NOT NULL default '',
1132 `delivery_date` date NOT NULL default '0000-00-00',
1133 PRIMARY KEY (`order_no`)
1134 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1137 ### Data of table `0_sales_orders` ###
1141 ### Structure of table `0_sales_pos` ###
1143 DROP TABLE IF EXISTS `0_sales_pos`;
1145 CREATE TABLE `0_sales_pos` (
1146 `id` smallint(6) unsigned NOT NULL auto_increment,
1147 `pos_name` varchar(30) NOT NULL,
1148 `cash_sale` tinyint(1) NOT NULL,
1149 `credit_sale` tinyint(1) NOT NULL,
1150 `pos_location` varchar(5) NOT NULL,
1151 `pos_account` smallint(6) unsigned NOT NULL,
1152 `inactive` tinyint(1) NOT NULL default '0',
1154 UNIQUE KEY `pos_name` (`pos_name`)
1155 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1158 ### Data of table `0_sales_pos` ###
1160 INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '2', '0');
1163 ### Structure of table `0_sales_types` ###
1165 DROP TABLE IF EXISTS `0_sales_types`;
1167 CREATE TABLE `0_sales_types` (
1168 `id` int(11) NOT NULL auto_increment,
1169 `sales_type` char(50) NOT NULL default '',
1170 `tax_included` int(1) NOT NULL default '0',
1171 `factor` double NOT NULL default '1',
1172 `inactive` tinyint(1) NOT NULL default '0',
1174 UNIQUE KEY `sales_type` (`sales_type`)
1175 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
1178 ### Data of table `0_sales_types` ###
1180 INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '1', '1', '0');
1181 INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '0.7', '0');
1184 ### Structure of table `0_salesman` ###
1186 DROP TABLE IF EXISTS `0_salesman`;
1188 CREATE TABLE `0_salesman` (
1189 `salesman_code` int(11) NOT NULL auto_increment,
1190 `salesman_name` char(60) NOT NULL default '',
1191 `salesman_phone` char(30) NOT NULL default '',
1192 `salesman_fax` char(30) NOT NULL default '',
1193 `salesman_email` varchar(100) NOT NULL default '',
1194 `provision` double NOT NULL default '0',
1195 `break_pt` double NOT NULL default '0',
1196 `provision2` double NOT NULL default '0',
1197 `inactive` tinyint(1) NOT NULL default '0',
1198 PRIMARY KEY (`salesman_code`),
1199 UNIQUE KEY `salesman_name` (`salesman_name`)
1200 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1203 ### Data of table `0_salesman` ###
1205 INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1208 ### Structure of table `0_shippers` ###
1210 DROP TABLE IF EXISTS `0_shippers`;
1212 CREATE TABLE `0_shippers` (
1213 `shipper_id` int(11) NOT NULL auto_increment,
1214 `shipper_name` varchar(60) NOT NULL default '',
1215 `phone` varchar(30) NOT NULL default '',
1216 `contact` tinytext NOT NULL,
1217 `address` tinytext NOT NULL,
1218 `inactive` tinyint(1) NOT NULL default '0',
1219 PRIMARY KEY (`shipper_id`),
1220 UNIQUE KEY `name` (`shipper_name`)
1221 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1224 ### Data of table `0_shippers` ###
1226 INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '0');
1229 ### Structure of table `0_sql_trail` ###
1231 DROP TABLE IF EXISTS `0_sql_trail`;
1233 CREATE TABLE `0_sql_trail` (
1234 `id` int(11) unsigned NOT NULL auto_increment,
1235 `sql` text NOT NULL,
1236 `result` tinyint(1) NOT NULL,
1237 `msg` varchar(255) NOT NULL,
1239 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1242 ### Data of table `0_sql_trail` ###
1246 ### Structure of table `0_stock_category` ###
1248 DROP TABLE IF EXISTS `0_stock_category`;
1250 CREATE TABLE `0_stock_category` (
1251 `category_id` int(11) NOT NULL auto_increment,
1252 `description` varchar(60) NOT NULL default '',
1253 `stock_act` varchar(11) default NULL,
1254 `cogs_act` varchar(11) default NULL,
1255 `adj_gl_act` varchar(11) default NULL,
1256 `purch_price_var_act` varchar(11) default NULL,
1257 `inactive` tinyint(1) NOT NULL default '0',
1258 PRIMARY KEY (`category_id`),
1259 UNIQUE KEY `description` (`description`)
1260 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
1263 ### Data of table `0_stock_category` ###
1265 INSERT INTO `0_stock_category` VALUES ('1', 'Components', '', '', '', '', '0');
1266 INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '', '', '', '', '0');
1267 INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '', '', '', '', '0');
1268 INSERT INTO `0_stock_category` VALUES ('4', 'Services', '', '', '', '', '0');
1271 ### Structure of table `0_stock_master` ###
1273 DROP TABLE IF EXISTS `0_stock_master`;
1275 CREATE TABLE `0_stock_master` (
1276 `stock_id` varchar(20) NOT NULL default '',
1277 `category_id` int(11) NOT NULL default '0',
1278 `tax_type_id` int(11) NOT NULL default '0',
1279 `description` varchar(200) NOT NULL default '',
1280 `long_description` tinytext NOT NULL,
1281 `units` varchar(20) NOT NULL default 'each',
1282 `mb_flag` char(1) NOT NULL default 'B',
1283 `sales_account` varchar(11) NOT NULL default '',
1284 `cogs_account` varchar(11) NOT NULL default '',
1285 `inventory_account` varchar(11) NOT NULL default '',
1286 `adjustment_account` varchar(11) NOT NULL default '',
1287 `assembly_account` varchar(11) NOT NULL default '',
1288 `dimension_id` int(11) default NULL,
1289 `dimension2_id` int(11) default NULL,
1290 `actual_cost` double NOT NULL default '0',
1291 `last_cost` double NOT NULL default '0',
1292 `material_cost` double NOT NULL default '0',
1293 `labour_cost` double NOT NULL default '0',
1294 `overhead_cost` double NOT NULL default '0',
1295 `inactive` tinyint(1) NOT NULL default '0',
1296 PRIMARY KEY (`stock_id`)
1300 ### Data of table `0_stock_master` ###
1304 ### Structure of table `0_stock_moves` ###
1306 DROP TABLE IF EXISTS `0_stock_moves`;
1308 CREATE TABLE `0_stock_moves` (
1309 `trans_id` int(11) NOT NULL auto_increment,
1310 `trans_no` int(11) NOT NULL default '0',
1311 `stock_id` char(20) NOT NULL default '',
1312 `type` smallint(6) NOT NULL default '0',
1313 `loc_code` char(5) NOT NULL default '',
1314 `tran_date` date NOT NULL default '0000-00-00',
1315 `person_id` int(11) default NULL,
1316 `price` double NOT NULL default '0',
1317 `reference` char(40) NOT NULL default '',
1318 `qty` double NOT NULL default '1',
1319 `discount_percent` double NOT NULL default '0',
1320 `standard_cost` double NOT NULL default '0',
1321 `visible` tinyint(1) NOT NULL default '1',
1322 PRIMARY KEY (`trans_id`),
1323 KEY `type` (`type`,`trans_no`)
1324 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1327 ### Data of table `0_stock_moves` ###
1331 ### Structure of table `0_supp_allocations` ###
1333 DROP TABLE IF EXISTS `0_supp_allocations`;
1335 CREATE TABLE `0_supp_allocations` (
1336 `id` int(11) NOT NULL auto_increment,
1337 `amt` double unsigned default NULL,
1338 `date_alloc` date NOT NULL default '0000-00-00',
1339 `trans_no_from` int(11) default NULL,
1340 `trans_type_from` int(11) default NULL,
1341 `trans_no_to` int(11) default NULL,
1342 `trans_type_to` int(11) default NULL,
1344 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1347 ### Data of table `0_supp_allocations` ###
1351 ### Structure of table `0_supp_invoice_items` ###
1353 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1355 CREATE TABLE `0_supp_invoice_items` (
1356 `id` int(11) NOT NULL auto_increment,
1357 `supp_trans_no` int(11) default NULL,
1358 `supp_trans_type` int(11) default NULL,
1359 `gl_code` varchar(11) NOT NULL default '0',
1360 `grn_item_id` int(11) default NULL,
1361 `po_detail_item_id` int(11) default NULL,
1362 `stock_id` varchar(20) NOT NULL default '',
1363 `description` tinytext,
1364 `quantity` double NOT NULL default '0',
1365 `unit_price` double NOT NULL default '0',
1366 `unit_tax` double NOT NULL default '0',
1369 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1372 ### Data of table `0_supp_invoice_items` ###
1376 ### Structure of table `0_supp_trans` ###
1378 DROP TABLE IF EXISTS `0_supp_trans`;
1380 CREATE TABLE `0_supp_trans` (
1381 `trans_no` int(11) unsigned NOT NULL default '0',
1382 `type` smallint(6) unsigned NOT NULL default '0',
1383 `supplier_id` int(11) unsigned default NULL,
1384 `reference` tinytext NOT NULL,
1385 `supp_reference` varchar(60) NOT NULL default '',
1386 `tran_date` date NOT NULL default '0000-00-00',
1387 `due_date` date NOT NULL default '0000-00-00',
1388 `ov_amount` double NOT NULL default '0',
1389 `ov_discount` double NOT NULL default '0',
1390 `ov_gst` double NOT NULL default '0',
1391 `rate` double NOT NULL default '1',
1392 `alloc` double NOT NULL default '0',
1393 PRIMARY KEY (`trans_no`,`type`),
1394 KEY `supplier_id` (`supplier_id`),
1395 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1400 ### Data of table `0_supp_trans` ###
1404 ### Structure of table `0_suppliers` ###
1406 DROP TABLE IF EXISTS `0_suppliers`;
1408 CREATE TABLE `0_suppliers` (
1409 `supplier_id` int(11) NOT NULL auto_increment,
1410 `supp_name` varchar(60) NOT NULL default '',
1411 `address` tinytext NOT NULL,
1412 `supp_address` tinytext NOT NULL,
1413 `phone` varchar(30) NOT NULL default '',
1414 `fax` varchar(30) NOT NULL default '',
1415 `gst_no` varchar(25) NOT NULL default '',
1416 `contact` varchar(60) NOT NULL default '',
1417 `supp_account_no` varchar(40) NOT NULL default '',
1418 `email` varchar(100) NOT NULL default '',
1419 `website` varchar(100) NOT NULL default '',
1420 `bank_account` varchar(60) NOT NULL default '',
1421 `curr_code` char(3) default NULL,
1422 `payment_terms` int(11) default NULL,
1423 `dimension_id` int(11) default '0',
1424 `dimension2_id` int(11) default '0',
1425 `tax_group_id` int(11) default NULL,
1426 `credit_limit` double NOT NULL default '0',
1427 `purchase_account` varchar(11) default NULL,
1428 `payable_account` varchar(11) default NULL,
1429 `payment_discount_account` varchar(11) default NULL,
1430 `notes` tinytext NOT NULL,
1431 `inactive` tinyint(1) NOT NULL default '0',
1432 PRIMARY KEY (`supplier_id`)
1433 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1436 ### Data of table `0_suppliers` ###
1440 ### Structure of table `0_sys_types` ###
1442 DROP TABLE IF EXISTS `0_sys_types`;
1444 CREATE TABLE `0_sys_types` (
1445 `type_id` smallint(6) NOT NULL default '0',
1446 `type_name` varchar(60) NOT NULL default '',
1447 `type_no` int(11) NOT NULL default '1',
1448 `next_reference` varchar(100) NOT NULL default '',
1449 PRIMARY KEY (`type_id`)
1453 ### Data of table `0_sys_types` ###
1455 INSERT INTO `0_sys_types` VALUES ('0', 'Journal - GL', '17', '1');
1456 INSERT INTO `0_sys_types` VALUES ('1', 'Payment - GL', '7', '1');
1457 INSERT INTO `0_sys_types` VALUES ('2', 'Receipt - GL', '4', '1');
1458 INSERT INTO `0_sys_types` VALUES ('4', 'Funds Transfer', '3', '1');
1459 INSERT INTO `0_sys_types` VALUES ('10', 'Sales Invoice', '16', '1');
1460 INSERT INTO `0_sys_types` VALUES ('11', 'Credit Note', '2', '1');
1461 INSERT INTO `0_sys_types` VALUES ('12', 'Receipt', '6', '1');
1462 INSERT INTO `0_sys_types` VALUES ('13', 'Delivery', '1', '1');
1463 INSERT INTO `0_sys_types` VALUES ('16', 'Location Transfer', '2', '1');
1464 INSERT INTO `0_sys_types` VALUES ('17', 'Inventory Adjustment', '2', '1');
1465 INSERT INTO `0_sys_types` VALUES ('18', 'Purchase Order', '1', '1');
1466 INSERT INTO `0_sys_types` VALUES ('20', 'Supplier Invoice', '6', '1');
1467 INSERT INTO `0_sys_types` VALUES ('21', 'Supplier Credit Note', '1', '1');
1468 INSERT INTO `0_sys_types` VALUES ('22', 'Supplier Payment', '3', '1');
1469 INSERT INTO `0_sys_types` VALUES ('25', 'Purchase Order Delivery', '1', '1');
1470 INSERT INTO `0_sys_types` VALUES ('26', 'Work Order', '1', '1');
1471 INSERT INTO `0_sys_types` VALUES ('28', 'Work Order Issue', '1', '1');
1472 INSERT INTO `0_sys_types` VALUES ('29', 'Work Order Production', '1', '1');
1473 INSERT INTO `0_sys_types` VALUES ('30', 'Sales Order', '1', '1');
1474 INSERT INTO `0_sys_types` VALUES ('35', 'Cost Update', '1', '1');
1475 INSERT INTO `0_sys_types` VALUES ('40', 'Dimension', '1', '1');
1478 ### Structure of table `0_tax_group_items` ###
1480 DROP TABLE IF EXISTS `0_tax_group_items`;
1482 CREATE TABLE `0_tax_group_items` (
1483 `tax_group_id` int(11) NOT NULL default '0',
1484 `tax_type_id` int(11) NOT NULL default '0',
1485 `rate` double NOT NULL default '0',
1486 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1490 ### Data of table `0_tax_group_items` ###
1492 INSERT INTO `0_tax_group_items` VALUES ('1', '1', '5');
1495 ### Structure of table `0_tax_groups` ###
1497 DROP TABLE IF EXISTS `0_tax_groups`;
1499 CREATE TABLE `0_tax_groups` (
1500 `id` int(11) NOT NULL auto_increment,
1501 `name` varchar(60) NOT NULL default '',
1502 `tax_shipping` tinyint(1) NOT NULL default '0',
1504 UNIQUE KEY `name` (`name`)
1505 ) TYPE=InnoDB AUTO_INCREMENT=3 ;
1508 ### Data of table `0_tax_groups` ###
1510 INSERT INTO `0_tax_groups` VALUES ('1', 'Tax', '0');
1511 INSERT INTO `0_tax_groups` VALUES ('2', 'Tax Exempt', '0');
1514 ### Structure of table `0_tax_types` ###
1516 DROP TABLE IF EXISTS `0_tax_types`;
1518 CREATE TABLE `0_tax_types` (
1519 `id` int(11) NOT NULL auto_increment,
1520 `rate` double NOT NULL default '0',
1521 `sales_gl_code` varchar(11) NOT NULL default '',
1522 `purchasing_gl_code` varchar(11) NOT NULL default '',
1523 `name` varchar(60) NOT NULL default '',
1525 UNIQUE KEY `name` (`name`,`rate`)
1526 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
1529 ### Data of table `0_tax_types` ###
1531 INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2150', 'Tax');
1534 ### Structure of table `0_trans_tax_details` ###
1536 DROP TABLE IF EXISTS `0_trans_tax_details`;
1538 CREATE TABLE `0_trans_tax_details` (
1539 `id` int(11) NOT NULL auto_increment,
1540 `trans_type` smallint(6) default NULL,
1541 `trans_no` int(11) default NULL,
1542 `tran_date` date NOT NULL,
1543 `tax_type_id` int(11) NOT NULL default '0',
1544 `rate` double NOT NULL default '0',
1545 `ex_rate` double NOT NULL default '1',
1546 `included_in_price` tinyint(1) NOT NULL default '0',
1547 `net_amount` double NOT NULL default '0',
1548 `amount` double NOT NULL default '0',
1551 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1554 ### Data of table `0_trans_tax_details` ###
1558 ### Structure of table `0_users` ###
1560 DROP TABLE IF EXISTS `0_users`;
1562 CREATE TABLE `0_users` (
1563 `user_id` varchar(60) NOT NULL default '',
1564 `password` varchar(100) NOT NULL default '',
1565 `real_name` varchar(100) NOT NULL default '',
1566 `full_access` int(11) NOT NULL default '1',
1567 `phone` varchar(30) NOT NULL default '',
1568 `email` varchar(100) default NULL,
1569 `language` varchar(20) default NULL,
1570 `date_format` tinyint(1) NOT NULL default '0',
1571 `date_sep` tinyint(1) NOT NULL default '0',
1572 `tho_sep` tinyint(1) NOT NULL default '0',
1573 `dec_sep` tinyint(1) NOT NULL default '0',
1574 `theme` varchar(20) NOT NULL default 'default',
1575 `page_size` varchar(20) NOT NULL default 'A4',
1576 `prices_dec` smallint(6) NOT NULL default '2',
1577 `qty_dec` smallint(6) NOT NULL default '2',
1578 `rates_dec` smallint(6) NOT NULL default '4',
1579 `percent_dec` smallint(6) NOT NULL default '1',
1580 `show_gl` tinyint(1) NOT NULL default '1',
1581 `show_codes` tinyint(1) NOT NULL default '0',
1582 `show_hints` tinyint(1) NOT NULL default '0',
1583 `last_visit_date` datetime default NULL,
1584 `query_size` tinyint(1) default '10',
1585 `graphic_links` tinyint(1) default '1',
1586 `pos` smallint(6) default '1',
1587 `print_profile` varchar(30) NOT NULL default '1',
1588 `rep_popup` tinyint(1) default '1',
1589 PRIMARY KEY (`user_id`)
1593 ### Data of table `0_users` ###
1595 INSERT INTO `0_users` VALUES ('admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', '2', '', 'adm@adm.com', 'en_US', '0', '0', '2', '1', 'default', 'Letter', '2', '2', '4', '1', '1', '0', '0', '2008-04-04 12:34:29', '10', '1', '1', '', '1');
1598 ### Structure of table `0_voided` ###
1600 DROP TABLE IF EXISTS `0_voided`;
1602 CREATE TABLE `0_voided` (
1603 `type` int(11) NOT NULL default '0',
1604 `id` int(11) NOT NULL default '0',
1605 `date_` date NOT NULL default '0000-00-00',
1606 `memo_` tinytext NOT NULL,
1607 UNIQUE KEY `id` (`type`,`id`)
1611 ### Data of table `0_voided` ###
1615 ### Structure of table `0_wo_issue_items` ###
1617 DROP TABLE IF EXISTS `0_wo_issue_items`;
1619 CREATE TABLE `0_wo_issue_items` (
1620 `id` int(11) NOT NULL auto_increment,
1621 `stock_id` varchar(40) default NULL,
1622 `issue_id` int(11) default NULL,
1623 `qty_issued` double default NULL,
1625 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1628 ### Data of table `0_wo_issue_items` ###
1632 ### Structure of table `0_wo_issues` ###
1634 DROP TABLE IF EXISTS `0_wo_issues`;
1636 CREATE TABLE `0_wo_issues` (
1637 `issue_no` int(11) NOT NULL auto_increment,
1638 `workorder_id` int(11) NOT NULL default '0',
1639 `reference` varchar(100) default NULL,
1640 `issue_date` date default NULL,
1641 `loc_code` varchar(5) default NULL,
1642 `workcentre_id` int(11) default NULL,
1643 PRIMARY KEY (`issue_no`)
1644 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1647 ### Data of table `0_wo_issues` ###
1651 ### Structure of table `0_wo_manufacture` ###
1653 DROP TABLE IF EXISTS `0_wo_manufacture`;
1655 CREATE TABLE `0_wo_manufacture` (
1656 `id` int(11) NOT NULL auto_increment,
1657 `reference` varchar(100) default NULL,
1658 `workorder_id` int(11) NOT NULL default '0',
1659 `quantity` double NOT NULL default '0',
1660 `date_` date NOT NULL default '0000-00-00',
1662 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1665 ### Data of table `0_wo_manufacture` ###
1669 ### Structure of table `0_wo_requirements` ###
1671 DROP TABLE IF EXISTS `0_wo_requirements`;
1673 CREATE TABLE `0_wo_requirements` (
1674 `id` int(11) NOT NULL auto_increment,
1675 `workorder_id` int(11) NOT NULL default '0',
1676 `stock_id` char(20) NOT NULL default '',
1677 `workcentre` int(11) NOT NULL default '0',
1678 `units_req` double NOT NULL default '1',
1679 `std_cost` double NOT NULL default '0',
1680 `loc_code` char(5) NOT NULL default '',
1681 `units_issued` double NOT NULL default '0',
1683 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1686 ### Data of table `0_wo_requirements` ###
1690 ### Structure of table `0_workcentres` ###
1692 DROP TABLE IF EXISTS `0_workcentres`;
1694 CREATE TABLE `0_workcentres` (
1695 `id` int(11) NOT NULL auto_increment,
1696 `name` char(40) NOT NULL default '',
1697 `description` char(50) NOT NULL default '',
1698 `inactive` tinyint(1) NOT NULL default '0',
1700 UNIQUE KEY `name` (`name`)
1701 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1704 ### Data of table `0_workcentres` ###
1708 ### Structure of table `0_workorders` ###
1710 DROP TABLE IF EXISTS `0_workorders`;
1712 CREATE TABLE `0_workorders` (
1713 `id` int(11) NOT NULL auto_increment,
1714 `wo_ref` varchar(60) NOT NULL default '',
1715 `loc_code` varchar(5) NOT NULL default '',
1716 `units_reqd` double NOT NULL default '1',
1717 `stock_id` varchar(20) NOT NULL default '',
1718 `date_` date NOT NULL default '0000-00-00',
1719 `type` tinyint(4) NOT NULL default '0',
1720 `required_by` date NOT NULL default '0000-00-00',
1721 `released_date` date NOT NULL default '0000-00-00',
1722 `units_issued` double NOT NULL default '0',
1723 `closed` tinyint(1) NOT NULL default '0',
1724 `released` tinyint(1) NOT NULL default '0',
1725 `additional_costs` double NOT NULL default '0',
1727 UNIQUE KEY `wo_ref` (`wo_ref`)
1728 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1731 ### Data of table `0_workorders` ###