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');
25 ### Structure of table `0_attachments` ###
27 DROP TABLE IF EXISTS `0_attachments`;
29 CREATE TABLE `0_attachments` (
30 `id` int(11) unsigned NOT NULL auto_increment,
31 `description` varchar(60) NOT NULL default '',
32 `type_no` int(11) NOT NULL default '0',
33 `trans_no` int(11) NOT NULL default '0',
34 `unique_name` varchar(60) NOT NULL default '',
35 `tran_date` date NOT NULL default '0000-00-00',
36 `filename` varchar(60) NOT NULL default '',
37 `filesize` int(11) NOT NULL default '0',
38 `filetype` varchar(60) NOT NULL default '',
40 KEY `type_no` (`type_no`,`trans_no`)
41 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
44 ### Data of table `0_attachments` ###
46 ### Structure of table `0_audit_trail` ###
48 DROP TABLE IF EXISTS `0_audit_trail`;
50 CREATE TABLE `0_audit_trail` (
51 `id` int(11) NOT NULL AUTO_INCREMENT,
52 `type` smallint(6) unsigned NOT NULL default '0',
53 `trans_no` int(11) unsigned NOT NULL default '0',
54 `user` smallint(6) unsigned NOT NULL default '0',
55 `stamp` timestamp NOT NULL,
56 `description` varchar(60) default NULL,
57 `fiscal_year` int(11) NOT NULL,
58 `gl_date` date NOT NULL default '0000-00-00',
59 `gl_seq` int(11) unsigned default NULL,
61 KEY (`fiscal_year`, `gl_seq`)
64 ### Data of table `0_audit_trail` ###
68 ### Structure of table `0_bank_accounts` ###
70 DROP TABLE IF EXISTS `0_bank_accounts`;
72 CREATE TABLE `0_bank_accounts` (
73 `account_code` varchar(11) NOT NULL default '',
74 `account_type` smallint(6) NOT NULL default '0',
75 `bank_account_name` varchar(60) NOT NULL default '',
76 `bank_account_number` varchar(100) NOT NULL default '',
77 `bank_name` varchar(60) NOT NULL default '',
78 `bank_address` tinytext,
79 `bank_curr_code` char(3) NOT NULL default '',
80 `id` smallint(6) NOT NULL auto_increment,
81 `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00',
82 `ending_reconcile_balance` double NOT NULL default '0',
83 `inactive` tinyint(1) NOT NULL default '0',
85 KEY `bank_account_name` (`bank_account_name`),
86 KEY `bank_account_number` (`bank_account_number`)
87 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
90 ### Data of table `0_bank_accounts` ###
92 INSERT INTO `0_bank_accounts` VALUES ('1060', '0', 'Current account', 'N/A', 'N/A', '', 'USD', '1', '0000-00-00 00:00:00', '0', '0');
93 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');
96 ### Structure of table `0_bank_trans` ###
98 DROP TABLE IF EXISTS `0_bank_trans`;
100 CREATE TABLE `0_bank_trans` (
101 `id` int(11) NOT NULL auto_increment,
102 `type` smallint(6) default NULL,
103 `trans_no` int(11) default NULL,
104 `bank_act` varchar(11) default NULL,
105 `ref` varchar(40) default NULL,
106 `trans_date` date NOT NULL default '0000-00-00',
107 `amount` double default NULL,
108 `dimension_id` int(11) NOT NULL default '0',
109 `dimension2_id` int(11) NOT NULL default '0',
110 `person_type_id` int(11) NOT NULL default '0',
111 `person_id` tinyblob,
112 `reconciled` date default NULL,
114 KEY `bank_act` (`bank_act`,`ref`),
115 KEY `type` (`type`,`trans_no`)
116 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
119 ### Data of table `0_bank_trans` ###
123 ### Structure of table `0_bom` ###
125 DROP TABLE IF EXISTS `0_bom`;
127 CREATE TABLE `0_bom` (
128 `id` int(11) NOT NULL auto_increment,
129 `parent` char(20) NOT NULL default '',
130 `component` char(20) NOT NULL default '',
131 `workcentre_added` int(11) NOT NULL default '0',
132 `loc_code` char(5) NOT NULL default '',
133 `quantity` double NOT NULL default '1',
134 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
135 KEY `component` (`component`),
137 KEY `loc_code` (`loc_code`),
138 KEY `parent` (`parent`,`loc_code`),
139 KEY `Parent_2` (`parent`),
140 KEY `workcentre_added` (`workcentre_added`)
141 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
144 ### Data of table `0_bom` ###
148 ### Structure of table `0_budget_trans` ###
150 DROP TABLE IF EXISTS `0_budget_trans`;
152 CREATE TABLE `0_budget_trans` (
153 `counter` int(11) NOT NULL auto_increment,
154 `type` smallint(6) NOT NULL default '0',
155 `type_no` bigint(16) NOT NULL default '1',
156 `tran_date` date NOT NULL default '0000-00-00',
157 `account` varchar(11) NOT NULL default '',
158 `memo_` tinytext NOT NULL,
159 `amount` double NOT NULL default '0',
160 `dimension_id` int(11) default '0',
161 `dimension2_id` int(11) default '0',
162 `person_type_id` int(11) default NULL,
163 `person_id` tinyblob,
164 PRIMARY KEY (`counter`),
165 KEY `Type_and_Number` (`type`,`type_no`)
166 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
169 ### Data of table `0_budget_trans` ###
173 ### Structure of table `0_chart_class` ###
175 DROP TABLE IF EXISTS `0_chart_class`;
177 CREATE TABLE `0_chart_class` (
178 `cid` int(11) NOT NULL default '0',
179 `class_name` varchar(60) NOT NULL default '',
180 `ctype` tinyint(1) NOT NULL default '0',
181 `inactive` tinyint(1) NOT NULL default '0',
186 ### Data of table `0_chart_class` ###
188 INSERT INTO `0_chart_class` VALUES ('1', 'Assets', '1', '0');
189 INSERT INTO `0_chart_class` VALUES ('2', 'Liabilities', '2', '0');
190 INSERT INTO `0_chart_class` VALUES ('3', 'Income', '4', '0');
191 INSERT INTO `0_chart_class` VALUES ('4', 'Costs', '6', '0');
193 ### Structure of table `0_chart_master` ###
195 DROP TABLE IF EXISTS `0_chart_master`;
197 CREATE TABLE `0_chart_master` (
198 `account_code` varchar(11) NOT NULL default '',
199 `account_code2` varchar(11) default '',
200 `account_name` varchar(60) NOT NULL default '',
201 `account_type` int(11) NOT NULL default '0',
202 `inactive` tinyint(1) NOT NULL default '0',
203 PRIMARY KEY (`account_code`),
204 KEY `account_code` (`account_code`),
205 KEY `account_name` (`account_name`)
209 ### Data of table `0_chart_master` ###
211 INSERT INTO `0_chart_master` VALUES ('1060', '', 'Checking Account', '1', '0');
212 INSERT INTO `0_chart_master` VALUES ('1065', '', 'Petty Cash', '1', '0');
213 INSERT INTO `0_chart_master` VALUES ('1200', '', 'Accounts Receivables', '1', '0');
214 INSERT INTO `0_chart_master` VALUES ('1205', '', 'Allowance for doubtful accounts', '1', '0');
215 INSERT INTO `0_chart_master` VALUES ('1510', '', 'Inventory', '2', '0');
216 INSERT INTO `0_chart_master` VALUES ('1520', '', 'Stocks of Raw Materials', '2', '0');
217 INSERT INTO `0_chart_master` VALUES ('1530', '', 'Stocks of Work In Progress', '2', '0');
218 INSERT INTO `0_chart_master` VALUES ('1540', '', 'Stocks of Finsihed Goods', '2', '0');
219 INSERT INTO `0_chart_master` VALUES ('1550', '', 'Goods Received Clearing account', '2', '0');
220 INSERT INTO `0_chart_master` VALUES ('1820', '', 'Office Furniture & Equipment', '3', '0');
221 INSERT INTO `0_chart_master` VALUES ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0');
222 INSERT INTO `0_chart_master` VALUES ('1840', '', 'Vehicle', '3', '0');
223 INSERT INTO `0_chart_master` VALUES ('1845', '', 'Accum. Amort. -Vehicle', '3', '0');
224 INSERT INTO `0_chart_master` VALUES ('2100', '', 'Accounts Payable', '4', '0');
225 INSERT INTO `0_chart_master` VALUES ('2110', '', 'Accrued Income Tax - Federal', '4', '0');
226 INSERT INTO `0_chart_master` VALUES ('2120', '', 'Accrued Income Tax - State', '4', '0');
227 INSERT INTO `0_chart_master` VALUES ('2130', '', 'Accrued Franchise Tax', '4', '0');
228 INSERT INTO `0_chart_master` VALUES ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0');
229 INSERT INTO `0_chart_master` VALUES ('2150', '', 'Sales Tax', '4', '0');
230 INSERT INTO `0_chart_master` VALUES ('2160', '', 'Accrued Use Tax Payable', '4', '0');
231 INSERT INTO `0_chart_master` VALUES ('2210', '', 'Accrued Wages', '4', '0');
232 INSERT INTO `0_chart_master` VALUES ('2220', '', 'Accrued Comp Time', '4', '0');
233 INSERT INTO `0_chart_master` VALUES ('2230', '', 'Accrued Holiday Pay', '4', '0');
234 INSERT INTO `0_chart_master` VALUES ('2240', '', 'Accrued Vacation Pay', '4', '0');
235 INSERT INTO `0_chart_master` VALUES ('2310', '', 'Accr. Benefits - 401K', '4', '0');
236 INSERT INTO `0_chart_master` VALUES ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0');
237 INSERT INTO `0_chart_master` VALUES ('2330', '', 'Accr. Benefits - Med, Den', '4', '0');
238 INSERT INTO `0_chart_master` VALUES ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0');
239 INSERT INTO `0_chart_master` VALUES ('2350', '', 'Accr. Benefits - Credit Union', '4', '0');
240 INSERT INTO `0_chart_master` VALUES ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0');
241 INSERT INTO `0_chart_master` VALUES ('2370', '', 'Accr. Benefits - Garnish', '4', '0');
242 INSERT INTO `0_chart_master` VALUES ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0');
243 INSERT INTO `0_chart_master` VALUES ('2620', '', 'Bank Loans', '5', '0');
244 INSERT INTO `0_chart_master` VALUES ('2680', '', 'Loans from Shareholders', '5', '0');
245 INSERT INTO `0_chart_master` VALUES ('3350', '', 'Common Shares', '6', '0');
246 INSERT INTO `0_chart_master` VALUES ('3590', '', 'Retained Earnings - prior years', '7', '0');
247 INSERT INTO `0_chart_master` VALUES ('4010', '', 'Sales', '8', '0');
248 INSERT INTO `0_chart_master` VALUES ('4430', '', 'Shipping & Handling', '9', '0');
249 INSERT INTO `0_chart_master` VALUES ('4440', '', 'Interest', '9', '0');
250 INSERT INTO `0_chart_master` VALUES ('4450', '', 'Foreign Exchange Gain', '9', '0');
251 INSERT INTO `0_chart_master` VALUES ('4500', '', 'Prompt Payment Discounts', '9', '0');
252 INSERT INTO `0_chart_master` VALUES ('4510', '', 'Discounts Given', '9', '0');
253 INSERT INTO `0_chart_master` VALUES ('5010', '', 'Cost of Goods Sold - Retail', '10', '0');
254 INSERT INTO `0_chart_master` VALUES ('5020', '', 'Material Usage Varaiance', '10', '0');
255 INSERT INTO `0_chart_master` VALUES ('5030', '', 'Consumable Materials', '10', '0');
256 INSERT INTO `0_chart_master` VALUES ('5040', '', 'Purchase price Variance', '10', '0');
257 INSERT INTO `0_chart_master` VALUES ('5050', '', 'Purchases of materials', '10', '0');
258 INSERT INTO `0_chart_master` VALUES ('5060', '', 'Discounts Received', '10', '0');
259 INSERT INTO `0_chart_master` VALUES ('5100', '', 'Freight', '10', '0');
260 INSERT INTO `0_chart_master` VALUES ('5410', '', 'Wages & Salaries', '11', '0');
261 INSERT INTO `0_chart_master` VALUES ('5420', '', 'Wages - Overtime', '11', '0');
262 INSERT INTO `0_chart_master` VALUES ('5430', '', 'Benefits - Comp Time', '11', '0');
263 INSERT INTO `0_chart_master` VALUES ('5440', '', 'Benefits - Payroll Taxes', '11', '0');
264 INSERT INTO `0_chart_master` VALUES ('5450', '', 'Benefits - Workers Comp', '11', '0');
265 INSERT INTO `0_chart_master` VALUES ('5460', '', 'Benefits - Pension', '11', '0');
266 INSERT INTO `0_chart_master` VALUES ('5470', '', 'Benefits - General Benefits', '11', '0');
267 INSERT INTO `0_chart_master` VALUES ('5510', '', 'Inc Tax Exp - Federal', '11', '0');
268 INSERT INTO `0_chart_master` VALUES ('5520', '', 'Inc Tax Exp - State', '11', '0');
269 INSERT INTO `0_chart_master` VALUES ('5530', '', 'Taxes - Real Estate', '11', '0');
270 INSERT INTO `0_chart_master` VALUES ('5540', '', 'Taxes - Personal Property', '11', '0');
271 INSERT INTO `0_chart_master` VALUES ('5550', '', 'Taxes - Franchise', '11', '0');
272 INSERT INTO `0_chart_master` VALUES ('5560', '', 'Taxes - Foreign Withholding', '11', '0');
273 INSERT INTO `0_chart_master` VALUES ('5610', '', 'Accounting & Legal', '12', '0');
274 INSERT INTO `0_chart_master` VALUES ('5615', '', 'Advertising & Promotions', '12', '0');
275 INSERT INTO `0_chart_master` VALUES ('5620', '', 'Bad Debts', '12', '0');
276 INSERT INTO `0_chart_master` VALUES ('5660', '', 'Amortization Expense', '12', '0');
277 INSERT INTO `0_chart_master` VALUES ('5685', '', 'Insurance', '12', '0');
278 INSERT INTO `0_chart_master` VALUES ('5690', '', 'Interest & Bank Charges', '12', '0');
279 INSERT INTO `0_chart_master` VALUES ('5700', '', 'Office Supplies', '12', '0');
280 INSERT INTO `0_chart_master` VALUES ('5760', '', 'Rent', '12', '0');
281 INSERT INTO `0_chart_master` VALUES ('5765', '', 'Repair & Maintenance', '12', '0');
282 INSERT INTO `0_chart_master` VALUES ('5780', '', 'Telephone', '12', '0');
283 INSERT INTO `0_chart_master` VALUES ('5785', '', 'Travel & Entertainment', '12', '0');
284 INSERT INTO `0_chart_master` VALUES ('5790', '', 'Utilities', '12', '0');
285 INSERT INTO `0_chart_master` VALUES ('5795', '', 'Registrations', '12', '0');
286 INSERT INTO `0_chart_master` VALUES ('5800', '', 'Licenses', '12', '0');
287 INSERT INTO `0_chart_master` VALUES ('5810', '', 'Foreign Exchange Loss', '12', '0');
288 INSERT INTO `0_chart_master` VALUES ('9990', '', 'Year Profit/Loss', '12', '0');
291 ### Structure of table `0_chart_types` ###
293 DROP TABLE IF EXISTS `0_chart_types`;
295 CREATE TABLE `0_chart_types` (
296 `id` int(11) NOT NULL auto_increment,
297 `name` varchar(60) NOT NULL default '',
298 `class_id` tinyint(1) NOT NULL default '0',
299 `parent` int(11) NOT NULL default '-1',
300 `inactive` tinyint(1) NOT NULL default '0',
303 ) TYPE=MyISAM AUTO_INCREMENT=13 ;
306 ### Data of table `0_chart_types` ###
308 INSERT INTO `0_chart_types` VALUES ('1', 'Current Assets', '1', '-1', '0');
309 INSERT INTO `0_chart_types` VALUES ('2', 'Inventory Assets', '1', '-1', '0');
310 INSERT INTO `0_chart_types` VALUES ('3', 'Capital Assets', '1', '-1', '0');
311 INSERT INTO `0_chart_types` VALUES ('4', 'Current Liabilities', '2', '-1', '0');
312 INSERT INTO `0_chart_types` VALUES ('5', 'Long Term Liabilities', '2', '-1', '0');
313 INSERT INTO `0_chart_types` VALUES ('6', 'Share Capital', '2', '-1', '0');
314 INSERT INTO `0_chart_types` VALUES ('7', 'Retained Earnings', '2', '-1', '0');
315 INSERT INTO `0_chart_types` VALUES ('8', 'Sales Revenue', '3', '-1', '0');
316 INSERT INTO `0_chart_types` VALUES ('9', 'Other Revenue', '3', '-1', '0');
317 INSERT INTO `0_chart_types` VALUES ('10', 'Cost of Goods Sold', '4', '-1', '0');
318 INSERT INTO `0_chart_types` VALUES ('11', 'Payroll Expenses', '4', '-1', '0');
319 INSERT INTO `0_chart_types` VALUES ('12', 'General & Administrative expenses', '4', -1, '0');
322 ### Structure of table `0_comments` ###
324 DROP TABLE IF EXISTS `0_comments`;
326 CREATE TABLE `0_comments` (
327 `type` int(11) NOT NULL default '0',
328 `id` int(11) NOT NULL default '0',
329 `date_` date default '0000-00-00',
334 ### Data of table `0_comments` ###
338 ### Structure of table `0_company` ###
340 DROP TABLE IF EXISTS `0_company`;
342 CREATE TABLE `0_company` (
343 `coy_code` int(11) NOT NULL default '1',
344 `coy_name` varchar(60) NOT NULL default '',
345 `gst_no` varchar(25) NOT NULL default '',
346 `coy_no` varchar(25) NOT NULL default '0',
347 `tax_prd` int(11) NOT NULL default '1',
348 `tax_last` int(11) NOT NULL default '1',
349 `postal_address` tinytext NOT NULL,
350 `phone` varchar(30) NOT NULL default '',
351 `fax` varchar(30) NOT NULL default '',
352 `email` varchar(100) NOT NULL default '',
353 `coy_logo` varchar(100) NOT NULL default '',
354 `domicile` varchar(55) NOT NULL default '',
355 `curr_default` char(3) NOT NULL default '',
356 `debtors_act` varchar(11) NOT NULL default '',
357 `pyt_discount_act` varchar(11) NOT NULL default '',
358 `creditors_act` varchar(11) NOT NULL default '',
359 `bank_charge_act` varchar(11) NOT NULL default '',
360 `exchange_diff_act` varchar(11) NOT NULL default '',
361 `profit_loss_year_act` varchar(11) NOT NULL default '',
362 `retained_earnings_act` varchar(11) NOT NULL default '',
363 `freight_act` varchar(11) NOT NULL default '',
364 `default_sales_act` varchar(11) NOT NULL default '',
365 `default_sales_discount_act` varchar(11) NOT NULL default '',
366 `default_prompt_payment_act` varchar(11) NOT NULL default '',
367 `default_inventory_act` varchar(11) NOT NULL default '',
368 `default_cogs_act` varchar(11) NOT NULL default '',
369 `default_adj_act` varchar(11) NOT NULL default '',
370 `default_inv_sales_act` varchar(11) NOT NULL default '',
371 `default_assembly_act` varchar(11) NOT NULL default '',
372 `payroll_act` varchar(11) NOT NULL default '',
373 `allow_negative_stock` tinyint(1) NOT NULL default '0',
374 `po_over_receive` int(11) NOT NULL default '10',
375 `po_over_charge` int(11) NOT NULL default '10',
376 `default_credit_limit` int(11) NOT NULL default '1000',
377 `default_workorder_required` int(11) NOT NULL default '20',
378 `default_dim_required` int(11) NOT NULL default '20',
379 `past_due_days` int(11) NOT NULL default '30',
380 `use_dimension` tinyint(1) default '0',
381 `f_year` int(11) NOT NULL default '1',
382 `no_item_list` tinyint(1) NOT NULL default '0',
383 `no_customer_list` tinyint(1) NOT NULL default '0',
384 `no_supplier_list` tinyint(1) NOT NULL default '0',
385 `base_sales` int(11) NOT NULL default '-1',
386 `foreign_codes` tinyint(1) NOT NULL default '0',
387 `accumulate_shipping` tinyint(1) NOT NULL default '0',
388 `legal_text` tinytext NOT NULL,
389 `default_delivery_required` smallint(6) NOT NULL default '1',
390 `version_id` varchar(11) NOT NULL default '',
391 `time_zone` tinyint(1) NOT NULL default '0',
392 `add_pct` int(5) NOT NULL default '-1',
393 `round_to` int(5) NOT NULL default '1',
394 `login_tout` SMALLINT(6) NOT NULL DEFAULT '600',
395 PRIMARY KEY (`coy_code`)
399 ### Data of table `0_company` ###
401 INSERT INTO `0_company` VALUES ('1', 'Company name', '', '', '1', '1', 'N/A', '', '', '', '', '', 'USD', '1200', '5060', '2100', '5690', '4450', '9990', '3590', '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', '', '1', '2.2', '0', '-1', '1', '600');
403 ### Structure of table `0_credit_status` ###
405 DROP TABLE IF EXISTS `0_credit_status`;
407 CREATE TABLE `0_credit_status` (
408 `id` int(11) NOT NULL auto_increment,
409 `reason_description` char(100) NOT NULL default '',
410 `dissallow_invoices` tinyint(1) NOT NULL default '0',
411 `inactive` tinyint(1) NOT NULL default '0',
413 UNIQUE KEY `reason_description` (`reason_description`)
414 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
417 ### Data of table `0_credit_status` ###
419 INSERT INTO `0_credit_status` VALUES ('1', 'Good History', '0', '0');
420 INSERT INTO `0_credit_status` VALUES ('3', 'No more work until payment received', '1', '0');
421 INSERT INTO `0_credit_status` VALUES ('4', 'In liquidation', '1', '0');
424 ### Structure of table `0_currencies` ###
426 DROP TABLE IF EXISTS `0_currencies`;
428 CREATE TABLE `0_currencies` (
429 `currency` varchar(60) NOT NULL default '',
430 `curr_abrev` char(3) NOT NULL default '',
431 `curr_symbol` varchar(10) NOT NULL default '',
432 `country` varchar(100) NOT NULL default '',
433 `hundreds_name` varchar(15) NOT NULL default '',
434 `auto_update` tinyint(1) NOT NULL default '1',
435 `inactive` tinyint(1) NOT NULL default '0',
436 PRIMARY KEY (`curr_abrev`)
440 ### Data of table `0_currencies` ###
442 INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0');
443 INSERT INTO `0_currencies` VALUES ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0');
444 INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents', '1', '0');
445 INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence', '1', '0');
447 ### Structure of table `0_cust_allocations` ###
449 DROP TABLE IF EXISTS `0_cust_allocations`;
451 CREATE TABLE `0_cust_allocations` (
452 `id` int(11) NOT NULL auto_increment,
453 `amt` double unsigned default NULL,
454 `date_alloc` date NOT NULL default '0000-00-00',
455 `trans_no_from` int(11) default NULL,
456 `trans_type_from` int(11) default NULL,
457 `trans_no_to` int(11) default NULL,
458 `trans_type_to` int(11) default NULL,
460 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
463 ### Data of table `0_cust_allocations` ###
467 ### Structure of table `0_cust_branch` ###
469 DROP TABLE IF EXISTS `0_cust_branch`;
471 CREATE TABLE `0_cust_branch` (
472 `branch_code` int(11) NOT NULL auto_increment,
473 `debtor_no` int(11) NOT NULL default '0',
474 `br_name` varchar(60) NOT NULL default '',
475 `branch_ref` varchar(30) NOT NULL default '',
476 `br_address` tinytext NOT NULL,
477 `area` int(11) default NULL,
478 `salesman` int(11) NOT NULL default '0',
479 `phone` varchar(30) NOT NULL default '',
480 `fax` varchar(30) NOT NULL default '',
481 `contact_name` varchar(60) NOT NULL default '',
482 `email` varchar(100) NOT NULL default '',
483 `default_location` varchar(5) NOT NULL default '',
484 `tax_group_id` int(11) default NULL,
485 `sales_account` varchar(11) default NULL,
486 `sales_discount_account` varchar(11) default NULL,
487 `receivables_account` varchar(11) default NULL,
488 `payment_discount_account` varchar(11) default NULL,
489 `default_ship_via` int(11) NOT NULL default '1',
490 `disable_trans` tinyint(4) NOT NULL default '0',
491 `br_post_address` tinytext NOT NULL,
492 `group_no` int(11) NOT NULL default '0',
493 `inactive` tinyint(1) NOT NULL default '0',
494 PRIMARY KEY (`branch_code`,`debtor_no`),
495 KEY `branch_code` (`branch_code`),
496 KEY `br_name` (`br_name`)
497 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
500 ### Data of table `0_cust_branch` ###
504 ### Structure of table `0_debtor_trans` ###
506 DROP TABLE IF EXISTS `0_debtor_trans`;
508 CREATE TABLE `0_debtor_trans` (
509 `trans_no` int(11) unsigned NOT NULL default '0',
510 `type` smallint(6) unsigned NOT NULL default '0',
511 `version` tinyint(1) unsigned NOT NULL default '0',
512 `debtor_no` int(11) unsigned default NULL,
513 `branch_code` int(11) NOT NULL default '-1',
514 `tran_date` date NOT NULL default '0000-00-00',
515 `due_date` date NOT NULL default '0000-00-00',
516 `reference` varchar(60) NOT NULL default '',
517 `tpe` int(11) NOT NULL default '0',
518 `order_` int(11) NOT NULL default '0',
519 `ov_amount` double NOT NULL default '0',
520 `ov_gst` double NOT NULL default '0',
521 `ov_freight` double NOT NULL default '0',
522 `ov_freight_tax` double NOT NULL default '0',
523 `ov_discount` double NOT NULL default '0',
524 `alloc` double NOT NULL default '0',
525 `rate` double NOT NULL default '1',
526 `ship_via` int(11) default NULL,
527 `trans_link` int(11) NOT NULL default '0',
528 `dimension_id` int(11) NOT NULL default '0',
529 `dimension2_id` int(11) NOT NULL default '0',
530 PRIMARY KEY (`trans_no`,`type`),
531 KEY `debtor_no` (`debtor_no`,`branch_code`)
535 ### Data of table `0_debtor_trans` ###
539 ### Structure of table `0_debtor_trans_details` ###
541 DROP TABLE IF EXISTS `0_debtor_trans_details`;
543 CREATE TABLE `0_debtor_trans_details` (
544 `id` int(11) NOT NULL auto_increment,
545 `debtor_trans_no` int(11) default NULL,
546 `debtor_trans_type` int(11) default NULL,
547 `stock_id` varchar(20) NOT NULL default '',
548 `description` tinytext,
549 `unit_price` double NOT NULL default '0',
550 `unit_tax` double NOT NULL default '0',
551 `quantity` double NOT NULL default '0',
552 `discount_percent` double NOT NULL default '0',
553 `standard_cost` double NOT NULL default '0',
554 `qty_done` double NOT NULL default '0',
556 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
559 ### Data of table `0_debtor_trans_details` ###
563 ### Structure of table `0_debtors_master` ###
565 DROP TABLE IF EXISTS `0_debtors_master`;
567 CREATE TABLE `0_debtors_master` (
568 `debtor_no` int(11) NOT NULL auto_increment,
569 `name` varchar(80) NOT NULL default '',
570 `debtor_ref` varchar(30) NOT NULL,
572 `email` varchar(100) NOT NULL default '',
573 `tax_id` varchar(55) NOT NULL default '',
574 `curr_code` char(3) NOT NULL default '',
575 `sales_type` int(11) NOT NULL default '1',
576 `dimension_id` int(11) NOT NULL default '0',
577 `dimension2_id` int(11) NOT NULL default '0',
578 `credit_status` int(11) NOT NULL default '0',
579 `payment_terms` int(11) default NULL,
580 `discount` double NOT NULL default '0',
581 `pymt_discount` double NOT NULL default '0',
582 `credit_limit` float NOT NULL default '1000',
583 `inactive` tinyint(1) NOT NULL default '0',
584 PRIMARY KEY (`debtor_no`),
585 UNIQUE KEY `name` (`name`)
586 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
589 ### Data of table `0_debtors_master` ###
593 ### Structure of table `0_dimensions` ###
595 DROP TABLE IF EXISTS `0_dimensions`;
597 CREATE TABLE `0_dimensions` (
598 `id` int(11) NOT NULL auto_increment,
599 `reference` varchar(60) NOT NULL default '',
600 `name` varchar(60) NOT NULL default '',
601 `type_` tinyint(1) NOT NULL default '1',
602 `closed` tinyint(1) NOT NULL default '0',
603 `date_` date NOT NULL default '0000-00-00',
604 `due_date` date NOT NULL default '0000-00-00',
606 UNIQUE KEY `reference` (`reference`)
607 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
610 ### Data of table `0_dimensions` ###
614 ### Structure of table `0_exchange_rates` ###
616 DROP TABLE IF EXISTS `0_exchange_rates`;
618 CREATE TABLE `0_exchange_rates` (
619 `id` int(11) NOT NULL auto_increment,
620 `curr_code` char(3) NOT NULL default '',
621 `rate_buy` double NOT NULL default '0',
622 `rate_sell` double NOT NULL default '0',
623 `date_` date NOT NULL default '0000-00-00',
625 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
626 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
629 ### Data of table `0_exchange_rates` ###
633 ### Structure of table `0_fiscal_year` ###
635 DROP TABLE IF EXISTS `0_fiscal_year`;
637 CREATE TABLE `0_fiscal_year` (
638 `id` int(11) NOT NULL auto_increment,
639 `begin` date default '0000-00-00',
640 `end` date default '0000-00-00',
641 `closed` tinyint(1) NOT NULL default '0',
643 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
646 ### Data of table `0_fiscal_year` ###
648 INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0');
651 ### Structure of table `0_gl_trans` ###
653 DROP TABLE IF EXISTS `0_gl_trans`;
655 CREATE TABLE `0_gl_trans` (
656 `counter` int(11) NOT NULL auto_increment,
657 `type` smallint(6) NOT NULL default '0',
658 `type_no` bigint(16) NOT NULL default '1',
659 `tran_date` date NOT NULL default '0000-00-00',
660 `account` varchar(11) NOT NULL default '',
661 `memo_` tinytext NOT NULL,
662 `amount` double NOT NULL default '0',
663 `dimension_id` int(11) NOT NULL default '0',
664 `dimension2_id` int(11) NOT NULL default '0',
665 `person_type_id` int(11) default NULL,
666 `person_id` tinyblob,
667 PRIMARY KEY (`counter`),
668 KEY `Type_and_Number` (`type`,`type_no`)
669 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
672 ### Data of table `0_gl_trans` ###
676 ### Structure of table `0_grn_batch` ###
678 DROP TABLE IF EXISTS `0_grn_batch`;
680 CREATE TABLE `0_grn_batch` (
681 `id` int(11) NOT NULL auto_increment,
682 `supplier_id` int(11) NOT NULL default '0',
683 `purch_order_no` int(11) default NULL,
684 `reference` varchar(60) NOT NULL default '',
685 `delivery_date` date NOT NULL default '0000-00-00',
686 `loc_code` varchar(5) default NULL,
688 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
691 ### Data of table `0_grn_batch` ###
695 ### Structure of table `0_grn_items` ###
697 DROP TABLE IF EXISTS `0_grn_items`;
699 CREATE TABLE `0_grn_items` (
700 `id` int(11) NOT NULL auto_increment,
701 `grn_batch_id` int(11) default NULL,
702 `po_detail_item` int(11) NOT NULL default '0',
703 `item_code` varchar(20) NOT NULL default '',
704 `description` tinytext,
705 `qty_recd` double NOT NULL default '0',
706 `quantity_inv` double NOT NULL default '0',
708 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
711 ### Data of table `0_grn_items` ###
715 ### Structure of table `0_groups` ###
717 DROP TABLE IF EXISTS `0_groups`;
719 CREATE TABLE `0_groups` (
720 `id` smallint(6) unsigned NOT NULL auto_increment,
721 `description` varchar(60) NOT NULL default '',
722 `inactive` tinyint(1) NOT NULL default '0',
724 UNIQUE KEY `description` (`description`)
725 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
728 ### Data of table `0_groups` ###
730 INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
731 INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
732 INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
735 ### Structure of table `0_item_codes` ###
737 DROP TABLE IF EXISTS `0_item_codes`;
739 CREATE TABLE `0_item_codes` (
740 `id` int(11) unsigned NOT NULL auto_increment,
741 `item_code` varchar(20) NOT NULL,
742 `stock_id` varchar(20) NOT NULL,
743 `description` varchar(200) NOT NULL default '',
744 `category_id` smallint(6) unsigned NOT NULL,
745 `quantity` double NOT NULL default '1',
746 `is_foreign` tinyint(1) NOT NULL default '0',
747 `inactive` tinyint(1) NOT NULL default '0',
749 UNIQUE KEY `stock_id` (`stock_id`,`item_code`)
750 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
753 ### Data of table `0_item_codes` ###
757 ### Structure of table `0_item_tax_type_exemptions` ###
759 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
761 CREATE TABLE `0_item_tax_type_exemptions` (
762 `item_tax_type_id` int(11) NOT NULL default '0',
763 `tax_type_id` int(11) NOT NULL default '0',
764 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
768 ### Data of table `0_item_tax_type_exemptions` ###
772 ### Structure of table `0_item_tax_types` ###
774 DROP TABLE IF EXISTS `0_item_tax_types`;
776 CREATE TABLE `0_item_tax_types` (
777 `id` int(11) NOT NULL auto_increment,
778 `name` varchar(60) NOT NULL default '',
779 `exempt` tinyint(1) NOT NULL default '0',
780 `inactive` tinyint(1) NOT NULL default '0',
782 UNIQUE KEY `name` (`name`)
783 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
786 ### Data of table `0_item_tax_types` ###
788 INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0', '0');
791 ### Structure of table `0_item_units` ###
793 DROP TABLE IF EXISTS `0_item_units`;
795 CREATE TABLE `0_item_units` (
796 `abbr` varchar(20) NOT NULL,
797 `name` varchar(40) NOT NULL,
798 `decimals` tinyint(2) NOT NULL,
799 `inactive` tinyint(1) NOT NULL default '0',
800 PRIMARY KEY (`abbr`),
801 UNIQUE KEY `name` (`name`)
805 ### Data of table `0_item_units` ###
807 INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0');
810 ### Structure of table `0_loc_stock` ###
812 DROP TABLE IF EXISTS `0_loc_stock`;
814 CREATE TABLE `0_loc_stock` (
815 `loc_code` char(5) NOT NULL default '',
816 `stock_id` char(20) NOT NULL default '',
817 `reorder_level` bigint(20) NOT NULL default '0',
818 PRIMARY KEY (`loc_code`,`stock_id`),
819 KEY `stock_id` (`stock_id`)
823 ### Data of table `0_loc_stock` ###
827 ### Structure of table `0_locations` ###
829 DROP TABLE IF EXISTS `0_locations`;
831 CREATE TABLE `0_locations` (
832 `loc_code` varchar(5) NOT NULL default '',
833 `location_name` varchar(60) NOT NULL default '',
834 `delivery_address` tinytext NOT NULL,
835 `phone` varchar(30) NOT NULL default '',
836 `fax` varchar(30) NOT NULL default '',
837 `email` varchar(100) NOT NULL default '',
838 `contact` varchar(30) NOT NULL default '',
839 `inactive` tinyint(1) NOT NULL default '0',
840 PRIMARY KEY (`loc_code`)
844 ### Data of table `0_locations` ###
846 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '0');
849 ### Structure of table `0_movement_types` ###
851 DROP TABLE IF EXISTS `0_movement_types`;
853 CREATE TABLE `0_movement_types` (
854 `id` int(11) NOT NULL auto_increment,
855 `name` varchar(60) NOT NULL default '',
856 `inactive` tinyint(1) NOT NULL default '0',
858 UNIQUE KEY `name` (`name`)
859 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
862 ### Data of table `0_movement_types` ###
864 INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment', '0');
867 ### Structure of table `0_payment_terms` ###
869 DROP TABLE IF EXISTS `0_payment_terms`;
871 CREATE TABLE `0_payment_terms` (
872 `terms_indicator` int(11) NOT NULL auto_increment,
873 `terms` char(80) NOT NULL default '',
874 `days_before_due` smallint(6) NOT NULL default '0',
875 `day_in_following_month` smallint(6) NOT NULL default '0',
876 `inactive` tinyint(1) NOT NULL default '0',
877 PRIMARY KEY (`terms_indicator`),
878 UNIQUE KEY `terms` (`terms`)
879 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
882 ### Data of table `0_payment_terms` ###
884 INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0');
885 INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0');
886 INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0');
887 INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0');
890 ### Structure of table `0_prices` ###
892 DROP TABLE IF EXISTS `0_prices`;
894 CREATE TABLE `0_prices` (
895 `id` int(11) NOT NULL auto_increment,
896 `stock_id` varchar(20) NOT NULL default '',
897 `sales_type_id` int(11) NOT NULL default '0',
898 `curr_abrev` char(3) NOT NULL default '',
899 `price` double NOT NULL default '0',
901 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
902 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
905 ### Data of table `0_prices` ###
909 ### Structure of table `0_print_profiles` ###
911 DROP TABLE IF EXISTS `0_print_profiles`;
913 CREATE TABLE `0_print_profiles` (
914 `id` smallint(6) unsigned NOT NULL auto_increment,
915 `profile` varchar(30) NOT NULL,
916 `report` varchar(5) default NULL,
917 `printer` tinyint(3) unsigned default NULL,
919 UNIQUE KEY `profile` (`profile`,`report`)
920 ) TYPE=MyISAM AUTO_INCREMENT=10 ;
923 ### Data of table `0_print_profiles` ###
925 INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0');
926 INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0');
927 INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2');
928 INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2');
929 INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2');
930 INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2');
931 INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2');
932 INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2');
933 INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2');
936 ### Structure of table `0_printers` ###
938 DROP TABLE IF EXISTS `0_printers`;
940 CREATE TABLE `0_printers` (
941 `id` tinyint(3) unsigned NOT NULL auto_increment,
942 `name` varchar(20) NOT NULL,
943 `description` varchar(60) NOT NULL,
944 `queue` varchar(20) NOT NULL,
945 `host` varchar(40) NOT NULL,
946 `port` smallint(11) unsigned NOT NULL,
947 `timeout` tinyint(3) unsigned NOT NULL,
949 UNIQUE KEY `name` (`name`)
950 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
953 ### Data of table `0_printers` ###
955 INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20');
956 INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5');
957 INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
960 ### Structure of table `0_purch_data` ###
962 DROP TABLE IF EXISTS `0_purch_data`;
964 CREATE TABLE `0_purch_data` (
965 `supplier_id` int(11) NOT NULL default '0',
966 `stock_id` char(20) NOT NULL default '',
967 `price` double NOT NULL default '0',
968 `suppliers_uom` char(50) NOT NULL default '',
969 `conversion_factor` double NOT NULL default '1',
970 `supplier_description` char(50) NOT NULL default '',
971 PRIMARY KEY (`supplier_id`,`stock_id`)
975 ### Data of table `0_purch_data` ###
979 ### Structure of table `0_purch_order_details` ###
981 DROP TABLE IF EXISTS `0_purch_order_details`;
983 CREATE TABLE `0_purch_order_details` (
984 `po_detail_item` int(11) NOT NULL auto_increment,
985 `order_no` int(11) NOT NULL default '0',
986 `item_code` varchar(20) NOT NULL default '',
987 `description` tinytext,
988 `delivery_date` date NOT NULL default '0000-00-00',
989 `qty_invoiced` double NOT NULL default '0',
990 `unit_price` double NOT NULL default '0',
991 `act_price` double NOT NULL default '0',
992 `std_cost_unit` double NOT NULL default '0',
993 `quantity_ordered` double NOT NULL default '0',
994 `quantity_received` double NOT NULL default '0',
995 PRIMARY KEY (`po_detail_item`)
996 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
999 ### Data of table `0_purch_order_details` ###
1003 ### Structure of table `0_purch_orders` ###
1005 DROP TABLE IF EXISTS `0_purch_orders`;
1007 CREATE TABLE `0_purch_orders` (
1008 `order_no` int(11) NOT NULL auto_increment,
1009 `supplier_id` int(11) NOT NULL default '0',
1010 `comments` tinytext,
1011 `ord_date` date NOT NULL default '0000-00-00',
1012 `reference` tinytext NOT NULL,
1013 `requisition_no` tinytext,
1014 `into_stock_location` varchar(5) NOT NULL default '',
1015 `delivery_address` tinytext NOT NULL,
1016 PRIMARY KEY (`order_no`)
1017 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1020 ### Data of table `0_purch_orders` ###
1024 ### Structure of table `0_quick_entries` ###
1026 DROP TABLE IF EXISTS `0_quick_entries`;
1028 CREATE TABLE `0_quick_entries` (
1029 `id` smallint(6) unsigned NOT NULL auto_increment,
1030 `type` tinyint(1) NOT NULL default '0',
1031 `description` varchar(60) NOT NULL,
1032 `base_amount` double NOT NULL default '0',
1033 `base_desc` varchar(60) default NULL,
1035 KEY `description` (`description`)
1036 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
1039 ### Data of table `0_quick_entries` ###
1041 INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount');
1042 INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount');
1043 INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount');
1046 ### Structure of table `0_quick_entry_lines` ###
1048 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1050 CREATE TABLE `0_quick_entry_lines` (
1051 `id` smallint(6) unsigned NOT NULL auto_increment,
1052 `qid` smallint(6) unsigned NOT NULL,
1053 `amount` double default '0',
1054 `action` varchar(2) NOT NULL,
1055 `dest_id` varchar(11) NOT NULL,
1056 `dimension_id` smallint(6) unsigned default NULL,
1057 `dimension2_id` smallint(6) unsigned default NULL,
1060 ) TYPE=MyISAM AUTO_INCREMENT=7 ;
1063 ### Data of table `0_quick_entry_lines` ###
1065 INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', 't-', '1', '0', '0');
1066 INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', 't-', '1', '0', '0');
1067 INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', 't-', '1', '0', '0');
1068 INSERT INTO `0_quick_entry_lines` VALUES ('4', '3', '0', '=', '4010', '0', '0');
1069 INSERT INTO `0_quick_entry_lines` VALUES ('5', '1', '0', '=', '5765', '0', '0');
1070 INSERT INTO `0_quick_entry_lines` VALUES ('6', '2', '0', '=', '5780', '0', '0');
1073 ### Structure of table `0_recurrent_invoices` ###
1075 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1077 CREATE TABLE `0_recurrent_invoices` (
1078 `id` smallint(6) unsigned NOT NULL auto_increment,
1079 `description` varchar(60) NOT NULL default '',
1080 `order_no` int(11) unsigned NOT NULL,
1081 `debtor_no` int(11) unsigned default NULL,
1082 `group_no` smallint(6) unsigned default NULL,
1083 `days` int(11) NOT NULL default '0',
1084 `monthly` int(11) NOT NULL default '0',
1085 `begin` date NOT NULL default '0000-00-00',
1086 `end` date NOT NULL default '0000-00-00',
1087 `last_sent` date NOT NULL default '0000-00-00',
1089 UNIQUE KEY `description` (`description`)
1090 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1093 ### Data of table `0_recurrent_invoices` ###
1097 ### Structure of table `0_refs` ###
1099 DROP TABLE IF EXISTS `0_refs`;
1101 CREATE TABLE `0_refs` (
1102 `id` int(11) NOT NULL default '0',
1103 `type` int(11) NOT NULL default '0',
1104 `reference` varchar(100) NOT NULL default '',
1105 PRIMARY KEY (`id`,`type`)
1109 ### Data of table `0_refs` ###
1113 ### Structure of table `0_sales_order_details` ###
1115 DROP TABLE IF EXISTS `0_sales_order_details`;
1117 CREATE TABLE `0_sales_order_details` (
1118 `id` int(11) NOT NULL auto_increment,
1119 `order_no` int(11) NOT NULL default '0',
1120 `trans_type` smallint(6) NOT NULL default '30',
1121 `stk_code` varchar(20) NOT NULL default '',
1122 `description` tinytext,
1123 `qty_sent` double NOT NULL default '0',
1124 `unit_price` double NOT NULL default '0',
1125 `quantity` double NOT NULL default '0',
1126 `discount_percent` double NOT NULL default '0',
1128 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1131 ### Data of table `0_sales_order_details` ###
1135 ### Structure of table `0_sales_orders` ###
1137 DROP TABLE IF EXISTS `0_sales_orders`;
1139 CREATE TABLE `0_sales_orders` (
1140 `order_no` int(11) NOT NULL auto_increment,
1141 `trans_type` smallint(6) NOT NULL default '30',
1142 `version` tinyint(1) unsigned NOT NULL default '0',
1143 `type` tinyint(1) NOT NULL default '0',
1144 `debtor_no` int(11) NOT NULL default '0',
1145 `branch_code` int(11) NOT NULL default '0',
1146 `reference` varchar(100) NOT NULL default '',
1147 `customer_ref` tinytext NOT NULL,
1148 `comments` tinytext,
1149 `ord_date` date NOT NULL default '0000-00-00',
1150 `order_type` int(11) NOT NULL default '0',
1151 `ship_via` int(11) NOT NULL default '0',
1152 `delivery_address` tinytext NOT NULL,
1153 `contact_phone` varchar(30) default NULL,
1154 `contact_email` varchar(100) default NULL,
1155 `deliver_to` tinytext NOT NULL,
1156 `freight_cost` double NOT NULL default '0',
1157 `from_stk_loc` varchar(5) NOT NULL default '',
1158 `delivery_date` date NOT NULL default '0000-00-00',
1159 PRIMARY KEY (`trans_type`, `order_no`)
1163 ### Data of table `0_sales_orders` ###
1167 ### Structure of table `0_sales_pos` ###
1169 DROP TABLE IF EXISTS `0_sales_pos`;
1171 CREATE TABLE `0_sales_pos` (
1172 `id` smallint(6) unsigned NOT NULL auto_increment,
1173 `pos_name` varchar(30) NOT NULL,
1174 `cash_sale` tinyint(1) NOT NULL,
1175 `credit_sale` tinyint(1) NOT NULL,
1176 `pos_location` varchar(5) NOT NULL,
1177 `pos_account` smallint(6) unsigned NOT NULL,
1178 `inactive` tinyint(1) NOT NULL default '0',
1180 UNIQUE KEY `pos_name` (`pos_name`)
1181 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1184 ### Data of table `0_sales_pos` ###
1186 INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '2', '0');
1189 ### Structure of table `0_sales_types` ###
1191 DROP TABLE IF EXISTS `0_sales_types`;
1193 CREATE TABLE `0_sales_types` (
1194 `id` int(11) NOT NULL auto_increment,
1195 `sales_type` char(50) NOT NULL default '',
1196 `tax_included` int(1) NOT NULL default '0',
1197 `factor` double NOT NULL default '1',
1198 `inactive` tinyint(1) NOT NULL default '0',
1200 UNIQUE KEY `sales_type` (`sales_type`)
1201 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
1204 ### Data of table `0_sales_types` ###
1206 INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '1', '1', '0');
1207 INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '0.7', '0');
1210 ### Structure of table `0_salesman` ###
1212 DROP TABLE IF EXISTS `0_salesman`;
1214 CREATE TABLE `0_salesman` (
1215 `salesman_code` int(11) NOT NULL auto_increment,
1216 `salesman_name` char(60) NOT NULL default '',
1217 `salesman_phone` char(30) NOT NULL default '',
1218 `salesman_fax` char(30) NOT NULL default '',
1219 `salesman_email` varchar(100) NOT NULL default '',
1220 `provision` double NOT NULL default '0',
1221 `break_pt` double NOT NULL default '0',
1222 `provision2` double NOT NULL default '0',
1223 `inactive` tinyint(1) NOT NULL default '0',
1224 PRIMARY KEY (`salesman_code`),
1225 UNIQUE KEY `salesman_name` (`salesman_name`)
1226 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1229 ### Data of table `0_salesman` ###
1231 INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1234 ### Structure of table `0_shippers` ###
1236 DROP TABLE IF EXISTS `0_shippers`;
1238 CREATE TABLE `0_shippers` (
1239 `shipper_id` int(11) NOT NULL auto_increment,
1240 `shipper_name` varchar(60) NOT NULL default '',
1241 `phone` varchar(30) NOT NULL default '',
1242 `contact` tinytext NOT NULL,
1243 `address` tinytext NOT NULL,
1244 `inactive` tinyint(1) NOT NULL default '0',
1245 PRIMARY KEY (`shipper_id`),
1246 UNIQUE KEY `name` (`shipper_name`)
1247 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1250 ### Data of table `0_shippers` ###
1252 INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '0');
1255 ### Structure of table `0_sql_trail` ###
1257 DROP TABLE IF EXISTS `0_sql_trail`;
1259 CREATE TABLE `0_sql_trail` (
1260 `id` int(11) unsigned NOT NULL auto_increment,
1261 `sql` text NOT NULL,
1262 `result` tinyint(1) NOT NULL,
1263 `msg` varchar(255) NOT NULL,
1265 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1268 ### Data of table `0_sql_trail` ###
1272 ### Structure of table `0_stock_category` ###
1274 DROP TABLE IF EXISTS `0_stock_category`;
1276 CREATE TABLE `0_stock_category` (
1277 `category_id` int(11) NOT NULL auto_increment,
1278 `description` varchar(60) NOT NULL default '',
1279 `dflt_tax_type` int(11) NOT NULL default '0',
1280 `dflt_units` varchar(20) NOT NULL default 'each',
1281 `dflt_mb_flag` char(1) NOT NULL default 'B',
1282 `dflt_sales_act` varchar(11) NOT NULL default '',
1283 `dflt_cogs_act` varchar(11) NOT NULL default '',
1284 `dflt_inventory_act` varchar(11) NOT NULL default '',
1285 `dflt_adjustment_act` varchar(11) NOT NULL default '',
1286 `dflt_assembly_act` varchar(11) NOT NULL default '',
1287 `dflt_dim1` int(11) default NULL,
1288 `dflt_dim2` int(11) default NULL,
1289 `inactive` tinyint(1) NOT NULL default '0',
1290 `dflt_no_sale` tinyint(1) NOT NULL default '0',
1291 PRIMARY KEY (`category_id`),
1292 UNIQUE KEY `description` (`description`)
1293 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
1296 ### Data of table `0_stock_category` ###
1298 INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1299 INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1300 INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1301 INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1304 ### Structure of table `0_stock_master` ###
1306 DROP TABLE IF EXISTS `0_stock_master`;
1308 CREATE TABLE `0_stock_master` (
1309 `stock_id` varchar(20) NOT NULL default '',
1310 `category_id` int(11) NOT NULL default '0',
1311 `tax_type_id` int(11) NOT NULL default '0',
1312 `description` varchar(200) NOT NULL default '',
1313 `long_description` tinytext NOT NULL,
1314 `units` varchar(20) NOT NULL default 'each',
1315 `mb_flag` char(1) NOT NULL default 'B',
1316 `sales_account` varchar(11) NOT NULL default '',
1317 `cogs_account` varchar(11) NOT NULL default '',
1318 `inventory_account` varchar(11) NOT NULL default '',
1319 `adjustment_account` varchar(11) NOT NULL default '',
1320 `assembly_account` varchar(11) NOT NULL default '',
1321 `dimension_id` int(11) default NULL,
1322 `dimension2_id` int(11) default NULL,
1323 `actual_cost` double NOT NULL default '0',
1324 `last_cost` double NOT NULL default '0',
1325 `material_cost` double NOT NULL default '0',
1326 `labour_cost` double NOT NULL default '0',
1327 `overhead_cost` double NOT NULL default '0',
1328 `inactive` tinyint(1) NOT NULL default '0',
1329 `no_sale` tinyint(1) NOT NULL default '0',
1330 PRIMARY KEY (`stock_id`)
1334 ### Data of table `0_stock_master` ###
1338 ### Structure of table `0_stock_moves` ###
1340 DROP TABLE IF EXISTS `0_stock_moves`;
1342 CREATE TABLE `0_stock_moves` (
1343 `trans_id` int(11) NOT NULL auto_increment,
1344 `trans_no` int(11) NOT NULL default '0',
1345 `stock_id` char(20) NOT NULL default '',
1346 `type` smallint(6) NOT NULL default '0',
1347 `loc_code` char(5) NOT NULL default '',
1348 `tran_date` date NOT NULL default '0000-00-00',
1349 `person_id` int(11) default NULL,
1350 `price` double NOT NULL default '0',
1351 `reference` char(40) NOT NULL default '',
1352 `qty` double NOT NULL default '1',
1353 `discount_percent` double NOT NULL default '0',
1354 `standard_cost` double NOT NULL default '0',
1355 `visible` tinyint(1) NOT NULL default '1',
1356 PRIMARY KEY (`trans_id`),
1357 KEY `type` (`type`,`trans_no`)
1358 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1361 ### Data of table `0_stock_moves` ###
1365 ### Structure of table `0_supp_allocations` ###
1367 DROP TABLE IF EXISTS `0_supp_allocations`;
1369 CREATE TABLE `0_supp_allocations` (
1370 `id` int(11) NOT NULL auto_increment,
1371 `amt` double unsigned default NULL,
1372 `date_alloc` date NOT NULL default '0000-00-00',
1373 `trans_no_from` int(11) default NULL,
1374 `trans_type_from` int(11) default NULL,
1375 `trans_no_to` int(11) default NULL,
1376 `trans_type_to` int(11) default NULL,
1378 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1381 ### Data of table `0_supp_allocations` ###
1385 ### Structure of table `0_supp_invoice_items` ###
1387 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1389 CREATE TABLE `0_supp_invoice_items` (
1390 `id` int(11) NOT NULL auto_increment,
1391 `supp_trans_no` int(11) default NULL,
1392 `supp_trans_type` int(11) default NULL,
1393 `gl_code` varchar(11) NOT NULL default '0',
1394 `grn_item_id` int(11) default NULL,
1395 `po_detail_item_id` int(11) default NULL,
1396 `stock_id` varchar(20) NOT NULL default '',
1397 `description` tinytext,
1398 `quantity` double NOT NULL default '0',
1399 `unit_price` double NOT NULL default '0',
1400 `unit_tax` double NOT NULL default '0',
1403 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1406 ### Data of table `0_supp_invoice_items` ###
1410 ### Structure of table `0_supp_trans` ###
1412 DROP TABLE IF EXISTS `0_supp_trans`;
1414 CREATE TABLE `0_supp_trans` (
1415 `trans_no` int(11) unsigned NOT NULL default '0',
1416 `type` smallint(6) unsigned NOT NULL default '0',
1417 `supplier_id` int(11) unsigned default NULL,
1418 `reference` tinytext NOT NULL,
1419 `supp_reference` varchar(60) NOT NULL default '',
1420 `tran_date` date NOT NULL default '0000-00-00',
1421 `due_date` date NOT NULL default '0000-00-00',
1422 `ov_amount` double NOT NULL default '0',
1423 `ov_discount` double NOT NULL default '0',
1424 `ov_gst` double NOT NULL default '0',
1425 `rate` double NOT NULL default '1',
1426 `alloc` double NOT NULL default '0',
1427 PRIMARY KEY (`trans_no`,`type`),
1428 KEY `supplier_id` (`supplier_id`),
1429 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1434 ### Data of table `0_supp_trans` ###
1438 ### Structure of table `0_suppliers` ###
1440 DROP TABLE IF EXISTS `0_suppliers`;
1442 CREATE TABLE `0_suppliers` (
1443 `supplier_id` int(11) NOT NULL auto_increment,
1444 `supp_name` varchar(60) NOT NULL default '',
1445 `supp_ref` varchar(30) NOT NULL default '',
1446 `address` tinytext NOT NULL,
1447 `supp_address` tinytext NOT NULL,
1448 `phone` varchar(30) NOT NULL default '',
1449 `fax` varchar(30) NOT NULL default '',
1450 `gst_no` varchar(25) NOT NULL default '',
1451 `contact` varchar(60) NOT NULL default '',
1452 `supp_account_no` varchar(40) NOT NULL default '',
1453 `email` varchar(100) NOT NULL default '',
1454 `website` varchar(100) NOT NULL default '',
1455 `bank_account` varchar(60) NOT NULL default '',
1456 `curr_code` char(3) default NULL,
1457 `payment_terms` int(11) default NULL,
1458 `dimension_id` int(11) default '0',
1459 `dimension2_id` int(11) default '0',
1460 `tax_group_id` int(11) default NULL,
1461 `credit_limit` double NOT NULL default '0',
1462 `purchase_account` varchar(11) default NULL,
1463 `payable_account` varchar(11) default NULL,
1464 `payment_discount_account` varchar(11) default NULL,
1465 `notes` tinytext NOT NULL,
1466 `inactive` tinyint(1) NOT NULL default '0',
1467 PRIMARY KEY (`supplier_id`)
1468 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1471 ### Data of table `0_suppliers` ###
1475 ### Structure of table `0_sys_types` ###
1477 DROP TABLE IF EXISTS `0_sys_types`;
1479 CREATE TABLE `0_sys_types` (
1480 `type_id` smallint(6) NOT NULL default '0',
1481 `type_name` varchar(60) NOT NULL default '',
1482 `type_no` int(11) NOT NULL default '1',
1483 `next_reference` varchar(100) NOT NULL default '',
1484 PRIMARY KEY (`type_id`)
1488 ### Data of table `0_sys_types` ###
1490 INSERT INTO `0_sys_types` VALUES ('0', '17', '1');
1491 INSERT INTO `0_sys_types` VALUES ('1', '7', '1');
1492 INSERT INTO `0_sys_types` VALUES ('2', '4', '1');
1493 INSERT INTO `0_sys_types` VALUES ('4', '3', '1');
1494 INSERT INTO `0_sys_types` VALUES ('10', '16', '1');
1495 INSERT INTO `0_sys_types` VALUES ('11', '2', '1');
1496 INSERT INTO `0_sys_types` VALUES ('12', '6', '1');
1497 INSERT INTO `0_sys_types` VALUES ('13', '1', '1');
1498 INSERT INTO `0_sys_types` VALUES ('16', '2', '1');
1499 INSERT INTO `0_sys_types` VALUES ('17', '2', '1');
1500 INSERT INTO `0_sys_types` VALUES ('18', '1', '1');
1501 INSERT INTO `0_sys_types` VALUES ('20', '6', '1');
1502 INSERT INTO `0_sys_types` VALUES ('21', '1', '1');
1503 INSERT INTO `0_sys_types` VALUES ('22', '3', '1');
1504 INSERT INTO `0_sys_types` VALUES ('25', '1', '1');
1505 INSERT INTO `0_sys_types` VALUES ('26', '1', '1');
1506 INSERT INTO `0_sys_types` VALUES ('28', '1', '1');
1507 INSERT INTO `0_sys_types` VALUES ('29', '1', '1');
1508 INSERT INTO `0_sys_types` VALUES ('30', '0', '1');
1509 INSERT INTO `0_sys_types` VALUES ('32', '0', '1');
1510 INSERT INTO `0_sys_types` VALUES ('35', '1', '1');
1511 INSERT INTO `0_sys_types` VALUES ('40', '1', '1');
1514 ### Structure of table `0_tax_group_items` ###
1516 DROP TABLE IF EXISTS `0_tax_group_items`;
1518 CREATE TABLE `0_tax_group_items` (
1519 `tax_group_id` int(11) NOT NULL default '0',
1520 `tax_type_id` int(11) NOT NULL default '0',
1521 `rate` double NOT NULL default '0',
1522 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1526 ### Data of table `0_tax_group_items` ###
1528 INSERT INTO `0_tax_group_items` VALUES ('1', '1', '5');
1531 ### Structure of table `0_tax_groups` ###
1533 DROP TABLE IF EXISTS `0_tax_groups`;
1535 CREATE TABLE `0_tax_groups` (
1536 `id` int(11) NOT NULL auto_increment,
1537 `name` varchar(60) NOT NULL default '',
1538 `tax_shipping` tinyint(1) NOT NULL default '0',
1539 `inactive` tinyint(1) NOT NULL default '0',
1541 UNIQUE KEY `name` (`name`)
1542 ) TYPE=InnoDB AUTO_INCREMENT=3 ;
1545 ### Data of table `0_tax_groups` ###
1547 INSERT INTO `0_tax_groups` VALUES ('1', 'Tax', '0', '0');
1548 INSERT INTO `0_tax_groups` VALUES ('2', 'Tax Exempt', '0', '0');
1551 ### Structure of table `0_tax_types` ###
1553 DROP TABLE IF EXISTS `0_tax_types`;
1555 CREATE TABLE `0_tax_types` (
1556 `id` int(11) NOT NULL auto_increment,
1557 `rate` double NOT NULL default '0',
1558 `sales_gl_code` varchar(11) NOT NULL default '',
1559 `purchasing_gl_code` varchar(11) NOT NULL default '',
1560 `name` varchar(60) NOT NULL default '',
1561 `inactive` tinyint(1) NOT NULL default '0',
1563 UNIQUE KEY `name` (`name`,`rate`)
1564 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
1567 ### Data of table `0_tax_types` ###
1569 INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2150', 'Tax', '0');
1572 ### Structure of table `0_trans_tax_details` ###
1574 DROP TABLE IF EXISTS `0_trans_tax_details`;
1576 CREATE TABLE `0_trans_tax_details` (
1577 `id` int(11) NOT NULL auto_increment,
1578 `trans_type` smallint(6) default NULL,
1579 `trans_no` int(11) default NULL,
1580 `tran_date` date NOT NULL,
1581 `tax_type_id` int(11) NOT NULL default '0',
1582 `rate` double NOT NULL default '0',
1583 `ex_rate` double NOT NULL default '1',
1584 `included_in_price` tinyint(1) NOT NULL default '0',
1585 `net_amount` double NOT NULL default '0',
1586 `amount` double NOT NULL default '0',
1589 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1592 ### Data of table `0_trans_tax_details` ###
1596 ### Structure of table `0_users` ###
1598 DROP TABLE IF EXISTS `0_users`;
1600 CREATE TABLE `0_users` (
1601 `id` SMALLINT(6) AUTO_INCREMENT,
1602 `user_id` varchar(60) NOT NULL default '',
1603 `password` varchar(100) NOT NULL default '',
1604 `real_name` varchar(100) NOT NULL default '',
1605 `role_id` int(11) NOT NULL default '1',
1606 `phone` varchar(30) NOT NULL default '',
1607 `email` varchar(100) default NULL,
1608 `language` varchar(20) default NULL,
1609 `date_format` tinyint(1) NOT NULL default '0',
1610 `date_sep` tinyint(1) NOT NULL default '0',
1611 `tho_sep` tinyint(1) NOT NULL default '0',
1612 `dec_sep` tinyint(1) NOT NULL default '0',
1613 `theme` varchar(20) NOT NULL default 'default',
1614 `page_size` varchar(20) NOT NULL default 'A4',
1615 `prices_dec` smallint(6) NOT NULL default '2',
1616 `qty_dec` smallint(6) NOT NULL default '2',
1617 `rates_dec` smallint(6) NOT NULL default '4',
1618 `percent_dec` smallint(6) NOT NULL default '1',
1619 `show_gl` tinyint(1) NOT NULL default '1',
1620 `show_codes` tinyint(1) NOT NULL default '0',
1621 `show_hints` tinyint(1) NOT NULL default '0',
1622 `last_visit_date` datetime default NULL,
1623 `query_size` tinyint(1) default '10',
1624 `graphic_links` tinyint(1) default '1',
1625 `pos` smallint(6) default '1',
1626 `print_profile` varchar(30) NOT NULL default '1',
1627 `rep_popup` tinyint(1) default '1',
1628 `sticky_doc_date` tinyint(1) default '0',
1629 `startup_tab` varchar(20) NOT NULL default '',
1630 `inactive` tinyint(1) NOT NULL default '0',
1632 UNIQUE KEY (`user_id`)
1633 ) TYPE=MyISAM AUTO_INCREMENT=2;
1636 ### Data of table `0_users` ###
1638 INSERT INTO `0_users` VALUES ('1', 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', '2', '', 'adm@adm.com', 'en_US', '0', '0', '0', '0', 'default', 'Letter', '2', '2', '4', '1', '1', '0', '0', '2008-04-04 12:34:29', '10', '1', '1', '1', '1', '0', 'orders', '0');
1640 ### Structure of table `0_voided` ###
1642 DROP TABLE IF EXISTS `0_voided`;
1644 CREATE TABLE `0_voided` (
1645 `type` int(11) NOT NULL default '0',
1646 `id` int(11) NOT NULL default '0',
1647 `date_` date NOT NULL default '0000-00-00',
1648 `memo_` tinytext NOT NULL,
1649 UNIQUE KEY `id` (`type`,`id`)
1653 ### Data of table `0_voided` ###
1657 ### Structure of table `0_wo_issue_items` ###
1659 DROP TABLE IF EXISTS `0_wo_issue_items`;
1661 CREATE TABLE `0_wo_issue_items` (
1662 `id` int(11) NOT NULL auto_increment,
1663 `stock_id` varchar(40) default NULL,
1664 `issue_id` int(11) default NULL,
1665 `qty_issued` double default NULL,
1667 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1670 ### Data of table `0_wo_issue_items` ###
1674 ### Structure of table `0_wo_issues` ###
1676 DROP TABLE IF EXISTS `0_wo_issues`;
1678 CREATE TABLE `0_wo_issues` (
1679 `issue_no` int(11) NOT NULL auto_increment,
1680 `workorder_id` int(11) NOT NULL default '0',
1681 `reference` varchar(100) default NULL,
1682 `issue_date` date default NULL,
1683 `loc_code` varchar(5) default NULL,
1684 `workcentre_id` int(11) default NULL,
1685 PRIMARY KEY (`issue_no`)
1686 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1689 ### Data of table `0_wo_issues` ###
1693 ### Structure of table `0_wo_manufacture` ###
1695 DROP TABLE IF EXISTS `0_wo_manufacture`;
1697 CREATE TABLE `0_wo_manufacture` (
1698 `id` int(11) NOT NULL auto_increment,
1699 `reference` varchar(100) default NULL,
1700 `workorder_id` int(11) NOT NULL default '0',
1701 `quantity` double NOT NULL default '0',
1702 `date_` date NOT NULL default '0000-00-00',
1704 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1707 ### Data of table `0_wo_manufacture` ###
1711 ### Structure of table `0_wo_requirements` ###
1713 DROP TABLE IF EXISTS `0_wo_requirements`;
1715 CREATE TABLE `0_wo_requirements` (
1716 `id` int(11) NOT NULL auto_increment,
1717 `workorder_id` int(11) NOT NULL default '0',
1718 `stock_id` char(20) NOT NULL default '',
1719 `workcentre` int(11) NOT NULL default '0',
1720 `units_req` double NOT NULL default '1',
1721 `std_cost` double NOT NULL default '0',
1722 `loc_code` char(5) NOT NULL default '',
1723 `units_issued` double NOT NULL default '0',
1725 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1728 ### Data of table `0_wo_requirements` ###
1732 ### Structure of table `0_workcentres` ###
1734 DROP TABLE IF EXISTS `0_workcentres`;
1736 CREATE TABLE `0_workcentres` (
1737 `id` int(11) NOT NULL auto_increment,
1738 `name` char(40) NOT NULL default '',
1739 `description` char(50) NOT NULL default '',
1740 `inactive` tinyint(1) NOT NULL default '0',
1742 UNIQUE KEY `name` (`name`)
1743 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1746 ### Data of table `0_workcentres` ###
1750 ### Structure of table `0_workorders` ###
1752 DROP TABLE IF EXISTS `0_workorders`;
1754 CREATE TABLE `0_workorders` (
1755 `id` int(11) NOT NULL auto_increment,
1756 `wo_ref` varchar(60) NOT NULL default '',
1757 `loc_code` varchar(5) NOT NULL default '',
1758 `units_reqd` double NOT NULL default '1',
1759 `stock_id` varchar(20) NOT NULL default '',
1760 `date_` date NOT NULL default '0000-00-00',
1761 `type` tinyint(4) NOT NULL default '0',
1762 `required_by` date NOT NULL default '0000-00-00',
1763 `released_date` date NOT NULL default '0000-00-00',
1764 `units_issued` double NOT NULL default '0',
1765 `closed` tinyint(1) NOT NULL default '0',
1766 `released` tinyint(1) NOT NULL default '0',
1767 `additional_costs` double NOT NULL default '0',
1769 UNIQUE KEY `wo_ref` (`wo_ref`)
1770 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1773 ### Data of table `0_workorders` ###