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 `dflt_curr_act` TINYINT(1) NOT NULL default '0',
81 `id` smallint(6) NOT NULL auto_increment,
82 `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00',
83 `ending_reconcile_balance` double NOT NULL default '0',
84 `inactive` tinyint(1) NOT NULL default '0',
86 KEY `bank_account_name` (`bank_account_name`),
87 KEY `bank_account_number` (`bank_account_number`)
88 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
91 ### Data of table `0_bank_accounts` ###
93 INSERT INTO `0_bank_accounts` VALUES ('1060', '0', 'Current account', 'N/A', 'N/A', '', 'USD', '1', '1', '0000-00-00 00:00:00', '0', '0');
94 INSERT INTO `0_bank_accounts` VALUES ('1065', '3', 'Petty Cash account', 'N/A', 'N/A', '', 'USD', '0', '2', '0000-00-00 00:00:00', '0', '0');
97 ### Structure of table `0_bank_trans` ###
99 DROP TABLE IF EXISTS `0_bank_trans`;
101 CREATE TABLE `0_bank_trans` (
102 `id` int(11) NOT NULL auto_increment,
103 `type` smallint(6) default NULL,
104 `trans_no` int(11) default NULL,
105 `bank_act` varchar(11) default NULL,
106 `ref` varchar(40) default NULL,
107 `trans_date` date NOT NULL default '0000-00-00',
108 `amount` double default NULL,
109 `dimension_id` int(11) NOT NULL default '0',
110 `dimension2_id` int(11) NOT NULL default '0',
111 `person_type_id` int(11) NOT NULL default '0',
112 `person_id` tinyblob,
113 `reconciled` date default NULL,
115 KEY `bank_act` (`bank_act`,`ref`),
116 KEY `type` (`type`,`trans_no`)
117 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
120 ### Data of table `0_bank_trans` ###
124 ### Structure of table `0_bom` ###
126 DROP TABLE IF EXISTS `0_bom`;
128 CREATE TABLE `0_bom` (
129 `id` int(11) NOT NULL auto_increment,
130 `parent` char(20) NOT NULL default '',
131 `component` char(20) NOT NULL default '',
132 `workcentre_added` int(11) NOT NULL default '0',
133 `loc_code` char(5) NOT NULL default '',
134 `quantity` double NOT NULL default '1',
135 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
136 KEY `component` (`component`),
138 KEY `loc_code` (`loc_code`),
139 KEY `parent` (`parent`,`loc_code`),
140 KEY `Parent_2` (`parent`),
141 KEY `workcentre_added` (`workcentre_added`)
142 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
145 ### Data of table `0_bom` ###
149 ### Structure of table `0_budget_trans` ###
151 DROP TABLE IF EXISTS `0_budget_trans`;
153 CREATE TABLE `0_budget_trans` (
154 `counter` int(11) NOT NULL auto_increment,
155 `type` smallint(6) NOT NULL default '0',
156 `type_no` bigint(16) NOT NULL default '1',
157 `tran_date` date NOT NULL default '0000-00-00',
158 `account` varchar(11) NOT NULL default '',
159 `memo_` tinytext NOT NULL,
160 `amount` double NOT NULL default '0',
161 `dimension_id` int(11) default '0',
162 `dimension2_id` int(11) default '0',
163 `person_type_id` int(11) default NULL,
164 `person_id` tinyblob,
165 PRIMARY KEY (`counter`),
166 KEY `Type_and_Number` (`type`,`type_no`)
167 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
170 ### Data of table `0_budget_trans` ###
174 ### Structure of table `0_chart_class` ###
176 DROP TABLE IF EXISTS `0_chart_class`;
178 CREATE TABLE `0_chart_class` (
179 `cid` int(11) NOT NULL default '0',
180 `class_name` varchar(60) NOT NULL default '',
181 `ctype` tinyint(1) NOT NULL default '0',
182 `inactive` tinyint(1) NOT NULL default '0',
187 ### Data of table `0_chart_class` ###
189 INSERT INTO `0_chart_class` VALUES ('1', 'Assets', '1', '0');
190 INSERT INTO `0_chart_class` VALUES ('2', 'Liabilities', '2', '0');
191 INSERT INTO `0_chart_class` VALUES ('3', 'Income', '4', '0');
192 INSERT INTO `0_chart_class` VALUES ('4', 'Costs', '6', '0');
194 ### Structure of table `0_chart_master` ###
196 DROP TABLE IF EXISTS `0_chart_master`;
198 CREATE TABLE `0_chart_master` (
199 `account_code` varchar(11) NOT NULL default '',
200 `account_code2` varchar(11) default '',
201 `account_name` varchar(60) NOT NULL default '',
202 `account_type` int(11) NOT NULL default '0',
203 `inactive` tinyint(1) NOT NULL default '0',
204 PRIMARY KEY (`account_code`),
205 KEY `account_code` (`account_code`),
206 KEY `account_name` (`account_name`)
210 ### Data of table `0_chart_master` ###
212 INSERT INTO `0_chart_master` VALUES ('1060', '', 'Checking Account', '1', '0');
213 INSERT INTO `0_chart_master` VALUES ('1065', '', 'Petty Cash', '1', '0');
214 INSERT INTO `0_chart_master` VALUES ('1200', '', 'Accounts Receivables', '1', '0');
215 INSERT INTO `0_chart_master` VALUES ('1205', '', 'Allowance for doubtful accounts', '1', '0');
216 INSERT INTO `0_chart_master` VALUES ('1510', '', 'Inventory', '2', '0');
217 INSERT INTO `0_chart_master` VALUES ('1520', '', 'Stocks of Raw Materials', '2', '0');
218 INSERT INTO `0_chart_master` VALUES ('1530', '', 'Stocks of Work In Progress', '2', '0');
219 INSERT INTO `0_chart_master` VALUES ('1540', '', 'Stocks of Finsihed Goods', '2', '0');
220 INSERT INTO `0_chart_master` VALUES ('1550', '', 'Goods Received Clearing account', '2', '0');
221 INSERT INTO `0_chart_master` VALUES ('1820', '', 'Office Furniture & Equipment', '3', '0');
222 INSERT INTO `0_chart_master` VALUES ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0');
223 INSERT INTO `0_chart_master` VALUES ('1840', '', 'Vehicle', '3', '0');
224 INSERT INTO `0_chart_master` VALUES ('1845', '', 'Accum. Amort. -Vehicle', '3', '0');
225 INSERT INTO `0_chart_master` VALUES ('2100', '', 'Accounts Payable', '4', '0');
226 INSERT INTO `0_chart_master` VALUES ('2110', '', 'Accrued Income Tax - Federal', '4', '0');
227 INSERT INTO `0_chart_master` VALUES ('2120', '', 'Accrued Income Tax - State', '4', '0');
228 INSERT INTO `0_chart_master` VALUES ('2130', '', 'Accrued Franchise Tax', '4', '0');
229 INSERT INTO `0_chart_master` VALUES ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0');
230 INSERT INTO `0_chart_master` VALUES ('2145', '', 'Purchase Tax', '4', '0');
231 INSERT INTO `0_chart_master` VALUES ('2150', '', 'Sales Tax', '4', '0');
232 INSERT INTO `0_chart_master` VALUES ('2160', '', 'Accrued Use Tax Payable', '4', '0');
233 INSERT INTO `0_chart_master` VALUES ('2210', '', 'Accrued Wages', '4', '0');
234 INSERT INTO `0_chart_master` VALUES ('2220', '', 'Accrued Comp Time', '4', '0');
235 INSERT INTO `0_chart_master` VALUES ('2230', '', 'Accrued Holiday Pay', '4', '0');
236 INSERT INTO `0_chart_master` VALUES ('2240', '', 'Accrued Vacation Pay', '4', '0');
237 INSERT INTO `0_chart_master` VALUES ('2310', '', 'Accr. Benefits - 401K', '4', '0');
238 INSERT INTO `0_chart_master` VALUES ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0');
239 INSERT INTO `0_chart_master` VALUES ('2330', '', 'Accr. Benefits - Med, Den', '4', '0');
240 INSERT INTO `0_chart_master` VALUES ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0');
241 INSERT INTO `0_chart_master` VALUES ('2350', '', 'Accr. Benefits - Credit Union', '4', '0');
242 INSERT INTO `0_chart_master` VALUES ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0');
243 INSERT INTO `0_chart_master` VALUES ('2370', '', 'Accr. Benefits - Garnish', '4', '0');
244 INSERT INTO `0_chart_master` VALUES ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0');
245 INSERT INTO `0_chart_master` VALUES ('2620', '', 'Bank Loans', '5', '0');
246 INSERT INTO `0_chart_master` VALUES ('2680', '', 'Loans from Shareholders', '5', '0');
247 INSERT INTO `0_chart_master` VALUES ('3350', '', 'Common Shares', '6', '0');
248 INSERT INTO `0_chart_master` VALUES ('3590', '', 'Retained Earnings - prior years', '7', '0');
249 INSERT INTO `0_chart_master` VALUES ('4010', '', 'Sales', '8', '0');
250 INSERT INTO `0_chart_master` VALUES ('4430', '', 'Shipping & Handling', '9', '0');
251 INSERT INTO `0_chart_master` VALUES ('4440', '', 'Interest', '9', '0');
252 INSERT INTO `0_chart_master` VALUES ('4450', '', 'Foreign Exchange Gain', '9', '0');
253 INSERT INTO `0_chart_master` VALUES ('4500', '', 'Prompt Payment Discounts', '9', '0');
254 INSERT INTO `0_chart_master` VALUES ('4510', '', 'Discounts Given', '9', '0');
255 INSERT INTO `0_chart_master` VALUES ('5010', '', 'Cost of Goods Sold - Retail', '10', '0');
256 INSERT INTO `0_chart_master` VALUES ('5020', '', 'Material Usage Varaiance', '10', '0');
257 INSERT INTO `0_chart_master` VALUES ('5030', '', 'Consumable Materials', '10', '0');
258 INSERT INTO `0_chart_master` VALUES ('5040', '', 'Purchase price Variance', '10', '0');
259 INSERT INTO `0_chart_master` VALUES ('5050', '', 'Purchases of materials', '10', '0');
260 INSERT INTO `0_chart_master` VALUES ('5060', '', 'Discounts Received', '10', '0');
261 INSERT INTO `0_chart_master` VALUES ('5100', '', 'Freight', '10', '0');
262 INSERT INTO `0_chart_master` VALUES ('5410', '', 'Wages & Salaries', '11', '0');
263 INSERT INTO `0_chart_master` VALUES ('5420', '', 'Wages - Overtime', '11', '0');
264 INSERT INTO `0_chart_master` VALUES ('5430', '', 'Benefits - Comp Time', '11', '0');
265 INSERT INTO `0_chart_master` VALUES ('5440', '', 'Benefits - Payroll Taxes', '11', '0');
266 INSERT INTO `0_chart_master` VALUES ('5450', '', 'Benefits - Workers Comp', '11', '0');
267 INSERT INTO `0_chart_master` VALUES ('5460', '', 'Benefits - Pension', '11', '0');
268 INSERT INTO `0_chart_master` VALUES ('5470', '', 'Benefits - General Benefits', '11', '0');
269 INSERT INTO `0_chart_master` VALUES ('5510', '', 'Inc Tax Exp - Federal', '11', '0');
270 INSERT INTO `0_chart_master` VALUES ('5520', '', 'Inc Tax Exp - State', '11', '0');
271 INSERT INTO `0_chart_master` VALUES ('5530', '', 'Taxes - Real Estate', '11', '0');
272 INSERT INTO `0_chart_master` VALUES ('5540', '', 'Taxes - Personal Property', '11', '0');
273 INSERT INTO `0_chart_master` VALUES ('5550', '', 'Taxes - Franchise', '11', '0');
274 INSERT INTO `0_chart_master` VALUES ('5560', '', 'Taxes - Foreign Withholding', '11', '0');
275 INSERT INTO `0_chart_master` VALUES ('5610', '', 'Accounting & Legal', '12', '0');
276 INSERT INTO `0_chart_master` VALUES ('5615', '', 'Advertising & Promotions', '12', '0');
277 INSERT INTO `0_chart_master` VALUES ('5620', '', 'Bad Debts', '12', '0');
278 INSERT INTO `0_chart_master` VALUES ('5660', '', 'Amortization Expense', '12', '0');
279 INSERT INTO `0_chart_master` VALUES ('5685', '', 'Insurance', '12', '0');
280 INSERT INTO `0_chart_master` VALUES ('5690', '', 'Interest & Bank Charges', '12', '0');
281 INSERT INTO `0_chart_master` VALUES ('5700', '', 'Office Supplies', '12', '0');
282 INSERT INTO `0_chart_master` VALUES ('5760', '', 'Rent', '12', '0');
283 INSERT INTO `0_chart_master` VALUES ('5765', '', 'Repair & Maintenance', '12', '0');
284 INSERT INTO `0_chart_master` VALUES ('5780', '', 'Telephone', '12', '0');
285 INSERT INTO `0_chart_master` VALUES ('5785', '', 'Travel & Entertainment', '12', '0');
286 INSERT INTO `0_chart_master` VALUES ('5790', '', 'Utilities', '12', '0');
287 INSERT INTO `0_chart_master` VALUES ('5795', '', 'Registrations', '12', '0');
288 INSERT INTO `0_chart_master` VALUES ('5800', '', 'Licenses', '12', '0');
289 INSERT INTO `0_chart_master` VALUES ('5810', '', 'Foreign Exchange Loss', '12', '0');
290 INSERT INTO `0_chart_master` VALUES ('9990', '', 'Year Profit/Loss', '12', '0');
293 ### Structure of table `0_chart_types` ###
295 DROP TABLE IF EXISTS `0_chart_types`;
297 CREATE TABLE `0_chart_types` (
298 `id` int(11) NOT NULL auto_increment,
299 `name` varchar(60) NOT NULL default '',
300 `class_id` tinyint(1) NOT NULL default '0',
301 `parent` int(11) NOT NULL default '-1',
302 `inactive` tinyint(1) NOT NULL default '0',
305 ) TYPE=MyISAM AUTO_INCREMENT=13 ;
308 ### Data of table `0_chart_types` ###
310 INSERT INTO `0_chart_types` VALUES ('1', 'Current Assets', '1', '-1', '0');
311 INSERT INTO `0_chart_types` VALUES ('2', 'Inventory Assets', '1', '-1', '0');
312 INSERT INTO `0_chart_types` VALUES ('3', 'Capital Assets', '1', '-1', '0');
313 INSERT INTO `0_chart_types` VALUES ('4', 'Current Liabilities', '2', '-1', '0');
314 INSERT INTO `0_chart_types` VALUES ('5', 'Long Term Liabilities', '2', '-1', '0');
315 INSERT INTO `0_chart_types` VALUES ('6', 'Share Capital', '2', '-1', '0');
316 INSERT INTO `0_chart_types` VALUES ('7', 'Retained Earnings', '2', '-1', '0');
317 INSERT INTO `0_chart_types` VALUES ('8', 'Sales Revenue', '3', '-1', '0');
318 INSERT INTO `0_chart_types` VALUES ('9', 'Other Revenue', '3', '-1', '0');
319 INSERT INTO `0_chart_types` VALUES ('10', 'Cost of Goods Sold', '4', '-1', '0');
320 INSERT INTO `0_chart_types` VALUES ('11', 'Payroll Expenses', '4', '-1', '0');
321 INSERT INTO `0_chart_types` VALUES ('12', 'General & Administrative expenses', '4', -1, '0');
324 ### Structure of table `0_comments` ###
326 DROP TABLE IF EXISTS `0_comments`;
328 CREATE TABLE `0_comments` (
329 `type` int(11) NOT NULL default '0',
330 `id` int(11) NOT NULL default '0',
331 `date_` date default '0000-00-00',
336 ### Data of table `0_comments` ###
340 ### Structure of table `0_company` ###
342 DROP TABLE IF EXISTS `0_company`;
344 CREATE TABLE `0_company` (
345 `coy_code` int(11) NOT NULL default '1',
346 `coy_name` varchar(60) NOT NULL default '',
347 `gst_no` varchar(25) NOT NULL default '',
348 `coy_no` varchar(25) NOT NULL default '0',
349 `tax_prd` int(11) NOT NULL default '1',
350 `tax_last` int(11) NOT NULL default '1',
351 `postal_address` tinytext NOT NULL,
352 `phone` varchar(30) NOT NULL default '',
353 `fax` varchar(30) NOT NULL default '',
354 `email` varchar(100) NOT NULL default '',
355 `coy_logo` varchar(100) NOT NULL default '',
356 `domicile` varchar(55) NOT NULL default '',
357 `curr_default` char(3) NOT NULL default '',
358 `debtors_act` varchar(11) NOT NULL default '',
359 `pyt_discount_act` varchar(11) NOT NULL default '',
360 `creditors_act` varchar(11) NOT NULL default '',
361 `bank_charge_act` varchar(11) NOT NULL default '',
362 `exchange_diff_act` varchar(11) NOT NULL default '',
363 `profit_loss_year_act` varchar(11) NOT NULL default '',
364 `retained_earnings_act` varchar(11) NOT NULL default '',
365 `freight_act` varchar(11) NOT NULL default '',
366 `default_sales_act` varchar(11) NOT NULL default '',
367 `default_sales_discount_act` varchar(11) NOT NULL default '',
368 `default_prompt_payment_act` varchar(11) NOT NULL default '',
369 `default_inventory_act` varchar(11) NOT NULL default '',
370 `default_cogs_act` varchar(11) NOT NULL default '',
371 `default_adj_act` varchar(11) NOT NULL default '',
372 `default_inv_sales_act` varchar(11) NOT NULL default '',
373 `default_assembly_act` varchar(11) NOT NULL default '',
374 `payroll_act` varchar(11) NOT NULL default '',
375 `allow_negative_stock` tinyint(1) NOT NULL default '0',
376 `po_over_receive` int(11) NOT NULL default '10',
377 `po_over_charge` int(11) NOT NULL default '10',
378 `default_credit_limit` int(11) NOT NULL default '1000',
379 `default_workorder_required` int(11) NOT NULL default '20',
380 `default_dim_required` int(11) NOT NULL default '20',
381 `past_due_days` int(11) NOT NULL default '30',
382 `use_dimension` tinyint(1) default '0',
383 `f_year` int(11) NOT NULL default '1',
384 `no_item_list` tinyint(1) NOT NULL default '0',
385 `no_customer_list` tinyint(1) NOT NULL default '0',
386 `no_supplier_list` tinyint(1) NOT NULL default '0',
387 `base_sales` int(11) NOT NULL default '-1',
388 `foreign_codes` tinyint(1) NOT NULL default '0',
389 `accumulate_shipping` tinyint(1) NOT NULL default '0',
390 `legal_text` tinytext NOT NULL,
391 `default_delivery_required` smallint(6) NOT NULL default '1',
392 `version_id` varchar(11) NOT NULL default '',
393 `time_zone` tinyint(1) NOT NULL default '0',
394 `add_pct` int(5) NOT NULL default '-1',
395 `round_to` int(5) NOT NULL default '1',
396 `login_tout` SMALLINT(6) NOT NULL DEFAULT '600',
397 PRIMARY KEY (`coy_code`)
400 ### Data of table `0_company` ###
402 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', '3', '0', '0', '0', '1', '0', '0', '', '1', '2.2', '0', '-1', '1', '600');
404 ### Structure of table `0_credit_status` ###
406 DROP TABLE IF EXISTS `0_credit_status`;
408 CREATE TABLE `0_credit_status` (
409 `id` int(11) NOT NULL auto_increment,
410 `reason_description` char(100) NOT NULL default '',
411 `dissallow_invoices` tinyint(1) NOT NULL default '0',
412 `inactive` tinyint(1) NOT NULL default '0',
414 UNIQUE KEY `reason_description` (`reason_description`)
415 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
418 ### Data of table `0_credit_status` ###
420 INSERT INTO `0_credit_status` VALUES ('1', 'Good History', '0', '0');
421 INSERT INTO `0_credit_status` VALUES ('3', 'No more work until payment received', '1', '0');
422 INSERT INTO `0_credit_status` VALUES ('4', 'In liquidation', '1', '0');
425 ### Structure of table `0_currencies` ###
427 DROP TABLE IF EXISTS `0_currencies`;
429 CREATE TABLE `0_currencies` (
430 `currency` varchar(60) NOT NULL default '',
431 `curr_abrev` char(3) NOT NULL default '',
432 `curr_symbol` varchar(10) NOT NULL default '',
433 `country` varchar(100) NOT NULL default '',
434 `hundreds_name` varchar(15) NOT NULL default '',
435 `auto_update` tinyint(1) NOT NULL default '1',
436 `inactive` tinyint(1) NOT NULL default '0',
437 PRIMARY KEY (`curr_abrev`)
441 ### Data of table `0_currencies` ###
443 INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0');
444 INSERT INTO `0_currencies` VALUES ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0');
445 INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents', '1', '0');
446 INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence', '1', '0');
448 ### Structure of table `0_cust_allocations` ###
450 DROP TABLE IF EXISTS `0_cust_allocations`;
452 CREATE TABLE `0_cust_allocations` (
453 `id` int(11) NOT NULL auto_increment,
454 `amt` double unsigned default NULL,
455 `date_alloc` date NOT NULL default '0000-00-00',
456 `trans_no_from` int(11) default NULL,
457 `trans_type_from` int(11) default NULL,
458 `trans_no_to` int(11) default NULL,
459 `trans_type_to` int(11) default NULL,
461 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
464 ### Data of table `0_cust_allocations` ###
468 ### Structure of table `0_cust_branch` ###
470 DROP TABLE IF EXISTS `0_cust_branch`;
472 CREATE TABLE `0_cust_branch` (
473 `branch_code` int(11) NOT NULL auto_increment,
474 `debtor_no` int(11) NOT NULL default '0',
475 `br_name` varchar(60) NOT NULL default '',
476 `branch_ref` varchar(30) NOT NULL default '',
477 `br_address` tinytext NOT NULL,
478 `area` int(11) default NULL,
479 `salesman` int(11) NOT NULL default '0',
480 `phone` varchar(30) NOT NULL default '',
481 `phone2` varchar(30) NOT NULL default '',
482 `fax` varchar(30) NOT NULL default '',
483 `contact_name` varchar(60) NOT NULL default '',
484 `email` varchar(100) NOT NULL default '',
485 `default_location` varchar(5) NOT NULL default '',
486 `tax_group_id` int(11) default NULL,
487 `sales_account` varchar(11) default NULL,
488 `sales_discount_account` varchar(11) default NULL,
489 `receivables_account` varchar(11) default NULL,
490 `payment_discount_account` varchar(11) default NULL,
491 `default_ship_via` int(11) NOT NULL default '1',
492 `disable_trans` tinyint(4) NOT NULL default '0',
493 `br_post_address` tinytext NOT NULL,
494 `group_no` int(11) NOT NULL default '0',
495 `notes` tinytext NOT NULL,
496 `inactive` tinyint(1) NOT NULL default '0',
497 PRIMARY KEY (`branch_code`,`debtor_no`),
498 KEY `branch_code` (`branch_code`),
499 KEY `br_name` (`br_name`)
500 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
503 ### Data of table `0_cust_branch` ###
507 ### Structure of table `0_debtor_trans` ###
509 DROP TABLE IF EXISTS `0_debtor_trans`;
511 CREATE TABLE `0_debtor_trans` (
512 `trans_no` int(11) unsigned NOT NULL default '0',
513 `type` smallint(6) unsigned NOT NULL default '0',
514 `version` tinyint(1) unsigned NOT NULL default '0',
515 `debtor_no` int(11) unsigned default NULL,
516 `branch_code` int(11) NOT NULL default '-1',
517 `tran_date` date NOT NULL default '0000-00-00',
518 `due_date` date NOT NULL default '0000-00-00',
519 `reference` varchar(60) NOT NULL default '',
520 `tpe` int(11) NOT NULL default '0',
521 `order_` int(11) NOT NULL default '0',
522 `ov_amount` double NOT NULL default '0',
523 `ov_gst` double NOT NULL default '0',
524 `ov_freight` double NOT NULL default '0',
525 `ov_freight_tax` double NOT NULL default '0',
526 `ov_discount` double NOT NULL default '0',
527 `alloc` double NOT NULL default '0',
528 `rate` double NOT NULL default '1',
529 `ship_via` int(11) default NULL,
530 `trans_link` int(11) NOT NULL default '0',
531 `dimension_id` int(11) NOT NULL default '0',
532 `dimension2_id` int(11) NOT NULL default '0',
533 PRIMARY KEY (`trans_no`,`type`),
534 KEY `debtor_no` (`debtor_no`,`branch_code`)
538 ### Data of table `0_debtor_trans` ###
542 ### Structure of table `0_debtor_trans_details` ###
544 DROP TABLE IF EXISTS `0_debtor_trans_details`;
546 CREATE TABLE `0_debtor_trans_details` (
547 `id` int(11) NOT NULL auto_increment,
548 `debtor_trans_no` int(11) default NULL,
549 `debtor_trans_type` int(11) default NULL,
550 `stock_id` varchar(20) NOT NULL default '',
551 `description` tinytext,
552 `unit_price` double NOT NULL default '0',
553 `unit_tax` double NOT NULL default '0',
554 `quantity` double NOT NULL default '0',
555 `discount_percent` double NOT NULL default '0',
556 `standard_cost` double NOT NULL default '0',
557 `qty_done` double NOT NULL default '0',
559 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
562 ### Data of table `0_debtor_trans_details` ###
566 ### Structure of table `0_debtors_master` ###
568 DROP TABLE IF EXISTS `0_debtors_master`;
570 CREATE TABLE `0_debtors_master` (
571 `debtor_no` int(11) NOT NULL auto_increment,
572 `name` varchar(100) NOT NULL default '',
573 `debtor_ref` varchar(30) NOT NULL,
575 `email` varchar(100) NOT NULL default '',
576 `tax_id` varchar(55) NOT NULL default '',
577 `curr_code` char(3) NOT NULL default '',
578 `sales_type` int(11) NOT NULL default '1',
579 `dimension_id` int(11) NOT NULL default '0',
580 `dimension2_id` int(11) NOT NULL default '0',
581 `credit_status` int(11) NOT NULL default '0',
582 `payment_terms` int(11) default NULL,
583 `discount` double NOT NULL default '0',
584 `pymt_discount` double NOT NULL default '0',
585 `credit_limit` float NOT NULL default '1000',
586 `notes` tinytext NOT NULL,
587 `inactive` tinyint(1) NOT NULL default '0',
588 PRIMARY KEY (`debtor_no`),
589 UNIQUE KEY `name` (`name`)
590 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
593 ### Data of table `0_debtors_master` ###
597 ### Structure of table `0_dimensions` ###
599 DROP TABLE IF EXISTS `0_dimensions`;
601 CREATE TABLE `0_dimensions` (
602 `id` int(11) NOT NULL auto_increment,
603 `reference` varchar(60) NOT NULL default '',
604 `name` varchar(60) NOT NULL default '',
605 `type_` tinyint(1) NOT NULL default '1',
606 `closed` tinyint(1) NOT NULL default '0',
607 `date_` date NOT NULL default '0000-00-00',
608 `due_date` date NOT NULL default '0000-00-00',
610 UNIQUE KEY `reference` (`reference`)
611 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
614 ### Data of table `0_dimensions` ###
618 ### Structure of table `0_exchange_rates` ###
620 DROP TABLE IF EXISTS `0_exchange_rates`;
622 CREATE TABLE `0_exchange_rates` (
623 `id` int(11) NOT NULL auto_increment,
624 `curr_code` char(3) NOT NULL default '',
625 `rate_buy` double NOT NULL default '0',
626 `rate_sell` double NOT NULL default '0',
627 `date_` date NOT NULL default '0000-00-00',
629 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
630 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
633 ### Data of table `0_exchange_rates` ###
637 ### Structure of table `0_fiscal_year` ###
639 DROP TABLE IF EXISTS `0_fiscal_year`;
641 CREATE TABLE `0_fiscal_year` (
642 `id` int(11) NOT NULL auto_increment,
643 `begin` date default '0000-00-00',
644 `end` date default '0000-00-00',
645 `closed` tinyint(1) NOT NULL default '0',
647 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
650 ### Data of table `0_fiscal_year` ###
652 INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0');
653 INSERT INTO `0_fiscal_year` VALUES ('2', '2009-01-01', '2009-12-31', '0');
654 INSERT INTO `0_fiscal_year` VALUES ('3', '2010-01-01', '2010-12-31', '0');
657 ### Structure of table `0_gl_trans` ###
659 DROP TABLE IF EXISTS `0_gl_trans`;
661 CREATE TABLE `0_gl_trans` (
662 `counter` int(11) NOT NULL auto_increment,
663 `type` smallint(6) NOT NULL default '0',
664 `type_no` bigint(16) NOT NULL default '1',
665 `tran_date` date NOT NULL default '0000-00-00',
666 `account` varchar(11) NOT NULL default '',
667 `memo_` tinytext NOT NULL,
668 `amount` double NOT NULL default '0',
669 `dimension_id` int(11) NOT NULL default '0',
670 `dimension2_id` int(11) NOT NULL default '0',
671 `person_type_id` int(11) default NULL,
672 `person_id` tinyblob,
673 PRIMARY KEY (`counter`),
674 KEY `Type_and_Number` (`type`,`type_no`)
675 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
678 ### Data of table `0_gl_trans` ###
682 ### Structure of table `0_grn_batch` ###
684 DROP TABLE IF EXISTS `0_grn_batch`;
686 CREATE TABLE `0_grn_batch` (
687 `id` int(11) NOT NULL auto_increment,
688 `supplier_id` int(11) NOT NULL default '0',
689 `purch_order_no` int(11) default NULL,
690 `reference` varchar(60) NOT NULL default '',
691 `delivery_date` date NOT NULL default '0000-00-00',
692 `loc_code` varchar(5) default NULL,
694 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
697 ### Data of table `0_grn_batch` ###
701 ### Structure of table `0_grn_items` ###
703 DROP TABLE IF EXISTS `0_grn_items`;
705 CREATE TABLE `0_grn_items` (
706 `id` int(11) NOT NULL auto_increment,
707 `grn_batch_id` int(11) default NULL,
708 `po_detail_item` int(11) NOT NULL default '0',
709 `item_code` varchar(20) NOT NULL default '',
710 `description` tinytext,
711 `qty_recd` double NOT NULL default '0',
712 `quantity_inv` double NOT NULL default '0',
714 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
717 ### Data of table `0_grn_items` ###
721 ### Structure of table `0_groups` ###
723 DROP TABLE IF EXISTS `0_groups`;
725 CREATE TABLE `0_groups` (
726 `id` smallint(6) unsigned NOT NULL auto_increment,
727 `description` varchar(60) NOT NULL default '',
728 `inactive` tinyint(1) NOT NULL default '0',
730 UNIQUE KEY `description` (`description`)
731 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
734 ### Data of table `0_groups` ###
736 INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
737 INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
738 INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
741 ### Structure of table `0_item_codes` ###
743 DROP TABLE IF EXISTS `0_item_codes`;
745 CREATE TABLE `0_item_codes` (
746 `id` int(11) unsigned NOT NULL auto_increment,
747 `item_code` varchar(20) NOT NULL,
748 `stock_id` varchar(20) NOT NULL,
749 `description` varchar(200) NOT NULL default '',
750 `category_id` smallint(6) unsigned NOT NULL,
751 `quantity` double NOT NULL default '1',
752 `is_foreign` tinyint(1) NOT NULL default '0',
753 `inactive` tinyint(1) NOT NULL default '0',
755 UNIQUE KEY `stock_id` (`stock_id`,`item_code`)
756 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
759 ### Data of table `0_item_codes` ###
763 ### Structure of table `0_item_tax_type_exemptions` ###
765 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
767 CREATE TABLE `0_item_tax_type_exemptions` (
768 `item_tax_type_id` int(11) NOT NULL default '0',
769 `tax_type_id` int(11) NOT NULL default '0',
770 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
774 ### Data of table `0_item_tax_type_exemptions` ###
778 ### Structure of table `0_item_tax_types` ###
780 DROP TABLE IF EXISTS `0_item_tax_types`;
782 CREATE TABLE `0_item_tax_types` (
783 `id` int(11) NOT NULL auto_increment,
784 `name` varchar(60) NOT NULL default '',
785 `exempt` tinyint(1) NOT NULL default '0',
786 `inactive` tinyint(1) NOT NULL default '0',
788 UNIQUE KEY `name` (`name`)
789 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
792 ### Data of table `0_item_tax_types` ###
794 INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0', '0');
797 ### Structure of table `0_item_units` ###
799 DROP TABLE IF EXISTS `0_item_units`;
801 CREATE TABLE `0_item_units` (
802 `abbr` varchar(20) NOT NULL,
803 `name` varchar(40) NOT NULL,
804 `decimals` tinyint(2) NOT NULL,
805 `inactive` tinyint(1) NOT NULL default '0',
806 PRIMARY KEY (`abbr`),
807 UNIQUE KEY `name` (`name`)
811 ### Data of table `0_item_units` ###
813 INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0');
816 ### Structure of table `0_loc_stock` ###
818 DROP TABLE IF EXISTS `0_loc_stock`;
820 CREATE TABLE `0_loc_stock` (
821 `loc_code` char(5) NOT NULL default '',
822 `stock_id` char(20) NOT NULL default '',
823 `reorder_level` bigint(20) NOT NULL default '0',
824 PRIMARY KEY (`loc_code`,`stock_id`),
825 KEY `stock_id` (`stock_id`)
829 ### Data of table `0_loc_stock` ###
833 ### Structure of table `0_locations` ###
835 DROP TABLE IF EXISTS `0_locations`;
837 CREATE TABLE `0_locations` (
838 `loc_code` varchar(5) NOT NULL default '',
839 `location_name` varchar(60) NOT NULL default '',
840 `delivery_address` tinytext NOT NULL,
841 `phone` varchar(30) NOT NULL default '',
842 `phone2` varchar(30) NOT NULL default '',
843 `fax` varchar(30) NOT NULL default '',
844 `email` varchar(100) NOT NULL default '',
845 `contact` varchar(30) NOT NULL default '',
846 `inactive` tinyint(1) NOT NULL default '0',
847 PRIMARY KEY (`loc_code`)
851 ### Data of table `0_locations` ###
853 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '', '0');
856 ### Structure of table `0_movement_types` ###
858 DROP TABLE IF EXISTS `0_movement_types`;
860 CREATE TABLE `0_movement_types` (
861 `id` int(11) NOT NULL auto_increment,
862 `name` varchar(60) NOT NULL default '',
863 `inactive` tinyint(1) NOT NULL default '0',
865 UNIQUE KEY `name` (`name`)
866 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
869 ### Data of table `0_movement_types` ###
871 INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment', '0');
874 ### Structure of table `0_payment_terms` ###
876 DROP TABLE IF EXISTS `0_payment_terms`;
878 CREATE TABLE `0_payment_terms` (
879 `terms_indicator` int(11) NOT NULL auto_increment,
880 `terms` char(80) NOT NULL default '',
881 `days_before_due` smallint(6) NOT NULL default '0',
882 `day_in_following_month` smallint(6) NOT NULL default '0',
883 `inactive` tinyint(1) NOT NULL default '0',
884 PRIMARY KEY (`terms_indicator`),
885 UNIQUE KEY `terms` (`terms`)
886 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
889 ### Data of table `0_payment_terms` ###
891 INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0');
892 INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0');
893 INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0');
894 INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0');
897 ### Structure of table `0_prices` ###
899 DROP TABLE IF EXISTS `0_prices`;
901 CREATE TABLE `0_prices` (
902 `id` int(11) NOT NULL auto_increment,
903 `stock_id` varchar(20) NOT NULL default '',
904 `sales_type_id` int(11) NOT NULL default '0',
905 `curr_abrev` char(3) NOT NULL default '',
906 `price` double NOT NULL default '0',
908 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
909 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
912 ### Data of table `0_prices` ###
916 ### Structure of table `0_print_profiles` ###
918 DROP TABLE IF EXISTS `0_print_profiles`;
920 CREATE TABLE `0_print_profiles` (
921 `id` smallint(6) unsigned NOT NULL auto_increment,
922 `profile` varchar(30) NOT NULL,
923 `report` varchar(5) default NULL,
924 `printer` tinyint(3) unsigned default NULL,
926 UNIQUE KEY `profile` (`profile`,`report`)
927 ) TYPE=MyISAM AUTO_INCREMENT=10 ;
930 ### Data of table `0_print_profiles` ###
932 INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0');
933 INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0');
934 INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2');
935 INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2');
936 INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2');
937 INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2');
938 INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2');
939 INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2');
940 INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2');
943 ### Structure of table `0_printers` ###
945 DROP TABLE IF EXISTS `0_printers`;
947 CREATE TABLE `0_printers` (
948 `id` tinyint(3) unsigned NOT NULL auto_increment,
949 `name` varchar(20) NOT NULL,
950 `description` varchar(60) NOT NULL,
951 `queue` varchar(20) NOT NULL,
952 `host` varchar(40) NOT NULL,
953 `port` smallint(11) unsigned NOT NULL,
954 `timeout` tinyint(3) unsigned NOT NULL,
956 UNIQUE KEY `name` (`name`)
957 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
960 ### Data of table `0_printers` ###
962 INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20');
963 INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5');
964 INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
967 ### Structure of table `0_purch_data` ###
969 DROP TABLE IF EXISTS `0_purch_data`;
971 CREATE TABLE `0_purch_data` (
972 `supplier_id` int(11) NOT NULL default '0',
973 `stock_id` char(20) NOT NULL default '',
974 `price` double NOT NULL default '0',
975 `suppliers_uom` char(50) NOT NULL default '',
976 `conversion_factor` double NOT NULL default '1',
977 `supplier_description` char(50) NOT NULL default '',
978 PRIMARY KEY (`supplier_id`,`stock_id`)
982 ### Data of table `0_purch_data` ###
986 ### Structure of table `0_purch_order_details` ###
988 DROP TABLE IF EXISTS `0_purch_order_details`;
990 CREATE TABLE `0_purch_order_details` (
991 `po_detail_item` int(11) NOT NULL auto_increment,
992 `order_no` int(11) NOT NULL default '0',
993 `item_code` varchar(20) NOT NULL default '',
994 `description` tinytext,
995 `delivery_date` date NOT NULL default '0000-00-00',
996 `qty_invoiced` double NOT NULL default '0',
997 `unit_price` double NOT NULL default '0',
998 `act_price` double NOT NULL default '0',
999 `std_cost_unit` double NOT NULL default '0',
1000 `quantity_ordered` double NOT NULL default '0',
1001 `quantity_received` double NOT NULL default '0',
1002 PRIMARY KEY (`po_detail_item`)
1003 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1006 ### Data of table `0_purch_order_details` ###
1010 ### Structure of table `0_purch_orders` ###
1012 DROP TABLE IF EXISTS `0_purch_orders`;
1014 CREATE TABLE `0_purch_orders` (
1015 `order_no` int(11) NOT NULL auto_increment,
1016 `supplier_id` int(11) NOT NULL default '0',
1017 `comments` tinytext,
1018 `ord_date` date NOT NULL default '0000-00-00',
1019 `reference` tinytext NOT NULL,
1020 `requisition_no` tinytext,
1021 `into_stock_location` varchar(5) NOT NULL default '',
1022 `delivery_address` tinytext NOT NULL,
1023 PRIMARY KEY (`order_no`)
1024 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1027 ### Data of table `0_purch_orders` ###
1031 ### Structure of table `0_quick_entries` ###
1033 DROP TABLE IF EXISTS `0_quick_entries`;
1035 CREATE TABLE `0_quick_entries` (
1036 `id` smallint(6) unsigned NOT NULL auto_increment,
1037 `type` tinyint(1) NOT NULL default '0',
1038 `description` varchar(60) NOT NULL,
1039 `base_amount` double NOT NULL default '0',
1040 `base_desc` varchar(60) default NULL,
1042 KEY `description` (`description`)
1043 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
1046 ### Data of table `0_quick_entries` ###
1048 INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount');
1049 INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount');
1050 INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount');
1053 ### Structure of table `0_quick_entry_lines` ###
1055 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1057 CREATE TABLE `0_quick_entry_lines` (
1058 `id` smallint(6) unsigned NOT NULL auto_increment,
1059 `qid` smallint(6) unsigned NOT NULL,
1060 `amount` double default '0',
1061 `action` varchar(2) NOT NULL,
1062 `dest_id` varchar(11) NOT NULL,
1063 `dimension_id` smallint(6) unsigned default NULL,
1064 `dimension2_id` smallint(6) unsigned default NULL,
1067 ) TYPE=MyISAM AUTO_INCREMENT=7 ;
1070 ### Data of table `0_quick_entry_lines` ###
1072 INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', 't-', '1', '0', '0');
1073 INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', 't-', '1', '0', '0');
1074 INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', 't-', '1', '0', '0');
1075 INSERT INTO `0_quick_entry_lines` VALUES ('4', '3', '0', '=', '4010', '0', '0');
1076 INSERT INTO `0_quick_entry_lines` VALUES ('5', '1', '0', '=', '5765', '0', '0');
1077 INSERT INTO `0_quick_entry_lines` VALUES ('6', '2', '0', '=', '5780', '0', '0');
1080 ### Structure of table `0_recurrent_invoices` ###
1082 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1084 CREATE TABLE `0_recurrent_invoices` (
1085 `id` smallint(6) unsigned NOT NULL auto_increment,
1086 `description` varchar(60) NOT NULL default '',
1087 `order_no` int(11) unsigned NOT NULL,
1088 `debtor_no` int(11) unsigned default NULL,
1089 `group_no` smallint(6) unsigned default NULL,
1090 `days` int(11) NOT NULL default '0',
1091 `monthly` int(11) NOT NULL default '0',
1092 `begin` date NOT NULL default '0000-00-00',
1093 `end` date NOT NULL default '0000-00-00',
1094 `last_sent` date NOT NULL default '0000-00-00',
1096 UNIQUE KEY `description` (`description`)
1097 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1100 ### Data of table `0_recurrent_invoices` ###
1104 ### Structure of table `0_refs` ###
1106 DROP TABLE IF EXISTS `0_refs`;
1108 CREATE TABLE `0_refs` (
1109 `id` int(11) NOT NULL default '0',
1110 `type` int(11) NOT NULL default '0',
1111 `reference` varchar(100) NOT NULL default '',
1112 PRIMARY KEY (`id`,`type`)
1116 ### Data of table `0_refs` ###
1120 ### Structure of table `0_sales_order_details` ###
1122 DROP TABLE IF EXISTS `0_sales_order_details`;
1124 CREATE TABLE `0_sales_order_details` (
1125 `id` int(11) NOT NULL auto_increment,
1126 `order_no` int(11) NOT NULL default '0',
1127 `trans_type` smallint(6) NOT NULL default '30',
1128 `stk_code` varchar(20) NOT NULL default '',
1129 `description` tinytext,
1130 `qty_sent` double NOT NULL default '0',
1131 `unit_price` double NOT NULL default '0',
1132 `quantity` double NOT NULL default '0',
1133 `discount_percent` double NOT NULL default '0',
1135 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1138 ### Data of table `0_sales_order_details` ###
1142 ### Structure of table `0_sales_orders` ###
1144 DROP TABLE IF EXISTS `0_sales_orders`;
1146 CREATE TABLE `0_sales_orders` (
1147 `order_no` int(11) NOT NULL,
1148 `trans_type` smallint(6) NOT NULL default '30',
1149 `version` tinyint(1) unsigned NOT NULL default '0',
1150 `type` tinyint(1) NOT NULL default '0',
1151 `debtor_no` int(11) NOT NULL default '0',
1152 `branch_code` int(11) NOT NULL default '0',
1153 `reference` varchar(100) NOT NULL default '',
1154 `customer_ref` tinytext NOT NULL,
1155 `comments` tinytext,
1156 `ord_date` date NOT NULL default '0000-00-00',
1157 `order_type` int(11) NOT NULL default '0',
1158 `ship_via` int(11) NOT NULL default '0',
1159 `delivery_address` tinytext NOT NULL,
1160 `contact_phone` varchar(30) default NULL,
1161 `contact_email` varchar(100) default NULL,
1162 `deliver_to` tinytext NOT NULL,
1163 `freight_cost` double NOT NULL default '0',
1164 `from_stk_loc` varchar(5) NOT NULL default '',
1165 `delivery_date` date NOT NULL default '0000-00-00',
1166 PRIMARY KEY (`trans_type`, `order_no`)
1170 ### Data of table `0_sales_orders` ###
1174 ### Structure of table `0_sales_pos` ###
1176 DROP TABLE IF EXISTS `0_sales_pos`;
1178 CREATE TABLE `0_sales_pos` (
1179 `id` smallint(6) unsigned NOT NULL auto_increment,
1180 `pos_name` varchar(30) NOT NULL,
1181 `cash_sale` tinyint(1) NOT NULL,
1182 `credit_sale` tinyint(1) NOT NULL,
1183 `pos_location` varchar(5) NOT NULL,
1184 `pos_account` smallint(6) unsigned NOT NULL,
1185 `inactive` tinyint(1) NOT NULL default '0',
1187 UNIQUE KEY `pos_name` (`pos_name`)
1188 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1191 ### Data of table `0_sales_pos` ###
1193 INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '2', '0');
1196 ### Structure of table `0_sales_types` ###
1198 DROP TABLE IF EXISTS `0_sales_types`;
1200 CREATE TABLE `0_sales_types` (
1201 `id` int(11) NOT NULL auto_increment,
1202 `sales_type` char(50) NOT NULL default '',
1203 `tax_included` int(1) NOT NULL default '0',
1204 `factor` double NOT NULL default '1',
1205 `inactive` tinyint(1) NOT NULL default '0',
1207 UNIQUE KEY `sales_type` (`sales_type`)
1208 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
1211 ### Data of table `0_sales_types` ###
1213 INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '1', '1', '0');
1214 INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '0.7', '0');
1217 ### Structure of table `0_salesman` ###
1219 DROP TABLE IF EXISTS `0_salesman`;
1221 CREATE TABLE `0_salesman` (
1222 `salesman_code` int(11) NOT NULL auto_increment,
1223 `salesman_name` char(60) NOT NULL default '',
1224 `salesman_phone` char(30) NOT NULL default '',
1225 `salesman_fax` char(30) NOT NULL default '',
1226 `salesman_email` varchar(100) NOT NULL default '',
1227 `provision` double NOT NULL default '0',
1228 `break_pt` double NOT NULL default '0',
1229 `provision2` double NOT NULL default '0',
1230 `inactive` tinyint(1) NOT NULL default '0',
1231 PRIMARY KEY (`salesman_code`),
1232 UNIQUE KEY `salesman_name` (`salesman_name`)
1233 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1236 ### Data of table `0_salesman` ###
1238 INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1240 ### Structure of table `0_security_roles` ###
1242 DROP TABLE IF EXISTS `0_security_roles`;
1243 CREATE TABLE IF NOT EXISTS `0_security_roles` (
1244 `id` int(11) NOT NULL auto_increment,
1245 `role` varchar(30) NOT NULL,
1246 `description` varchar(50) default NULL,
1249 `inactive` tinyint(1) NOT NULL default '0',
1251 UNIQUE KEY `role` (`role`)
1252 ) TYPE=MyISAM AUTO_INCREMENT=11 ;
1255 -- Data of table `0_security_roles`
1258 INSERT INTO `0_security_roles` VALUES (1, 'Inquiries', 'Inquiries', '768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;773;774;2822;3073;3075;3076;3077;3329;3330;3331;3332;3333;3334;3335;5377;5633;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8450;8451;10497;10753;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15622;15623;15624;15625;15626;15873;15882;16129;16130;16131;16132', 0);
1259 INSERT INTO `0_security_roles` VALUES (2, 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;10496;10752;11008;13056;13312;15616;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;769;770;771;772;773;774;2817;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5636;5637;5641;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8195;8196;8197;8449;8450;8451;10497;10753;10754;10755;10756;10757;11009;11010;11011;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15628;15625;15626;15627;15873;15874;15875;15876;15877;15878;15879;15880;15883;15881;15882;16129;16130;16131;16132', 0);
1260 INSERT INTO `0_security_roles` VALUES (3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873', 0);
1261 INSERT INTO `0_security_roles` VALUES (4, 'Stock Manager', 'Stock Manager', '2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '2818;2822;3073;3076;3077;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5889;5890;5891;8193;8194;8450;8451;10753;11009;11010;11012;13313;13315;15882;16129;16130;16131;16132', 0);
1262 INSERT INTO `0_security_roles` VALUES (5, 'Production Manager', 'Production Manager', '512;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5640;5889;5890;5891;8193;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0);
1263 INSERT INTO `0_security_roles` VALUES (6, 'Purchase Officer', 'Purchase Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5377;5633;5635;5640;5640;5889;5890;5891;8193;8194;8196;8197;8449;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0);
1264 INSERT INTO `0_security_roles` VALUES (7, 'AR Officer', 'AR Officer', '512;768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;771;773;774;2818;2819;2820;2821;2822;2823;3073;3073;3074;3075;3076;3077;3078;3079;3080;3081;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5633;5634;5637;5638;5639;5640;5640;5889;5890;5891;8193;8194;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0);
1265 INSERT INTO `0_security_roles` VALUES (8, 'AP Officer', 'AP Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;769;770;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5635;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0);
1266 INSERT INTO `0_security_roles` VALUES (9, 'Accountant', 'New Accountant', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0);
1267 INSERT INTO `0_security_roles` VALUES (10, 'Sub Admin', 'Sub Admin', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15873;15874;15876;15877;15878;15879;15880;15882;16129;16130;16131;16132', 0);
1269 ### Structure of table `0_shippers` ###
1271 DROP TABLE IF EXISTS `0_shippers`;
1273 CREATE TABLE `0_shippers` (
1274 `shipper_id` int(11) NOT NULL auto_increment,
1275 `shipper_name` varchar(60) NOT NULL default '',
1276 `phone` varchar(30) NOT NULL default '',
1277 `phone2` varchar(30) NOT NULL default '',
1278 `contact` tinytext NOT NULL,
1279 `address` tinytext NOT NULL,
1280 `inactive` tinyint(1) NOT NULL default '0',
1281 PRIMARY KEY (`shipper_id`),
1282 UNIQUE KEY `name` (`shipper_name`)
1283 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1286 ### Data of table `0_shippers` ###
1288 INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '', '0');
1291 ### Structure of table `0_sql_trail` ###
1293 DROP TABLE IF EXISTS `0_sql_trail`;
1295 CREATE TABLE `0_sql_trail` (
1296 `id` int(11) unsigned NOT NULL auto_increment,
1297 `sql` text NOT NULL,
1298 `result` tinyint(1) NOT NULL,
1299 `msg` varchar(255) NOT NULL,
1301 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1304 ### Data of table `0_sql_trail` ###
1308 ### Structure of table `0_stock_category` ###
1310 DROP TABLE IF EXISTS `0_stock_category`;
1312 CREATE TABLE `0_stock_category` (
1313 `category_id` int(11) NOT NULL auto_increment,
1314 `description` varchar(60) NOT NULL default '',
1315 `dflt_tax_type` int(11) NOT NULL default '1',
1316 `dflt_units` varchar(20) NOT NULL default 'each',
1317 `dflt_mb_flag` char(1) NOT NULL default 'B',
1318 `dflt_sales_act` varchar(11) NOT NULL default '',
1319 `dflt_cogs_act` varchar(11) NOT NULL default '',
1320 `dflt_inventory_act` varchar(11) NOT NULL default '',
1321 `dflt_adjustment_act` varchar(11) NOT NULL default '',
1322 `dflt_assembly_act` varchar(11) NOT NULL default '',
1323 `dflt_dim1` int(11) default NULL,
1324 `dflt_dim2` int(11) default NULL,
1325 `inactive` tinyint(1) NOT NULL default '0',
1326 `dflt_no_sale` tinyint(1) NOT NULL default '0',
1327 PRIMARY KEY (`category_id`),
1328 UNIQUE KEY `description` (`description`)
1329 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
1332 ### Data of table `0_stock_category` ###
1334 INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1335 INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1336 INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1337 INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1340 ### Structure of table `0_stock_master` ###
1342 DROP TABLE IF EXISTS `0_stock_master`;
1344 CREATE TABLE `0_stock_master` (
1345 `stock_id` varchar(20) NOT NULL default '',
1346 `category_id` int(11) NOT NULL default '0',
1347 `tax_type_id` int(11) NOT NULL default '0',
1348 `description` varchar(200) NOT NULL default '',
1349 `long_description` tinytext NOT NULL,
1350 `units` varchar(20) NOT NULL default 'each',
1351 `mb_flag` char(1) NOT NULL default 'B',
1352 `sales_account` varchar(11) NOT NULL default '',
1353 `cogs_account` varchar(11) NOT NULL default '',
1354 `inventory_account` varchar(11) NOT NULL default '',
1355 `adjustment_account` varchar(11) NOT NULL default '',
1356 `assembly_account` varchar(11) NOT NULL default '',
1357 `dimension_id` int(11) default NULL,
1358 `dimension2_id` int(11) default NULL,
1359 `actual_cost` double NOT NULL default '0',
1360 `last_cost` double NOT NULL default '0',
1361 `material_cost` double NOT NULL default '0',
1362 `labour_cost` double NOT NULL default '0',
1363 `overhead_cost` double NOT NULL default '0',
1364 `inactive` tinyint(1) NOT NULL default '0',
1365 `no_sale` tinyint(1) NOT NULL default '0',
1366 PRIMARY KEY (`stock_id`)
1370 ### Data of table `0_stock_master` ###
1374 ### Structure of table `0_stock_moves` ###
1376 DROP TABLE IF EXISTS `0_stock_moves`;
1378 CREATE TABLE `0_stock_moves` (
1379 `trans_id` int(11) NOT NULL auto_increment,
1380 `trans_no` int(11) NOT NULL default '0',
1381 `stock_id` char(20) NOT NULL default '',
1382 `type` smallint(6) NOT NULL default '0',
1383 `loc_code` char(5) NOT NULL default '',
1384 `tran_date` date NOT NULL default '0000-00-00',
1385 `person_id` int(11) default NULL,
1386 `price` double NOT NULL default '0',
1387 `reference` char(40) NOT NULL default '',
1388 `qty` double NOT NULL default '1',
1389 `discount_percent` double NOT NULL default '0',
1390 `standard_cost` double NOT NULL default '0',
1391 `visible` tinyint(1) NOT NULL default '1',
1392 PRIMARY KEY (`trans_id`),
1393 KEY `type` (`type`,`trans_no`)
1394 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1397 ### Data of table `0_stock_moves` ###
1401 ### Structure of table `0_supp_allocations` ###
1403 DROP TABLE IF EXISTS `0_supp_allocations`;
1405 CREATE TABLE `0_supp_allocations` (
1406 `id` int(11) NOT NULL auto_increment,
1407 `amt` double unsigned default NULL,
1408 `date_alloc` date NOT NULL default '0000-00-00',
1409 `trans_no_from` int(11) default NULL,
1410 `trans_type_from` int(11) default NULL,
1411 `trans_no_to` int(11) default NULL,
1412 `trans_type_to` int(11) default NULL,
1414 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1417 ### Data of table `0_supp_allocations` ###
1421 ### Structure of table `0_supp_invoice_items` ###
1423 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1425 CREATE TABLE `0_supp_invoice_items` (
1426 `id` int(11) NOT NULL auto_increment,
1427 `supp_trans_no` int(11) default NULL,
1428 `supp_trans_type` int(11) default NULL,
1429 `gl_code` varchar(11) NOT NULL default '0',
1430 `grn_item_id` int(11) default NULL,
1431 `po_detail_item_id` int(11) default NULL,
1432 `stock_id` varchar(20) NOT NULL default '',
1433 `description` tinytext,
1434 `quantity` double NOT NULL default '0',
1435 `unit_price` double NOT NULL default '0',
1436 `unit_tax` double NOT NULL default '0',
1439 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1442 ### Data of table `0_supp_invoice_items` ###
1446 ### Structure of table `0_supp_trans` ###
1448 DROP TABLE IF EXISTS `0_supp_trans`;
1450 CREATE TABLE `0_supp_trans` (
1451 `trans_no` int(11) unsigned NOT NULL default '0',
1452 `type` smallint(6) unsigned NOT NULL default '0',
1453 `supplier_id` int(11) unsigned default NULL,
1454 `reference` tinytext NOT NULL,
1455 `supp_reference` varchar(60) NOT NULL default '',
1456 `tran_date` date NOT NULL default '0000-00-00',
1457 `due_date` date NOT NULL default '0000-00-00',
1458 `ov_amount` double NOT NULL default '0',
1459 `ov_discount` double NOT NULL default '0',
1460 `ov_gst` double NOT NULL default '0',
1461 `rate` double NOT NULL default '1',
1462 `alloc` double NOT NULL default '0',
1463 PRIMARY KEY (`trans_no`,`type`),
1464 KEY `supplier_id` (`supplier_id`),
1465 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1470 ### Data of table `0_supp_trans` ###
1474 ### Structure of table `0_suppliers` ###
1476 DROP TABLE IF EXISTS `0_suppliers`;
1478 CREATE TABLE `0_suppliers` (
1479 `supplier_id` int(11) NOT NULL auto_increment,
1480 `supp_name` varchar(60) NOT NULL default '',
1481 `supp_ref` varchar(30) NOT NULL default '',
1482 `address` tinytext NOT NULL,
1483 `supp_address` tinytext NOT NULL,
1484 `phone` varchar(30) NOT NULL default '',
1485 `phone2` varchar(30) NOT NULL default '',
1486 `fax` varchar(30) NOT NULL default '',
1487 `gst_no` varchar(25) NOT NULL default '',
1488 `contact` varchar(60) NOT NULL default '',
1489 `supp_account_no` varchar(40) NOT NULL default '',
1490 `email` varchar(100) NOT NULL default '',
1491 `website` varchar(100) NOT NULL default '',
1492 `bank_account` varchar(60) NOT NULL default '',
1493 `curr_code` char(3) default NULL,
1494 `payment_terms` int(11) default NULL,
1495 `dimension_id` int(11) default '0',
1496 `dimension2_id` int(11) default '0',
1497 `tax_group_id` int(11) default NULL,
1498 `credit_limit` double NOT NULL default '0',
1499 `purchase_account` varchar(11) default NULL,
1500 `payable_account` varchar(11) default NULL,
1501 `payment_discount_account` varchar(11) default NULL,
1502 `notes` tinytext NOT NULL,
1503 `inactive` tinyint(1) NOT NULL default '0',
1504 PRIMARY KEY (`supplier_id`)
1505 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1508 ### Data of table `0_suppliers` ###
1512 ### Structure of table `0_sys_types` ###
1514 DROP TABLE IF EXISTS `0_sys_types`;
1516 CREATE TABLE `0_sys_types` (
1517 `type_id` smallint(6) NOT NULL default '0',
1518 `type_no` int(11) NOT NULL default '1',
1519 `next_reference` varchar(100) NOT NULL default '',
1520 PRIMARY KEY (`type_id`)
1524 ### Data of table `0_sys_types` ###
1526 INSERT INTO `0_sys_types` VALUES ('0', '17', '1');
1527 INSERT INTO `0_sys_types` VALUES ('1', '7', '1');
1528 INSERT INTO `0_sys_types` VALUES ('2', '4', '1');
1529 INSERT INTO `0_sys_types` VALUES ('4', '3', '1');
1530 INSERT INTO `0_sys_types` VALUES ('10', '16', '1');
1531 INSERT INTO `0_sys_types` VALUES ('11', '2', '1');
1532 INSERT INTO `0_sys_types` VALUES ('12', '6', '1');
1533 INSERT INTO `0_sys_types` VALUES ('13', '1', '1');
1534 INSERT INTO `0_sys_types` VALUES ('16', '2', '1');
1535 INSERT INTO `0_sys_types` VALUES ('17', '2', '1');
1536 INSERT INTO `0_sys_types` VALUES ('18', '1', '1');
1537 INSERT INTO `0_sys_types` VALUES ('20', '6', '1');
1538 INSERT INTO `0_sys_types` VALUES ('21', '1', '1');
1539 INSERT INTO `0_sys_types` VALUES ('22', '3', '1');
1540 INSERT INTO `0_sys_types` VALUES ('25', '1', '1');
1541 INSERT INTO `0_sys_types` VALUES ('26', '1', '1');
1542 INSERT INTO `0_sys_types` VALUES ('28', '1', '1');
1543 INSERT INTO `0_sys_types` VALUES ('29', '1', '1');
1544 INSERT INTO `0_sys_types` VALUES ('30', '0', '1');
1545 INSERT INTO `0_sys_types` VALUES ('32', '0', '1');
1546 INSERT INTO `0_sys_types` VALUES ('35', '1', '1');
1547 INSERT INTO `0_sys_types` VALUES ('40', '1', '1');
1550 ### Structure of table `0_tax_group_items` ###
1552 DROP TABLE IF EXISTS `0_tax_group_items`;
1554 CREATE TABLE `0_tax_group_items` (
1555 `tax_group_id` int(11) NOT NULL default '0',
1556 `tax_type_id` int(11) NOT NULL default '0',
1557 `rate` double NOT NULL default '0',
1558 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1562 ### Data of table `0_tax_group_items` ###
1564 INSERT INTO `0_tax_group_items` VALUES ('1', '1', '5');
1567 ### Structure of table `0_tax_groups` ###
1569 DROP TABLE IF EXISTS `0_tax_groups`;
1571 CREATE TABLE `0_tax_groups` (
1572 `id` int(11) NOT NULL auto_increment,
1573 `name` varchar(60) NOT NULL default '',
1574 `tax_shipping` tinyint(1) NOT NULL default '0',
1575 `inactive` tinyint(1) NOT NULL default '0',
1577 UNIQUE KEY `name` (`name`)
1578 ) TYPE=InnoDB AUTO_INCREMENT=3 ;
1581 ### Data of table `0_tax_groups` ###
1583 INSERT INTO `0_tax_groups` VALUES ('1', 'Tax', '0', '0');
1584 INSERT INTO `0_tax_groups` VALUES ('2', 'Tax Exempt', '0', '0');
1587 ### Structure of table `0_tax_types` ###
1589 DROP TABLE IF EXISTS `0_tax_types`;
1591 CREATE TABLE `0_tax_types` (
1592 `id` int(11) NOT NULL auto_increment,
1593 `rate` double NOT NULL default '0',
1594 `sales_gl_code` varchar(11) NOT NULL default '',
1595 `purchasing_gl_code` varchar(11) NOT NULL default '',
1596 `name` varchar(60) NOT NULL default '',
1597 `inactive` tinyint(1) NOT NULL default '0',
1599 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
1602 ### Data of table `0_tax_types` ###
1604 INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2145', 'Tax', '0');
1607 ### Structure of table `0_trans_tax_details` ###
1609 DROP TABLE IF EXISTS `0_trans_tax_details`;
1611 CREATE TABLE `0_trans_tax_details` (
1612 `id` int(11) NOT NULL auto_increment,
1613 `trans_type` smallint(6) default NULL,
1614 `trans_no` int(11) default NULL,
1615 `tran_date` date NOT NULL,
1616 `tax_type_id` int(11) NOT NULL default '0',
1617 `rate` double NOT NULL default '0',
1618 `ex_rate` double NOT NULL default '1',
1619 `included_in_price` tinyint(1) NOT NULL default '0',
1620 `net_amount` double NOT NULL default '0',
1621 `amount` double NOT NULL default '0',
1624 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1627 ### Data of table `0_trans_tax_details` ###
1631 ### Structure of table `0_users` ###
1633 DROP TABLE IF EXISTS `0_users`;
1635 CREATE TABLE `0_users` (
1636 `id` SMALLINT(6) AUTO_INCREMENT,
1637 `user_id` varchar(60) NOT NULL default '',
1638 `password` varchar(100) NOT NULL default '',
1639 `real_name` varchar(100) NOT NULL default '',
1640 `role_id` int(11) NOT NULL default '1',
1641 `phone` varchar(30) NOT NULL default '',
1642 `email` varchar(100) default NULL,
1643 `language` varchar(20) default NULL,
1644 `date_format` tinyint(1) NOT NULL default '0',
1645 `date_sep` tinyint(1) NOT NULL default '0',
1646 `tho_sep` tinyint(1) NOT NULL default '0',
1647 `dec_sep` tinyint(1) NOT NULL default '0',
1648 `theme` varchar(20) NOT NULL default 'default',
1649 `page_size` varchar(20) NOT NULL default 'A4',
1650 `prices_dec` smallint(6) NOT NULL default '2',
1651 `qty_dec` smallint(6) NOT NULL default '2',
1652 `rates_dec` smallint(6) NOT NULL default '4',
1653 `percent_dec` smallint(6) NOT NULL default '1',
1654 `show_gl` tinyint(1) NOT NULL default '1',
1655 `show_codes` tinyint(1) NOT NULL default '0',
1656 `show_hints` tinyint(1) NOT NULL default '0',
1657 `last_visit_date` datetime default NULL,
1658 `query_size` tinyint(1) default '10',
1659 `graphic_links` tinyint(1) default '1',
1660 `pos` smallint(6) default '1',
1661 `print_profile` varchar(30) NOT NULL default '1',
1662 `rep_popup` tinyint(1) default '1',
1663 `sticky_doc_date` tinyint(1) default '0',
1664 `startup_tab` varchar(20) NOT NULL default '',
1665 `inactive` tinyint(1) NOT NULL default '0',
1667 UNIQUE KEY (`user_id`)
1668 ) TYPE=MyISAM AUTO_INCREMENT=2;
1671 ### Data of table `0_users` ###
1673 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');
1675 ### Structure of table `0_voided` ###
1677 DROP TABLE IF EXISTS `0_voided`;
1679 CREATE TABLE `0_voided` (
1680 `type` int(11) NOT NULL default '0',
1681 `id` int(11) NOT NULL default '0',
1682 `date_` date NOT NULL default '0000-00-00',
1683 `memo_` tinytext NOT NULL,
1684 UNIQUE KEY `id` (`type`,`id`)
1688 ### Data of table `0_voided` ###
1692 ### Structure of table `0_wo_issue_items` ###
1694 DROP TABLE IF EXISTS `0_wo_issue_items`;
1696 CREATE TABLE `0_wo_issue_items` (
1697 `id` int(11) NOT NULL auto_increment,
1698 `stock_id` varchar(40) default NULL,
1699 `issue_id` int(11) default NULL,
1700 `qty_issued` double default NULL,
1702 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1705 ### Data of table `0_wo_issue_items` ###
1709 ### Structure of table `0_wo_issues` ###
1711 DROP TABLE IF EXISTS `0_wo_issues`;
1713 CREATE TABLE `0_wo_issues` (
1714 `issue_no` int(11) NOT NULL auto_increment,
1715 `workorder_id` int(11) NOT NULL default '0',
1716 `reference` varchar(100) default NULL,
1717 `issue_date` date default NULL,
1718 `loc_code` varchar(5) default NULL,
1719 `workcentre_id` int(11) default NULL,
1720 PRIMARY KEY (`issue_no`)
1721 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1724 ### Data of table `0_wo_issues` ###
1728 ### Structure of table `0_wo_manufacture` ###
1730 DROP TABLE IF EXISTS `0_wo_manufacture`;
1732 CREATE TABLE `0_wo_manufacture` (
1733 `id` int(11) NOT NULL auto_increment,
1734 `reference` varchar(100) default NULL,
1735 `workorder_id` int(11) NOT NULL default '0',
1736 `quantity` double NOT NULL default '0',
1737 `date_` date NOT NULL default '0000-00-00',
1739 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1742 ### Data of table `0_wo_manufacture` ###
1746 ### Structure of table `0_wo_requirements` ###
1748 DROP TABLE IF EXISTS `0_wo_requirements`;
1750 CREATE TABLE `0_wo_requirements` (
1751 `id` int(11) NOT NULL auto_increment,
1752 `workorder_id` int(11) NOT NULL default '0',
1753 `stock_id` char(20) NOT NULL default '',
1754 `workcentre` int(11) NOT NULL default '0',
1755 `units_req` double NOT NULL default '1',
1756 `std_cost` double NOT NULL default '0',
1757 `loc_code` char(5) NOT NULL default '',
1758 `units_issued` double NOT NULL default '0',
1760 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1763 ### Data of table `0_wo_requirements` ###
1767 ### Structure of table `0_workcentres` ###
1769 DROP TABLE IF EXISTS `0_workcentres`;
1771 CREATE TABLE `0_workcentres` (
1772 `id` int(11) NOT NULL auto_increment,
1773 `name` char(40) NOT NULL default '',
1774 `description` char(50) NOT NULL default '',
1775 `inactive` tinyint(1) NOT NULL default '0',
1777 UNIQUE KEY `name` (`name`)
1778 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1781 ### Data of table `0_workcentres` ###
1785 ### Structure of table `0_workorders` ###
1787 DROP TABLE IF EXISTS `0_workorders`;
1789 CREATE TABLE `0_workorders` (
1790 `id` int(11) NOT NULL auto_increment,
1791 `wo_ref` varchar(60) NOT NULL default '',
1792 `loc_code` varchar(5) NOT NULL default '',
1793 `units_reqd` double NOT NULL default '1',
1794 `stock_id` varchar(20) NOT NULL default '',
1795 `date_` date NOT NULL default '0000-00-00',
1796 `type` tinyint(4) NOT NULL default '0',
1797 `required_by` date NOT NULL default '0000-00-00',
1798 `released_date` date NOT NULL default '0000-00-00',
1799 `units_issued` double NOT NULL default '0',
1800 `closed` tinyint(1) NOT NULL default '0',
1801 `released` tinyint(1) NOT NULL default '0',
1802 `additional_costs` double NOT NULL default '0',
1804 UNIQUE KEY `wo_ref` (`wo_ref`)
1805 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1808 ### Data of table `0_workorders` ###
1812 ### Structure of table `0_tags` ###
1814 DROP TABLE IF EXISTS `0_tags`;
1816 CREATE TABLE `0_tags` (
1817 `id` int(11) NOT NULL auto_increment,
1818 `type` smallint(6) NOT NULL,
1819 `name` varchar(30) NOT NULL,
1820 `description` varchar(60) default NULL,
1821 `inactive` tinyint(1) NOT NULL default '0',
1823 UNIQUE KEY(`type`,`name`)
1824 ) TYPE=MyISAM AUTO_INCREMENT=1;
1827 ### Data of table `0_chart_tags` ###
1831 ### Structure of table `0_tag_associations` ###
1833 DROP TABLE IF EXISTS `0_tag_associations`;
1835 CREATE TABLE `0_tag_associations` (
1836 `record_id` varchar(11) NOT NULL,
1837 `tag_id` int(11) NOT NULL,
1838 UNIQUE KEY(`record_id`,`tag_id`)
1842 ### Data of table `0_tag_associations` ###
1844 DROP TABLE IF EXISTS `0_useronline` ;
1846 CREATE TABLE `0_useronline` (
1847 `id` int(11) NOT NULL AUTO_INCREMENT ,
1848 `timestamp` int(15) NOT NULL default '0',
1849 `ip` varchar(40) NOT NULL default '',
1850 `file` varchar(100) NOT NULL default '',
1851 PRIMARY KEY `id` (`id`) ,
1853 ) TYPE=MYISAM AUTO_INCREMENT=1;