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 ('2150', '', 'Sales Tax', '4', '0');
231 INSERT INTO `0_chart_master` VALUES ('2160', '', 'Accrued Use Tax Payable', '4', '0');
232 INSERT INTO `0_chart_master` VALUES ('2210', '', 'Accrued Wages', '4', '0');
233 INSERT INTO `0_chart_master` VALUES ('2220', '', 'Accrued Comp Time', '4', '0');
234 INSERT INTO `0_chart_master` VALUES ('2230', '', 'Accrued Holiday Pay', '4', '0');
235 INSERT INTO `0_chart_master` VALUES ('2240', '', 'Accrued Vacation Pay', '4', '0');
236 INSERT INTO `0_chart_master` VALUES ('2310', '', 'Accr. Benefits - 401K', '4', '0');
237 INSERT INTO `0_chart_master` VALUES ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0');
238 INSERT INTO `0_chart_master` VALUES ('2330', '', 'Accr. Benefits - Med, Den', '4', '0');
239 INSERT INTO `0_chart_master` VALUES ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0');
240 INSERT INTO `0_chart_master` VALUES ('2350', '', 'Accr. Benefits - Credit Union', '4', '0');
241 INSERT INTO `0_chart_master` VALUES ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0');
242 INSERT INTO `0_chart_master` VALUES ('2370', '', 'Accr. Benefits - Garnish', '4', '0');
243 INSERT INTO `0_chart_master` VALUES ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0');
244 INSERT INTO `0_chart_master` VALUES ('2620', '', 'Bank Loans', '5', '0');
245 INSERT INTO `0_chart_master` VALUES ('2680', '', 'Loans from Shareholders', '5', '0');
246 INSERT INTO `0_chart_master` VALUES ('3350', '', 'Common Shares', '6', '0');
247 INSERT INTO `0_chart_master` VALUES ('3590', '', 'Retained Earnings - prior years', '7', '0');
248 INSERT INTO `0_chart_master` VALUES ('4010', '', 'Sales', '8', '0');
249 INSERT INTO `0_chart_master` VALUES ('4430', '', 'Shipping & Handling', '9', '0');
250 INSERT INTO `0_chart_master` VALUES ('4440', '', 'Interest', '9', '0');
251 INSERT INTO `0_chart_master` VALUES ('4450', '', 'Foreign Exchange Gain', '9', '0');
252 INSERT INTO `0_chart_master` VALUES ('4500', '', 'Prompt Payment Discounts', '9', '0');
253 INSERT INTO `0_chart_master` VALUES ('4510', '', 'Discounts Given', '9', '0');
254 INSERT INTO `0_chart_master` VALUES ('5010', '', 'Cost of Goods Sold - Retail', '10', '0');
255 INSERT INTO `0_chart_master` VALUES ('5020', '', 'Material Usage Varaiance', '10', '0');
256 INSERT INTO `0_chart_master` VALUES ('5030', '', 'Consumable Materials', '10', '0');
257 INSERT INTO `0_chart_master` VALUES ('5040', '', 'Purchase price Variance', '10', '0');
258 INSERT INTO `0_chart_master` VALUES ('5050', '', 'Purchases of materials', '10', '0');
259 INSERT INTO `0_chart_master` VALUES ('5060', '', 'Discounts Received', '10', '0');
260 INSERT INTO `0_chart_master` VALUES ('5100', '', 'Freight', '10', '0');
261 INSERT INTO `0_chart_master` VALUES ('5410', '', 'Wages & Salaries', '11', '0');
262 INSERT INTO `0_chart_master` VALUES ('5420', '', 'Wages - Overtime', '11', '0');
263 INSERT INTO `0_chart_master` VALUES ('5430', '', 'Benefits - Comp Time', '11', '0');
264 INSERT INTO `0_chart_master` VALUES ('5440', '', 'Benefits - Payroll Taxes', '11', '0');
265 INSERT INTO `0_chart_master` VALUES ('5450', '', 'Benefits - Workers Comp', '11', '0');
266 INSERT INTO `0_chart_master` VALUES ('5460', '', 'Benefits - Pension', '11', '0');
267 INSERT INTO `0_chart_master` VALUES ('5470', '', 'Benefits - General Benefits', '11', '0');
268 INSERT INTO `0_chart_master` VALUES ('5510', '', 'Inc Tax Exp - Federal', '11', '0');
269 INSERT INTO `0_chart_master` VALUES ('5520', '', 'Inc Tax Exp - State', '11', '0');
270 INSERT INTO `0_chart_master` VALUES ('5530', '', 'Taxes - Real Estate', '11', '0');
271 INSERT INTO `0_chart_master` VALUES ('5540', '', 'Taxes - Personal Property', '11', '0');
272 INSERT INTO `0_chart_master` VALUES ('5550', '', 'Taxes - Franchise', '11', '0');
273 INSERT INTO `0_chart_master` VALUES ('5560', '', 'Taxes - Foreign Withholding', '11', '0');
274 INSERT INTO `0_chart_master` VALUES ('5610', '', 'Accounting & Legal', '12', '0');
275 INSERT INTO `0_chart_master` VALUES ('5615', '', 'Advertising & Promotions', '12', '0');
276 INSERT INTO `0_chart_master` VALUES ('5620', '', 'Bad Debts', '12', '0');
277 INSERT INTO `0_chart_master` VALUES ('5660', '', 'Amortization Expense', '12', '0');
278 INSERT INTO `0_chart_master` VALUES ('5685', '', 'Insurance', '12', '0');
279 INSERT INTO `0_chart_master` VALUES ('5690', '', 'Interest & Bank Charges', '12', '0');
280 INSERT INTO `0_chart_master` VALUES ('5700', '', 'Office Supplies', '12', '0');
281 INSERT INTO `0_chart_master` VALUES ('5760', '', 'Rent', '12', '0');
282 INSERT INTO `0_chart_master` VALUES ('5765', '', 'Repair & Maintenance', '12', '0');
283 INSERT INTO `0_chart_master` VALUES ('5780', '', 'Telephone', '12', '0');
284 INSERT INTO `0_chart_master` VALUES ('5785', '', 'Travel & Entertainment', '12', '0');
285 INSERT INTO `0_chart_master` VALUES ('5790', '', 'Utilities', '12', '0');
286 INSERT INTO `0_chart_master` VALUES ('5795', '', 'Registrations', '12', '0');
287 INSERT INTO `0_chart_master` VALUES ('5800', '', 'Licenses', '12', '0');
288 INSERT INTO `0_chart_master` VALUES ('5810', '', 'Foreign Exchange Loss', '12', '0');
289 INSERT INTO `0_chart_master` VALUES ('9990', '', 'Year Profit/Loss', '12', '0');
292 ### Structure of table `0_chart_types` ###
294 DROP TABLE IF EXISTS `0_chart_types`;
296 CREATE TABLE `0_chart_types` (
297 `id` int(11) NOT NULL auto_increment,
298 `name` varchar(60) NOT NULL default '',
299 `class_id` tinyint(1) NOT NULL default '0',
300 `parent` int(11) NOT NULL default '-1',
301 `inactive` tinyint(1) NOT NULL default '0',
304 ) TYPE=MyISAM AUTO_INCREMENT=13 ;
307 ### Data of table `0_chart_types` ###
309 INSERT INTO `0_chart_types` VALUES ('1', 'Current Assets', '1', '-1', '0');
310 INSERT INTO `0_chart_types` VALUES ('2', 'Inventory Assets', '1', '-1', '0');
311 INSERT INTO `0_chart_types` VALUES ('3', 'Capital Assets', '1', '-1', '0');
312 INSERT INTO `0_chart_types` VALUES ('4', 'Current Liabilities', '2', '-1', '0');
313 INSERT INTO `0_chart_types` VALUES ('5', 'Long Term Liabilities', '2', '-1', '0');
314 INSERT INTO `0_chart_types` VALUES ('6', 'Share Capital', '2', '-1', '0');
315 INSERT INTO `0_chart_types` VALUES ('7', 'Retained Earnings', '2', '-1', '0');
316 INSERT INTO `0_chart_types` VALUES ('8', 'Sales Revenue', '3', '-1', '0');
317 INSERT INTO `0_chart_types` VALUES ('9', 'Other Revenue', '3', '-1', '0');
318 INSERT INTO `0_chart_types` VALUES ('10', 'Cost of Goods Sold', '4', '-1', '0');
319 INSERT INTO `0_chart_types` VALUES ('11', 'Payroll Expenses', '4', '-1', '0');
320 INSERT INTO `0_chart_types` VALUES ('12', 'General & Administrative expenses', '4', -1, '0');
323 ### Structure of table `0_comments` ###
325 DROP TABLE IF EXISTS `0_comments`;
327 CREATE TABLE `0_comments` (
328 `type` int(11) NOT NULL default '0',
329 `id` int(11) NOT NULL default '0',
330 `date_` date default '0000-00-00',
332 KEY `type_and_id` (`type`, `id`)
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`)
401 ### Data of table `0_company` ###
403 INSERT INTO `0_company` VALUES ('1', 'Company name', '', '', '1', '1', 'N/A', '', '', '', '', '', 'USD', '1200', '5060', '2100', '5690', '4450', '9990', '3590', '4430', '4010', '4510', '4500', '1510', '5010', '5040', '4010', '1530', '5000', '0', '10', '10', '1000', '20', '20', '30', '1', '1', '0', '0', '0', '1', '0', '0', '', '1', '2.2', '0', '-1', '1', '600');
405 ### Structure of table `0_credit_status` ###
407 DROP TABLE IF EXISTS `0_credit_status`;
409 CREATE TABLE `0_credit_status` (
410 `id` int(11) NOT NULL auto_increment,
411 `reason_description` char(100) NOT NULL default '',
412 `dissallow_invoices` tinyint(1) NOT NULL default '0',
413 `inactive` tinyint(1) NOT NULL default '0',
415 UNIQUE KEY `reason_description` (`reason_description`)
416 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
419 ### Data of table `0_credit_status` ###
421 INSERT INTO `0_credit_status` VALUES ('1', 'Good History', '0', '0');
422 INSERT INTO `0_credit_status` VALUES ('3', 'No more work until payment received', '1', '0');
423 INSERT INTO `0_credit_status` VALUES ('4', 'In liquidation', '1', '0');
426 ### Structure of table `0_currencies` ###
428 DROP TABLE IF EXISTS `0_currencies`;
430 CREATE TABLE `0_currencies` (
431 `currency` varchar(60) NOT NULL default '',
432 `curr_abrev` char(3) NOT NULL default '',
433 `curr_symbol` varchar(10) NOT NULL default '',
434 `country` varchar(100) NOT NULL default '',
435 `hundreds_name` varchar(15) NOT NULL default '',
436 `auto_update` tinyint(1) NOT NULL default '1',
437 `inactive` tinyint(1) NOT NULL default '0',
438 PRIMARY KEY (`curr_abrev`)
442 ### Data of table `0_currencies` ###
444 INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0');
445 INSERT INTO `0_currencies` VALUES ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0');
446 INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents', '1', '0');
447 INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence', '1', '0');
449 ### Structure of table `0_cust_allocations` ###
451 DROP TABLE IF EXISTS `0_cust_allocations`;
453 CREATE TABLE `0_cust_allocations` (
454 `id` int(11) NOT NULL auto_increment,
455 `amt` double unsigned default NULL,
456 `date_alloc` date NOT NULL default '0000-00-00',
457 `trans_no_from` int(11) default NULL,
458 `trans_type_from` int(11) default NULL,
459 `trans_no_to` int(11) default NULL,
460 `trans_type_to` int(11) default NULL,
462 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
465 ### Data of table `0_cust_allocations` ###
469 ### Structure of table `0_cust_branch` ###
471 DROP TABLE IF EXISTS `0_cust_branch`;
473 CREATE TABLE `0_cust_branch` (
474 `branch_code` int(11) NOT NULL auto_increment,
475 `debtor_no` int(11) NOT NULL default '0',
476 `br_name` varchar(60) NOT NULL default '',
477 `branch_ref` varchar(30) NOT NULL default '',
478 `br_address` tinytext NOT NULL,
479 `area` int(11) default NULL,
480 `salesman` int(11) NOT NULL default '0',
481 `phone` varchar(30) NOT NULL default '',
482 `phone2` varchar(30) NOT NULL default '',
483 `fax` varchar(30) NOT NULL default '',
484 `contact_name` varchar(60) NOT NULL default '',
485 `email` varchar(100) NOT NULL default '',
486 `default_location` varchar(5) NOT NULL default '',
487 `tax_group_id` int(11) default NULL,
488 `sales_account` varchar(11) default NULL,
489 `sales_discount_account` varchar(11) default NULL,
490 `receivables_account` varchar(11) default NULL,
491 `payment_discount_account` varchar(11) default NULL,
492 `default_ship_via` int(11) NOT NULL default '1',
493 `disable_trans` tinyint(4) NOT NULL default '0',
494 `br_post_address` tinytext NOT NULL,
495 `group_no` int(11) NOT NULL default '0',
496 `notes` tinytext NOT NULL,
497 `inactive` tinyint(1) NOT NULL default '0',
498 PRIMARY KEY (`branch_code`,`debtor_no`),
499 KEY `branch_code` (`branch_code`),
500 KEY `br_name` (`br_name`)
501 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
504 ### Data of table `0_cust_branch` ###
508 ### Structure of table `0_debtor_trans` ###
510 DROP TABLE IF EXISTS `0_debtor_trans`;
512 CREATE TABLE `0_debtor_trans` (
513 `trans_no` int(11) unsigned NOT NULL default '0',
514 `type` smallint(6) unsigned NOT NULL default '0',
515 `version` tinyint(1) unsigned NOT NULL default '0',
516 `debtor_no` int(11) unsigned default NULL,
517 `branch_code` int(11) NOT NULL default '-1',
518 `tran_date` date NOT NULL default '0000-00-00',
519 `due_date` date NOT NULL default '0000-00-00',
520 `reference` varchar(60) NOT NULL default '',
521 `tpe` int(11) NOT NULL default '0',
522 `order_` int(11) NOT NULL default '0',
523 `ov_amount` double NOT NULL default '0',
524 `ov_gst` double NOT NULL default '0',
525 `ov_freight` double NOT NULL default '0',
526 `ov_freight_tax` double NOT NULL default '0',
527 `ov_discount` double NOT NULL default '0',
528 `alloc` double NOT NULL default '0',
529 `rate` double NOT NULL default '1',
530 `ship_via` int(11) default NULL,
531 `trans_link` int(11) NOT NULL default '0',
532 `dimension_id` int(11) NOT NULL default '0',
533 `dimension2_id` int(11) NOT NULL default '0',
534 PRIMARY KEY (`trans_no`,`type`),
535 KEY `debtor_no` (`debtor_no`,`branch_code`)
539 ### Data of table `0_debtor_trans` ###
543 ### Structure of table `0_debtor_trans_details` ###
545 DROP TABLE IF EXISTS `0_debtor_trans_details`;
547 CREATE TABLE `0_debtor_trans_details` (
548 `id` int(11) NOT NULL auto_increment,
549 `debtor_trans_no` int(11) default NULL,
550 `debtor_trans_type` int(11) default NULL,
551 `stock_id` varchar(20) NOT NULL default '',
552 `description` tinytext,
553 `unit_price` double NOT NULL default '0',
554 `unit_tax` double NOT NULL default '0',
555 `quantity` double NOT NULL default '0',
556 `discount_percent` double NOT NULL default '0',
557 `standard_cost` double NOT NULL default '0',
558 `qty_done` double NOT NULL default '0',
560 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
563 ### Data of table `0_debtor_trans_details` ###
567 ### Structure of table `0_debtors_master` ###
569 DROP TABLE IF EXISTS `0_debtors_master`;
571 CREATE TABLE `0_debtors_master` (
572 `debtor_no` int(11) NOT NULL auto_increment,
573 `name` varchar(100) NOT NULL default '',
574 `debtor_ref` varchar(30) NOT NULL,
576 `email` varchar(100) NOT NULL default '',
577 `tax_id` varchar(55) NOT NULL default '',
578 `curr_code` char(3) NOT NULL default '',
579 `sales_type` int(11) NOT NULL default '1',
580 `dimension_id` int(11) NOT NULL default '0',
581 `dimension2_id` int(11) NOT NULL default '0',
582 `credit_status` int(11) NOT NULL default '0',
583 `payment_terms` int(11) default NULL,
584 `discount` double NOT NULL default '0',
585 `pymt_discount` double NOT NULL default '0',
586 `credit_limit` float NOT NULL default '1000',
587 `notes` tinytext NOT NULL,
588 `inactive` tinyint(1) NOT NULL default '0',
589 PRIMARY KEY (`debtor_no`),
590 UNIQUE KEY `name` (`name`)
591 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
594 ### Data of table `0_debtors_master` ###
598 ### Structure of table `0_dimensions` ###
600 DROP TABLE IF EXISTS `0_dimensions`;
602 CREATE TABLE `0_dimensions` (
603 `id` int(11) NOT NULL auto_increment,
604 `reference` varchar(60) NOT NULL default '',
605 `name` varchar(60) NOT NULL default '',
606 `type_` tinyint(1) NOT NULL default '1',
607 `closed` tinyint(1) NOT NULL default '0',
608 `date_` date NOT NULL default '0000-00-00',
609 `due_date` date NOT NULL default '0000-00-00',
611 UNIQUE KEY `reference` (`reference`)
612 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
615 ### Data of table `0_dimensions` ###
619 ### Structure of table `0_exchange_rates` ###
621 DROP TABLE IF EXISTS `0_exchange_rates`;
623 CREATE TABLE `0_exchange_rates` (
624 `id` int(11) NOT NULL auto_increment,
625 `curr_code` char(3) NOT NULL default '',
626 `rate_buy` double NOT NULL default '0',
627 `rate_sell` double NOT NULL default '0',
628 `date_` date NOT NULL default '0000-00-00',
630 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
631 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
634 ### Data of table `0_exchange_rates` ###
638 ### Structure of table `0_fiscal_year` ###
640 DROP TABLE IF EXISTS `0_fiscal_year`;
642 CREATE TABLE `0_fiscal_year` (
643 `id` int(11) NOT NULL auto_increment,
644 `begin` date default '0000-00-00',
645 `end` date default '0000-00-00',
646 `closed` tinyint(1) NOT NULL default '0',
648 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
651 ### Data of table `0_fiscal_year` ###
653 INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0');
656 ### Structure of table `0_gl_trans` ###
658 DROP TABLE IF EXISTS `0_gl_trans`;
660 CREATE TABLE `0_gl_trans` (
661 `counter` int(11) NOT NULL auto_increment,
662 `type` smallint(6) NOT NULL default '0',
663 `type_no` bigint(16) NOT NULL default '1',
664 `tran_date` date NOT NULL default '0000-00-00',
665 `account` varchar(11) NOT NULL default '',
666 `memo_` tinytext NOT NULL,
667 `amount` double NOT NULL default '0',
668 `dimension_id` int(11) NOT NULL default '0',
669 `dimension2_id` int(11) NOT NULL default '0',
670 `person_type_id` int(11) default NULL,
671 `person_id` tinyblob,
672 PRIMARY KEY (`counter`),
673 KEY `Type_and_Number` (`type`,`type_no`)
674 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
677 ### Data of table `0_gl_trans` ###
681 ### Structure of table `0_grn_batch` ###
683 DROP TABLE IF EXISTS `0_grn_batch`;
685 CREATE TABLE `0_grn_batch` (
686 `id` int(11) NOT NULL auto_increment,
687 `supplier_id` int(11) NOT NULL default '0',
688 `purch_order_no` int(11) default NULL,
689 `reference` varchar(60) NOT NULL default '',
690 `delivery_date` date NOT NULL default '0000-00-00',
691 `loc_code` varchar(5) default NULL,
693 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
696 ### Data of table `0_grn_batch` ###
700 ### Structure of table `0_grn_items` ###
702 DROP TABLE IF EXISTS `0_grn_items`;
704 CREATE TABLE `0_grn_items` (
705 `id` int(11) NOT NULL auto_increment,
706 `grn_batch_id` int(11) default NULL,
707 `po_detail_item` int(11) NOT NULL default '0',
708 `item_code` varchar(20) NOT NULL default '',
709 `description` tinytext,
710 `qty_recd` double NOT NULL default '0',
711 `quantity_inv` double NOT NULL default '0',
713 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
716 ### Data of table `0_grn_items` ###
720 ### Structure of table `0_groups` ###
722 DROP TABLE IF EXISTS `0_groups`;
724 CREATE TABLE `0_groups` (
725 `id` smallint(6) unsigned NOT NULL auto_increment,
726 `description` varchar(60) NOT NULL default '',
727 `inactive` tinyint(1) NOT NULL default '0',
729 UNIQUE KEY `description` (`description`)
730 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
733 ### Data of table `0_groups` ###
735 INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
736 INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
737 INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
740 ### Structure of table `0_item_codes` ###
742 DROP TABLE IF EXISTS `0_item_codes`;
744 CREATE TABLE `0_item_codes` (
745 `id` int(11) unsigned NOT NULL auto_increment,
746 `item_code` varchar(20) NOT NULL,
747 `stock_id` varchar(20) NOT NULL,
748 `description` varchar(200) NOT NULL default '',
749 `category_id` smallint(6) unsigned NOT NULL,
750 `quantity` double NOT NULL default '1',
751 `is_foreign` tinyint(1) NOT NULL default '0',
752 `inactive` tinyint(1) NOT NULL default '0',
754 UNIQUE KEY `stock_id` (`stock_id`,`item_code`)
755 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
758 ### Data of table `0_item_codes` ###
762 ### Structure of table `0_item_tax_type_exemptions` ###
764 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
766 CREATE TABLE `0_item_tax_type_exemptions` (
767 `item_tax_type_id` int(11) NOT NULL default '0',
768 `tax_type_id` int(11) NOT NULL default '0',
769 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
773 ### Data of table `0_item_tax_type_exemptions` ###
777 ### Structure of table `0_item_tax_types` ###
779 DROP TABLE IF EXISTS `0_item_tax_types`;
781 CREATE TABLE `0_item_tax_types` (
782 `id` int(11) NOT NULL auto_increment,
783 `name` varchar(60) NOT NULL default '',
784 `exempt` tinyint(1) NOT NULL default '0',
785 `inactive` tinyint(1) NOT NULL default '0',
787 UNIQUE KEY `name` (`name`)
788 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
791 ### Data of table `0_item_tax_types` ###
793 INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0', '0');
796 ### Structure of table `0_item_units` ###
798 DROP TABLE IF EXISTS `0_item_units`;
800 CREATE TABLE `0_item_units` (
801 `abbr` varchar(20) NOT NULL,
802 `name` varchar(40) NOT NULL,
803 `decimals` tinyint(2) NOT NULL,
804 `inactive` tinyint(1) NOT NULL default '0',
805 PRIMARY KEY (`abbr`),
806 UNIQUE KEY `name` (`name`)
810 ### Data of table `0_item_units` ###
812 INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0');
815 ### Structure of table `0_loc_stock` ###
817 DROP TABLE IF EXISTS `0_loc_stock`;
819 CREATE TABLE `0_loc_stock` (
820 `loc_code` char(5) NOT NULL default '',
821 `stock_id` char(20) NOT NULL default '',
822 `reorder_level` bigint(20) NOT NULL default '0',
823 PRIMARY KEY (`loc_code`,`stock_id`),
824 KEY `stock_id` (`stock_id`)
828 ### Data of table `0_loc_stock` ###
832 ### Structure of table `0_locations` ###
834 DROP TABLE IF EXISTS `0_locations`;
836 CREATE TABLE `0_locations` (
837 `loc_code` varchar(5) NOT NULL default '',
838 `location_name` varchar(60) NOT NULL default '',
839 `delivery_address` tinytext NOT NULL,
840 `phone` varchar(30) NOT NULL default '',
841 `phone2` varchar(30) NOT NULL default '',
842 `fax` varchar(30) NOT NULL default '',
843 `email` varchar(100) NOT NULL default '',
844 `contact` varchar(30) NOT NULL default '',
845 `inactive` tinyint(1) NOT NULL default '0',
846 PRIMARY KEY (`loc_code`)
850 ### Data of table `0_locations` ###
852 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '', '0');
855 ### Structure of table `0_movement_types` ###
857 DROP TABLE IF EXISTS `0_movement_types`;
859 CREATE TABLE `0_movement_types` (
860 `id` int(11) NOT NULL auto_increment,
861 `name` varchar(60) NOT NULL default '',
862 `inactive` tinyint(1) NOT NULL default '0',
864 UNIQUE KEY `name` (`name`)
865 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
868 ### Data of table `0_movement_types` ###
870 INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment', '0');
873 ### Structure of table `0_payment_terms` ###
875 DROP TABLE IF EXISTS `0_payment_terms`;
877 CREATE TABLE `0_payment_terms` (
878 `terms_indicator` int(11) NOT NULL auto_increment,
879 `terms` char(80) NOT NULL default '',
880 `days_before_due` smallint(6) NOT NULL default '0',
881 `day_in_following_month` smallint(6) NOT NULL default '0',
882 `inactive` tinyint(1) NOT NULL default '0',
883 PRIMARY KEY (`terms_indicator`),
884 UNIQUE KEY `terms` (`terms`)
885 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
888 ### Data of table `0_payment_terms` ###
890 INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0');
891 INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0');
892 INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0');
893 INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0');
896 ### Structure of table `0_prices` ###
898 DROP TABLE IF EXISTS `0_prices`;
900 CREATE TABLE `0_prices` (
901 `id` int(11) NOT NULL auto_increment,
902 `stock_id` varchar(20) NOT NULL default '',
903 `sales_type_id` int(11) NOT NULL default '0',
904 `curr_abrev` char(3) NOT NULL default '',
905 `price` double NOT NULL default '0',
907 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
908 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
911 ### Data of table `0_prices` ###
915 ### Structure of table `0_print_profiles` ###
917 DROP TABLE IF EXISTS `0_print_profiles`;
919 CREATE TABLE `0_print_profiles` (
920 `id` smallint(6) unsigned NOT NULL auto_increment,
921 `profile` varchar(30) NOT NULL,
922 `report` varchar(5) default NULL,
923 `printer` tinyint(3) unsigned default NULL,
925 UNIQUE KEY `profile` (`profile`,`report`)
926 ) TYPE=MyISAM AUTO_INCREMENT=10 ;
929 ### Data of table `0_print_profiles` ###
931 INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0');
932 INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0');
933 INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2');
934 INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2');
935 INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2');
936 INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2');
937 INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2');
938 INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2');
939 INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2');
942 ### Structure of table `0_printers` ###
944 DROP TABLE IF EXISTS `0_printers`;
946 CREATE TABLE `0_printers` (
947 `id` tinyint(3) unsigned NOT NULL auto_increment,
948 `name` varchar(20) NOT NULL,
949 `description` varchar(60) NOT NULL,
950 `queue` varchar(20) NOT NULL,
951 `host` varchar(40) NOT NULL,
952 `port` smallint(11) unsigned NOT NULL,
953 `timeout` tinyint(3) unsigned NOT NULL,
955 UNIQUE KEY `name` (`name`)
956 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
959 ### Data of table `0_printers` ###
961 INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20');
962 INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5');
963 INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
966 ### Structure of table `0_purch_data` ###
968 DROP TABLE IF EXISTS `0_purch_data`;
970 CREATE TABLE `0_purch_data` (
971 `supplier_id` int(11) NOT NULL default '0',
972 `stock_id` char(20) NOT NULL default '',
973 `price` double NOT NULL default '0',
974 `suppliers_uom` char(50) NOT NULL default '',
975 `conversion_factor` double NOT NULL default '1',
976 `supplier_description` char(50) NOT NULL default '',
977 PRIMARY KEY (`supplier_id`,`stock_id`)
981 ### Data of table `0_purch_data` ###
985 ### Structure of table `0_purch_order_details` ###
987 DROP TABLE IF EXISTS `0_purch_order_details`;
989 CREATE TABLE `0_purch_order_details` (
990 `po_detail_item` int(11) NOT NULL auto_increment,
991 `order_no` int(11) NOT NULL default '0',
992 `item_code` varchar(20) NOT NULL default '',
993 `description` tinytext,
994 `delivery_date` date NOT NULL default '0000-00-00',
995 `qty_invoiced` double NOT NULL default '0',
996 `unit_price` double NOT NULL default '0',
997 `act_price` double NOT NULL default '0',
998 `std_cost_unit` double NOT NULL default '0',
999 `quantity_ordered` double NOT NULL default '0',
1000 `quantity_received` double NOT NULL default '0',
1001 PRIMARY KEY (`po_detail_item`)
1002 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1005 ### Data of table `0_purch_order_details` ###
1009 ### Structure of table `0_purch_orders` ###
1011 DROP TABLE IF EXISTS `0_purch_orders`;
1013 CREATE TABLE `0_purch_orders` (
1014 `order_no` int(11) NOT NULL auto_increment,
1015 `supplier_id` int(11) NOT NULL default '0',
1016 `comments` tinytext,
1017 `ord_date` date NOT NULL default '0000-00-00',
1018 `reference` tinytext NOT NULL,
1019 `requisition_no` tinytext,
1020 `into_stock_location` varchar(5) NOT NULL default '',
1021 `delivery_address` tinytext NOT NULL,
1022 PRIMARY KEY (`order_no`)
1023 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1026 ### Data of table `0_purch_orders` ###
1030 ### Structure of table `0_quick_entries` ###
1032 DROP TABLE IF EXISTS `0_quick_entries`;
1034 CREATE TABLE `0_quick_entries` (
1035 `id` smallint(6) unsigned NOT NULL auto_increment,
1036 `type` tinyint(1) NOT NULL default '0',
1037 `description` varchar(60) NOT NULL,
1038 `base_amount` double NOT NULL default '0',
1039 `base_desc` varchar(60) default NULL,
1040 `bal_type` tinyint(1) NOT NULL default '0',
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', '0');
1049 INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount'. '0');
1050 INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount', '0');
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;5891;7937;7938;7939;7940;8193;8194;8195;8196;8197;8449;8450;8451;10497;10753;10754;10755;10756;10757;11009;11010;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;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 '0',
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 UNIQUE KEY `name` (`name`,`rate`)
1600 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
1603 ### Data of table `0_tax_types` ###
1605 INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2150', 'Tax', '0');
1608 ### Structure of table `0_trans_tax_details` ###
1610 DROP TABLE IF EXISTS `0_trans_tax_details`;
1612 CREATE TABLE `0_trans_tax_details` (
1613 `id` int(11) NOT NULL auto_increment,
1614 `trans_type` smallint(6) default NULL,
1615 `trans_no` int(11) default NULL,
1616 `tran_date` date NOT NULL,
1617 `tax_type_id` int(11) NOT NULL default '0',
1618 `rate` double NOT NULL default '0',
1619 `ex_rate` double NOT NULL default '1',
1620 `included_in_price` tinyint(1) NOT NULL default '0',
1621 `net_amount` double NOT NULL default '0',
1622 `amount` double NOT NULL default '0',
1625 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1628 ### Data of table `0_trans_tax_details` ###
1632 ### Structure of table `0_users` ###
1634 DROP TABLE IF EXISTS `0_users`;
1636 CREATE TABLE `0_users` (
1637 `id` SMALLINT(6) AUTO_INCREMENT,
1638 `user_id` varchar(60) NOT NULL default '',
1639 `password` varchar(100) NOT NULL default '',
1640 `real_name` varchar(100) NOT NULL default '',
1641 `role_id` int(11) NOT NULL default '1',
1642 `phone` varchar(30) NOT NULL default '',
1643 `email` varchar(100) default NULL,
1644 `language` varchar(20) default NULL,
1645 `date_format` tinyint(1) NOT NULL default '0',
1646 `date_sep` tinyint(1) NOT NULL default '0',
1647 `tho_sep` tinyint(1) NOT NULL default '0',
1648 `dec_sep` tinyint(1) NOT NULL default '0',
1649 `theme` varchar(20) NOT NULL default 'default',
1650 `page_size` varchar(20) NOT NULL default 'A4',
1651 `prices_dec` smallint(6) NOT NULL default '2',
1652 `qty_dec` smallint(6) NOT NULL default '2',
1653 `rates_dec` smallint(6) NOT NULL default '4',
1654 `percent_dec` smallint(6) NOT NULL default '1',
1655 `show_gl` tinyint(1) NOT NULL default '1',
1656 `show_codes` tinyint(1) NOT NULL default '0',
1657 `show_hints` tinyint(1) NOT NULL default '0',
1658 `last_visit_date` datetime default NULL,
1659 `query_size` tinyint(1) default '10',
1660 `graphic_links` tinyint(1) default '1',
1661 `pos` smallint(6) default '1',
1662 `print_profile` varchar(30) NOT NULL default '1',
1663 `rep_popup` tinyint(1) default '1',
1664 `sticky_doc_date` tinyint(1) default '0',
1665 `startup_tab` varchar(20) NOT NULL default '',
1666 `inactive` tinyint(1) NOT NULL default '0',
1668 UNIQUE KEY (`user_id`)
1669 ) TYPE=MyISAM AUTO_INCREMENT=2;
1672 ### Data of table `0_users` ###
1674 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');
1676 ### Structure of table `0_voided` ###
1678 DROP TABLE IF EXISTS `0_voided`;
1680 CREATE TABLE `0_voided` (
1681 `type` int(11) NOT NULL default '0',
1682 `id` int(11) NOT NULL default '0',
1683 `date_` date NOT NULL default '0000-00-00',
1684 `memo_` tinytext NOT NULL,
1685 UNIQUE KEY `id` (`type`,`id`)
1689 ### Data of table `0_voided` ###
1693 ### Structure of table `0_wo_issue_items` ###
1695 DROP TABLE IF EXISTS `0_wo_issue_items`;
1697 CREATE TABLE `0_wo_issue_items` (
1698 `id` int(11) NOT NULL auto_increment,
1699 `stock_id` varchar(40) default NULL,
1700 `issue_id` int(11) default NULL,
1701 `qty_issued` double default NULL,
1703 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1706 ### Data of table `0_wo_issue_items` ###
1710 ### Structure of table `0_wo_issues` ###
1712 DROP TABLE IF EXISTS `0_wo_issues`;
1714 CREATE TABLE `0_wo_issues` (
1715 `issue_no` int(11) NOT NULL auto_increment,
1716 `workorder_id` int(11) NOT NULL default '0',
1717 `reference` varchar(100) default NULL,
1718 `issue_date` date default NULL,
1719 `loc_code` varchar(5) default NULL,
1720 `workcentre_id` int(11) default NULL,
1721 PRIMARY KEY (`issue_no`)
1722 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1725 ### Data of table `0_wo_issues` ###
1729 ### Structure of table `0_wo_manufacture` ###
1731 DROP TABLE IF EXISTS `0_wo_manufacture`;
1733 CREATE TABLE `0_wo_manufacture` (
1734 `id` int(11) NOT NULL auto_increment,
1735 `reference` varchar(100) default NULL,
1736 `workorder_id` int(11) NOT NULL default '0',
1737 `quantity` double NOT NULL default '0',
1738 `date_` date NOT NULL default '0000-00-00',
1740 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1743 ### Data of table `0_wo_manufacture` ###
1747 ### Structure of table `0_wo_requirements` ###
1749 DROP TABLE IF EXISTS `0_wo_requirements`;
1751 CREATE TABLE `0_wo_requirements` (
1752 `id` int(11) NOT NULL auto_increment,
1753 `workorder_id` int(11) NOT NULL default '0',
1754 `stock_id` char(20) NOT NULL default '',
1755 `workcentre` int(11) NOT NULL default '0',
1756 `units_req` double NOT NULL default '1',
1757 `std_cost` double NOT NULL default '0',
1758 `loc_code` char(5) NOT NULL default '',
1759 `units_issued` double NOT NULL default '0',
1761 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1764 ### Data of table `0_wo_requirements` ###
1768 ### Structure of table `0_workcentres` ###
1770 DROP TABLE IF EXISTS `0_workcentres`;
1772 CREATE TABLE `0_workcentres` (
1773 `id` int(11) NOT NULL auto_increment,
1774 `name` char(40) NOT NULL default '',
1775 `description` char(50) NOT NULL default '',
1776 `inactive` tinyint(1) NOT NULL default '0',
1778 UNIQUE KEY `name` (`name`)
1779 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1782 ### Data of table `0_workcentres` ###
1786 ### Structure of table `0_workorders` ###
1788 DROP TABLE IF EXISTS `0_workorders`;
1790 CREATE TABLE `0_workorders` (
1791 `id` int(11) NOT NULL auto_increment,
1792 `wo_ref` varchar(60) NOT NULL default '',
1793 `loc_code` varchar(5) NOT NULL default '',
1794 `units_reqd` double NOT NULL default '1',
1795 `stock_id` varchar(20) NOT NULL default '',
1796 `date_` date NOT NULL default '0000-00-00',
1797 `type` tinyint(4) NOT NULL default '0',
1798 `required_by` date NOT NULL default '0000-00-00',
1799 `released_date` date NOT NULL default '0000-00-00',
1800 `units_issued` double NOT NULL default '0',
1801 `closed` tinyint(1) NOT NULL default '0',
1802 `released` tinyint(1) NOT NULL default '0',
1803 `additional_costs` double NOT NULL default '0',
1805 UNIQUE KEY `wo_ref` (`wo_ref`)
1806 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1809 ### Data of table `0_workorders` ###
1813 ### Structure of table `0_tags` ###
1815 DROP TABLE IF EXISTS `0_tags`;
1817 CREATE TABLE `0_tags` (
1818 `id` int(11) NOT NULL auto_increment,
1819 `type` smallint(6) NOT NULL,
1820 `name` varchar(30) NOT NULL,
1821 `description` varchar(60) default NULL,
1822 `inactive` tinyint(1) NOT NULL default '0',
1824 UNIQUE KEY(`type`,`name`)
1825 ) TYPE=MyISAM AUTO_INCREMENT=1;
1828 ### Data of table `0_chart_tags` ###
1832 ### Structure of table `0_tag_associations` ###
1834 DROP TABLE IF EXISTS `0_tag_associations`;
1836 CREATE TABLE `0_tag_associations` (
1837 `record_id` varchar(11) NOT NULL,
1838 `tag_id` int(11) NOT NULL,
1839 UNIQUE KEY(`record_id`,`tag_id`)
1843 ### Data of table `0_tag_associations` ###
1845 DROP TABLE IF EXISTS `0_useronline` ;
1847 CREATE TABLE `0_useronline` (
1848 `id` int(11) NOT NULL AUTO_INCREMENT ,
1849 `timestamp` int(15) NOT NULL default '0',
1850 `ip` varchar(40) NOT NULL default '',
1851 `file` varchar(100) NOT NULL default '',
1852 PRIMARY KEY `id` (`id`) ,
1854 ) TYPE=MYISAM AUTO_INCREMENT=1;