1 # MySQL dump of database 'fa' on host 'localhost'
2 # Backup Date and Time: 2009-01-30 11:03
3 # Built by FrontAccounting 2.1.0 CVS
4 # http://frontaccounting.net
5 # Company: Company name
7 # Database: en_US-new.sql release 2.1
10 ### Structure of table `0_areas` ###
12 DROP TABLE IF EXISTS `0_areas`;
14 CREATE TABLE `0_areas` (
15 `area_code` int(11) NOT NULL auto_increment,
16 `description` varchar(60) NOT NULL default '',
17 `inactive` tinyint(1) NOT NULL default '0',
18 PRIMARY KEY (`area_code`),
19 UNIQUE KEY `description` (`description`)
20 ) TYPE=MyISAM AUTO_INCREMENT=2 AUTO_INCREMENT=2 ;
23 ### Data of table `0_areas` ###
25 INSERT INTO `0_areas` VALUES ('1', 'USA', '0');
28 ### Structure of table `0_attachments` ###
30 DROP TABLE IF EXISTS `0_attachments`;
32 CREATE TABLE `0_attachments` (
33 `id` int(11) unsigned NOT NULL auto_increment,
34 `description` varchar(60) NOT NULL default '',
35 `type_no` int(11) NOT NULL default '0',
36 `trans_no` int(11) NOT NULL default '0',
37 `unique_name` varchar(60) NOT NULL default '',
38 `tran_date` date NOT NULL default '0000-00-00',
39 `filename` varchar(60) NOT NULL default '',
40 `filesize` int(11) NOT NULL default '0',
41 `filetype` varchar(60) NOT NULL default '',
43 KEY `type_no` (`type_no`,`trans_no`)
44 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
47 ### Data of table `0_attachments` ###
51 ### Structure of table `0_bank_accounts` ###
53 DROP TABLE IF EXISTS `0_bank_accounts`;
55 CREATE TABLE `0_bank_accounts` (
56 `account_code` varchar(11) NOT NULL default '',
57 `account_type` smallint(6) NOT NULL default '0',
58 `bank_account_name` varchar(60) NOT NULL default '',
59 `bank_account_number` varchar(100) NOT NULL default '',
60 `bank_name` varchar(60) NOT NULL default '',
61 `bank_address` tinytext,
62 `bank_curr_code` char(3) NOT NULL default '',
63 `id` smallint(6) NOT NULL auto_increment,
64 `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00',
65 `ending_reconcile_balance` double NOT NULL default '0',
66 `inactive` tinyint(1) NOT NULL default '0',
68 KEY `bank_account_name` (`bank_account_name`),
69 KEY `bank_account_number` (`bank_account_number`)
70 ) TYPE=MyISAM AUTO_INCREMENT=3 AUTO_INCREMENT=3 ;
73 ### Data of table `0_bank_accounts` ###
75 INSERT INTO `0_bank_accounts` VALUES ('1700', '0', 'Current account', 'N/A', 'N/A', '', 'USD', '1', '0000-00-00 00:00:00', '0', '0');
76 INSERT INTO `0_bank_accounts` VALUES ('1705', '0', 'Petty Cash account', 'N/A', 'N/A', '', 'USD', '2', '0000-00-00 00:00:00', '0', '0');
79 ### Structure of table `0_bank_trans` ###
81 DROP TABLE IF EXISTS `0_bank_trans`;
83 CREATE TABLE `0_bank_trans` (
84 `id` int(11) NOT NULL auto_increment,
85 `type` smallint(6) default NULL,
86 `trans_no` int(11) default NULL,
87 `bank_act` varchar(11) default NULL,
88 `ref` varchar(40) default NULL,
89 `trans_date` date NOT NULL default '0000-00-00',
90 `amount` double default NULL,
91 `dimension_id` int(11) NOT NULL default '0',
92 `dimension2_id` int(11) NOT NULL default '0',
93 `person_type_id` int(11) NOT NULL default '0',
95 `reconciled` date default NULL,
97 KEY `bank_act` (`bank_act`,`ref`),
98 KEY `type` (`type`,`trans_no`)
99 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
102 ### Data of table `0_bank_trans` ###
106 ### Structure of table `0_bom` ###
108 DROP TABLE IF EXISTS `0_bom`;
110 CREATE TABLE `0_bom` (
111 `id` int(11) NOT NULL auto_increment,
112 `parent` char(20) NOT NULL default '',
113 `component` char(20) NOT NULL default '',
114 `workcentre_added` int(11) NOT NULL default '0',
115 `loc_code` char(5) NOT NULL default '',
116 `quantity` double NOT NULL default '1',
117 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
118 KEY `component` (`component`),
120 KEY `loc_code` (`loc_code`),
121 KEY `parent` (`parent`,`loc_code`),
122 KEY `Parent_2` (`parent`),
123 KEY `workcentre_added` (`workcentre_added`)
124 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
127 ### Data of table `0_bom` ###
131 ### Structure of table `0_budget_trans` ###
133 DROP TABLE IF EXISTS `0_budget_trans`;
135 CREATE TABLE `0_budget_trans` (
136 `counter` int(11) NOT NULL auto_increment,
137 `type` smallint(6) NOT NULL default '0',
138 `type_no` bigint(16) NOT NULL default '1',
139 `tran_date` date NOT NULL default '0000-00-00',
140 `account` varchar(11) NOT NULL default '',
141 `memo_` tinytext NOT NULL,
142 `amount` double NOT NULL default '0',
143 `dimension_id` int(11) default '0',
144 `dimension2_id` int(11) default '0',
145 `person_type_id` int(11) default NULL,
146 `person_id` tinyblob,
147 PRIMARY KEY (`counter`),
148 KEY `Type_and_Number` (`type`,`type_no`)
149 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
152 ### Data of table `0_budget_trans` ###
156 ### Structure of table `0_chart_class` ###
158 DROP TABLE IF EXISTS `0_chart_class`;
160 CREATE TABLE `0_chart_class` (
161 `cid` int(11) NOT NULL default '0',
162 `class_name` varchar(60) NOT NULL default '',
163 `balance_sheet` tinyint(1) NOT NULL default '0',
164 `sign_convert` tinyint(1) NOT NULL default '0',
165 `inactive` tinyint(1) NOT NULL default '0',
170 ### Data of table `0_chart_class` ###
172 INSERT INTO `0_chart_class` VALUES ('1', 'Assets', '1', '0', '0');
173 INSERT INTO `0_chart_class` VALUES ('2', 'Liabilities', '1', '1', '0');
174 INSERT INTO `0_chart_class` VALUES ('3', 'Income', '0', '1', '0');
175 INSERT INTO `0_chart_class` VALUES ('4', 'Costs', '0', '1', '0');
178 ### Structure of table `0_chart_master` ###
180 DROP TABLE IF EXISTS `0_chart_master`;
182 CREATE TABLE `0_chart_master` (
183 `account_code` varchar(11) NOT NULL default '',
184 `account_code2` varchar(11) default '',
185 `account_name` varchar(60) NOT NULL default '',
186 `account_type` int(11) NOT NULL default '0',
187 `inactive` tinyint(1) NOT NULL default '0',
188 PRIMARY KEY (`account_code`),
189 KEY `account_code` (`account_code`),
190 KEY `account_name` (`account_name`)
194 ### Data of table `0_chart_master` ###
196 INSERT INTO `0_chart_master` VALUES ('3000', '', 'Sales', '1', '0');
197 INSERT INTO `0_chart_master` VALUES ('3010', '', 'Sales - Wholesale', '1', '0');
198 INSERT INTO `0_chart_master` VALUES ('3020', '', 'Sales of Other items', '1', '0');
199 INSERT INTO `0_chart_master` VALUES ('3400', '', 'Difference On Exchange', '1', '0');
200 INSERT INTO `0_chart_master` VALUES ('5000', '', 'Direct Labour', '2', '0');
201 INSERT INTO `0_chart_master` VALUES ('5050', '', 'Direct Labour Recovery', '2', '0');
202 INSERT INTO `0_chart_master` VALUES ('4200', '', 'Material Usage Varaiance', '2', '0');
203 INSERT INTO `0_chart_master` VALUES ('4210', '', 'Consumable Materials', '2', '0');
204 INSERT INTO `0_chart_master` VALUES ('4220', '', 'Purchase price Variance', '2', '0');
205 INSERT INTO `0_chart_master` VALUES ('4000', '', 'Purchases of materials', '2', '0');
206 INSERT INTO `0_chart_master` VALUES ('4250', '', 'Discounts Received', '2', '0');
207 INSERT INTO `0_chart_master` VALUES ('4260', '', 'Exchange Variation', '2', '0');
208 INSERT INTO `0_chart_master` VALUES ('4300', '', 'Freight Inwards', '2', '0');
209 INSERT INTO `0_chart_master` VALUES ('4010', '', 'Cost of Goods Sold - Retail', '2', '0');
210 INSERT INTO `0_chart_master` VALUES ('6790', '', 'Bank Charges', '5', '0');
211 INSERT INTO `0_chart_master` VALUES ('6800', '', 'Entertainments', '5', '0');
212 INSERT INTO `0_chart_master` VALUES ('6810', '', 'Legal Expenses', '5', '0');
213 INSERT INTO `0_chart_master` VALUES ('6600', '', 'Repairs and Maintenance Office', '5', '0');
214 INSERT INTO `0_chart_master` VALUES ('6730', '', 'phone', '5', '0');
215 INSERT INTO `0_chart_master` VALUES ('8200', '', 'Bank Interest', '52', '0');
216 INSERT INTO `0_chart_master` VALUES ('8900', '', 'Profit and Loss this year', '52', '0');
217 INSERT INTO `0_chart_master` VALUES ('6840', '', 'Credit Control', '5', '0');
218 INSERT INTO `0_chart_master` VALUES ('7040', '', 'Depreciation Office Equipment', '51', '0');
219 INSERT INTO `0_chart_master` VALUES ('3800', '', 'Freight Outwards', '5', '0');
220 INSERT INTO `0_chart_master` VALUES ('4500', '', 'Packaging', '5', '0');
221 INSERT INTO `0_chart_master` VALUES ('6400', '', 'Commissions', '5', '0');
222 INSERT INTO `0_chart_master` VALUES ('3200', '', 'Prompt Payment Discounts', '1', '0');
223 INSERT INTO `0_chart_master` VALUES ('6700', '', 'General Expenses', '5', '0');
224 INSERT INTO `0_chart_master` VALUES ('5200', '', 'Indirect Labour', '2', '0');
225 INSERT INTO `0_chart_master` VALUES ('5210', '', 'Overhead Recovery', '5', '0');
226 INSERT INTO `0_chart_master` VALUES ('1700', '', 'Bank account', '10', '0');
227 INSERT INTO `0_chart_master` VALUES ('1705', '', 'Petty Cash', '10', '0');
228 INSERT INTO `0_chart_master` VALUES ('1710', '', 'Foreign currency account', '10', '0');
229 INSERT INTO `0_chart_master` VALUES ('1500', '', 'Accounts Receivable', '20', '0');
230 INSERT INTO `0_chart_master` VALUES ('1400', '', 'Stocks of Raw Materials', '45', '0');
231 INSERT INTO `0_chart_master` VALUES ('1410', '', 'Stocks of Work In Progress', '45', '0');
232 INSERT INTO `0_chart_master` VALUES ('1420', '', 'Stocks of Finsihed Goods', '45', '0');
233 INSERT INTO `0_chart_master` VALUES ('1430', '', 'Goods Received Clearing account', '30', '0');
234 INSERT INTO `0_chart_master` VALUES ('2630', '', 'Accounts Payable', '30', '0');
235 INSERT INTO `0_chart_master` VALUES ('2660', '', 'VAT out 5', '30', '0');
236 INSERT INTO `0_chart_master` VALUES ('2662', '', 'VAT out 1', '30', '0');
237 INSERT INTO `0_chart_master` VALUES ('2664', '', 'VAT out 25', '30', '0');
238 INSERT INTO `0_chart_master` VALUES ('2680', '', 'VAT In 5', '30', '0');
239 INSERT INTO `0_chart_master` VALUES ('2682', '', 'VAT In 25', '30', '0');
240 INSERT INTO `0_chart_master` VALUES ('2050', '', 'Retained Earnings', '50', '0');
241 INSERT INTO `0_chart_master` VALUES ('2000', '', 'Share Capital', '50', '0');
244 ### Structure of table `0_chart_types` ###
246 DROP TABLE IF EXISTS `0_chart_types`;
248 CREATE TABLE `0_chart_types` (
249 `id` int(11) NOT NULL auto_increment,
250 `name` varchar(60) NOT NULL default '',
251 `class_id` tinyint(1) NOT NULL default '0',
252 `parent` int(11) NOT NULL default '-1',
253 `inactive` tinyint(1) NOT NULL default '0',
256 ) TYPE=MyISAM AUTO_INCREMENT=53 AUTO_INCREMENT=53 ;
259 ### Data of table `0_chart_types` ###
261 INSERT INTO `0_chart_types` VALUES ('1', 'Sales', '3', '-1', '0');
262 INSERT INTO `0_chart_types` VALUES ('2', 'Cost of Sales', '4', '-1', '0');
263 INSERT INTO `0_chart_types` VALUES ('5', 'Expenses', '4', '-1', '0');
264 INSERT INTO `0_chart_types` VALUES ('10', 'Cash/Bank', '1', '-1', '0');
265 INSERT INTO `0_chart_types` VALUES ('20', 'Accounts Receivable', '1', '-1', '0');
266 INSERT INTO `0_chart_types` VALUES ('30', 'Accounts Payable', '2', '-1', '0');
267 INSERT INTO `0_chart_types` VALUES ('40', 'Fixed Assets', '1', '-1', '0');
268 INSERT INTO `0_chart_types` VALUES ('45', 'Inventory', '1', '-1', '0');
269 INSERT INTO `0_chart_types` VALUES ('50', 'Equity', '2', '-1', '0');
270 INSERT INTO `0_chart_types` VALUES ('51', 'Depreciations', '4', '-1', '0');
271 INSERT INTO `0_chart_types` VALUES ('52', 'Financials', '4', '-1', '0');
274 ### Structure of table `0_comments` ###
276 DROP TABLE IF EXISTS `0_comments`;
278 CREATE TABLE `0_comments` (
279 `type` int(11) NOT NULL default '0',
280 `id` int(11) NOT NULL default '0',
281 `date_` date default '0000-00-00',
286 ### Data of table `0_comments` ###
290 ### Structure of table `0_company` ###
292 DROP TABLE IF EXISTS `0_company`;
294 CREATE TABLE `0_company` (
295 `coy_code` int(11) NOT NULL default '1',
296 `coy_name` varchar(60) NOT NULL default '',
297 `gst_no` varchar(25) NOT NULL default '',
298 `coy_no` varchar(25) NOT NULL default '0',
299 `tax_prd` int(11) NOT NULL default '1',
300 `tax_last` int(11) NOT NULL default '1',
301 `postal_address` tinytext NOT NULL,
302 `phone` varchar(30) NOT NULL default '',
303 `fax` varchar(30) NOT NULL default '',
304 `email` varchar(100) NOT NULL default '',
305 `coy_logo` varchar(100) NOT NULL default '',
306 `domicile` varchar(55) NOT NULL default '',
307 `curr_default` char(3) NOT NULL default '',
308 `debtors_act` varchar(11) NOT NULL default '',
309 `pyt_discount_act` varchar(11) NOT NULL default '',
310 `creditors_act` varchar(11) NOT NULL default '',
311 `grn_act` varchar(11) NOT NULL default '',
312 `exchange_diff_act` varchar(11) NOT NULL default '',
313 `profit_loss_year_act` varchar(11) NOT NULL default '',
314 `retained_earnings_act` varchar(11) NOT NULL default '',
315 `freight_act` varchar(11) NOT NULL default '',
316 `default_sales_act` varchar(11) NOT NULL default '',
317 `default_sales_discount_act` varchar(11) NOT NULL default '',
318 `default_prompt_payment_act` varchar(11) NOT NULL default '',
319 `default_inventory_act` varchar(11) NOT NULL default '',
320 `default_cogs_act` varchar(11) NOT NULL default '',
321 `default_adj_act` varchar(11) NOT NULL default '',
322 `default_inv_sales_act` varchar(11) NOT NULL default '',
323 `default_assembly_act` varchar(11) NOT NULL default '',
324 `payroll_act` varchar(11) NOT NULL default '',
325 `allow_negative_stock` tinyint(1) NOT NULL default '0',
326 `po_over_receive` int(11) NOT NULL default '10',
327 `po_over_charge` int(11) NOT NULL default '10',
328 `default_credit_limit` int(11) NOT NULL default '1000',
329 `default_workorder_required` int(11) NOT NULL default '20',
330 `default_dim_required` int(11) NOT NULL default '20',
331 `past_due_days` int(11) NOT NULL default '30',
332 `use_dimension` tinyint(1) default '0',
333 `f_year` int(11) NOT NULL default '1',
334 `no_item_list` tinyint(1) NOT NULL default '0',
335 `no_customer_list` tinyint(1) NOT NULL default '0',
336 `no_supplier_list` tinyint(1) NOT NULL default '0',
337 `base_sales` int(11) NOT NULL default '-1',
338 `foreign_codes` tinyint(1) NOT NULL default '0',
339 `accumulate_shipping` tinyint(1) NOT NULL default '0',
340 `legal_text` tinytext NOT NULL,
341 `default_delivery_required` smallint(6) NOT NULL default '1',
342 `version_id` varchar(11) NOT NULL default '',
343 PRIMARY KEY (`coy_code`)
347 ### Data of table `0_company` ###
349 INSERT INTO `0_company` VALUES ('1', 'Company name', '', '', '1', '1', 'N/A', '', '', '', '', '', 'USD', '1500', '4250', '2630', '1430', '4260', '4220', '2050', '3800', '3000', '3000', '3200', '1420', '4010', '4210', '3000', '1410', '5000', '0', '10', '10', '1000', '20', '20', '30', '1', '1', '0', '0', '0', '-1', '0', '0', '', '1');
352 ### Structure of table `0_credit_status` ###
354 DROP TABLE IF EXISTS `0_credit_status`;
356 CREATE TABLE `0_credit_status` (
357 `id` int(11) NOT NULL auto_increment,
358 `reason_description` char(100) NOT NULL default '',
359 `dissallow_invoices` tinyint(1) NOT NULL default '0',
360 `inactive` tinyint(1) NOT NULL default '0',
362 UNIQUE KEY `reason_description` (`reason_description`)
363 ) TYPE=MyISAM AUTO_INCREMENT=5 AUTO_INCREMENT=5 ;
366 ### Data of table `0_credit_status` ###
368 INSERT INTO `0_credit_status` VALUES ('1', 'Good History', '0', '0');
369 INSERT INTO `0_credit_status` VALUES ('3', 'No more work until payment received', '1', '0');
370 INSERT INTO `0_credit_status` VALUES ('4', 'In liquidation', '1', '0');
373 ### Structure of table `0_currencies` ###
375 DROP TABLE IF EXISTS `0_currencies`;
377 CREATE TABLE `0_currencies` (
378 `currency` varchar(60) NOT NULL default '',
379 `curr_abrev` char(3) NOT NULL default '',
380 `curr_symbol` varchar(10) NOT NULL default '',
381 `country` varchar(100) NOT NULL default '',
382 `hundreds_name` varchar(15) NOT NULL default '',
383 `inactive` tinyint(1) NOT NULL default '0',
384 PRIMARY KEY (`curr_abrev`)
388 ### Data of table `0_currencies` ###
390 INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents', '0');
391 INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence', '0');
392 INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents', '0');
395 ### Structure of table `0_cust_allocations` ###
397 DROP TABLE IF EXISTS `0_cust_allocations`;
399 CREATE TABLE `0_cust_allocations` (
400 `id` int(11) NOT NULL auto_increment,
401 `amt` double unsigned default NULL,
402 `date_alloc` date NOT NULL default '0000-00-00',
403 `trans_no_from` int(11) default NULL,
404 `trans_type_from` int(11) default NULL,
405 `trans_no_to` int(11) default NULL,
406 `trans_type_to` int(11) default NULL,
408 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
411 ### Data of table `0_cust_allocations` ###
415 ### Structure of table `0_cust_branch` ###
417 DROP TABLE IF EXISTS `0_cust_branch`;
419 CREATE TABLE `0_cust_branch` (
420 `branch_code` int(11) NOT NULL auto_increment,
421 `debtor_no` int(11) NOT NULL default '0',
422 `br_name` varchar(60) NOT NULL default '',
423 `br_address` tinytext NOT NULL,
424 `area` int(11) default NULL,
425 `salesman` int(11) NOT NULL default '0',
426 `phone` varchar(30) NOT NULL default '',
427 `fax` varchar(30) NOT NULL default '',
428 `contact_name` varchar(60) NOT NULL default '',
429 `email` varchar(100) NOT NULL default '',
430 `default_location` varchar(5) NOT NULL default '',
431 `tax_group_id` int(11) default NULL,
432 `sales_account` varchar(11) default NULL,
433 `sales_discount_account` varchar(11) default NULL,
434 `receivables_account` varchar(11) default NULL,
435 `payment_discount_account` varchar(11) default NULL,
436 `default_ship_via` int(11) NOT NULL default '1',
437 `disable_trans` tinyint(4) NOT NULL default '0',
438 `br_post_address` tinytext NOT NULL,
439 `group_no` int(11) NOT NULL default '0',
440 `inactive` tinyint(1) NOT NULL default '0',
441 PRIMARY KEY (`branch_code`,`debtor_no`),
442 KEY `branch_code` (`branch_code`),
443 KEY `br_name` (`br_name`)
444 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
447 ### Data of table `0_cust_branch` ###
451 ### Structure of table `0_debtor_trans` ###
453 DROP TABLE IF EXISTS `0_debtor_trans`;
455 CREATE TABLE `0_debtor_trans` (
456 `trans_no` int(11) unsigned NOT NULL default '0',
457 `type` smallint(6) unsigned NOT NULL default '0',
458 `version` tinyint(1) unsigned NOT NULL default '0',
459 `debtor_no` int(11) unsigned default NULL,
460 `branch_code` int(11) NOT NULL default '-1',
461 `tran_date` date NOT NULL default '0000-00-00',
462 `due_date` date NOT NULL default '0000-00-00',
463 `reference` varchar(60) NOT NULL default '',
464 `tpe` int(11) NOT NULL default '0',
465 `order_` int(11) NOT NULL default '0',
466 `ov_amount` double NOT NULL default '0',
467 `ov_gst` double NOT NULL default '0',
468 `ov_freight` double NOT NULL default '0',
469 `ov_freight_tax` double NOT NULL default '0',
470 `ov_discount` double NOT NULL default '0',
471 `alloc` double NOT NULL default '0',
472 `rate` double NOT NULL default '1',
473 `ship_via` int(11) default NULL,
474 `trans_link` int(11) NOT NULL default '0',
475 `dimension_id` int(11) NOT NULL default '0',
476 `dimension2_id` int(11) NOT NULL default '0',
477 PRIMARY KEY (`trans_no`,`type`),
478 KEY `debtor_no` (`debtor_no`,`branch_code`)
482 ### Data of table `0_debtor_trans` ###
486 ### Structure of table `0_debtor_trans_details` ###
488 DROP TABLE IF EXISTS `0_debtor_trans_details`;
490 CREATE TABLE `0_debtor_trans_details` (
491 `id` int(11) NOT NULL auto_increment,
492 `debtor_trans_no` int(11) default NULL,
493 `debtor_trans_type` int(11) default NULL,
494 `stock_id` varchar(20) NOT NULL default '',
495 `description` tinytext,
496 `unit_price` double NOT NULL default '0',
497 `unit_tax` double NOT NULL default '0',
498 `quantity` double NOT NULL default '0',
499 `discount_percent` double NOT NULL default '0',
500 `standard_cost` double NOT NULL default '0',
501 `qty_done` double NOT NULL default '0',
503 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
506 ### Data of table `0_debtor_trans_details` ###
510 ### Structure of table `0_debtors_master` ###
512 DROP TABLE IF EXISTS `0_debtors_master`;
514 CREATE TABLE `0_debtors_master` (
515 `debtor_no` int(11) NOT NULL auto_increment,
516 `name` varchar(80) NOT NULL default '',
518 `email` varchar(100) NOT NULL default '',
519 `tax_id` varchar(55) NOT NULL default '',
520 `curr_code` char(3) NOT NULL default '',
521 `sales_type` int(11) NOT NULL default '1',
522 `dimension_id` int(11) NOT NULL default '0',
523 `dimension2_id` int(11) NOT NULL default '0',
524 `credit_status` int(11) NOT NULL default '0',
525 `payment_terms` int(11) default NULL,
526 `discount` double NOT NULL default '0',
527 `pymt_discount` double NOT NULL default '0',
528 `credit_limit` float NOT NULL default '1000',
529 `inactive` tinyint(1) NOT NULL default '0',
530 PRIMARY KEY (`debtor_no`),
531 UNIQUE KEY `name` (`name`)
532 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
535 ### Data of table `0_debtors_master` ###
539 ### Structure of table `0_dimensions` ###
541 DROP TABLE IF EXISTS `0_dimensions`;
543 CREATE TABLE `0_dimensions` (
544 `id` int(11) NOT NULL auto_increment,
545 `reference` varchar(60) NOT NULL default '',
546 `name` varchar(60) NOT NULL default '',
547 `type_` tinyint(1) NOT NULL default '1',
548 `closed` tinyint(1) NOT NULL default '0',
549 `date_` date NOT NULL default '0000-00-00',
550 `due_date` date NOT NULL default '0000-00-00',
552 UNIQUE KEY `reference` (`reference`)
553 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
556 ### Data of table `0_dimensions` ###
560 ### Structure of table `0_exchange_rates` ###
562 DROP TABLE IF EXISTS `0_exchange_rates`;
564 CREATE TABLE `0_exchange_rates` (
565 `id` int(11) NOT NULL auto_increment,
566 `curr_code` char(3) NOT NULL default '',
567 `rate_buy` double NOT NULL default '0',
568 `rate_sell` double NOT NULL default '0',
569 `date_` date NOT NULL default '0000-00-00',
571 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
572 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
575 ### Data of table `0_exchange_rates` ###
579 ### Structure of table `0_fiscal_year` ###
581 DROP TABLE IF EXISTS `0_fiscal_year`;
583 CREATE TABLE `0_fiscal_year` (
584 `id` int(11) NOT NULL auto_increment,
585 `begin` date default '0000-00-00',
586 `end` date default '0000-00-00',
587 `closed` tinyint(1) NOT NULL default '0',
589 ) TYPE=InnoDB AUTO_INCREMENT=2 AUTO_INCREMENT=2 ;
592 ### Data of table `0_fiscal_year` ###
594 INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0');
597 ### Structure of table `0_gl_trans` ###
599 DROP TABLE IF EXISTS `0_gl_trans`;
601 CREATE TABLE `0_gl_trans` (
602 `counter` int(11) NOT NULL auto_increment,
603 `type` smallint(6) NOT NULL default '0',
604 `type_no` bigint(16) NOT NULL default '1',
605 `tran_date` date NOT NULL default '0000-00-00',
606 `account` varchar(11) NOT NULL default '',
607 `memo_` tinytext NOT NULL,
608 `amount` double NOT NULL default '0',
609 `dimension_id` int(11) NOT NULL default '0',
610 `dimension2_id` int(11) NOT NULL default '0',
611 `person_type_id` int(11) default NULL,
612 `person_id` tinyblob,
613 PRIMARY KEY (`counter`),
614 KEY `Type_and_Number` (`type`,`type_no`)
615 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
618 ### Data of table `0_gl_trans` ###
622 ### Structure of table `0_grn_batch` ###
624 DROP TABLE IF EXISTS `0_grn_batch`;
626 CREATE TABLE `0_grn_batch` (
627 `id` int(11) NOT NULL auto_increment,
628 `supplier_id` int(11) NOT NULL default '0',
629 `purch_order_no` int(11) default NULL,
630 `reference` varchar(60) NOT NULL default '',
631 `delivery_date` date NOT NULL default '0000-00-00',
632 `loc_code` varchar(5) default NULL,
634 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
637 ### Data of table `0_grn_batch` ###
641 ### Structure of table `0_grn_items` ###
643 DROP TABLE IF EXISTS `0_grn_items`;
645 CREATE TABLE `0_grn_items` (
646 `id` int(11) NOT NULL auto_increment,
647 `grn_batch_id` int(11) default NULL,
648 `po_detail_item` int(11) NOT NULL default '0',
649 `item_code` varchar(20) NOT NULL default '',
650 `description` tinytext,
651 `qty_recd` double NOT NULL default '0',
652 `quantity_inv` double NOT NULL default '0',
654 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
657 ### Data of table `0_grn_items` ###
661 ### Structure of table `0_groups` ###
663 DROP TABLE IF EXISTS `0_groups`;
665 CREATE TABLE `0_groups` (
666 `id` smallint(6) unsigned NOT NULL auto_increment,
667 `description` varchar(60) NOT NULL default '',
668 `inactive` tinyint(1) NOT NULL default '0',
670 UNIQUE KEY `description` (`description`)
671 ) TYPE=MyISAM AUTO_INCREMENT=4 AUTO_INCREMENT=4 ;
674 ### Data of table `0_groups` ###
676 INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
677 INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
678 INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
681 ### Structure of table `0_item_codes` ###
683 DROP TABLE IF EXISTS `0_item_codes`;
685 CREATE TABLE `0_item_codes` (
686 `id` int(11) unsigned NOT NULL auto_increment,
687 `item_code` varchar(20) NOT NULL,
688 `stock_id` varchar(20) NOT NULL,
689 `description` varchar(200) NOT NULL default '',
690 `category_id` smallint(6) unsigned NOT NULL,
691 `quantity` double NOT NULL default '1',
692 `is_foreign` tinyint(1) NOT NULL default '0',
693 `inactive` tinyint(1) NOT NULL default '0',
695 UNIQUE KEY `stock_id` (`stock_id`,`item_code`)
696 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
699 ### Data of table `0_item_codes` ###
703 ### Structure of table `0_item_tax_type_exemptions` ###
705 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
707 CREATE TABLE `0_item_tax_type_exemptions` (
708 `item_tax_type_id` int(11) NOT NULL default '0',
709 `tax_type_id` int(11) NOT NULL default '0',
710 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
714 ### Data of table `0_item_tax_type_exemptions` ###
718 ### Structure of table `0_item_tax_types` ###
720 DROP TABLE IF EXISTS `0_item_tax_types`;
722 CREATE TABLE `0_item_tax_types` (
723 `id` int(11) NOT NULL auto_increment,
724 `name` varchar(60) NOT NULL default '',
725 `exempt` tinyint(1) NOT NULL default '0',
726 `inactive` tinyint(1) NOT NULL default '0',
728 UNIQUE KEY `name` (`name`)
729 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
732 ### Data of table `0_item_tax_types` ###
736 ### Structure of table `0_item_units` ###
738 DROP TABLE IF EXISTS `0_item_units`;
740 CREATE TABLE `0_item_units` (
741 `abbr` varchar(20) NOT NULL,
742 `name` varchar(40) NOT NULL,
743 `decimals` tinyint(2) NOT NULL,
744 `inactive` tinyint(1) NOT NULL default '0',
745 PRIMARY KEY (`abbr`),
746 UNIQUE KEY `name` (`name`)
750 ### Data of table `0_item_units` ###
752 INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0');
755 ### Structure of table `0_loc_stock` ###
757 DROP TABLE IF EXISTS `0_loc_stock`;
759 CREATE TABLE `0_loc_stock` (
760 `loc_code` char(5) NOT NULL default '',
761 `stock_id` char(20) NOT NULL default '',
762 `reorder_level` bigint(20) NOT NULL default '0',
763 PRIMARY KEY (`loc_code`,`stock_id`),
764 KEY `stock_id` (`stock_id`)
768 ### Data of table `0_loc_stock` ###
772 ### Structure of table `0_locations` ###
774 DROP TABLE IF EXISTS `0_locations`;
776 CREATE TABLE `0_locations` (
777 `loc_code` varchar(5) NOT NULL default '',
778 `location_name` varchar(60) NOT NULL default '',
779 `delivery_address` tinytext NOT NULL,
780 `phone` varchar(30) NOT NULL default '',
781 `fax` varchar(30) NOT NULL default '',
782 `email` varchar(100) NOT NULL default '',
783 `contact` varchar(30) NOT NULL default '',
784 `inactive` tinyint(1) NOT NULL default '0',
785 PRIMARY KEY (`loc_code`)
789 ### Data of table `0_locations` ###
791 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '0');
794 ### Structure of table `0_movement_types` ###
796 DROP TABLE IF EXISTS `0_movement_types`;
798 CREATE TABLE `0_movement_types` (
799 `id` int(11) NOT NULL auto_increment,
800 `name` varchar(60) NOT NULL default '',
801 `inactive` tinyint(1) NOT NULL default '0',
803 UNIQUE KEY `name` (`name`)
804 ) TYPE=MyISAM AUTO_INCREMENT=2 AUTO_INCREMENT=2 ;
807 ### Data of table `0_movement_types` ###
809 INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment', '0');
812 ### Structure of table `0_payment_terms` ###
814 DROP TABLE IF EXISTS `0_payment_terms`;
816 CREATE TABLE `0_payment_terms` (
817 `terms_indicator` int(11) NOT NULL auto_increment,
818 `terms` char(80) NOT NULL default '',
819 `days_before_due` smallint(6) NOT NULL default '0',
820 `day_in_following_month` smallint(6) NOT NULL default '0',
821 `inactive` tinyint(1) NOT NULL default '0',
822 PRIMARY KEY (`terms_indicator`),
823 UNIQUE KEY `terms` (`terms`)
824 ) TYPE=MyISAM AUTO_INCREMENT=5 AUTO_INCREMENT=5 ;
827 ### Data of table `0_payment_terms` ###
829 INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0');
830 INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0');
831 INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0');
832 INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0');
835 ### Structure of table `0_prices` ###
837 DROP TABLE IF EXISTS `0_prices`;
839 CREATE TABLE `0_prices` (
840 `id` int(11) NOT NULL auto_increment,
841 `stock_id` varchar(20) NOT NULL default '',
842 `sales_type_id` int(11) NOT NULL default '0',
843 `curr_abrev` char(3) NOT NULL default '',
844 `price` double NOT NULL default '0',
846 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
847 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
850 ### Data of table `0_prices` ###
854 ### Structure of table `0_print_profiles` ###
856 DROP TABLE IF EXISTS `0_print_profiles`;
858 CREATE TABLE `0_print_profiles` (
859 `id` smallint(6) unsigned NOT NULL auto_increment,
860 `profile` varchar(30) NOT NULL,
861 `report` varchar(5) default NULL,
862 `printer` tinyint(3) unsigned default NULL,
864 UNIQUE KEY `profile` (`profile`,`report`)
865 ) TYPE=MyISAM AUTO_INCREMENT=10 AUTO_INCREMENT=10 ;
868 ### Data of table `0_print_profiles` ###
870 INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0');
871 INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0');
872 INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2');
873 INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2');
874 INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2');
875 INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2');
876 INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2');
877 INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2');
878 INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2');
881 ### Structure of table `0_printers` ###
883 DROP TABLE IF EXISTS `0_printers`;
885 CREATE TABLE `0_printers` (
886 `id` tinyint(3) unsigned NOT NULL auto_increment,
887 `name` varchar(20) NOT NULL,
888 `description` varchar(60) NOT NULL,
889 `queue` varchar(20) NOT NULL,
890 `host` varchar(40) NOT NULL,
891 `port` smallint(11) unsigned NOT NULL,
892 `timeout` tinyint(3) unsigned NOT NULL,
894 UNIQUE KEY `name` (`name`)
895 ) TYPE=MyISAM AUTO_INCREMENT=4 AUTO_INCREMENT=4 ;
898 ### Data of table `0_printers` ###
900 INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20');
901 INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5');
902 INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
905 ### Structure of table `0_purch_data` ###
907 DROP TABLE IF EXISTS `0_purch_data`;
909 CREATE TABLE `0_purch_data` (
910 `supplier_id` int(11) NOT NULL default '0',
911 `stock_id` char(20) NOT NULL default '',
912 `price` double NOT NULL default '0',
913 `suppliers_uom` char(50) NOT NULL default '',
914 `conversion_factor` double NOT NULL default '1',
915 `supplier_description` char(50) NOT NULL default '',
916 PRIMARY KEY (`supplier_id`,`stock_id`)
920 ### Data of table `0_purch_data` ###
924 ### Structure of table `0_purch_order_details` ###
926 DROP TABLE IF EXISTS `0_purch_order_details`;
928 CREATE TABLE `0_purch_order_details` (
929 `po_detail_item` int(11) NOT NULL auto_increment,
930 `order_no` int(11) NOT NULL default '0',
931 `item_code` varchar(20) NOT NULL default '',
932 `description` tinytext,
933 `delivery_date` date NOT NULL default '0000-00-00',
934 `qty_invoiced` double NOT NULL default '0',
935 `unit_price` double NOT NULL default '0',
936 `act_price` double NOT NULL default '0',
937 `std_cost_unit` double NOT NULL default '0',
938 `quantity_ordered` double NOT NULL default '0',
939 `quantity_received` double NOT NULL default '0',
940 PRIMARY KEY (`po_detail_item`)
941 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
944 ### Data of table `0_purch_order_details` ###
948 ### Structure of table `0_purch_orders` ###
950 DROP TABLE IF EXISTS `0_purch_orders`;
952 CREATE TABLE `0_purch_orders` (
953 `order_no` int(11) NOT NULL auto_increment,
954 `supplier_id` int(11) NOT NULL default '0',
956 `ord_date` date NOT NULL default '0000-00-00',
957 `reference` tinytext NOT NULL,
958 `requisition_no` tinytext,
959 `into_stock_location` varchar(5) NOT NULL default '',
960 `delivery_address` tinytext NOT NULL,
961 PRIMARY KEY (`order_no`)
962 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
965 ### Data of table `0_purch_orders` ###
969 ### Structure of table `0_quick_entries` ###
971 DROP TABLE IF EXISTS `0_quick_entries`;
973 CREATE TABLE `0_quick_entries` (
974 `id` smallint(6) unsigned NOT NULL auto_increment,
975 `type` tinyint(1) NOT NULL default '0',
976 `description` varchar(60) NOT NULL,
977 `base_amount` double NOT NULL default '0',
978 `base_desc` varchar(60) default NULL,
980 KEY `description` (`description`)
981 ) TYPE=MyISAM AUTO_INCREMENT=4 AUTO_INCREMENT=4 ;
984 ### Data of table `0_quick_entries` ###
986 INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount');
987 INSERT INTO `0_quick_entries` VALUES ('2', '1', 'Phone', '0', 'Amount');
988 INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount');
991 ### Structure of table `0_quick_entry_lines` ###
993 DROP TABLE IF EXISTS `0_quick_entry_lines`;
995 CREATE TABLE `0_quick_entry_lines` (
996 `id` smallint(6) unsigned NOT NULL auto_increment,
997 `qid` smallint(6) unsigned NOT NULL,
998 `amount` double default '0',
999 `action` varchar(2) NOT NULL,
1000 `dest_id` varchar(11) NOT NULL,
1001 `dimension_id` smallint(6) unsigned default NULL,
1002 `dimension2_id` smallint(6) unsigned default NULL,
1005 ) TYPE=MyISAM AUTO_INCREMENT=4 AUTO_INCREMENT=4 ;
1008 ### Data of table `0_quick_entry_lines` ###
1010 INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', '=', '6600', '0', '0');
1011 INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', '=', '6730', '0', '0');
1012 INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', '=', '3000', '0', '0');
1015 ### Structure of table `0_recurrent_invoices` ###
1017 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1019 CREATE TABLE `0_recurrent_invoices` (
1020 `id` smallint(6) unsigned NOT NULL auto_increment,
1021 `description` varchar(60) NOT NULL default '',
1022 `order_no` int(11) unsigned NOT NULL,
1023 `debtor_no` int(11) unsigned default NULL,
1024 `group_no` smallint(6) unsigned default NULL,
1025 `days` int(11) NOT NULL default '0',
1026 `monthly` int(11) NOT NULL default '0',
1027 `begin` date NOT NULL default '0000-00-00',
1028 `end` date NOT NULL default '0000-00-00',
1029 `last_sent` date NOT NULL default '0000-00-00',
1031 UNIQUE KEY `description` (`description`)
1032 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1035 ### Data of table `0_recurrent_invoices` ###
1039 ### Structure of table `0_refs` ###
1041 DROP TABLE IF EXISTS `0_refs`;
1043 CREATE TABLE `0_refs` (
1044 `id` int(11) NOT NULL default '0',
1045 `type` int(11) NOT NULL default '0',
1046 `reference` varchar(100) NOT NULL default '',
1047 PRIMARY KEY (`id`,`type`)
1051 ### Data of table `0_refs` ###
1055 ### Structure of table `0_sales_order_details` ###
1057 DROP TABLE IF EXISTS `0_sales_order_details`;
1059 CREATE TABLE `0_sales_order_details` (
1060 `id` int(11) NOT NULL auto_increment,
1061 `order_no` int(11) NOT NULL default '0',
1062 `stk_code` varchar(20) NOT NULL default '',
1063 `description` tinytext,
1064 `qty_sent` double NOT NULL default '0',
1065 `unit_price` double NOT NULL default '0',
1066 `quantity` double NOT NULL default '0',
1067 `discount_percent` double NOT NULL default '0',
1069 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1072 ### Data of table `0_sales_order_details` ###
1076 ### Structure of table `0_sales_orders` ###
1078 DROP TABLE IF EXISTS `0_sales_orders`;
1080 CREATE TABLE `0_sales_orders` (
1081 `order_no` int(11) NOT NULL auto_increment,
1082 `version` tinyint(1) unsigned NOT NULL default '0',
1083 `type` tinyint(1) NOT NULL default '0',
1084 `debtor_no` int(11) NOT NULL default '0',
1085 `branch_code` int(11) NOT NULL default '0',
1086 `customer_ref` tinytext NOT NULL,
1087 `comments` tinytext,
1088 `ord_date` date NOT NULL default '0000-00-00',
1089 `order_type` int(11) NOT NULL default '0',
1090 `ship_via` int(11) NOT NULL default '0',
1091 `delivery_address` tinytext NOT NULL,
1092 `contact_phone` varchar(30) default NULL,
1093 `contact_email` varchar(100) default NULL,
1094 `deliver_to` tinytext NOT NULL,
1095 `freight_cost` double NOT NULL default '0',
1096 `from_stk_loc` varchar(5) NOT NULL default '',
1097 `delivery_date` date NOT NULL default '0000-00-00',
1098 PRIMARY KEY (`order_no`)
1099 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1102 ### Data of table `0_sales_orders` ###
1106 ### Structure of table `0_sales_pos` ###
1108 DROP TABLE IF EXISTS `0_sales_pos`;
1110 CREATE TABLE `0_sales_pos` (
1111 `id` smallint(6) unsigned NOT NULL auto_increment,
1112 `pos_name` varchar(30) NOT NULL,
1113 `cash_sale` tinyint(1) NOT NULL,
1114 `credit_sale` tinyint(1) NOT NULL,
1115 `pos_location` varchar(5) NOT NULL,
1116 `pos_account` smallint(6) unsigned NOT NULL,
1117 `inactive` tinyint(1) NOT NULL default '0',
1119 UNIQUE KEY `pos_name` (`pos_name`)
1120 ) TYPE=MyISAM AUTO_INCREMENT=2 AUTO_INCREMENT=2 ;
1123 ### Data of table `0_sales_pos` ###
1125 INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '1', '0');
1128 ### Structure of table `0_sales_types` ###
1130 DROP TABLE IF EXISTS `0_sales_types`;
1132 CREATE TABLE `0_sales_types` (
1133 `id` int(11) NOT NULL auto_increment,
1134 `sales_type` char(50) NOT NULL default '',
1135 `tax_included` int(1) NOT NULL default '0',
1136 `factor` double NOT NULL default '1',
1137 `inactive` tinyint(1) NOT NULL default '0',
1139 UNIQUE KEY `sales_type` (`sales_type`)
1140 ) TYPE=MyISAM AUTO_INCREMENT=3 AUTO_INCREMENT=3 ;
1143 ### Data of table `0_sales_types` ###
1145 INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '0', '1', '0');
1146 INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '1', '0');
1149 ### Structure of table `0_salesman` ###
1151 DROP TABLE IF EXISTS `0_salesman`;
1153 CREATE TABLE `0_salesman` (
1154 `salesman_code` int(11) NOT NULL auto_increment,
1155 `salesman_name` char(60) NOT NULL default '',
1156 `salesman_phone` char(30) NOT NULL default '',
1157 `salesman_fax` char(30) NOT NULL default '',
1158 `salesman_email` varchar(100) NOT NULL default '',
1159 `provision` double NOT NULL default '0',
1160 `break_pt` double NOT NULL default '0',
1161 `provision2` double NOT NULL default '0',
1162 `inactive` tinyint(1) NOT NULL default '0',
1163 PRIMARY KEY (`salesman_code`),
1164 UNIQUE KEY `salesman_name` (`salesman_name`)
1165 ) TYPE=MyISAM AUTO_INCREMENT=2 AUTO_INCREMENT=2 ;
1168 ### Data of table `0_salesman` ###
1170 INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1173 ### Structure of table `0_shippers` ###
1175 DROP TABLE IF EXISTS `0_shippers`;
1177 CREATE TABLE `0_shippers` (
1178 `shipper_id` int(11) NOT NULL auto_increment,
1179 `shipper_name` varchar(60) NOT NULL default '',
1180 `phone` varchar(30) NOT NULL default '',
1181 `contact` tinytext NOT NULL,
1182 `address` tinytext NOT NULL,
1183 `inactive` tinyint(1) NOT NULL default '0',
1184 PRIMARY KEY (`shipper_id`),
1185 UNIQUE KEY `name` (`shipper_name`)
1186 ) TYPE=MyISAM AUTO_INCREMENT=2 AUTO_INCREMENT=2 ;
1189 ### Data of table `0_shippers` ###
1191 INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '0');
1194 ### Structure of table `0_sql_trail` ###
1196 DROP TABLE IF EXISTS `0_sql_trail`;
1198 CREATE TABLE `0_sql_trail` (
1199 `id` int(11) unsigned NOT NULL auto_increment,
1200 `sql` text NOT NULL,
1201 `result` tinyint(1) NOT NULL,
1202 `msg` varchar(255) NOT NULL,
1204 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1207 ### Data of table `0_sql_trail` ###
1211 ### Structure of table `0_stock_category` ###
1213 DROP TABLE IF EXISTS `0_stock_category`;
1215 CREATE TABLE `0_stock_category` (
1216 `category_id` int(11) NOT NULL auto_increment,
1217 `description` varchar(60) NOT NULL default '',
1218 `dflt_tax_type` int(11) NOT NULL default '0',
1219 `dflt_units` varchar(20) NOT NULL default 'each',
1220 `dflt_mb_flag` char(1) NOT NULL default 'B',
1221 `dflt_sales_act` varchar(11) NOT NULL default '',
1222 `dflt_cogs_act` varchar(11) NOT NULL default '',
1223 `dflt_inventory_act` varchar(11) NOT NULL default '',
1224 `dflt_adjustment_act` varchar(11) NOT NULL default '',
1225 `dflt_assembly_act` varchar(11) NOT NULL default '',
1226 `dflt_dim1` int(11) default NULL,
1227 `dflt_dim2` int(11) default NULL,
1228 `inactive` tinyint(1) NOT NULL default '0',
1229 PRIMARY KEY (`category_id`),
1230 UNIQUE KEY `description` (`description`)
1231 ) TYPE=MyISAM AUTO_INCREMENT=5 AUTO_INCREMENT=5 ;
1234 ### Data of table `0_stock_category` ###
1236 INSERT INTO `0_stock_category` VALUES ('1', 'Components', '0');
1237 INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '0');
1238 INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '0');
1239 INSERT INTO `0_stock_category` VALUES ('4', 'Services', '0');
1242 ### Structure of table `0_stock_master` ###
1244 DROP TABLE IF EXISTS `0_stock_master`;
1246 CREATE TABLE `0_stock_master` (
1247 `stock_id` varchar(20) NOT NULL default '',
1248 `category_id` int(11) NOT NULL default '0',
1249 `tax_type_id` int(11) NOT NULL default '0',
1250 `description` varchar(200) NOT NULL default '',
1251 `long_description` tinytext NOT NULL,
1252 `units` varchar(20) NOT NULL default 'each',
1253 `mb_flag` char(1) NOT NULL default 'B',
1254 `sales_account` varchar(11) NOT NULL default '',
1255 `cogs_account` varchar(11) NOT NULL default '',
1256 `inventory_account` varchar(11) NOT NULL default '',
1257 `adjustment_account` varchar(11) NOT NULL default '',
1258 `assembly_account` varchar(11) NOT NULL default '',
1259 `dimension_id` int(11) default NULL,
1260 `dimension2_id` int(11) default NULL,
1261 `actual_cost` double NOT NULL default '0',
1262 `last_cost` double NOT NULL default '0',
1263 `material_cost` double NOT NULL default '0',
1264 `labour_cost` double NOT NULL default '0',
1265 `overhead_cost` double NOT NULL default '0',
1266 `inactive` tinyint(1) NOT NULL default '0',
1267 PRIMARY KEY (`stock_id`)
1271 ### Data of table `0_stock_master` ###
1275 ### Structure of table `0_stock_moves` ###
1277 DROP TABLE IF EXISTS `0_stock_moves`;
1279 CREATE TABLE `0_stock_moves` (
1280 `trans_id` int(11) NOT NULL auto_increment,
1281 `trans_no` int(11) NOT NULL default '0',
1282 `stock_id` char(20) NOT NULL default '',
1283 `type` smallint(6) NOT NULL default '0',
1284 `loc_code` char(5) NOT NULL default '',
1285 `tran_date` date NOT NULL default '0000-00-00',
1286 `person_id` int(11) default NULL,
1287 `price` double NOT NULL default '0',
1288 `reference` char(40) NOT NULL default '',
1289 `qty` double NOT NULL default '1',
1290 `discount_percent` double NOT NULL default '0',
1291 `standard_cost` double NOT NULL default '0',
1292 `visible` tinyint(1) NOT NULL default '1',
1293 PRIMARY KEY (`trans_id`),
1294 KEY `type` (`type`,`trans_no`)
1295 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1298 ### Data of table `0_stock_moves` ###
1302 ### Structure of table `0_supp_allocations` ###
1304 DROP TABLE IF EXISTS `0_supp_allocations`;
1306 CREATE TABLE `0_supp_allocations` (
1307 `id` int(11) NOT NULL auto_increment,
1308 `amt` double unsigned default NULL,
1309 `date_alloc` date NOT NULL default '0000-00-00',
1310 `trans_no_from` int(11) default NULL,
1311 `trans_type_from` int(11) default NULL,
1312 `trans_no_to` int(11) default NULL,
1313 `trans_type_to` int(11) default NULL,
1315 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1318 ### Data of table `0_supp_allocations` ###
1322 ### Structure of table `0_supp_invoice_items` ###
1324 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1326 CREATE TABLE `0_supp_invoice_items` (
1327 `id` int(11) NOT NULL auto_increment,
1328 `supp_trans_no` int(11) default NULL,
1329 `supp_trans_type` int(11) default NULL,
1330 `gl_code` varchar(11) NOT NULL default '0',
1331 `grn_item_id` int(11) default NULL,
1332 `po_detail_item_id` int(11) default NULL,
1333 `stock_id` varchar(20) NOT NULL default '',
1334 `description` tinytext,
1335 `quantity` double NOT NULL default '0',
1336 `unit_price` double NOT NULL default '0',
1337 `unit_tax` double NOT NULL default '0',
1340 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1343 ### Data of table `0_supp_invoice_items` ###
1347 ### Structure of table `0_supp_trans` ###
1349 DROP TABLE IF EXISTS `0_supp_trans`;
1351 CREATE TABLE `0_supp_trans` (
1352 `trans_no` int(11) unsigned NOT NULL default '0',
1353 `type` smallint(6) unsigned NOT NULL default '0',
1354 `supplier_id` int(11) unsigned default NULL,
1355 `reference` tinytext NOT NULL,
1356 `supp_reference` varchar(60) NOT NULL default '',
1357 `tran_date` date NOT NULL default '0000-00-00',
1358 `due_date` date NOT NULL default '0000-00-00',
1359 `ov_amount` double NOT NULL default '0',
1360 `ov_discount` double NOT NULL default '0',
1361 `ov_gst` double NOT NULL default '0',
1362 `rate` double NOT NULL default '1',
1363 `alloc` double NOT NULL default '0',
1364 PRIMARY KEY (`trans_no`,`type`),
1365 KEY `supplier_id` (`supplier_id`),
1366 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1371 ### Data of table `0_supp_trans` ###
1375 ### Structure of table `0_suppliers` ###
1377 DROP TABLE IF EXISTS `0_suppliers`;
1379 CREATE TABLE `0_suppliers` (
1380 `supplier_id` int(11) NOT NULL auto_increment,
1381 `supp_name` varchar(60) NOT NULL default '',
1382 `address` tinytext NOT NULL,
1383 `supp_address` tinytext NOT NULL,
1384 `phone` varchar(30) NOT NULL default '',
1385 `fax` varchar(30) NOT NULL default '',
1386 `gst_no` varchar(25) NOT NULL default '',
1387 `contact` varchar(60) NOT NULL default '',
1388 `supp_account_no` varchar(40) NOT NULL default '',
1389 `email` varchar(100) NOT NULL default '',
1390 `website` varchar(100) NOT NULL default '',
1391 `bank_account` varchar(60) NOT NULL default '',
1392 `curr_code` char(3) default NULL,
1393 `payment_terms` int(11) default NULL,
1394 `dimension_id` int(11) default '0',
1395 `dimension2_id` int(11) default '0',
1396 `tax_group_id` int(11) default NULL,
1397 `credit_limit` double NOT NULL default '0',
1398 `purchase_account` varchar(11) default NULL,
1399 `payable_account` varchar(11) default NULL,
1400 `payment_discount_account` varchar(11) default NULL,
1401 `notes` tinytext NOT NULL,
1402 `inactive` tinyint(1) NOT NULL default '0',
1403 PRIMARY KEY (`supplier_id`)
1404 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1407 ### Data of table `0_suppliers` ###
1411 ### Structure of table `0_sys_types` ###
1413 DROP TABLE IF EXISTS `0_sys_types`;
1415 CREATE TABLE `0_sys_types` (
1416 `type_id` smallint(6) NOT NULL default '0',
1417 `type_name` varchar(60) NOT NULL default '',
1418 `type_no` int(11) NOT NULL default '1',
1419 `next_reference` varchar(100) NOT NULL default '',
1420 PRIMARY KEY (`type_id`)
1424 ### Data of table `0_sys_types` ###
1426 INSERT INTO `0_sys_types` VALUES ('0', 'Journal - GL', '17', '1');
1427 INSERT INTO `0_sys_types` VALUES ('1', 'Payment - GL', '7', '1');
1428 INSERT INTO `0_sys_types` VALUES ('2', 'Receipt - GL', '4', '1');
1429 INSERT INTO `0_sys_types` VALUES ('4', 'Funds Transfer', '3', '1');
1430 INSERT INTO `0_sys_types` VALUES ('10', 'Sales Invoice', '16', '1');
1431 INSERT INTO `0_sys_types` VALUES ('11', 'Credit Note', '2', '1');
1432 INSERT INTO `0_sys_types` VALUES ('12', 'Receipt', '6', '1');
1433 INSERT INTO `0_sys_types` VALUES ('13', 'Delivery', '1', '1');
1434 INSERT INTO `0_sys_types` VALUES ('16', 'Location Transfer', '2', '1');
1435 INSERT INTO `0_sys_types` VALUES ('17', 'Inventory Adjustment', '2', '1');
1436 INSERT INTO `0_sys_types` VALUES ('18', 'Purchase Order', '1', '1');
1437 INSERT INTO `0_sys_types` VALUES ('20', 'Supplier Invoice', '6', '1');
1438 INSERT INTO `0_sys_types` VALUES ('21', 'Supplier Credit Note', '1', '1');
1439 INSERT INTO `0_sys_types` VALUES ('22', 'Supplier Payment', '3', '1');
1440 INSERT INTO `0_sys_types` VALUES ('25', 'Purchase Order Delivery', '1', '1');
1441 INSERT INTO `0_sys_types` VALUES ('26', 'Work Order', '1', '1');
1442 INSERT INTO `0_sys_types` VALUES ('28', 'Work Order Issue', '1', '1');
1443 INSERT INTO `0_sys_types` VALUES ('29', 'Work Order Production', '1', '1');
1444 INSERT INTO `0_sys_types` VALUES ('30', 'Sales Order', '1', '1');
1445 INSERT INTO `0_sys_types` VALUES ('35', 'Cost Update', '1', '1');
1446 INSERT INTO `0_sys_types` VALUES ('40', 'Dimension', '1', '1');
1449 ### Structure of table `0_tax_group_items` ###
1451 DROP TABLE IF EXISTS `0_tax_group_items`;
1453 CREATE TABLE `0_tax_group_items` (
1454 `tax_group_id` int(11) NOT NULL default '0',
1455 `tax_type_id` int(11) NOT NULL default '0',
1456 `rate` double NOT NULL default '0',
1457 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1461 ### Data of table `0_tax_group_items` ###
1465 ### Structure of table `0_tax_groups` ###
1467 DROP TABLE IF EXISTS `0_tax_groups`;
1469 CREATE TABLE `0_tax_groups` (
1470 `id` int(11) NOT NULL auto_increment,
1471 `name` varchar(60) NOT NULL default '',
1472 `tax_shipping` tinyint(1) NOT NULL default '0',
1473 `inactive` tinyint(1) NOT NULL default '0',
1475 UNIQUE KEY `name` (`name`)
1476 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1479 ### Data of table `0_tax_groups` ###
1483 ### Structure of table `0_tax_types` ###
1485 DROP TABLE IF EXISTS `0_tax_types`;
1487 CREATE TABLE `0_tax_types` (
1488 `id` int(11) NOT NULL auto_increment,
1489 `rate` double NOT NULL default '0',
1490 `sales_gl_code` varchar(11) NOT NULL default '',
1491 `purchasing_gl_code` varchar(11) NOT NULL default '',
1492 `name` varchar(60) NOT NULL default '',
1493 `inactive` tinyint(1) NOT NULL default '0',
1495 UNIQUE KEY `name` (`name`,`rate`)
1496 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1499 ### Data of table `0_tax_types` ###
1503 ### Structure of table `0_trans_tax_details` ###
1505 DROP TABLE IF EXISTS `0_trans_tax_details`;
1507 CREATE TABLE `0_trans_tax_details` (
1508 `id` int(11) NOT NULL auto_increment,
1509 `trans_type` smallint(6) default NULL,
1510 `trans_no` int(11) default NULL,
1511 `tran_date` date NOT NULL,
1512 `tax_type_id` int(11) NOT NULL default '0',
1513 `rate` double NOT NULL default '0',
1514 `ex_rate` double NOT NULL default '1',
1515 `included_in_price` tinyint(1) NOT NULL default '0',
1516 `net_amount` double NOT NULL default '0',
1517 `amount` double NOT NULL default '0',
1520 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1523 ### Data of table `0_trans_tax_details` ###
1527 ### Structure of table `0_users` ###
1529 DROP TABLE IF EXISTS `0_users`;
1531 CREATE TABLE `0_users` (
1532 `user_id` varchar(60) NOT NULL default '',
1533 `password` varchar(100) NOT NULL default '',
1534 `real_name` varchar(100) NOT NULL default '',
1535 `full_access` int(11) NOT NULL default '1',
1536 `phone` varchar(30) NOT NULL default '',
1537 `email` varchar(100) default NULL,
1538 `language` varchar(20) default NULL,
1539 `date_format` tinyint(1) NOT NULL default '0',
1540 `date_sep` tinyint(1) NOT NULL default '0',
1541 `tho_sep` tinyint(1) NOT NULL default '0',
1542 `dec_sep` tinyint(1) NOT NULL default '0',
1543 `theme` varchar(20) NOT NULL default 'default',
1544 `page_size` varchar(20) NOT NULL default 'A4',
1545 `prices_dec` smallint(6) NOT NULL default '2',
1546 `qty_dec` smallint(6) NOT NULL default '2',
1547 `rates_dec` smallint(6) NOT NULL default '4',
1548 `percent_dec` smallint(6) NOT NULL default '1',
1549 `show_gl` tinyint(1) NOT NULL default '1',
1550 `show_codes` tinyint(1) NOT NULL default '0',
1551 `show_hints` tinyint(1) NOT NULL default '0',
1552 `last_visit_date` datetime default NULL,
1553 `query_size` tinyint(1) default '10',
1554 `graphic_links` tinyint(1) default '1',
1555 `pos` smallint(6) default '1',
1556 `print_profile` varchar(30) NOT NULL default '1',
1557 `rep_popup` tinyint(1) default '1',
1558 `sticky_doc_date` tinyint(1) default '0',
1559 PRIMARY KEY (`user_id`)
1563 ### Data of table `0_users` ###
1565 INSERT INTO `0_users` VALUES ('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');
1568 ### Structure of table `0_voided` ###
1570 DROP TABLE IF EXISTS `0_voided`;
1572 CREATE TABLE `0_voided` (
1573 `type` int(11) NOT NULL default '0',
1574 `id` int(11) NOT NULL default '0',
1575 `date_` date NOT NULL default '0000-00-00',
1576 `memo_` tinytext NOT NULL,
1577 UNIQUE KEY `id` (`type`,`id`)
1581 ### Data of table `0_voided` ###
1585 ### Structure of table `0_wo_issue_items` ###
1587 DROP TABLE IF EXISTS `0_wo_issue_items`;
1589 CREATE TABLE `0_wo_issue_items` (
1590 `id` int(11) NOT NULL auto_increment,
1591 `stock_id` varchar(40) default NULL,
1592 `issue_id` int(11) default NULL,
1593 `qty_issued` double default NULL,
1595 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1598 ### Data of table `0_wo_issue_items` ###
1602 ### Structure of table `0_wo_issues` ###
1604 DROP TABLE IF EXISTS `0_wo_issues`;
1606 CREATE TABLE `0_wo_issues` (
1607 `issue_no` int(11) NOT NULL auto_increment,
1608 `workorder_id` int(11) NOT NULL default '0',
1609 `reference` varchar(100) default NULL,
1610 `issue_date` date default NULL,
1611 `loc_code` varchar(5) default NULL,
1612 `workcentre_id` int(11) default NULL,
1613 PRIMARY KEY (`issue_no`)
1614 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1617 ### Data of table `0_wo_issues` ###
1621 ### Structure of table `0_wo_manufacture` ###
1623 DROP TABLE IF EXISTS `0_wo_manufacture`;
1625 CREATE TABLE `0_wo_manufacture` (
1626 `id` int(11) NOT NULL auto_increment,
1627 `reference` varchar(100) default NULL,
1628 `workorder_id` int(11) NOT NULL default '0',
1629 `quantity` double NOT NULL default '0',
1630 `date_` date NOT NULL default '0000-00-00',
1632 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1635 ### Data of table `0_wo_manufacture` ###
1639 ### Structure of table `0_wo_requirements` ###
1641 DROP TABLE IF EXISTS `0_wo_requirements`;
1643 CREATE TABLE `0_wo_requirements` (
1644 `id` int(11) NOT NULL auto_increment,
1645 `workorder_id` int(11) NOT NULL default '0',
1646 `stock_id` char(20) NOT NULL default '',
1647 `workcentre` int(11) NOT NULL default '0',
1648 `units_req` double NOT NULL default '1',
1649 `std_cost` double NOT NULL default '0',
1650 `loc_code` char(5) NOT NULL default '',
1651 `units_issued` double NOT NULL default '0',
1653 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1656 ### Data of table `0_wo_requirements` ###
1660 ### Structure of table `0_workcentres` ###
1662 DROP TABLE IF EXISTS `0_workcentres`;
1664 CREATE TABLE `0_workcentres` (
1665 `id` int(11) NOT NULL auto_increment,
1666 `name` char(40) NOT NULL default '',
1667 `description` char(50) NOT NULL default '',
1668 `inactive` tinyint(1) NOT NULL default '0',
1670 UNIQUE KEY `name` (`name`)
1671 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1674 ### Data of table `0_workcentres` ###
1678 ### Structure of table `0_workorders` ###
1680 DROP TABLE IF EXISTS `0_workorders`;
1682 CREATE TABLE `0_workorders` (
1683 `id` int(11) NOT NULL auto_increment,
1684 `wo_ref` varchar(60) NOT NULL default '',
1685 `loc_code` varchar(5) NOT NULL default '',
1686 `units_reqd` double NOT NULL default '1',
1687 `stock_id` varchar(20) NOT NULL default '',
1688 `date_` date NOT NULL default '0000-00-00',
1689 `type` tinyint(4) NOT NULL default '0',
1690 `required_by` date NOT NULL default '0000-00-00',
1691 `released_date` date NOT NULL default '0000-00-00',
1692 `units_issued` double NOT NULL default '0',
1693 `closed` tinyint(1) NOT NULL default '0',
1694 `released` tinyint(1) NOT NULL default '0',
1695 `additional_costs` double NOT NULL default '0',
1697 UNIQUE KEY `wo_ref` (`wo_ref`)
1698 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1701 ### Data of table `0_workorders` ###