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 `amount` double default NULL,
89 `dimension_id` int(11) NOT NULL default '0',
90 `dimension2_id` int(11) NOT NULL default '0',
91 `person_type_id` int(11) NOT NULL default '0',
93 `reconciled` date default NULL,
95 KEY `bank_act` (`bank_act`,`ref`),
96 KEY `type` (`type`,`trans_no`)
97 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
100 ### Data of table `0_bank_trans` ###
104 ### Structure of table `0_bom` ###
106 DROP TABLE IF EXISTS `0_bom`;
108 CREATE TABLE `0_bom` (
109 `id` int(11) NOT NULL auto_increment,
110 `parent` char(20) NOT NULL default '',
111 `component` char(20) NOT NULL default '',
112 `workcentre_added` int(11) NOT NULL default '0',
113 `loc_code` char(5) NOT NULL default '',
114 `quantity` double NOT NULL default '1',
115 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
116 KEY `component` (`component`),
118 KEY `loc_code` (`loc_code`),
119 KEY `parent` (`parent`,`loc_code`),
120 KEY `Parent_2` (`parent`),
121 KEY `workcentre_added` (`workcentre_added`)
122 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
125 ### Data of table `0_bom` ###
129 ### Structure of table `0_budget_trans` ###
131 DROP TABLE IF EXISTS `0_budget_trans`;
133 CREATE TABLE `0_budget_trans` (
134 `counter` int(11) NOT NULL auto_increment,
135 `type` smallint(6) NOT NULL default '0',
136 `type_no` bigint(16) NOT NULL default '1',
137 `tran_date` date NOT NULL default '0000-00-00',
138 `account` varchar(11) NOT NULL default '',
139 `memo_` tinytext NOT NULL,
140 `amount` double NOT NULL default '0',
141 `dimension_id` int(11) default '0',
142 `dimension2_id` int(11) default '0',
143 `person_type_id` int(11) default NULL,
144 `person_id` tinyblob,
145 PRIMARY KEY (`counter`),
146 KEY `Type_and_Number` (`type`,`type_no`)
147 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
150 ### Data of table `0_budget_trans` ###
154 ### Structure of table `0_chart_class` ###
156 DROP TABLE IF EXISTS `0_chart_class`;
158 CREATE TABLE `0_chart_class` (
159 `cid` int(11) NOT NULL default '0',
160 `class_name` varchar(60) NOT NULL default '',
161 `balance_sheet` tinyint(1) NOT NULL default '0',
166 ### Data of table `0_chart_class` ###
168 INSERT INTO `0_chart_class` VALUES ('1', 'Assets', '1');
169 INSERT INTO `0_chart_class` VALUES ('2', 'Liabilities', '2');
170 INSERT INTO `0_chart_class` VALUES ('3', 'Income', '4');
171 INSERT INTO `0_chart_class` VALUES ('4', 'Costs', '6');
174 ### Structure of table `0_chart_master` ###
176 DROP TABLE IF EXISTS `0_chart_master`;
178 CREATE TABLE `0_chart_master` (
179 `account_code` varchar(11) NOT NULL default '',
180 `account_code2` varchar(11) default '',
181 `account_name` varchar(60) NOT NULL default '',
182 `account_type` int(11) NOT NULL default '0',
183 `inactive` tinyint(1) NOT NULL default '0',
184 PRIMARY KEY (`account_code`),
185 KEY `account_code` (`account_code`),
186 KEY `account_name` (`account_name`)
190 ### Data of table `0_chart_master` ###
192 INSERT INTO `0_chart_master` VALUES ('1060', '', 'Checking Account', '1', '0');
193 INSERT INTO `0_chart_master` VALUES ('1065', '', 'Petty Cash', '1', '0');
194 INSERT INTO `0_chart_master` VALUES ('1200', '', 'Accounts Receivables', '1', '0');
195 INSERT INTO `0_chart_master` VALUES ('1205', '', 'Allowance for doubtful accounts', '1', '0');
196 INSERT INTO `0_chart_master` VALUES ('1510', '', 'Inventory', '2', '0');
197 INSERT INTO `0_chart_master` VALUES ('1520', '', 'Stocks of Raw Materials', '2', '0');
198 INSERT INTO `0_chart_master` VALUES ('1530', '', 'Stocks of Work In Progress', '2', '0');
199 INSERT INTO `0_chart_master` VALUES ('1540', '', 'Stocks of Finsihed Goods', '2', '0');
200 INSERT INTO `0_chart_master` VALUES ('1550', '', 'Goods Received Clearing account', '2', '0');
201 INSERT INTO `0_chart_master` VALUES ('1820', '', 'Office Furniture & Equipment', '3', '0');
202 INSERT INTO `0_chart_master` VALUES ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0');
203 INSERT INTO `0_chart_master` VALUES ('1840', '', 'Vehicle', '3', '0');
204 INSERT INTO `0_chart_master` VALUES ('1845', '', 'Accum. Amort. -Vehicle', '3', '0');
205 INSERT INTO `0_chart_master` VALUES ('2100', '', 'Accounts Payable', '4', '0');
206 INSERT INTO `0_chart_master` VALUES ('2110', '', 'Accrued Income Tax - Federal', '4', '0');
207 INSERT INTO `0_chart_master` VALUES ('2120', '', 'Accrued Income Tax - State', '4', '0');
208 INSERT INTO `0_chart_master` VALUES ('2130', '', 'Accrued Franchise Tax', '4', '0');
209 INSERT INTO `0_chart_master` VALUES ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0');
210 INSERT INTO `0_chart_master` VALUES ('2150', '', 'Sales Tax', '4', '0');
211 INSERT INTO `0_chart_master` VALUES ('2160', '', 'Accrued Use Tax Payable', '4', '0');
212 INSERT INTO `0_chart_master` VALUES ('2210', '', 'Accrued Wages', '4', '0');
213 INSERT INTO `0_chart_master` VALUES ('2220', '', 'Accrued Comp Time', '4', '0');
214 INSERT INTO `0_chart_master` VALUES ('2230', '', 'Accrued Holiday Pay', '4', '0');
215 INSERT INTO `0_chart_master` VALUES ('2240', '', 'Accrued Vacation Pay', '4', '0');
216 INSERT INTO `0_chart_master` VALUES ('2310', '', 'Accr. Benefits - 401K', '4', '0');
217 INSERT INTO `0_chart_master` VALUES ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0');
218 INSERT INTO `0_chart_master` VALUES ('2330', '', 'Accr. Benefits - Med, Den', '4', '0');
219 INSERT INTO `0_chart_master` VALUES ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0');
220 INSERT INTO `0_chart_master` VALUES ('2350', '', 'Accr. Benefits - Credit Union', '4', '0');
221 INSERT INTO `0_chart_master` VALUES ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0');
222 INSERT INTO `0_chart_master` VALUES ('2370', '', 'Accr. Benefits - Garnish', '4', '0');
223 INSERT INTO `0_chart_master` VALUES ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0');
224 INSERT INTO `0_chart_master` VALUES ('2620', '', 'Bank Loans', '5', '0');
225 INSERT INTO `0_chart_master` VALUES ('2680', '', 'Loans from Shareholders', '5', '0');
226 INSERT INTO `0_chart_master` VALUES ('3350', '', 'Common Shares', '6', '0');
227 INSERT INTO `0_chart_master` VALUES ('3590', '', 'Retained Earnings - prior years', '7', '0');
228 INSERT INTO `0_chart_master` VALUES ('4010', '', 'Sales', '8', '0');
229 INSERT INTO `0_chart_master` VALUES ('4430', '', 'Shipping & Handling', '9', '0');
230 INSERT INTO `0_chart_master` VALUES ('4440', '', 'Interest', '9', '0');
231 INSERT INTO `0_chart_master` VALUES ('4450', '', 'Foreign Exchange Gain', '9', '0');
232 INSERT INTO `0_chart_master` VALUES ('4500', '', 'Prompt Payment Discounts', '9', '0');
233 INSERT INTO `0_chart_master` VALUES ('4510', '', 'Discounts Given', '9', '0');
234 INSERT INTO `0_chart_master` VALUES ('5010', '', 'Cost of Goods Sold - Retail', '10', '0');
235 INSERT INTO `0_chart_master` VALUES ('5020', '', 'Material Usage Varaiance', '10', '0');
236 INSERT INTO `0_chart_master` VALUES ('5030', '', 'Consumable Materials', '10', '0');
237 INSERT INTO `0_chart_master` VALUES ('5040', '', 'Purchase price Variance', '10', '0');
238 INSERT INTO `0_chart_master` VALUES ('5050', '', 'Purchases of materials', '10', '0');
239 INSERT INTO `0_chart_master` VALUES ('5060', '', 'Discounts Received', '10', '0');
240 INSERT INTO `0_chart_master` VALUES ('5100', '', 'Freight', '10', '0');
241 INSERT INTO `0_chart_master` VALUES ('5410', '', 'Wages & Salaries', '11', '0');
242 INSERT INTO `0_chart_master` VALUES ('5420', '', 'Wages - Overtime', '11', '0');
243 INSERT INTO `0_chart_master` VALUES ('5430', '', 'Benefits - Comp Time', '11', '0');
244 INSERT INTO `0_chart_master` VALUES ('5440', '', 'Benefits - Payroll Taxes', '11', '0');
245 INSERT INTO `0_chart_master` VALUES ('5450', '', 'Benefits - Workers Comp', '11', '0');
246 INSERT INTO `0_chart_master` VALUES ('5460', '', 'Benefits - Pension', '11', '0');
247 INSERT INTO `0_chart_master` VALUES ('5470', '', 'Benefits - General Benefits', '11', '0');
248 INSERT INTO `0_chart_master` VALUES ('5510', '', 'Inc Tax Exp - Federal', '11', '0');
249 INSERT INTO `0_chart_master` VALUES ('5520', '', 'Inc Tax Exp - State', '11', '0');
250 INSERT INTO `0_chart_master` VALUES ('5530', '', 'Taxes - Real Estate', '11', '0');
251 INSERT INTO `0_chart_master` VALUES ('5540', '', 'Taxes - Personal Property', '11', '0');
252 INSERT INTO `0_chart_master` VALUES ('5550', '', 'Taxes - Franchise', '11', '0');
253 INSERT INTO `0_chart_master` VALUES ('5560', '', 'Taxes - Foreign Withholding', '11', '0');
254 INSERT INTO `0_chart_master` VALUES ('5610', '', 'Accounting & Legal', '12', '0');
255 INSERT INTO `0_chart_master` VALUES ('5615', '', 'Advertising & Promotions', '12', '0');
256 INSERT INTO `0_chart_master` VALUES ('5620', '', 'Bad Debts', '12', '0');
257 INSERT INTO `0_chart_master` VALUES ('5660', '', 'Amortization Expense', '12', '0');
258 INSERT INTO `0_chart_master` VALUES ('5685', '', 'Insurance', '12', '0');
259 INSERT INTO `0_chart_master` VALUES ('5690', '', 'Interest & Bank Charges', '12', '0');
260 INSERT INTO `0_chart_master` VALUES ('5700', '', 'Office Supplies', '12', '0');
261 INSERT INTO `0_chart_master` VALUES ('5760', '', 'Rent', '12', '0');
262 INSERT INTO `0_chart_master` VALUES ('5765', '', 'Repair & Maintenance', '12', '0');
263 INSERT INTO `0_chart_master` VALUES ('5780', '', 'Telephone', '12', '0');
264 INSERT INTO `0_chart_master` VALUES ('5785', '', 'Travel & Entertainment', '12', '0');
265 INSERT INTO `0_chart_master` VALUES ('5790', '', 'Utilities', '12', '0');
266 INSERT INTO `0_chart_master` VALUES ('5795', '', 'Registrations', '12', '0');
267 INSERT INTO `0_chart_master` VALUES ('5800', '', 'Licenses', '12', '0');
268 INSERT INTO `0_chart_master` VALUES ('5810', '', 'Foreign Exchange Loss', '12', '0');
269 INSERT INTO `0_chart_master` VALUES ('9990', '', 'Year Profit/Loss', '12', '0');
272 ### Structure of table `0_chart_types` ###
274 DROP TABLE IF EXISTS `0_chart_types`;
276 CREATE TABLE `0_chart_types` (
277 `id` int(11) NOT NULL auto_increment,
278 `name` varchar(60) NOT NULL default '',
279 `class_id` tinyint(1) NOT NULL default '0',
280 `parent` int(11) NOT NULL default '-1',
283 ) TYPE=MyISAM AUTO_INCREMENT=13 ;
286 ### Data of table `0_chart_types` ###
288 INSERT INTO `0_chart_types` VALUES ('1', 'Current Assets', '1', '0');
289 INSERT INTO `0_chart_types` VALUES ('2', 'Inventory Assets', '1', '0');
290 INSERT INTO `0_chart_types` VALUES ('3', 'Capital Assets', '1', '0');
291 INSERT INTO `0_chart_types` VALUES ('4', 'Current Liabilities', '2', '0');
292 INSERT INTO `0_chart_types` VALUES ('5', 'Long Term Liabilities', '2', '0');
293 INSERT INTO `0_chart_types` VALUES ('6', 'Share Capital', '2', '0');
294 INSERT INTO `0_chart_types` VALUES ('7', 'Retained Earnings', '2', '0');
295 INSERT INTO `0_chart_types` VALUES ('8', 'Sales Revenue', '3', '0');
296 INSERT INTO `0_chart_types` VALUES ('9', 'Other Revenue', '3', '0');
297 INSERT INTO `0_chart_types` VALUES ('10', 'Cost of Goods Sold', '4', '0');
298 INSERT INTO `0_chart_types` VALUES ('11', 'Payroll Expenses', '4', '0');
299 INSERT INTO `0_chart_types` VALUES ('12', 'General & Administrative expenses', '4', '0');
302 ### Structure of table `0_comments` ###
304 DROP TABLE IF EXISTS `0_comments`;
306 CREATE TABLE `0_comments` (
307 `type` int(11) NOT NULL default '0',
308 `id` int(11) NOT NULL default '0',
309 `date_` date default '0000-00-00',
314 ### Data of table `0_comments` ###
318 ### Structure of table `0_company` ###
320 DROP TABLE IF EXISTS `0_company`;
322 CREATE TABLE `0_company` (
323 `coy_code` int(11) NOT NULL default '1',
324 `coy_name` varchar(60) NOT NULL default '',
325 `gst_no` varchar(25) NOT NULL default '',
326 `coy_no` varchar(25) NOT NULL default '0',
327 `tax_prd` int(11) NOT NULL default '1',
328 `tax_last` int(11) NOT NULL default '1',
329 `postal_address` tinytext NOT NULL,
330 `phone` varchar(30) NOT NULL default '',
331 `fax` varchar(30) NOT NULL default '',
332 `email` varchar(100) NOT NULL default '',
333 `coy_logo` varchar(100) NOT NULL default '',
334 `domicile` varchar(55) NOT NULL default '',
335 `curr_default` char(3) NOT NULL default '',
336 `debtors_act` varchar(11) NOT NULL default '',
337 `pyt_discount_act` varchar(11) NOT NULL default '',
338 `creditors_act` varchar(11) NOT NULL default '',
339 `grn_act` varchar(11) NOT NULL default '',
340 `exchange_diff_act` varchar(11) NOT NULL default '',
341 `purch_exchange_diff_act` varchar(11) NOT NULL default '',
342 `retained_earnings_act` varchar(11) NOT NULL default '',
343 `freight_act` varchar(11) NOT NULL default '',
344 `default_sales_act` varchar(11) NOT NULL default '',
345 `default_sales_discount_act` varchar(11) NOT NULL default '',
346 `default_prompt_payment_act` varchar(11) NOT NULL default '',
347 `default_inventory_act` varchar(11) NOT NULL default '',
348 `default_cogs_act` varchar(11) NOT NULL default '',
349 `default_adj_act` varchar(11) NOT NULL default '',
350 `default_inv_sales_act` varchar(11) NOT NULL default '',
351 `default_assembly_act` varchar(11) NOT NULL default '',
352 `payroll_act` varchar(11) NOT NULL default '',
353 `custom1_name` varchar(60) NOT NULL default '',
354 `custom2_name` varchar(60) NOT NULL default '',
355 `custom3_name` varchar(60) NOT NULL default '',
356 `custom1_value` varchar(100) NOT NULL default '',
357 `custom2_value` varchar(100) NOT NULL default '',
358 `custom3_value` varchar(100) NOT NULL default '',
359 `allow_negative_stock` tinyint(1) NOT NULL default '0',
360 `po_over_receive` int(11) NOT NULL default '10',
361 `po_over_charge` int(11) NOT NULL default '10',
362 `default_credit_limit` int(11) NOT NULL default '1000',
363 `default_workorder_required` int(11) NOT NULL default '20',
364 `default_dim_required` int(11) NOT NULL default '20',
365 `past_due_days` int(11) NOT NULL default '30',
366 `use_dimension` tinyint(1) default '0',
367 `f_year` int(11) NOT NULL default '1',
368 `no_item_list` tinyint(1) NOT NULL default '0',
369 `no_customer_list` tinyint(1) NOT NULL default '0',
370 `no_supplier_list` tinyint(1) NOT NULL default '0',
371 `base_sales` int(11) NOT NULL default '-1',
372 `foreign_codes` tinyint(1) NOT NULL default '0',
373 `accumulate_shipping` tinyint(1) NOT NULL default '0',
374 `legal_text` tinytext NOT NULL,
375 PRIMARY KEY (`coy_code`)
379 ### Data of table `0_company` ###
381 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', '');
384 ### Structure of table `0_credit_status` ###
386 DROP TABLE IF EXISTS `0_credit_status`;
388 CREATE TABLE `0_credit_status` (
389 `id` int(11) NOT NULL auto_increment,
390 `reason_description` char(100) NOT NULL default '',
391 `dissallow_invoices` tinyint(1) NOT NULL default '0',
392 `inactive` tinyint(1) NOT NULL default '0',
394 UNIQUE KEY `reason_description` (`reason_description`)
395 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
398 ### Data of table `0_credit_status` ###
400 INSERT INTO `0_credit_status` VALUES ('1', 'Good History', '0', '0');
401 INSERT INTO `0_credit_status` VALUES ('3', 'No more work until payment received', '1', '0');
402 INSERT INTO `0_credit_status` VALUES ('4', 'In liquidation', '1', '0');
405 ### Structure of table `0_currencies` ###
407 DROP TABLE IF EXISTS `0_currencies`;
409 CREATE TABLE `0_currencies` (
410 `currency` varchar(60) NOT NULL default '',
411 `curr_abrev` char(3) NOT NULL default '',
412 `curr_symbol` varchar(10) NOT NULL default '',
413 `country` varchar(100) NOT NULL default '',
414 `hundreds_name` varchar(15) NOT NULL default '',
415 `inactive` tinyint(1) NOT NULL default '0',
416 PRIMARY KEY (`curr_abrev`)
420 ### Data of table `0_currencies` ###
422 INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents', '0');
423 INSERT INTO `0_currencies` VALUES ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '0');
424 INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents', '0');
425 INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence', '0');
428 ### Structure of table `0_cust_allocations` ###
430 DROP TABLE IF EXISTS `0_cust_allocations`;
432 CREATE TABLE `0_cust_allocations` (
433 `id` int(11) NOT NULL auto_increment,
434 `amt` double unsigned default NULL,
435 `date_alloc` date NOT NULL default '0000-00-00',
436 `trans_no_from` int(11) default NULL,
437 `trans_type_from` int(11) default NULL,
438 `trans_no_to` int(11) default NULL,
439 `trans_type_to` int(11) default NULL,
441 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
444 ### Data of table `0_cust_allocations` ###
448 ### Structure of table `0_cust_branch` ###
450 DROP TABLE IF EXISTS `0_cust_branch`;
452 CREATE TABLE `0_cust_branch` (
453 `branch_code` int(11) NOT NULL auto_increment,
454 `debtor_no` int(11) NOT NULL default '0',
455 `br_name` varchar(60) NOT NULL default '',
456 `br_address` tinytext NOT NULL,
457 `area` int(11) default NULL,
458 `salesman` int(11) NOT NULL default '0',
459 `phone` varchar(30) NOT NULL default '',
460 `fax` varchar(30) NOT NULL default '',
461 `contact_name` varchar(60) NOT NULL default '',
462 `email` varchar(100) NOT NULL default '',
463 `default_location` varchar(5) NOT NULL default '',
464 `tax_group_id` int(11) default NULL,
465 `sales_account` varchar(11) default NULL,
466 `sales_discount_account` varchar(11) default NULL,
467 `receivables_account` varchar(11) default NULL,
468 `payment_discount_account` varchar(11) default NULL,
469 `default_ship_via` int(11) NOT NULL default '1',
470 `disable_trans` tinyint(4) NOT NULL default '0',
471 `br_post_address` tinytext NOT NULL,
472 `group_no` int(11) NOT NULL default '0',
473 PRIMARY KEY (`branch_code`,`debtor_no`),
474 KEY `branch_code` (`branch_code`),
475 KEY `br_name` (`br_name`)
476 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
479 ### Data of table `0_cust_branch` ###
483 ### Structure of table `0_debtor_trans` ###
485 DROP TABLE IF EXISTS `0_debtor_trans`;
487 CREATE TABLE `0_debtor_trans` (
488 `trans_no` int(11) unsigned NOT NULL default '0',
489 `type` smallint(6) unsigned NOT NULL default '0',
490 `version` tinyint(1) unsigned NOT NULL default '0',
491 `debtor_no` int(11) unsigned default NULL,
492 `branch_code` int(11) NOT NULL default '-1',
493 `tran_date` date NOT NULL default '0000-00-00',
494 `due_date` date NOT NULL default '0000-00-00',
495 `reference` varchar(60) NOT NULL default '',
496 `tpe` int(11) NOT NULL default '0',
497 `order_` int(11) NOT NULL default '0',
498 `ov_amount` double NOT NULL default '0',
499 `ov_gst` double NOT NULL default '0',
500 `ov_freight` double NOT NULL default '0',
501 `ov_freight_tax` double NOT NULL default '0',
502 `ov_discount` double NOT NULL default '0',
503 `alloc` double NOT NULL default '0',
504 `rate` double NOT NULL default '1',
505 `ship_via` int(11) default NULL,
506 `trans_link` int(11) NOT NULL default '0',
507 `dimension_id` int(11) NOT NULL default '0',
508 `dimension2_id` int(11) NOT NULL default '0',
509 PRIMARY KEY (`trans_no`,`type`),
510 KEY `debtor_no` (`debtor_no`,`branch_code`)
514 ### Data of table `0_debtor_trans` ###
518 ### Structure of table `0_debtor_trans_details` ###
520 DROP TABLE IF EXISTS `0_debtor_trans_details`;
522 CREATE TABLE `0_debtor_trans_details` (
523 `id` int(11) NOT NULL auto_increment,
524 `debtor_trans_no` int(11) default NULL,
525 `debtor_trans_type` int(11) default NULL,
526 `stock_id` varchar(20) NOT NULL default '',
527 `description` tinytext,
528 `unit_price` double NOT NULL default '0',
529 `unit_tax` double NOT NULL default '0',
530 `quantity` double NOT NULL default '0',
531 `discount_percent` double NOT NULL default '0',
532 `standard_cost` double NOT NULL default '0',
533 `qty_done` double NOT NULL default '0',
535 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
538 ### Data of table `0_debtor_trans_details` ###
542 ### Structure of table `0_debtors_master` ###
544 DROP TABLE IF EXISTS `0_debtors_master`;
546 CREATE TABLE `0_debtors_master` (
547 `debtor_no` int(11) NOT NULL auto_increment,
548 `name` varchar(60) NOT NULL default '',
550 `email` varchar(100) NOT NULL default '',
551 `tax_id` varchar(55) NOT NULL default '',
552 `curr_code` char(3) NOT NULL default '',
553 `sales_type` int(11) NOT NULL default '1',
554 `dimension_id` int(11) NOT NULL default '0',
555 `dimension2_id` int(11) NOT NULL default '0',
556 `credit_status` int(11) NOT NULL default '0',
557 `payment_terms` int(11) default NULL,
558 `discount` double NOT NULL default '0',
559 `pymt_discount` double NOT NULL default '0',
560 `credit_limit` float NOT NULL default '1000',
561 `inactive` tinyint(1) NOT NULL default '0',
562 PRIMARY KEY (`debtor_no`),
563 UNIQUE KEY `name` (`name`)
564 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
567 ### Data of table `0_debtors_master` ###
571 ### Structure of table `0_dimensions` ###
573 DROP TABLE IF EXISTS `0_dimensions`;
575 CREATE TABLE `0_dimensions` (
576 `id` int(11) NOT NULL auto_increment,
577 `reference` varchar(60) NOT NULL default '',
578 `name` varchar(60) NOT NULL default '',
579 `type_` tinyint(1) NOT NULL default '1',
580 `closed` tinyint(1) NOT NULL default '0',
581 `date_` date NOT NULL default '0000-00-00',
582 `due_date` date NOT NULL default '0000-00-00',
584 UNIQUE KEY `reference` (`reference`)
585 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
588 ### Data of table `0_dimensions` ###
592 ### Structure of table `0_exchange_rates` ###
594 DROP TABLE IF EXISTS `0_exchange_rates`;
596 CREATE TABLE `0_exchange_rates` (
597 `id` int(11) NOT NULL auto_increment,
598 `curr_code` char(3) NOT NULL default '',
599 `rate_buy` double NOT NULL default '0',
600 `rate_sell` double NOT NULL default '0',
601 `date_` date NOT NULL default '0000-00-00',
603 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
604 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
607 ### Data of table `0_exchange_rates` ###
611 ### Structure of table `0_fiscal_year` ###
613 DROP TABLE IF EXISTS `0_fiscal_year`;
615 CREATE TABLE `0_fiscal_year` (
616 `id` int(11) NOT NULL auto_increment,
617 `begin` date default '0000-00-00',
618 `end` date default '0000-00-00',
619 `closed` tinyint(1) NOT NULL default '0',
621 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
624 ### Data of table `0_fiscal_year` ###
626 INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0');
629 ### Structure of table `0_gl_trans` ###
631 DROP TABLE IF EXISTS `0_gl_trans`;
633 CREATE TABLE `0_gl_trans` (
634 `counter` int(11) NOT NULL auto_increment,
635 `type` smallint(6) NOT NULL default '0',
636 `type_no` bigint(16) NOT NULL default '1',
637 `tran_date` date NOT NULL default '0000-00-00',
638 `account` varchar(11) NOT NULL default '',
639 `memo_` tinytext NOT NULL,
640 `amount` double NOT NULL default '0',
641 `dimension_id` int(11) NOT NULL default '0',
642 `dimension2_id` int(11) NOT NULL default '0',
643 `person_type_id` int(11) default NULL,
644 `person_id` tinyblob,
645 PRIMARY KEY (`counter`),
646 KEY `Type_and_Number` (`type`,`type_no`)
647 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
650 ### Data of table `0_gl_trans` ###
654 ### Structure of table `0_grn_batch` ###
656 DROP TABLE IF EXISTS `0_grn_batch`;
658 CREATE TABLE `0_grn_batch` (
659 `id` int(11) NOT NULL auto_increment,
660 `supplier_id` int(11) NOT NULL default '0',
661 `purch_order_no` int(11) default NULL,
662 `reference` varchar(60) NOT NULL default '',
663 `delivery_date` date NOT NULL default '0000-00-00',
664 `loc_code` varchar(5) default NULL,
666 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
669 ### Data of table `0_grn_batch` ###
673 ### Structure of table `0_grn_items` ###
675 DROP TABLE IF EXISTS `0_grn_items`;
677 CREATE TABLE `0_grn_items` (
678 `id` int(11) NOT NULL auto_increment,
679 `grn_batch_id` int(11) default NULL,
680 `po_detail_item` int(11) NOT NULL default '0',
681 `item_code` varchar(20) NOT NULL default '',
682 `description` tinytext,
683 `qty_recd` double NOT NULL default '0',
684 `quantity_inv` double NOT NULL default '0',
686 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
689 ### Data of table `0_grn_items` ###
693 ### Structure of table `0_groups` ###
695 DROP TABLE IF EXISTS `0_groups`;
697 CREATE TABLE `0_groups` (
698 `id` smallint(6) unsigned NOT NULL auto_increment,
699 `description` varchar(60) NOT NULL default '',
700 `inactive` tinyint(1) NOT NULL default '0',
702 UNIQUE KEY `description` (`description`)
703 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
706 ### Data of table `0_groups` ###
708 INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
709 INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
710 INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
713 ### Structure of table `0_item_codes` ###
715 DROP TABLE IF EXISTS `0_item_codes`;
717 CREATE TABLE `0_item_codes` (
718 `id` int(11) unsigned NOT NULL auto_increment,
719 `item_code` varchar(20) NOT NULL,
720 `stock_id` varchar(20) NOT NULL,
721 `description` varchar(200) NOT NULL default '',
722 `category_id` smallint(6) unsigned NOT NULL,
723 `quantity` double NOT NULL default '1',
724 `is_foreign` tinyint(1) NOT NULL default '0',
725 `inactive` tinyint(1) NOT NULL default '0',
727 UNIQUE KEY `stock_id` (`stock_id`,`item_code`)
728 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
731 ### Data of table `0_item_codes` ###
735 ### Structure of table `0_item_tax_type_exemptions` ###
737 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
739 CREATE TABLE `0_item_tax_type_exemptions` (
740 `item_tax_type_id` int(11) NOT NULL default '0',
741 `tax_type_id` int(11) NOT NULL default '0',
742 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
746 ### Data of table `0_item_tax_type_exemptions` ###
750 ### Structure of table `0_item_tax_types` ###
752 DROP TABLE IF EXISTS `0_item_tax_types`;
754 CREATE TABLE `0_item_tax_types` (
755 `id` int(11) NOT NULL auto_increment,
756 `name` varchar(60) NOT NULL default '',
757 `exempt` tinyint(1) NOT NULL default '0',
759 UNIQUE KEY `name` (`name`)
760 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
763 ### Data of table `0_item_tax_types` ###
765 INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0');
768 ### Structure of table `0_item_units` ###
770 DROP TABLE IF EXISTS `0_item_units`;
772 CREATE TABLE `0_item_units` (
773 `abbr` varchar(20) NOT NULL,
774 `name` varchar(40) NOT NULL,
775 `decimals` tinyint(2) NOT NULL,
776 `inactive` tinyint(1) NOT NULL default '0',
777 PRIMARY KEY (`abbr`),
778 UNIQUE KEY `name` (`name`)
782 ### Data of table `0_item_units` ###
784 INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0');
787 ### Structure of table `0_loc_stock` ###
789 DROP TABLE IF EXISTS `0_loc_stock`;
791 CREATE TABLE `0_loc_stock` (
792 `loc_code` char(5) NOT NULL default '',
793 `stock_id` char(20) NOT NULL default '',
794 `reorder_level` bigint(20) NOT NULL default '0',
795 PRIMARY KEY (`loc_code`,`stock_id`),
796 KEY `stock_id` (`stock_id`)
800 ### Data of table `0_loc_stock` ###
804 ### Structure of table `0_locations` ###
806 DROP TABLE IF EXISTS `0_locations`;
808 CREATE TABLE `0_locations` (
809 `loc_code` varchar(5) NOT NULL default '',
810 `location_name` varchar(60) NOT NULL default '',
811 `delivery_address` tinytext NOT NULL,
812 `phone` varchar(30) NOT NULL default '',
813 `fax` varchar(30) NOT NULL default '',
814 `email` varchar(100) NOT NULL default '',
815 `contact` varchar(30) NOT NULL default '',
816 `inactive` tinyint(1) NOT NULL default '0',
817 PRIMARY KEY (`loc_code`)
821 ### Data of table `0_locations` ###
823 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '0');
826 ### Structure of table `0_movement_types` ###
828 DROP TABLE IF EXISTS `0_movement_types`;
830 CREATE TABLE `0_movement_types` (
831 `id` int(11) NOT NULL auto_increment,
832 `name` varchar(60) NOT NULL default '',
834 UNIQUE KEY `name` (`name`)
835 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
838 ### Data of table `0_movement_types` ###
840 INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment');
843 ### Structure of table `0_payment_terms` ###
845 DROP TABLE IF EXISTS `0_payment_terms`;
847 CREATE TABLE `0_payment_terms` (
848 `terms_indicator` int(11) NOT NULL auto_increment,
849 `terms` char(80) NOT NULL default '',
850 `days_before_due` smallint(6) NOT NULL default '0',
851 `day_in_following_month` smallint(6) NOT NULL default '0',
852 `inactive` tinyint(1) NOT NULL default '0',
853 PRIMARY KEY (`terms_indicator`),
854 UNIQUE KEY `terms` (`terms`)
855 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
858 ### Data of table `0_payment_terms` ###
860 INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0');
861 INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0');
862 INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0');
863 INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0');
866 ### Structure of table `0_prices` ###
868 DROP TABLE IF EXISTS `0_prices`;
870 CREATE TABLE `0_prices` (
871 `id` int(11) NOT NULL auto_increment,
872 `stock_id` varchar(20) NOT NULL default '',
873 `sales_type_id` int(11) NOT NULL default '0',
874 `curr_abrev` char(3) NOT NULL default '',
875 `price` double NOT NULL default '0',
877 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
878 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
881 ### Data of table `0_prices` ###
885 ### Structure of table `0_print_profiles` ###
887 DROP TABLE IF EXISTS `0_print_profiles`;
889 CREATE TABLE `0_print_profiles` (
890 `id` smallint(6) unsigned NOT NULL auto_increment,
891 `profile` varchar(30) NOT NULL,
892 `report` varchar(5) default NULL,
893 `printer` tinyint(3) unsigned default NULL,
895 UNIQUE KEY `profile` (`profile`,`report`)
896 ) TYPE=MyISAM AUTO_INCREMENT=10 ;
899 ### Data of table `0_print_profiles` ###
901 INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0');
902 INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0');
903 INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2');
904 INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2');
905 INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2');
906 INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2');
907 INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2');
908 INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2');
909 INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2');
912 ### Structure of table `0_printers` ###
914 DROP TABLE IF EXISTS `0_printers`;
916 CREATE TABLE `0_printers` (
917 `id` tinyint(3) unsigned NOT NULL auto_increment,
918 `name` varchar(20) NOT NULL,
919 `description` varchar(60) NOT NULL,
920 `queue` varchar(20) NOT NULL,
921 `host` varchar(40) NOT NULL,
922 `port` smallint(11) unsigned NOT NULL,
923 `timeout` tinyint(3) unsigned NOT NULL,
925 UNIQUE KEY `name` (`name`)
926 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
929 ### Data of table `0_printers` ###
931 INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20');
932 INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5');
933 INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
936 ### Structure of table `0_purch_data` ###
938 DROP TABLE IF EXISTS `0_purch_data`;
940 CREATE TABLE `0_purch_data` (
941 `supplier_id` int(11) NOT NULL default '0',
942 `stock_id` char(20) NOT NULL default '',
943 `price` double NOT NULL default '0',
944 `suppliers_uom` char(50) NOT NULL default '',
945 `conversion_factor` double NOT NULL default '1',
946 `supplier_description` char(50) NOT NULL default '',
947 PRIMARY KEY (`supplier_id`,`stock_id`)
951 ### Data of table `0_purch_data` ###
955 ### Structure of table `0_purch_order_details` ###
957 DROP TABLE IF EXISTS `0_purch_order_details`;
959 CREATE TABLE `0_purch_order_details` (
960 `po_detail_item` int(11) NOT NULL auto_increment,
961 `order_no` int(11) NOT NULL default '0',
962 `item_code` varchar(20) NOT NULL default '',
963 `description` tinytext,
964 `delivery_date` date NOT NULL default '0000-00-00',
965 `qty_invoiced` double NOT NULL default '0',
966 `unit_price` double NOT NULL default '0',
967 `act_price` double NOT NULL default '0',
968 `std_cost_unit` double NOT NULL default '0',
969 `quantity_ordered` double NOT NULL default '0',
970 `quantity_received` double NOT NULL default '0',
971 PRIMARY KEY (`po_detail_item`)
972 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
975 ### Data of table `0_purch_order_details` ###
979 ### Structure of table `0_purch_orders` ###
981 DROP TABLE IF EXISTS `0_purch_orders`;
983 CREATE TABLE `0_purch_orders` (
984 `order_no` int(11) NOT NULL auto_increment,
985 `supplier_id` int(11) NOT NULL default '0',
987 `ord_date` date NOT NULL default '0000-00-00',
988 `reference` tinytext NOT NULL,
989 `requisition_no` tinytext,
990 `into_stock_location` varchar(5) NOT NULL default '',
991 `delivery_address` tinytext NOT NULL,
992 PRIMARY KEY (`order_no`)
993 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
996 ### Data of table `0_purch_orders` ###
1000 ### Structure of table `0_quick_entries` ###
1002 DROP TABLE IF EXISTS `0_quick_entries`;
1004 CREATE TABLE `0_quick_entries` (
1005 `id` smallint(6) unsigned NOT NULL auto_increment,
1006 `type` tinyint(1) NOT NULL default '0',
1007 `description` varchar(60) NOT NULL,
1008 `base_amount` double NOT NULL default '0',
1009 `base_desc` varchar(60) default NULL,
1011 KEY `description` (`description`)
1012 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
1015 ### Data of table `0_quick_entries` ###
1017 INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount');
1018 INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount');
1019 INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount');
1022 ### Structure of table `0_quick_entry_lines` ###
1024 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1026 CREATE TABLE `0_quick_entry_lines` (
1027 `id` smallint(6) unsigned NOT NULL auto_increment,
1028 `qid` smallint(6) unsigned NOT NULL,
1029 `amount` double default '0',
1030 `action` varchar(2) NOT NULL,
1031 `dest_id` varchar(11) NOT NULL,
1032 `dimension_id` smallint(6) unsigned default NULL,
1033 `dimension2_id` smallint(6) unsigned default NULL,
1036 ) TYPE=MyISAM AUTO_INCREMENT=7 ;
1039 ### Data of table `0_quick_entry_lines` ###
1041 INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', 't-', '1', '0', '0');
1042 INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', 't-', '1', '0', '0');
1043 INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', 't-', '1', '0', '0');
1044 INSERT INTO `0_quick_entry_lines` VALUES ('4', '3', '0', '=', '4010', '0', '0');
1045 INSERT INTO `0_quick_entry_lines` VALUES ('5', '1', '0', '=', '5765', '0', '0');
1046 INSERT INTO `0_quick_entry_lines` VALUES ('6', '2', '0', '=', '5780', '0', '0');
1049 ### Structure of table `0_recurrent_invoices` ###
1051 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1053 CREATE TABLE `0_recurrent_invoices` (
1054 `id` smallint(6) unsigned NOT NULL auto_increment,
1055 `description` varchar(60) NOT NULL default '',
1056 `order_no` int(11) unsigned NOT NULL,
1057 `debtor_no` int(11) unsigned default NULL,
1058 `group_no` smallint(6) unsigned default NULL,
1059 `days` int(11) NOT NULL default '0',
1060 `monthly` int(11) NOT NULL default '0',
1061 `begin` date NOT NULL default '0000-00-00',
1062 `end` date NOT NULL default '0000-00-00',
1063 `last_sent` date NOT NULL default '0000-00-00',
1065 UNIQUE KEY `description` (`description`)
1066 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1069 ### Data of table `0_recurrent_invoices` ###
1073 ### Structure of table `0_refs` ###
1075 DROP TABLE IF EXISTS `0_refs`;
1077 CREATE TABLE `0_refs` (
1078 `id` int(11) NOT NULL default '0',
1079 `type` int(11) NOT NULL default '0',
1080 `reference` varchar(100) NOT NULL default '',
1081 PRIMARY KEY (`id`,`type`)
1085 ### Data of table `0_refs` ###
1089 ### Structure of table `0_sales_order_details` ###
1091 DROP TABLE IF EXISTS `0_sales_order_details`;
1093 CREATE TABLE `0_sales_order_details` (
1094 `id` int(11) NOT NULL auto_increment,
1095 `order_no` int(11) NOT NULL default '0',
1096 `stk_code` varchar(20) NOT NULL default '',
1097 `description` tinytext,
1098 `qty_sent` double NOT NULL default '0',
1099 `unit_price` double NOT NULL default '0',
1100 `quantity` double NOT NULL default '0',
1101 `discount_percent` double NOT NULL default '0',
1103 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1106 ### Data of table `0_sales_order_details` ###
1110 ### Structure of table `0_sales_orders` ###
1112 DROP TABLE IF EXISTS `0_sales_orders`;
1114 CREATE TABLE `0_sales_orders` (
1115 `order_no` int(11) NOT NULL auto_increment,
1116 `version` tinyint(1) unsigned NOT NULL default '0',
1117 `type` tinyint(1) NOT NULL default '0',
1118 `debtor_no` int(11) NOT NULL default '0',
1119 `branch_code` int(11) NOT NULL default '0',
1120 `customer_ref` tinytext NOT NULL,
1121 `comments` tinytext,
1122 `ord_date` date NOT NULL default '0000-00-00',
1123 `order_type` int(11) NOT NULL default '0',
1124 `ship_via` int(11) NOT NULL default '0',
1125 `delivery_address` tinytext NOT NULL,
1126 `contact_phone` varchar(30) default NULL,
1127 `contact_email` varchar(100) default NULL,
1128 `deliver_to` tinytext NOT NULL,
1129 `freight_cost` double NOT NULL default '0',
1130 `from_stk_loc` varchar(5) NOT NULL default '',
1131 `delivery_date` date NOT NULL default '0000-00-00',
1132 PRIMARY KEY (`order_no`)
1133 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1136 ### Data of table `0_sales_orders` ###
1140 ### Structure of table `0_sales_pos` ###
1142 DROP TABLE IF EXISTS `0_sales_pos`;
1144 CREATE TABLE `0_sales_pos` (
1145 `id` smallint(6) unsigned NOT NULL auto_increment,
1146 `pos_name` varchar(30) NOT NULL,
1147 `cash_sale` tinyint(1) NOT NULL,
1148 `credit_sale` tinyint(1) NOT NULL,
1149 `pos_location` varchar(5) NOT NULL,
1150 `pos_account` smallint(6) unsigned NOT NULL,
1151 `inactive` tinyint(1) NOT NULL default '0',
1153 UNIQUE KEY `pos_name` (`pos_name`)
1154 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1157 ### Data of table `0_sales_pos` ###
1159 INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '2', '0');
1162 ### Structure of table `0_sales_types` ###
1164 DROP TABLE IF EXISTS `0_sales_types`;
1166 CREATE TABLE `0_sales_types` (
1167 `id` int(11) NOT NULL auto_increment,
1168 `sales_type` char(50) NOT NULL default '',
1169 `tax_included` int(1) NOT NULL default '0',
1170 `factor` double NOT NULL default '1',
1171 `inactive` tinyint(1) NOT NULL default '0',
1173 UNIQUE KEY `sales_type` (`sales_type`)
1174 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
1177 ### Data of table `0_sales_types` ###
1179 INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '1', '1', '0');
1180 INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '0.7', '0');
1183 ### Structure of table `0_salesman` ###
1185 DROP TABLE IF EXISTS `0_salesman`;
1187 CREATE TABLE `0_salesman` (
1188 `salesman_code` int(11) NOT NULL auto_increment,
1189 `salesman_name` char(60) NOT NULL default '',
1190 `salesman_phone` char(30) NOT NULL default '',
1191 `salesman_fax` char(30) NOT NULL default '',
1192 `salesman_email` varchar(100) NOT NULL default '',
1193 `provision` double NOT NULL default '0',
1194 `break_pt` double NOT NULL default '0',
1195 `provision2` double NOT NULL default '0',
1196 `inactive` tinyint(1) NOT NULL default '0',
1197 PRIMARY KEY (`salesman_code`),
1198 UNIQUE KEY `salesman_name` (`salesman_name`)
1199 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1202 ### Data of table `0_salesman` ###
1204 INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1207 ### Structure of table `0_shippers` ###
1209 DROP TABLE IF EXISTS `0_shippers`;
1211 CREATE TABLE `0_shippers` (
1212 `shipper_id` int(11) NOT NULL auto_increment,
1213 `shipper_name` varchar(60) NOT NULL default '',
1214 `phone` varchar(30) NOT NULL default '',
1215 `contact` tinytext NOT NULL,
1216 `address` tinytext NOT NULL,
1217 `inactive` tinyint(1) NOT NULL default '0',
1218 PRIMARY KEY (`shipper_id`),
1219 UNIQUE KEY `name` (`shipper_name`)
1220 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1223 ### Data of table `0_shippers` ###
1225 INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '0');
1228 ### Structure of table `0_sql_trail` ###
1230 DROP TABLE IF EXISTS `0_sql_trail`;
1232 CREATE TABLE `0_sql_trail` (
1233 `id` int(11) unsigned NOT NULL auto_increment,
1234 `sql` text NOT NULL,
1235 `result` tinyint(1) NOT NULL,
1236 `msg` varchar(255) NOT NULL,
1238 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1241 ### Data of table `0_sql_trail` ###
1245 ### Structure of table `0_stock_category` ###
1247 DROP TABLE IF EXISTS `0_stock_category`;
1249 CREATE TABLE `0_stock_category` (
1250 `category_id` int(11) NOT NULL auto_increment,
1251 `description` varchar(60) NOT NULL default '',
1252 `stock_act` varchar(11) default NULL,
1253 `cogs_act` varchar(11) default NULL,
1254 `adj_gl_act` varchar(11) default NULL,
1255 `purch_price_var_act` varchar(11) default NULL,
1256 `inactive` tinyint(1) NOT NULL default '0',
1257 PRIMARY KEY (`category_id`),
1258 UNIQUE KEY `description` (`description`)
1259 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
1262 ### Data of table `0_stock_category` ###
1264 INSERT INTO `0_stock_category` VALUES ('1', 'Components', '', '', '', '', '0');
1265 INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '', '', '', '', '0');
1266 INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '', '', '', '', '0');
1267 INSERT INTO `0_stock_category` VALUES ('4', 'Services', '', '', '', '', '0');
1270 ### Structure of table `0_stock_master` ###
1272 DROP TABLE IF EXISTS `0_stock_master`;
1274 CREATE TABLE `0_stock_master` (
1275 `stock_id` varchar(20) NOT NULL default '',
1276 `category_id` int(11) NOT NULL default '0',
1277 `tax_type_id` int(11) NOT NULL default '0',
1278 `description` varchar(200) NOT NULL default '',
1279 `long_description` tinytext NOT NULL,
1280 `units` varchar(20) NOT NULL default 'each',
1281 `mb_flag` char(1) NOT NULL default 'B',
1282 `sales_account` varchar(11) NOT NULL default '',
1283 `cogs_account` varchar(11) NOT NULL default '',
1284 `inventory_account` varchar(11) NOT NULL default '',
1285 `adjustment_account` varchar(11) NOT NULL default '',
1286 `assembly_account` varchar(11) NOT NULL default '',
1287 `dimension_id` int(11) default NULL,
1288 `dimension2_id` int(11) default NULL,
1289 `actual_cost` double NOT NULL default '0',
1290 `last_cost` double NOT NULL default '0',
1291 `material_cost` double NOT NULL default '0',
1292 `labour_cost` double NOT NULL default '0',
1293 `overhead_cost` double NOT NULL default '0',
1294 `inactive` tinyint(1) NOT NULL default '0',
1295 PRIMARY KEY (`stock_id`)
1299 ### Data of table `0_stock_master` ###
1303 ### Structure of table `0_stock_moves` ###
1305 DROP TABLE IF EXISTS `0_stock_moves`;
1307 CREATE TABLE `0_stock_moves` (
1308 `trans_id` int(11) NOT NULL auto_increment,
1309 `trans_no` int(11) NOT NULL default '0',
1310 `stock_id` char(20) NOT NULL default '',
1311 `type` smallint(6) NOT NULL default '0',
1312 `loc_code` char(5) NOT NULL default '',
1313 `tran_date` date NOT NULL default '0000-00-00',
1314 `person_id` int(11) default NULL,
1315 `price` double NOT NULL default '0',
1316 `reference` char(40) NOT NULL default '',
1317 `qty` double NOT NULL default '1',
1318 `discount_percent` double NOT NULL default '0',
1319 `standard_cost` double NOT NULL default '0',
1320 `visible` tinyint(1) NOT NULL default '1',
1321 PRIMARY KEY (`trans_id`),
1322 KEY `type` (`type`,`trans_no`)
1323 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1326 ### Data of table `0_stock_moves` ###
1330 ### Structure of table `0_supp_allocations` ###
1332 DROP TABLE IF EXISTS `0_supp_allocations`;
1334 CREATE TABLE `0_supp_allocations` (
1335 `id` int(11) NOT NULL auto_increment,
1336 `amt` double unsigned default NULL,
1337 `date_alloc` date NOT NULL default '0000-00-00',
1338 `trans_no_from` int(11) default NULL,
1339 `trans_type_from` int(11) default NULL,
1340 `trans_no_to` int(11) default NULL,
1341 `trans_type_to` int(11) default NULL,
1343 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1346 ### Data of table `0_supp_allocations` ###
1350 ### Structure of table `0_supp_invoice_items` ###
1352 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1354 CREATE TABLE `0_supp_invoice_items` (
1355 `id` int(11) NOT NULL auto_increment,
1356 `supp_trans_no` int(11) default NULL,
1357 `supp_trans_type` int(11) default NULL,
1358 `gl_code` varchar(11) NOT NULL default '0',
1359 `grn_item_id` int(11) default NULL,
1360 `po_detail_item_id` int(11) default NULL,
1361 `stock_id` varchar(20) NOT NULL default '',
1362 `description` tinytext,
1363 `quantity` double NOT NULL default '0',
1364 `unit_price` double NOT NULL default '0',
1365 `unit_tax` double NOT NULL default '0',
1368 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1371 ### Data of table `0_supp_invoice_items` ###
1375 ### Structure of table `0_supp_trans` ###
1377 DROP TABLE IF EXISTS `0_supp_trans`;
1379 CREATE TABLE `0_supp_trans` (
1380 `trans_no` int(11) unsigned NOT NULL default '0',
1381 `type` smallint(6) unsigned NOT NULL default '0',
1382 `supplier_id` int(11) unsigned default NULL,
1383 `reference` tinytext NOT NULL,
1384 `supp_reference` varchar(60) NOT NULL default '',
1385 `tran_date` date NOT NULL default '0000-00-00',
1386 `due_date` date NOT NULL default '0000-00-00',
1387 `ov_amount` double NOT NULL default '0',
1388 `ov_discount` double NOT NULL default '0',
1389 `ov_gst` double NOT NULL default '0',
1390 `rate` double NOT NULL default '1',
1391 `alloc` double NOT NULL default '0',
1392 PRIMARY KEY (`trans_no`,`type`),
1393 KEY `supplier_id` (`supplier_id`),
1394 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1399 ### Data of table `0_supp_trans` ###
1403 ### Structure of table `0_suppliers` ###
1405 DROP TABLE IF EXISTS `0_suppliers`;
1407 CREATE TABLE `0_suppliers` (
1408 `supplier_id` int(11) NOT NULL auto_increment,
1409 `supp_name` varchar(60) NOT NULL default '',
1410 `address` tinytext NOT NULL,
1411 `supp_address` tinytext NOT NULL,
1412 `phone` varchar(30) NOT NULL default '',
1413 `fax` varchar(30) NOT NULL default '',
1414 `gst_no` varchar(25) NOT NULL default '',
1415 `contact` varchar(60) NOT NULL default '',
1416 `supp_account_no` varchar(40) NOT NULL default '',
1417 `email` varchar(100) NOT NULL default '',
1418 `website` varchar(100) NOT NULL default '',
1419 `bank_account` varchar(60) NOT NULL default '',
1420 `curr_code` char(3) default NULL,
1421 `payment_terms` int(11) default NULL,
1422 `dimension_id` int(11) default '0',
1423 `dimension2_id` int(11) default '0',
1424 `tax_group_id` int(11) default NULL,
1425 `credit_limit` double NOT NULL default '0',
1426 `purchase_account` varchar(11) default NULL,
1427 `payable_account` varchar(11) default NULL,
1428 `payment_discount_account` varchar(11) default NULL,
1429 `notes` tinytext NOT NULL,
1430 `inactive` tinyint(1) NOT NULL default '0',
1431 PRIMARY KEY (`supplier_id`)
1432 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1435 ### Data of table `0_suppliers` ###
1439 ### Structure of table `0_sys_types` ###
1441 DROP TABLE IF EXISTS `0_sys_types`;
1443 CREATE TABLE `0_sys_types` (
1444 `type_id` smallint(6) NOT NULL default '0',
1445 `type_name` varchar(60) NOT NULL default '',
1446 `type_no` int(11) NOT NULL default '1',
1447 `next_reference` varchar(100) NOT NULL default '',
1448 PRIMARY KEY (`type_id`)
1452 ### Data of table `0_sys_types` ###
1454 INSERT INTO `0_sys_types` VALUES ('0', 'Journal - GL', '17', '1');
1455 INSERT INTO `0_sys_types` VALUES ('1', 'Payment - GL', '7', '1');
1456 INSERT INTO `0_sys_types` VALUES ('2', 'Receipt - GL', '4', '1');
1457 INSERT INTO `0_sys_types` VALUES ('4', 'Funds Transfer', '3', '1');
1458 INSERT INTO `0_sys_types` VALUES ('10', 'Sales Invoice', '16', '1');
1459 INSERT INTO `0_sys_types` VALUES ('11', 'Credit Note', '2', '1');
1460 INSERT INTO `0_sys_types` VALUES ('12', 'Receipt', '6', '1');
1461 INSERT INTO `0_sys_types` VALUES ('13', 'Delivery', '1', '1');
1462 INSERT INTO `0_sys_types` VALUES ('16', 'Location Transfer', '2', '1');
1463 INSERT INTO `0_sys_types` VALUES ('17', 'Inventory Adjustment', '2', '1');
1464 INSERT INTO `0_sys_types` VALUES ('18', 'Purchase Order', '1', '1');
1465 INSERT INTO `0_sys_types` VALUES ('20', 'Supplier Invoice', '6', '1');
1466 INSERT INTO `0_sys_types` VALUES ('21', 'Supplier Credit Note', '1', '1');
1467 INSERT INTO `0_sys_types` VALUES ('22', 'Supplier Payment', '3', '1');
1468 INSERT INTO `0_sys_types` VALUES ('25', 'Purchase Order Delivery', '1', '1');
1469 INSERT INTO `0_sys_types` VALUES ('26', 'Work Order', '1', '1');
1470 INSERT INTO `0_sys_types` VALUES ('28', 'Work Order Issue', '1', '1');
1471 INSERT INTO `0_sys_types` VALUES ('29', 'Work Order Production', '1', '1');
1472 INSERT INTO `0_sys_types` VALUES ('30', 'Sales Order', '1', '1');
1473 INSERT INTO `0_sys_types` VALUES ('35', 'Cost Update', '1', '1');
1474 INSERT INTO `0_sys_types` VALUES ('40', 'Dimension', '1', '1');
1477 ### Structure of table `0_tax_group_items` ###
1479 DROP TABLE IF EXISTS `0_tax_group_items`;
1481 CREATE TABLE `0_tax_group_items` (
1482 `tax_group_id` int(11) NOT NULL default '0',
1483 `tax_type_id` int(11) NOT NULL default '0',
1484 `rate` double NOT NULL default '0',
1485 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1489 ### Data of table `0_tax_group_items` ###
1491 INSERT INTO `0_tax_group_items` VALUES ('1', '1', '5');
1494 ### Structure of table `0_tax_groups` ###
1496 DROP TABLE IF EXISTS `0_tax_groups`;
1498 CREATE TABLE `0_tax_groups` (
1499 `id` int(11) NOT NULL auto_increment,
1500 `name` varchar(60) NOT NULL default '',
1501 `tax_shipping` tinyint(1) NOT NULL default '0',
1503 UNIQUE KEY `name` (`name`)
1504 ) TYPE=InnoDB AUTO_INCREMENT=3 ;
1507 ### Data of table `0_tax_groups` ###
1509 INSERT INTO `0_tax_groups` VALUES ('1', 'Tax', '0');
1510 INSERT INTO `0_tax_groups` VALUES ('2', 'Tax Exempt', '0');
1513 ### Structure of table `0_tax_types` ###
1515 DROP TABLE IF EXISTS `0_tax_types`;
1517 CREATE TABLE `0_tax_types` (
1518 `id` int(11) NOT NULL auto_increment,
1519 `rate` double NOT NULL default '0',
1520 `sales_gl_code` varchar(11) NOT NULL default '',
1521 `purchasing_gl_code` varchar(11) NOT NULL default '',
1522 `name` varchar(60) NOT NULL default '',
1524 UNIQUE KEY `name` (`name`,`rate`)
1525 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
1528 ### Data of table `0_tax_types` ###
1530 INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2150', 'Tax');
1533 ### Structure of table `0_trans_tax_details` ###
1535 DROP TABLE IF EXISTS `0_trans_tax_details`;
1537 CREATE TABLE `0_trans_tax_details` (
1538 `id` int(11) NOT NULL auto_increment,
1539 `trans_type` smallint(6) default NULL,
1540 `trans_no` int(11) default NULL,
1541 `tran_date` date NOT NULL,
1542 `tax_type_id` int(11) NOT NULL default '0',
1543 `rate` double NOT NULL default '0',
1544 `ex_rate` double NOT NULL default '1',
1545 `included_in_price` tinyint(1) NOT NULL default '0',
1546 `net_amount` double NOT NULL default '0',
1547 `amount` double NOT NULL default '0',
1550 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1553 ### Data of table `0_trans_tax_details` ###
1557 ### Structure of table `0_users` ###
1559 DROP TABLE IF EXISTS `0_users`;
1561 CREATE TABLE `0_users` (
1562 `user_id` varchar(60) NOT NULL default '',
1563 `password` varchar(100) NOT NULL default '',
1564 `real_name` varchar(100) NOT NULL default '',
1565 `full_access` int(11) NOT NULL default '1',
1566 `phone` varchar(30) NOT NULL default '',
1567 `email` varchar(100) default NULL,
1568 `language` varchar(20) default NULL,
1569 `date_format` tinyint(1) NOT NULL default '0',
1570 `date_sep` tinyint(1) NOT NULL default '0',
1571 `tho_sep` tinyint(1) NOT NULL default '0',
1572 `dec_sep` tinyint(1) NOT NULL default '0',
1573 `theme` varchar(20) NOT NULL default 'default',
1574 `page_size` varchar(20) NOT NULL default 'A4',
1575 `prices_dec` smallint(6) NOT NULL default '2',
1576 `qty_dec` smallint(6) NOT NULL default '2',
1577 `rates_dec` smallint(6) NOT NULL default '4',
1578 `percent_dec` smallint(6) NOT NULL default '1',
1579 `show_gl` tinyint(1) NOT NULL default '1',
1580 `show_codes` tinyint(1) NOT NULL default '0',
1581 `show_hints` tinyint(1) NOT NULL default '0',
1582 `last_visit_date` datetime default NULL,
1583 `query_size` tinyint(1) default '10',
1584 `graphic_links` tinyint(1) default '1',
1585 `pos` smallint(6) default '1',
1586 `print_profile` varchar(30) NOT NULL default '1',
1587 `rep_popup` tinyint(1) default '1',
1588 PRIMARY KEY (`user_id`)
1592 ### Data of table `0_users` ###
1594 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');
1597 ### Structure of table `0_voided` ###
1599 DROP TABLE IF EXISTS `0_voided`;
1601 CREATE TABLE `0_voided` (
1602 `type` int(11) NOT NULL default '0',
1603 `id` int(11) NOT NULL default '0',
1604 `date_` date NOT NULL default '0000-00-00',
1605 `memo_` tinytext NOT NULL,
1606 UNIQUE KEY `id` (`type`,`id`)
1610 ### Data of table `0_voided` ###
1614 ### Structure of table `0_wo_issue_items` ###
1616 DROP TABLE IF EXISTS `0_wo_issue_items`;
1618 CREATE TABLE `0_wo_issue_items` (
1619 `id` int(11) NOT NULL auto_increment,
1620 `stock_id` varchar(40) default NULL,
1621 `issue_id` int(11) default NULL,
1622 `qty_issued` double default NULL,
1624 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1627 ### Data of table `0_wo_issue_items` ###
1631 ### Structure of table `0_wo_issues` ###
1633 DROP TABLE IF EXISTS `0_wo_issues`;
1635 CREATE TABLE `0_wo_issues` (
1636 `issue_no` int(11) NOT NULL auto_increment,
1637 `workorder_id` int(11) NOT NULL default '0',
1638 `reference` varchar(100) default NULL,
1639 `issue_date` date default NULL,
1640 `loc_code` varchar(5) default NULL,
1641 `workcentre_id` int(11) default NULL,
1642 PRIMARY KEY (`issue_no`)
1643 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1646 ### Data of table `0_wo_issues` ###
1650 ### Structure of table `0_wo_manufacture` ###
1652 DROP TABLE IF EXISTS `0_wo_manufacture`;
1654 CREATE TABLE `0_wo_manufacture` (
1655 `id` int(11) NOT NULL auto_increment,
1656 `reference` varchar(100) default NULL,
1657 `workorder_id` int(11) NOT NULL default '0',
1658 `quantity` double NOT NULL default '0',
1659 `date_` date NOT NULL default '0000-00-00',
1661 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1664 ### Data of table `0_wo_manufacture` ###
1668 ### Structure of table `0_wo_requirements` ###
1670 DROP TABLE IF EXISTS `0_wo_requirements`;
1672 CREATE TABLE `0_wo_requirements` (
1673 `id` int(11) NOT NULL auto_increment,
1674 `workorder_id` int(11) NOT NULL default '0',
1675 `stock_id` char(20) NOT NULL default '',
1676 `workcentre` int(11) NOT NULL default '0',
1677 `units_req` double NOT NULL default '1',
1678 `std_cost` double NOT NULL default '0',
1679 `loc_code` char(5) NOT NULL default '',
1680 `units_issued` double NOT NULL default '0',
1682 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1685 ### Data of table `0_wo_requirements` ###
1689 ### Structure of table `0_workcentres` ###
1691 DROP TABLE IF EXISTS `0_workcentres`;
1693 CREATE TABLE `0_workcentres` (
1694 `id` int(11) NOT NULL auto_increment,
1695 `name` char(40) NOT NULL default '',
1696 `description` char(50) NOT NULL default '',
1697 `inactive` tinyint(1) NOT NULL default '0',
1699 UNIQUE KEY `name` (`name`)
1700 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1703 ### Data of table `0_workcentres` ###
1707 ### Structure of table `0_workorders` ###
1709 DROP TABLE IF EXISTS `0_workorders`;
1711 CREATE TABLE `0_workorders` (
1712 `id` int(11) NOT NULL auto_increment,
1713 `wo_ref` varchar(60) NOT NULL default '',
1714 `loc_code` varchar(5) NOT NULL default '',
1715 `units_reqd` double NOT NULL default '1',
1716 `stock_id` varchar(20) NOT NULL default '',
1717 `date_` date NOT NULL default '0000-00-00',
1718 `type` tinyint(4) NOT NULL default '0',
1719 `required_by` date NOT NULL default '0000-00-00',
1720 `released_date` date NOT NULL default '0000-00-00',
1721 `units_issued` double NOT NULL default '0',
1722 `closed` tinyint(1) NOT NULL default '0',
1723 `released` tinyint(1) NOT NULL default '0',
1724 `additional_costs` double NOT NULL default '0',
1726 UNIQUE KEY `wo_ref` (`wo_ref`)
1727 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1730 ### Data of table `0_workorders` ###