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', '1', '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');
655 ### Structure of table `0_gl_trans` ###
657 DROP TABLE IF EXISTS `0_gl_trans`;
659 CREATE TABLE `0_gl_trans` (
660 `counter` int(11) NOT NULL auto_increment,
661 `type` smallint(6) NOT NULL default '0',
662 `type_no` bigint(16) NOT NULL default '1',
663 `tran_date` date NOT NULL default '0000-00-00',
664 `account` varchar(11) NOT NULL default '',
665 `memo_` tinytext NOT NULL,
666 `amount` double NOT NULL default '0',
667 `dimension_id` int(11) NOT NULL default '0',
668 `dimension2_id` int(11) NOT NULL default '0',
669 `person_type_id` int(11) default NULL,
670 `person_id` tinyblob,
671 PRIMARY KEY (`counter`),
672 KEY `Type_and_Number` (`type`,`type_no`)
673 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
676 ### Data of table `0_gl_trans` ###
680 ### Structure of table `0_grn_batch` ###
682 DROP TABLE IF EXISTS `0_grn_batch`;
684 CREATE TABLE `0_grn_batch` (
685 `id` int(11) NOT NULL auto_increment,
686 `supplier_id` int(11) NOT NULL default '0',
687 `purch_order_no` int(11) default NULL,
688 `reference` varchar(60) NOT NULL default '',
689 `delivery_date` date NOT NULL default '0000-00-00',
690 `loc_code` varchar(5) default NULL,
692 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
695 ### Data of table `0_grn_batch` ###
699 ### Structure of table `0_grn_items` ###
701 DROP TABLE IF EXISTS `0_grn_items`;
703 CREATE TABLE `0_grn_items` (
704 `id` int(11) NOT NULL auto_increment,
705 `grn_batch_id` int(11) default NULL,
706 `po_detail_item` int(11) NOT NULL default '0',
707 `item_code` varchar(20) NOT NULL default '',
708 `description` tinytext,
709 `qty_recd` double NOT NULL default '0',
710 `quantity_inv` double NOT NULL default '0',
712 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
715 ### Data of table `0_grn_items` ###
719 ### Structure of table `0_groups` ###
721 DROP TABLE IF EXISTS `0_groups`;
723 CREATE TABLE `0_groups` (
724 `id` smallint(6) unsigned NOT NULL auto_increment,
725 `description` varchar(60) NOT NULL default '',
726 `inactive` tinyint(1) NOT NULL default '0',
728 UNIQUE KEY `description` (`description`)
729 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
732 ### Data of table `0_groups` ###
734 INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
735 INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
736 INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
739 ### Structure of table `0_item_codes` ###
741 DROP TABLE IF EXISTS `0_item_codes`;
743 CREATE TABLE `0_item_codes` (
744 `id` int(11) unsigned NOT NULL auto_increment,
745 `item_code` varchar(20) NOT NULL,
746 `stock_id` varchar(20) NOT NULL,
747 `description` varchar(200) NOT NULL default '',
748 `category_id` smallint(6) unsigned NOT NULL,
749 `quantity` double NOT NULL default '1',
750 `is_foreign` tinyint(1) NOT NULL default '0',
751 `inactive` tinyint(1) NOT NULL default '0',
753 UNIQUE KEY `stock_id` (`stock_id`,`item_code`)
754 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
757 ### Data of table `0_item_codes` ###
761 ### Structure of table `0_item_tax_type_exemptions` ###
763 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
765 CREATE TABLE `0_item_tax_type_exemptions` (
766 `item_tax_type_id` int(11) NOT NULL default '0',
767 `tax_type_id` int(11) NOT NULL default '0',
768 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
772 ### Data of table `0_item_tax_type_exemptions` ###
776 ### Structure of table `0_item_tax_types` ###
778 DROP TABLE IF EXISTS `0_item_tax_types`;
780 CREATE TABLE `0_item_tax_types` (
781 `id` int(11) NOT NULL auto_increment,
782 `name` varchar(60) NOT NULL default '',
783 `exempt` tinyint(1) NOT NULL default '0',
784 `inactive` tinyint(1) NOT NULL default '0',
786 UNIQUE KEY `name` (`name`)
787 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
790 ### Data of table `0_item_tax_types` ###
792 INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0', '0');
795 ### Structure of table `0_item_units` ###
797 DROP TABLE IF EXISTS `0_item_units`;
799 CREATE TABLE `0_item_units` (
800 `abbr` varchar(20) NOT NULL,
801 `name` varchar(40) NOT NULL,
802 `decimals` tinyint(2) NOT NULL,
803 `inactive` tinyint(1) NOT NULL default '0',
804 PRIMARY KEY (`abbr`),
805 UNIQUE KEY `name` (`name`)
809 ### Data of table `0_item_units` ###
811 INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0');
814 ### Structure of table `0_loc_stock` ###
816 DROP TABLE IF EXISTS `0_loc_stock`;
818 CREATE TABLE `0_loc_stock` (
819 `loc_code` char(5) NOT NULL default '',
820 `stock_id` char(20) NOT NULL default '',
821 `reorder_level` bigint(20) NOT NULL default '0',
822 PRIMARY KEY (`loc_code`,`stock_id`),
823 KEY `stock_id` (`stock_id`)
827 ### Data of table `0_loc_stock` ###
831 ### Structure of table `0_locations` ###
833 DROP TABLE IF EXISTS `0_locations`;
835 CREATE TABLE `0_locations` (
836 `loc_code` varchar(5) NOT NULL default '',
837 `location_name` varchar(60) NOT NULL default '',
838 `delivery_address` tinytext NOT NULL,
839 `phone` varchar(30) NOT NULL default '',
840 `phone2` varchar(30) NOT NULL default '',
841 `fax` varchar(30) NOT NULL default '',
842 `email` varchar(100) NOT NULL default '',
843 `contact` varchar(30) NOT NULL default '',
844 `inactive` tinyint(1) NOT NULL default '0',
845 PRIMARY KEY (`loc_code`)
849 ### Data of table `0_locations` ###
851 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '', '0');
854 ### Structure of table `0_movement_types` ###
856 DROP TABLE IF EXISTS `0_movement_types`;
858 CREATE TABLE `0_movement_types` (
859 `id` int(11) NOT NULL auto_increment,
860 `name` varchar(60) NOT NULL default '',
861 `inactive` tinyint(1) NOT NULL default '0',
863 UNIQUE KEY `name` (`name`)
864 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
867 ### Data of table `0_movement_types` ###
869 INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment', '0');
872 ### Structure of table `0_payment_terms` ###
874 DROP TABLE IF EXISTS `0_payment_terms`;
876 CREATE TABLE `0_payment_terms` (
877 `terms_indicator` int(11) NOT NULL auto_increment,
878 `terms` char(80) NOT NULL default '',
879 `days_before_due` smallint(6) NOT NULL default '0',
880 `day_in_following_month` smallint(6) NOT NULL default '0',
881 `inactive` tinyint(1) NOT NULL default '0',
882 PRIMARY KEY (`terms_indicator`),
883 UNIQUE KEY `terms` (`terms`)
884 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
887 ### Data of table `0_payment_terms` ###
889 INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0');
890 INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0');
891 INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0');
892 INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0');
895 ### Structure of table `0_prices` ###
897 DROP TABLE IF EXISTS `0_prices`;
899 CREATE TABLE `0_prices` (
900 `id` int(11) NOT NULL auto_increment,
901 `stock_id` varchar(20) NOT NULL default '',
902 `sales_type_id` int(11) NOT NULL default '0',
903 `curr_abrev` char(3) NOT NULL default '',
904 `price` double NOT NULL default '0',
906 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
907 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
910 ### Data of table `0_prices` ###
914 ### Structure of table `0_print_profiles` ###
916 DROP TABLE IF EXISTS `0_print_profiles`;
918 CREATE TABLE `0_print_profiles` (
919 `id` smallint(6) unsigned NOT NULL auto_increment,
920 `profile` varchar(30) NOT NULL,
921 `report` varchar(5) default NULL,
922 `printer` tinyint(3) unsigned default NULL,
924 UNIQUE KEY `profile` (`profile`,`report`)
925 ) TYPE=MyISAM AUTO_INCREMENT=10 ;
928 ### Data of table `0_print_profiles` ###
930 INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0');
931 INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0');
932 INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2');
933 INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2');
934 INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2');
935 INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2');
936 INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2');
937 INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2');
938 INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2');
941 ### Structure of table `0_printers` ###
943 DROP TABLE IF EXISTS `0_printers`;
945 CREATE TABLE `0_printers` (
946 `id` tinyint(3) unsigned NOT NULL auto_increment,
947 `name` varchar(20) NOT NULL,
948 `description` varchar(60) NOT NULL,
949 `queue` varchar(20) NOT NULL,
950 `host` varchar(40) NOT NULL,
951 `port` smallint(11) unsigned NOT NULL,
952 `timeout` tinyint(3) unsigned NOT NULL,
954 UNIQUE KEY `name` (`name`)
955 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
958 ### Data of table `0_printers` ###
960 INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20');
961 INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5');
962 INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
965 ### Structure of table `0_purch_data` ###
967 DROP TABLE IF EXISTS `0_purch_data`;
969 CREATE TABLE `0_purch_data` (
970 `supplier_id` int(11) NOT NULL default '0',
971 `stock_id` char(20) NOT NULL default '',
972 `price` double NOT NULL default '0',
973 `suppliers_uom` char(50) NOT NULL default '',
974 `conversion_factor` double NOT NULL default '1',
975 `supplier_description` char(50) NOT NULL default '',
976 PRIMARY KEY (`supplier_id`,`stock_id`)
980 ### Data of table `0_purch_data` ###
984 ### Structure of table `0_purch_order_details` ###
986 DROP TABLE IF EXISTS `0_purch_order_details`;
988 CREATE TABLE `0_purch_order_details` (
989 `po_detail_item` int(11) NOT NULL auto_increment,
990 `order_no` int(11) NOT NULL default '0',
991 `item_code` varchar(20) NOT NULL default '',
992 `description` tinytext,
993 `delivery_date` date NOT NULL default '0000-00-00',
994 `qty_invoiced` double NOT NULL default '0',
995 `unit_price` double NOT NULL default '0',
996 `act_price` double NOT NULL default '0',
997 `std_cost_unit` double NOT NULL default '0',
998 `quantity_ordered` double NOT NULL default '0',
999 `quantity_received` double NOT NULL default '0',
1000 PRIMARY KEY (`po_detail_item`)
1001 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1004 ### Data of table `0_purch_order_details` ###
1008 ### Structure of table `0_purch_orders` ###
1010 DROP TABLE IF EXISTS `0_purch_orders`;
1012 CREATE TABLE `0_purch_orders` (
1013 `order_no` int(11) NOT NULL auto_increment,
1014 `supplier_id` int(11) NOT NULL default '0',
1015 `comments` tinytext,
1016 `ord_date` date NOT NULL default '0000-00-00',
1017 `reference` tinytext NOT NULL,
1018 `requisition_no` tinytext,
1019 `into_stock_location` varchar(5) NOT NULL default '',
1020 `delivery_address` tinytext NOT NULL,
1021 PRIMARY KEY (`order_no`)
1022 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1025 ### Data of table `0_purch_orders` ###
1029 ### Structure of table `0_quick_entries` ###
1031 DROP TABLE IF EXISTS `0_quick_entries`;
1033 CREATE TABLE `0_quick_entries` (
1034 `id` smallint(6) unsigned NOT NULL auto_increment,
1035 `type` tinyint(1) NOT NULL default '0',
1036 `description` varchar(60) NOT NULL,
1037 `base_amount` double NOT NULL default '0',
1038 `base_desc` varchar(60) default NULL,
1040 KEY `description` (`description`)
1041 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
1044 ### Data of table `0_quick_entries` ###
1046 INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount');
1047 INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount');
1048 INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount');
1051 ### Structure of table `0_quick_entry_lines` ###
1053 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1055 CREATE TABLE `0_quick_entry_lines` (
1056 `id` smallint(6) unsigned NOT NULL auto_increment,
1057 `qid` smallint(6) unsigned NOT NULL,
1058 `amount` double default '0',
1059 `action` varchar(2) NOT NULL,
1060 `dest_id` varchar(11) NOT NULL,
1061 `dimension_id` smallint(6) unsigned default NULL,
1062 `dimension2_id` smallint(6) unsigned default NULL,
1065 ) TYPE=MyISAM AUTO_INCREMENT=7 ;
1068 ### Data of table `0_quick_entry_lines` ###
1070 INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', 't-', '1', '0', '0');
1071 INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', 't-', '1', '0', '0');
1072 INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', 't-', '1', '0', '0');
1073 INSERT INTO `0_quick_entry_lines` VALUES ('4', '3', '0', '=', '4010', '0', '0');
1074 INSERT INTO `0_quick_entry_lines` VALUES ('5', '1', '0', '=', '5765', '0', '0');
1075 INSERT INTO `0_quick_entry_lines` VALUES ('6', '2', '0', '=', '5780', '0', '0');
1078 ### Structure of table `0_recurrent_invoices` ###
1080 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1082 CREATE TABLE `0_recurrent_invoices` (
1083 `id` smallint(6) unsigned NOT NULL auto_increment,
1084 `description` varchar(60) NOT NULL default '',
1085 `order_no` int(11) unsigned NOT NULL,
1086 `debtor_no` int(11) unsigned default NULL,
1087 `group_no` smallint(6) unsigned default NULL,
1088 `days` int(11) NOT NULL default '0',
1089 `monthly` int(11) NOT NULL default '0',
1090 `begin` date NOT NULL default '0000-00-00',
1091 `end` date NOT NULL default '0000-00-00',
1092 `last_sent` date NOT NULL default '0000-00-00',
1094 UNIQUE KEY `description` (`description`)
1095 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1098 ### Data of table `0_recurrent_invoices` ###
1102 ### Structure of table `0_refs` ###
1104 DROP TABLE IF EXISTS `0_refs`;
1106 CREATE TABLE `0_refs` (
1107 `id` int(11) NOT NULL default '0',
1108 `type` int(11) NOT NULL default '0',
1109 `reference` varchar(100) NOT NULL default '',
1110 PRIMARY KEY (`id`,`type`)
1114 ### Data of table `0_refs` ###
1118 ### Structure of table `0_sales_order_details` ###
1120 DROP TABLE IF EXISTS `0_sales_order_details`;
1122 CREATE TABLE `0_sales_order_details` (
1123 `id` int(11) NOT NULL auto_increment,
1124 `order_no` int(11) NOT NULL default '0',
1125 `trans_type` smallint(6) NOT NULL default '30',
1126 `stk_code` varchar(20) NOT NULL default '',
1127 `description` tinytext,
1128 `qty_sent` double NOT NULL default '0',
1129 `unit_price` double NOT NULL default '0',
1130 `quantity` double NOT NULL default '0',
1131 `discount_percent` double NOT NULL default '0',
1133 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1136 ### Data of table `0_sales_order_details` ###
1140 ### Structure of table `0_sales_orders` ###
1142 DROP TABLE IF EXISTS `0_sales_orders`;
1144 CREATE TABLE `0_sales_orders` (
1145 `order_no` int(11) NOT NULL,
1146 `trans_type` smallint(6) NOT NULL default '30',
1147 `version` tinyint(1) unsigned NOT NULL default '0',
1148 `type` tinyint(1) NOT NULL default '0',
1149 `debtor_no` int(11) NOT NULL default '0',
1150 `branch_code` int(11) NOT NULL default '0',
1151 `reference` varchar(100) NOT NULL default '',
1152 `customer_ref` tinytext NOT NULL,
1153 `comments` tinytext,
1154 `ord_date` date NOT NULL default '0000-00-00',
1155 `order_type` int(11) NOT NULL default '0',
1156 `ship_via` int(11) NOT NULL default '0',
1157 `delivery_address` tinytext NOT NULL,
1158 `contact_phone` varchar(30) default NULL,
1159 `contact_email` varchar(100) default NULL,
1160 `deliver_to` tinytext NOT NULL,
1161 `freight_cost` double NOT NULL default '0',
1162 `from_stk_loc` varchar(5) NOT NULL default '',
1163 `delivery_date` date NOT NULL default '0000-00-00',
1164 PRIMARY KEY (`trans_type`, `order_no`)
1168 ### Data of table `0_sales_orders` ###
1172 ### Structure of table `0_sales_pos` ###
1174 DROP TABLE IF EXISTS `0_sales_pos`;
1176 CREATE TABLE `0_sales_pos` (
1177 `id` smallint(6) unsigned NOT NULL auto_increment,
1178 `pos_name` varchar(30) NOT NULL,
1179 `cash_sale` tinyint(1) NOT NULL,
1180 `credit_sale` tinyint(1) NOT NULL,
1181 `pos_location` varchar(5) NOT NULL,
1182 `pos_account` smallint(6) unsigned NOT NULL,
1183 `inactive` tinyint(1) NOT NULL default '0',
1185 UNIQUE KEY `pos_name` (`pos_name`)
1186 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1189 ### Data of table `0_sales_pos` ###
1191 INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '2', '0');
1194 ### Structure of table `0_sales_types` ###
1196 DROP TABLE IF EXISTS `0_sales_types`;
1198 CREATE TABLE `0_sales_types` (
1199 `id` int(11) NOT NULL auto_increment,
1200 `sales_type` char(50) NOT NULL default '',
1201 `tax_included` int(1) NOT NULL default '0',
1202 `factor` double NOT NULL default '1',
1203 `inactive` tinyint(1) NOT NULL default '0',
1205 UNIQUE KEY `sales_type` (`sales_type`)
1206 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
1209 ### Data of table `0_sales_types` ###
1211 INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '1', '1', '0');
1212 INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '0.7', '0');
1215 ### Structure of table `0_salesman` ###
1217 DROP TABLE IF EXISTS `0_salesman`;
1219 CREATE TABLE `0_salesman` (
1220 `salesman_code` int(11) NOT NULL auto_increment,
1221 `salesman_name` char(60) NOT NULL default '',
1222 `salesman_phone` char(30) NOT NULL default '',
1223 `salesman_fax` char(30) NOT NULL default '',
1224 `salesman_email` varchar(100) NOT NULL default '',
1225 `provision` double NOT NULL default '0',
1226 `break_pt` double NOT NULL default '0',
1227 `provision2` double NOT NULL default '0',
1228 `inactive` tinyint(1) NOT NULL default '0',
1229 PRIMARY KEY (`salesman_code`),
1230 UNIQUE KEY `salesman_name` (`salesman_name`)
1231 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1234 ### Data of table `0_salesman` ###
1236 INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1238 ### Structure of table `0_security_roles` ###
1240 DROP TABLE IF EXISTS `0_security_roles`;
1241 CREATE TABLE IF NOT EXISTS `0_security_roles` (
1242 `id` int(11) NOT NULL auto_increment,
1243 `role` varchar(30) NOT NULL,
1244 `description` varchar(50) default NULL,
1247 `inactive` tinyint(1) NOT NULL default '0',
1249 UNIQUE KEY `role` (`role`)
1250 ) TYPE=MyISAM AUTO_INCREMENT=11 ;
1253 -- Data of table `0_security_roles`
1256 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);
1257 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);
1258 INSERT INTO `0_security_roles` VALUES (3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873', 0);
1259 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);
1260 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);
1261 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);
1262 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);
1263 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);
1264 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);
1265 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);
1267 ### Structure of table `0_shippers` ###
1269 DROP TABLE IF EXISTS `0_shippers`;
1271 CREATE TABLE `0_shippers` (
1272 `shipper_id` int(11) NOT NULL auto_increment,
1273 `shipper_name` varchar(60) NOT NULL default '',
1274 `phone` varchar(30) NOT NULL default '',
1275 `phone2` varchar(30) NOT NULL default '',
1276 `contact` tinytext NOT NULL,
1277 `address` tinytext NOT NULL,
1278 `inactive` tinyint(1) NOT NULL default '0',
1279 PRIMARY KEY (`shipper_id`),
1280 UNIQUE KEY `name` (`shipper_name`)
1281 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1284 ### Data of table `0_shippers` ###
1286 INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '', '0');
1289 ### Structure of table `0_sql_trail` ###
1291 DROP TABLE IF EXISTS `0_sql_trail`;
1293 CREATE TABLE `0_sql_trail` (
1294 `id` int(11) unsigned NOT NULL auto_increment,
1295 `sql` text NOT NULL,
1296 `result` tinyint(1) NOT NULL,
1297 `msg` varchar(255) NOT NULL,
1299 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1302 ### Data of table `0_sql_trail` ###
1306 ### Structure of table `0_stock_category` ###
1308 DROP TABLE IF EXISTS `0_stock_category`;
1310 CREATE TABLE `0_stock_category` (
1311 `category_id` int(11) NOT NULL auto_increment,
1312 `description` varchar(60) NOT NULL default '',
1313 `dflt_tax_type` int(11) NOT NULL default '1',
1314 `dflt_units` varchar(20) NOT NULL default 'each',
1315 `dflt_mb_flag` char(1) NOT NULL default 'B',
1316 `dflt_sales_act` varchar(11) NOT NULL default '',
1317 `dflt_cogs_act` varchar(11) NOT NULL default '',
1318 `dflt_inventory_act` varchar(11) NOT NULL default '',
1319 `dflt_adjustment_act` varchar(11) NOT NULL default '',
1320 `dflt_assembly_act` varchar(11) NOT NULL default '',
1321 `dflt_dim1` int(11) default NULL,
1322 `dflt_dim2` int(11) default NULL,
1323 `inactive` tinyint(1) NOT NULL default '0',
1324 `dflt_no_sale` tinyint(1) NOT NULL default '0',
1325 PRIMARY KEY (`category_id`),
1326 UNIQUE KEY `description` (`description`)
1327 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
1330 ### Data of table `0_stock_category` ###
1332 INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1333 INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1334 INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1335 INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1338 ### Structure of table `0_stock_master` ###
1340 DROP TABLE IF EXISTS `0_stock_master`;
1342 CREATE TABLE `0_stock_master` (
1343 `stock_id` varchar(20) NOT NULL default '',
1344 `category_id` int(11) NOT NULL default '0',
1345 `tax_type_id` int(11) NOT NULL default '0',
1346 `description` varchar(200) NOT NULL default '',
1347 `long_description` tinytext NOT NULL,
1348 `units` varchar(20) NOT NULL default 'each',
1349 `mb_flag` char(1) NOT NULL default 'B',
1350 `sales_account` varchar(11) NOT NULL default '',
1351 `cogs_account` varchar(11) NOT NULL default '',
1352 `inventory_account` varchar(11) NOT NULL default '',
1353 `adjustment_account` varchar(11) NOT NULL default '',
1354 `assembly_account` varchar(11) NOT NULL default '',
1355 `dimension_id` int(11) default NULL,
1356 `dimension2_id` int(11) default NULL,
1357 `actual_cost` double NOT NULL default '0',
1358 `last_cost` double NOT NULL default '0',
1359 `material_cost` double NOT NULL default '0',
1360 `labour_cost` double NOT NULL default '0',
1361 `overhead_cost` double NOT NULL default '0',
1362 `inactive` tinyint(1) NOT NULL default '0',
1363 `no_sale` tinyint(1) NOT NULL default '0',
1364 PRIMARY KEY (`stock_id`)
1368 ### Data of table `0_stock_master` ###
1372 ### Structure of table `0_stock_moves` ###
1374 DROP TABLE IF EXISTS `0_stock_moves`;
1376 CREATE TABLE `0_stock_moves` (
1377 `trans_id` int(11) NOT NULL auto_increment,
1378 `trans_no` int(11) NOT NULL default '0',
1379 `stock_id` char(20) NOT NULL default '',
1380 `type` smallint(6) NOT NULL default '0',
1381 `loc_code` char(5) NOT NULL default '',
1382 `tran_date` date NOT NULL default '0000-00-00',
1383 `person_id` int(11) default NULL,
1384 `price` double NOT NULL default '0',
1385 `reference` char(40) NOT NULL default '',
1386 `qty` double NOT NULL default '1',
1387 `discount_percent` double NOT NULL default '0',
1388 `standard_cost` double NOT NULL default '0',
1389 `visible` tinyint(1) NOT NULL default '1',
1390 PRIMARY KEY (`trans_id`),
1391 KEY `type` (`type`,`trans_no`)
1392 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1395 ### Data of table `0_stock_moves` ###
1399 ### Structure of table `0_supp_allocations` ###
1401 DROP TABLE IF EXISTS `0_supp_allocations`;
1403 CREATE TABLE `0_supp_allocations` (
1404 `id` int(11) NOT NULL auto_increment,
1405 `amt` double unsigned default NULL,
1406 `date_alloc` date NOT NULL default '0000-00-00',
1407 `trans_no_from` int(11) default NULL,
1408 `trans_type_from` int(11) default NULL,
1409 `trans_no_to` int(11) default NULL,
1410 `trans_type_to` int(11) default NULL,
1412 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1415 ### Data of table `0_supp_allocations` ###
1419 ### Structure of table `0_supp_invoice_items` ###
1421 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1423 CREATE TABLE `0_supp_invoice_items` (
1424 `id` int(11) NOT NULL auto_increment,
1425 `supp_trans_no` int(11) default NULL,
1426 `supp_trans_type` int(11) default NULL,
1427 `gl_code` varchar(11) NOT NULL default '0',
1428 `grn_item_id` int(11) default NULL,
1429 `po_detail_item_id` int(11) default NULL,
1430 `stock_id` varchar(20) NOT NULL default '',
1431 `description` tinytext,
1432 `quantity` double NOT NULL default '0',
1433 `unit_price` double NOT NULL default '0',
1434 `unit_tax` double NOT NULL default '0',
1437 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1440 ### Data of table `0_supp_invoice_items` ###
1444 ### Structure of table `0_supp_trans` ###
1446 DROP TABLE IF EXISTS `0_supp_trans`;
1448 CREATE TABLE `0_supp_trans` (
1449 `trans_no` int(11) unsigned NOT NULL default '0',
1450 `type` smallint(6) unsigned NOT NULL default '0',
1451 `supplier_id` int(11) unsigned default NULL,
1452 `reference` tinytext NOT NULL,
1453 `supp_reference` varchar(60) NOT NULL default '',
1454 `tran_date` date NOT NULL default '0000-00-00',
1455 `due_date` date NOT NULL default '0000-00-00',
1456 `ov_amount` double NOT NULL default '0',
1457 `ov_discount` double NOT NULL default '0',
1458 `ov_gst` double NOT NULL default '0',
1459 `rate` double NOT NULL default '1',
1460 `alloc` double NOT NULL default '0',
1461 PRIMARY KEY (`trans_no`,`type`),
1462 KEY `supplier_id` (`supplier_id`),
1463 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1468 ### Data of table `0_supp_trans` ###
1472 ### Structure of table `0_suppliers` ###
1474 DROP TABLE IF EXISTS `0_suppliers`;
1476 CREATE TABLE `0_suppliers` (
1477 `supplier_id` int(11) NOT NULL auto_increment,
1478 `supp_name` varchar(60) NOT NULL default '',
1479 `supp_ref` varchar(30) NOT NULL default '',
1480 `address` tinytext NOT NULL,
1481 `supp_address` tinytext NOT NULL,
1482 `phone` varchar(30) NOT NULL default '',
1483 `phone2` varchar(30) NOT NULL default '',
1484 `fax` varchar(30) NOT NULL default '',
1485 `gst_no` varchar(25) NOT NULL default '',
1486 `contact` varchar(60) NOT NULL default '',
1487 `supp_account_no` varchar(40) NOT NULL default '',
1488 `email` varchar(100) NOT NULL default '',
1489 `website` varchar(100) NOT NULL default '',
1490 `bank_account` varchar(60) NOT NULL default '',
1491 `curr_code` char(3) default NULL,
1492 `payment_terms` int(11) default NULL,
1493 `dimension_id` int(11) default '0',
1494 `dimension2_id` int(11) default '0',
1495 `tax_group_id` int(11) default NULL,
1496 `credit_limit` double NOT NULL default '0',
1497 `purchase_account` varchar(11) default NULL,
1498 `payable_account` varchar(11) default NULL,
1499 `payment_discount_account` varchar(11) default NULL,
1500 `notes` tinytext NOT NULL,
1501 `inactive` tinyint(1) NOT NULL default '0',
1502 PRIMARY KEY (`supplier_id`)
1503 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1506 ### Data of table `0_suppliers` ###
1510 ### Structure of table `0_sys_types` ###
1512 DROP TABLE IF EXISTS `0_sys_types`;
1514 CREATE TABLE `0_sys_types` (
1515 `type_id` smallint(6) NOT NULL default '0',
1516 `type_no` int(11) NOT NULL default '1',
1517 `next_reference` varchar(100) NOT NULL default '',
1518 PRIMARY KEY (`type_id`)
1522 ### Data of table `0_sys_types` ###
1524 INSERT INTO `0_sys_types` VALUES ('0', '17', '1');
1525 INSERT INTO `0_sys_types` VALUES ('1', '7', '1');
1526 INSERT INTO `0_sys_types` VALUES ('2', '4', '1');
1527 INSERT INTO `0_sys_types` VALUES ('4', '3', '1');
1528 INSERT INTO `0_sys_types` VALUES ('10', '16', '1');
1529 INSERT INTO `0_sys_types` VALUES ('11', '2', '1');
1530 INSERT INTO `0_sys_types` VALUES ('12', '6', '1');
1531 INSERT INTO `0_sys_types` VALUES ('13', '1', '1');
1532 INSERT INTO `0_sys_types` VALUES ('16', '2', '1');
1533 INSERT INTO `0_sys_types` VALUES ('17', '2', '1');
1534 INSERT INTO `0_sys_types` VALUES ('18', '1', '1');
1535 INSERT INTO `0_sys_types` VALUES ('20', '6', '1');
1536 INSERT INTO `0_sys_types` VALUES ('21', '1', '1');
1537 INSERT INTO `0_sys_types` VALUES ('22', '3', '1');
1538 INSERT INTO `0_sys_types` VALUES ('25', '1', '1');
1539 INSERT INTO `0_sys_types` VALUES ('26', '1', '1');
1540 INSERT INTO `0_sys_types` VALUES ('28', '1', '1');
1541 INSERT INTO `0_sys_types` VALUES ('29', '1', '1');
1542 INSERT INTO `0_sys_types` VALUES ('30', '0', '1');
1543 INSERT INTO `0_sys_types` VALUES ('32', '0', '1');
1544 INSERT INTO `0_sys_types` VALUES ('35', '1', '1');
1545 INSERT INTO `0_sys_types` VALUES ('40', '1', '1');
1548 ### Structure of table `0_tax_group_items` ###
1550 DROP TABLE IF EXISTS `0_tax_group_items`;
1552 CREATE TABLE `0_tax_group_items` (
1553 `tax_group_id` int(11) NOT NULL default '0',
1554 `tax_type_id` int(11) NOT NULL default '0',
1555 `rate` double NOT NULL default '0',
1556 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1560 ### Data of table `0_tax_group_items` ###
1562 INSERT INTO `0_tax_group_items` VALUES ('1', '1', '5');
1565 ### Structure of table `0_tax_groups` ###
1567 DROP TABLE IF EXISTS `0_tax_groups`;
1569 CREATE TABLE `0_tax_groups` (
1570 `id` int(11) NOT NULL auto_increment,
1571 `name` varchar(60) NOT NULL default '',
1572 `tax_shipping` tinyint(1) NOT NULL default '0',
1573 `inactive` tinyint(1) NOT NULL default '0',
1575 UNIQUE KEY `name` (`name`)
1576 ) TYPE=InnoDB AUTO_INCREMENT=3 ;
1579 ### Data of table `0_tax_groups` ###
1581 INSERT INTO `0_tax_groups` VALUES ('1', 'Tax', '0', '0');
1582 INSERT INTO `0_tax_groups` VALUES ('2', 'Tax Exempt', '0', '0');
1585 ### Structure of table `0_tax_types` ###
1587 DROP TABLE IF EXISTS `0_tax_types`;
1589 CREATE TABLE `0_tax_types` (
1590 `id` int(11) NOT NULL auto_increment,
1591 `rate` double NOT NULL default '0',
1592 `sales_gl_code` varchar(11) NOT NULL default '',
1593 `purchasing_gl_code` varchar(11) NOT NULL default '',
1594 `name` varchar(60) NOT NULL default '',
1595 `inactive` tinyint(1) NOT NULL default '0',
1597 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
1600 ### Data of table `0_tax_types` ###
1602 INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2145', 'Tax', '0');
1605 ### Structure of table `0_trans_tax_details` ###
1607 DROP TABLE IF EXISTS `0_trans_tax_details`;
1609 CREATE TABLE `0_trans_tax_details` (
1610 `id` int(11) NOT NULL auto_increment,
1611 `trans_type` smallint(6) default NULL,
1612 `trans_no` int(11) default NULL,
1613 `tran_date` date NOT NULL,
1614 `tax_type_id` int(11) NOT NULL default '0',
1615 `rate` double NOT NULL default '0',
1616 `ex_rate` double NOT NULL default '1',
1617 `included_in_price` tinyint(1) NOT NULL default '0',
1618 `net_amount` double NOT NULL default '0',
1619 `amount` double NOT NULL default '0',
1622 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1625 ### Data of table `0_trans_tax_details` ###
1629 ### Structure of table `0_users` ###
1631 DROP TABLE IF EXISTS `0_users`;
1633 CREATE TABLE `0_users` (
1634 `id` SMALLINT(6) AUTO_INCREMENT,
1635 `user_id` varchar(60) NOT NULL default '',
1636 `password` varchar(100) NOT NULL default '',
1637 `real_name` varchar(100) NOT NULL default '',
1638 `role_id` int(11) NOT NULL default '1',
1639 `phone` varchar(30) NOT NULL default '',
1640 `email` varchar(100) default NULL,
1641 `language` varchar(20) default NULL,
1642 `date_format` tinyint(1) NOT NULL default '0',
1643 `date_sep` tinyint(1) NOT NULL default '0',
1644 `tho_sep` tinyint(1) NOT NULL default '0',
1645 `dec_sep` tinyint(1) NOT NULL default '0',
1646 `theme` varchar(20) NOT NULL default 'default',
1647 `page_size` varchar(20) NOT NULL default 'A4',
1648 `prices_dec` smallint(6) NOT NULL default '2',
1649 `qty_dec` smallint(6) NOT NULL default '2',
1650 `rates_dec` smallint(6) NOT NULL default '4',
1651 `percent_dec` smallint(6) NOT NULL default '1',
1652 `show_gl` tinyint(1) NOT NULL default '1',
1653 `show_codes` tinyint(1) NOT NULL default '0',
1654 `show_hints` tinyint(1) NOT NULL default '0',
1655 `last_visit_date` datetime default NULL,
1656 `query_size` tinyint(1) default '10',
1657 `graphic_links` tinyint(1) default '1',
1658 `pos` smallint(6) default '1',
1659 `print_profile` varchar(30) NOT NULL default '1',
1660 `rep_popup` tinyint(1) default '1',
1661 `sticky_doc_date` tinyint(1) default '0',
1662 `startup_tab` varchar(20) NOT NULL default '',
1663 `inactive` tinyint(1) NOT NULL default '0',
1665 UNIQUE KEY (`user_id`)
1666 ) TYPE=MyISAM AUTO_INCREMENT=2;
1669 ### Data of table `0_users` ###
1671 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');
1673 ### Structure of table `0_voided` ###
1675 DROP TABLE IF EXISTS `0_voided`;
1677 CREATE TABLE `0_voided` (
1678 `type` int(11) NOT NULL default '0',
1679 `id` int(11) NOT NULL default '0',
1680 `date_` date NOT NULL default '0000-00-00',
1681 `memo_` tinytext NOT NULL,
1682 UNIQUE KEY `id` (`type`,`id`)
1686 ### Data of table `0_voided` ###
1690 ### Structure of table `0_wo_issue_items` ###
1692 DROP TABLE IF EXISTS `0_wo_issue_items`;
1694 CREATE TABLE `0_wo_issue_items` (
1695 `id` int(11) NOT NULL auto_increment,
1696 `stock_id` varchar(40) default NULL,
1697 `issue_id` int(11) default NULL,
1698 `qty_issued` double default NULL,
1700 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1703 ### Data of table `0_wo_issue_items` ###
1707 ### Structure of table `0_wo_issues` ###
1709 DROP TABLE IF EXISTS `0_wo_issues`;
1711 CREATE TABLE `0_wo_issues` (
1712 `issue_no` int(11) NOT NULL auto_increment,
1713 `workorder_id` int(11) NOT NULL default '0',
1714 `reference` varchar(100) default NULL,
1715 `issue_date` date default NULL,
1716 `loc_code` varchar(5) default NULL,
1717 `workcentre_id` int(11) default NULL,
1718 PRIMARY KEY (`issue_no`)
1719 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1722 ### Data of table `0_wo_issues` ###
1726 ### Structure of table `0_wo_manufacture` ###
1728 DROP TABLE IF EXISTS `0_wo_manufacture`;
1730 CREATE TABLE `0_wo_manufacture` (
1731 `id` int(11) NOT NULL auto_increment,
1732 `reference` varchar(100) default NULL,
1733 `workorder_id` int(11) NOT NULL default '0',
1734 `quantity` double NOT NULL default '0',
1735 `date_` date NOT NULL default '0000-00-00',
1737 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1740 ### Data of table `0_wo_manufacture` ###
1744 ### Structure of table `0_wo_requirements` ###
1746 DROP TABLE IF EXISTS `0_wo_requirements`;
1748 CREATE TABLE `0_wo_requirements` (
1749 `id` int(11) NOT NULL auto_increment,
1750 `workorder_id` int(11) NOT NULL default '0',
1751 `stock_id` char(20) NOT NULL default '',
1752 `workcentre` int(11) NOT NULL default '0',
1753 `units_req` double NOT NULL default '1',
1754 `std_cost` double NOT NULL default '0',
1755 `loc_code` char(5) NOT NULL default '',
1756 `units_issued` double NOT NULL default '0',
1758 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1761 ### Data of table `0_wo_requirements` ###
1765 ### Structure of table `0_workcentres` ###
1767 DROP TABLE IF EXISTS `0_workcentres`;
1769 CREATE TABLE `0_workcentres` (
1770 `id` int(11) NOT NULL auto_increment,
1771 `name` char(40) NOT NULL default '',
1772 `description` char(50) NOT NULL default '',
1773 `inactive` tinyint(1) NOT NULL default '0',
1775 UNIQUE KEY `name` (`name`)
1776 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1779 ### Data of table `0_workcentres` ###
1783 ### Structure of table `0_workorders` ###
1785 DROP TABLE IF EXISTS `0_workorders`;
1787 CREATE TABLE `0_workorders` (
1788 `id` int(11) NOT NULL auto_increment,
1789 `wo_ref` varchar(60) NOT NULL default '',
1790 `loc_code` varchar(5) NOT NULL default '',
1791 `units_reqd` double NOT NULL default '1',
1792 `stock_id` varchar(20) NOT NULL default '',
1793 `date_` date NOT NULL default '0000-00-00',
1794 `type` tinyint(4) NOT NULL default '0',
1795 `required_by` date NOT NULL default '0000-00-00',
1796 `released_date` date NOT NULL default '0000-00-00',
1797 `units_issued` double NOT NULL default '0',
1798 `closed` tinyint(1) NOT NULL default '0',
1799 `released` tinyint(1) NOT NULL default '0',
1800 `additional_costs` double NOT NULL default '0',
1802 UNIQUE KEY `wo_ref` (`wo_ref`)
1803 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1806 ### Data of table `0_workorders` ###
1810 ### Structure of table `0_tags` ###
1812 DROP TABLE IF EXISTS `0_tags`;
1814 CREATE TABLE `0_tags` (
1815 `id` int(11) NOT NULL auto_increment,
1816 `type` smallint(6) NOT NULL,
1817 `name` varchar(30) NOT NULL,
1818 `description` varchar(60) default NULL,
1819 `inactive` tinyint(1) NOT NULL default '0',
1821 UNIQUE KEY(`type`,`name`)
1822 ) TYPE=MyISAM AUTO_INCREMENT=1;
1825 ### Data of table `0_chart_tags` ###
1829 ### Structure of table `0_tag_associations` ###
1831 DROP TABLE IF EXISTS `0_tag_associations`;
1833 CREATE TABLE `0_tag_associations` (
1834 `record_id` varchar(11) NOT NULL,
1835 `tag_id` int(11) NOT NULL,
1836 UNIQUE KEY(`record_id`,`tag_id`)
1840 ### Data of table `0_tag_associations` ###
1842 DROP TABLE IF EXISTS `0_useronline` ;
1844 CREATE TABLE `0_useronline` (
1845 `id` int(11) NOT NULL AUTO_INCREMENT ,
1846 `timestamp` int(15) NOT NULL default '0',
1847 `ip` varchar(40) NOT NULL default '',
1848 `file` varchar(100) NOT NULL default '',
1849 PRIMARY KEY `id` (`id`) ,
1851 ) TYPE=MYISAM AUTO_INCREMENT=1;