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',
335 ### Data of table `0_comments` ###
339 ### Structure of table `0_company` ###
341 DROP TABLE IF EXISTS `0_company`;
343 CREATE TABLE `0_company` (
344 `coy_code` int(11) NOT NULL default '1',
345 `coy_name` varchar(60) NOT NULL default '',
346 `gst_no` varchar(25) NOT NULL default '',
347 `coy_no` varchar(25) NOT NULL default '0',
348 `tax_prd` int(11) NOT NULL default '1',
349 `tax_last` int(11) NOT NULL default '1',
350 `postal_address` tinytext NOT NULL,
351 `phone` varchar(30) NOT NULL default '',
352 `fax` varchar(30) NOT NULL default '',
353 `email` varchar(100) NOT NULL default '',
354 `coy_logo` varchar(100) NOT NULL default '',
355 `domicile` varchar(55) NOT NULL default '',
356 `curr_default` char(3) NOT NULL default '',
357 `debtors_act` varchar(11) NOT NULL default '',
358 `pyt_discount_act` varchar(11) NOT NULL default '',
359 `creditors_act` varchar(11) NOT NULL default '',
360 `bank_charge_act` varchar(11) NOT NULL default '',
361 `exchange_diff_act` varchar(11) NOT NULL default '',
362 `profit_loss_year_act` varchar(11) NOT NULL default '',
363 `retained_earnings_act` varchar(11) NOT NULL default '',
364 `freight_act` varchar(11) NOT NULL default '',
365 `default_sales_act` varchar(11) NOT NULL default '',
366 `default_sales_discount_act` varchar(11) NOT NULL default '',
367 `default_prompt_payment_act` varchar(11) NOT NULL default '',
368 `default_inventory_act` varchar(11) NOT NULL default '',
369 `default_cogs_act` varchar(11) NOT NULL default '',
370 `default_adj_act` varchar(11) NOT NULL default '',
371 `default_inv_sales_act` varchar(11) NOT NULL default '',
372 `default_assembly_act` varchar(11) NOT NULL default '',
373 `payroll_act` varchar(11) NOT NULL default '',
374 `allow_negative_stock` tinyint(1) NOT NULL default '0',
375 `po_over_receive` int(11) NOT NULL default '10',
376 `po_over_charge` int(11) NOT NULL default '10',
377 `default_credit_limit` int(11) NOT NULL default '1000',
378 `default_workorder_required` int(11) NOT NULL default '20',
379 `default_dim_required` int(11) NOT NULL default '20',
380 `past_due_days` int(11) NOT NULL default '30',
381 `use_dimension` tinyint(1) default '0',
382 `f_year` int(11) NOT NULL default '1',
383 `no_item_list` tinyint(1) NOT NULL default '0',
384 `no_customer_list` tinyint(1) NOT NULL default '0',
385 `no_supplier_list` tinyint(1) NOT NULL default '0',
386 `base_sales` int(11) NOT NULL default '-1',
387 `foreign_codes` tinyint(1) NOT NULL default '0',
388 `accumulate_shipping` tinyint(1) NOT NULL default '0',
389 `legal_text` tinytext NOT NULL,
390 `default_delivery_required` smallint(6) NOT NULL default '1',
391 `version_id` varchar(11) NOT NULL default '',
392 `time_zone` tinyint(1) NOT NULL default '0',
393 `add_pct` int(5) NOT NULL default '-1',
394 `round_to` int(5) NOT NULL default '1',
395 `login_tout` SMALLINT(6) NOT NULL DEFAULT '600',
396 PRIMARY KEY (`coy_code`)
399 ### Data of table `0_company` ###
401 INSERT INTO `0_company` VALUES ('1', 'Company name', '', '', '1', '1', 'N/A', '', '', '', '', '', 'USD', '1200', '5060', '2100', '5690', '4450', '9990', '3590', '4430', '4010', '4510', '4500', '1510', '5010', '5040', '4010', '1530', '5000', '0', '10', '10', '1000', '20', '20', '30', '1', '1', '0', '0', '0', '1', '0', '0', '', '1', '2.2', '0', '-1', '1', '600');
403 ### Structure of table `0_credit_status` ###
405 DROP TABLE IF EXISTS `0_credit_status`;
407 CREATE TABLE `0_credit_status` (
408 `id` int(11) NOT NULL auto_increment,
409 `reason_description` char(100) NOT NULL default '',
410 `dissallow_invoices` tinyint(1) NOT NULL default '0',
411 `inactive` tinyint(1) NOT NULL default '0',
413 UNIQUE KEY `reason_description` (`reason_description`)
414 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
417 ### Data of table `0_credit_status` ###
419 INSERT INTO `0_credit_status` VALUES ('1', 'Good History', '0', '0');
420 INSERT INTO `0_credit_status` VALUES ('3', 'No more work until payment received', '1', '0');
421 INSERT INTO `0_credit_status` VALUES ('4', 'In liquidation', '1', '0');
424 ### Structure of table `0_currencies` ###
426 DROP TABLE IF EXISTS `0_currencies`;
428 CREATE TABLE `0_currencies` (
429 `currency` varchar(60) NOT NULL default '',
430 `curr_abrev` char(3) NOT NULL default '',
431 `curr_symbol` varchar(10) NOT NULL default '',
432 `country` varchar(100) NOT NULL default '',
433 `hundreds_name` varchar(15) NOT NULL default '',
434 `auto_update` tinyint(1) NOT NULL default '1',
435 `inactive` tinyint(1) NOT NULL default '0',
436 PRIMARY KEY (`curr_abrev`)
440 ### Data of table `0_currencies` ###
442 INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0');
443 INSERT INTO `0_currencies` VALUES ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0');
444 INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents', '1', '0');
445 INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence', '1', '0');
447 ### Structure of table `0_cust_allocations` ###
449 DROP TABLE IF EXISTS `0_cust_allocations`;
451 CREATE TABLE `0_cust_allocations` (
452 `id` int(11) NOT NULL auto_increment,
453 `amt` double unsigned default NULL,
454 `date_alloc` date NOT NULL default '0000-00-00',
455 `trans_no_from` int(11) default NULL,
456 `trans_type_from` int(11) default NULL,
457 `trans_no_to` int(11) default NULL,
458 `trans_type_to` int(11) default NULL,
460 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
463 ### Data of table `0_cust_allocations` ###
467 ### Structure of table `0_cust_branch` ###
469 DROP TABLE IF EXISTS `0_cust_branch`;
471 CREATE TABLE `0_cust_branch` (
472 `branch_code` int(11) NOT NULL auto_increment,
473 `debtor_no` int(11) NOT NULL default '0',
474 `br_name` varchar(60) NOT NULL default '',
475 `branch_ref` varchar(30) NOT NULL default '',
476 `br_address` tinytext NOT NULL,
477 `area` int(11) default NULL,
478 `salesman` int(11) NOT NULL default '0',
479 `phone` varchar(30) NOT NULL default '',
480 `phone2` varchar(30) NOT NULL default '',
481 `fax` varchar(30) NOT NULL default '',
482 `contact_name` varchar(60) NOT NULL default '',
483 `email` varchar(100) NOT NULL default '',
484 `default_location` varchar(5) NOT NULL default '',
485 `tax_group_id` int(11) default NULL,
486 `sales_account` varchar(11) default NULL,
487 `sales_discount_account` varchar(11) default NULL,
488 `receivables_account` varchar(11) default NULL,
489 `payment_discount_account` varchar(11) default NULL,
490 `default_ship_via` int(11) NOT NULL default '1',
491 `disable_trans` tinyint(4) NOT NULL default '0',
492 `br_post_address` tinytext NOT NULL,
493 `group_no` int(11) NOT NULL default '0',
494 `notes` tinytext NOT NULL,
495 `inactive` tinyint(1) NOT NULL default '0',
496 PRIMARY KEY (`branch_code`,`debtor_no`),
497 KEY `branch_code` (`branch_code`),
498 KEY `br_name` (`br_name`)
499 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
502 ### Data of table `0_cust_branch` ###
506 ### Structure of table `0_debtor_trans` ###
508 DROP TABLE IF EXISTS `0_debtor_trans`;
510 CREATE TABLE `0_debtor_trans` (
511 `trans_no` int(11) unsigned NOT NULL default '0',
512 `type` smallint(6) unsigned NOT NULL default '0',
513 `version` tinyint(1) unsigned NOT NULL default '0',
514 `debtor_no` int(11) unsigned default NULL,
515 `branch_code` int(11) NOT NULL default '-1',
516 `tran_date` date NOT NULL default '0000-00-00',
517 `due_date` date NOT NULL default '0000-00-00',
518 `reference` varchar(60) NOT NULL default '',
519 `tpe` int(11) NOT NULL default '0',
520 `order_` int(11) NOT NULL default '0',
521 `ov_amount` double NOT NULL default '0',
522 `ov_gst` double NOT NULL default '0',
523 `ov_freight` double NOT NULL default '0',
524 `ov_freight_tax` double NOT NULL default '0',
525 `ov_discount` double NOT NULL default '0',
526 `alloc` double NOT NULL default '0',
527 `rate` double NOT NULL default '1',
528 `ship_via` int(11) default NULL,
529 `trans_link` int(11) NOT NULL default '0',
530 `dimension_id` int(11) NOT NULL default '0',
531 `dimension2_id` int(11) NOT NULL default '0',
532 PRIMARY KEY (`trans_no`,`type`),
533 KEY `debtor_no` (`debtor_no`,`branch_code`)
537 ### Data of table `0_debtor_trans` ###
541 ### Structure of table `0_debtor_trans_details` ###
543 DROP TABLE IF EXISTS `0_debtor_trans_details`;
545 CREATE TABLE `0_debtor_trans_details` (
546 `id` int(11) NOT NULL auto_increment,
547 `debtor_trans_no` int(11) default NULL,
548 `debtor_trans_type` int(11) default NULL,
549 `stock_id` varchar(20) NOT NULL default '',
550 `description` tinytext,
551 `unit_price` double NOT NULL default '0',
552 `unit_tax` double NOT NULL default '0',
553 `quantity` double NOT NULL default '0',
554 `discount_percent` double NOT NULL default '0',
555 `standard_cost` double NOT NULL default '0',
556 `qty_done` double NOT NULL default '0',
558 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
561 ### Data of table `0_debtor_trans_details` ###
565 ### Structure of table `0_debtors_master` ###
567 DROP TABLE IF EXISTS `0_debtors_master`;
569 CREATE TABLE `0_debtors_master` (
570 `debtor_no` int(11) NOT NULL auto_increment,
571 `name` varchar(100) NOT NULL default '',
572 `debtor_ref` varchar(30) NOT NULL,
574 `email` varchar(100) NOT NULL default '',
575 `tax_id` varchar(55) NOT NULL default '',
576 `curr_code` char(3) NOT NULL default '',
577 `sales_type` int(11) NOT NULL default '1',
578 `dimension_id` int(11) NOT NULL default '0',
579 `dimension2_id` int(11) NOT NULL default '0',
580 `credit_status` int(11) NOT NULL default '0',
581 `payment_terms` int(11) default NULL,
582 `discount` double NOT NULL default '0',
583 `pymt_discount` double NOT NULL default '0',
584 `credit_limit` float NOT NULL default '1000',
585 `notes` tinytext NOT NULL,
586 `inactive` tinyint(1) NOT NULL default '0',
587 PRIMARY KEY (`debtor_no`),
588 UNIQUE KEY `name` (`name`)
589 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
592 ### Data of table `0_debtors_master` ###
596 ### Structure of table `0_dimensions` ###
598 DROP TABLE IF EXISTS `0_dimensions`;
600 CREATE TABLE `0_dimensions` (
601 `id` int(11) NOT NULL auto_increment,
602 `reference` varchar(60) NOT NULL default '',
603 `name` varchar(60) NOT NULL default '',
604 `type_` tinyint(1) NOT NULL default '1',
605 `closed` tinyint(1) NOT NULL default '0',
606 `date_` date NOT NULL default '0000-00-00',
607 `due_date` date NOT NULL default '0000-00-00',
609 UNIQUE KEY `reference` (`reference`)
610 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
613 ### Data of table `0_dimensions` ###
617 ### Structure of table `0_exchange_rates` ###
619 DROP TABLE IF EXISTS `0_exchange_rates`;
621 CREATE TABLE `0_exchange_rates` (
622 `id` int(11) NOT NULL auto_increment,
623 `curr_code` char(3) NOT NULL default '',
624 `rate_buy` double NOT NULL default '0',
625 `rate_sell` double NOT NULL default '0',
626 `date_` date NOT NULL default '0000-00-00',
628 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
629 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
632 ### Data of table `0_exchange_rates` ###
636 ### Structure of table `0_fiscal_year` ###
638 DROP TABLE IF EXISTS `0_fiscal_year`;
640 CREATE TABLE `0_fiscal_year` (
641 `id` int(11) NOT NULL auto_increment,
642 `begin` date default '0000-00-00',
643 `end` date default '0000-00-00',
644 `closed` tinyint(1) NOT NULL default '0',
646 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
649 ### Data of table `0_fiscal_year` ###
651 INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0');
654 ### Structure of table `0_gl_trans` ###
656 DROP TABLE IF EXISTS `0_gl_trans`;
658 CREATE TABLE `0_gl_trans` (
659 `counter` int(11) NOT NULL auto_increment,
660 `type` smallint(6) NOT NULL default '0',
661 `type_no` bigint(16) NOT NULL default '1',
662 `tran_date` date NOT NULL default '0000-00-00',
663 `account` varchar(11) NOT NULL default '',
664 `memo_` tinytext NOT NULL,
665 `amount` double NOT NULL default '0',
666 `dimension_id` int(11) NOT NULL default '0',
667 `dimension2_id` int(11) NOT NULL default '0',
668 `person_type_id` int(11) default NULL,
669 `person_id` tinyblob,
670 PRIMARY KEY (`counter`),
671 KEY `Type_and_Number` (`type`,`type_no`)
672 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
675 ### Data of table `0_gl_trans` ###
679 ### Structure of table `0_grn_batch` ###
681 DROP TABLE IF EXISTS `0_grn_batch`;
683 CREATE TABLE `0_grn_batch` (
684 `id` int(11) NOT NULL auto_increment,
685 `supplier_id` int(11) NOT NULL default '0',
686 `purch_order_no` int(11) default NULL,
687 `reference` varchar(60) NOT NULL default '',
688 `delivery_date` date NOT NULL default '0000-00-00',
689 `loc_code` varchar(5) default NULL,
691 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
694 ### Data of table `0_grn_batch` ###
698 ### Structure of table `0_grn_items` ###
700 DROP TABLE IF EXISTS `0_grn_items`;
702 CREATE TABLE `0_grn_items` (
703 `id` int(11) NOT NULL auto_increment,
704 `grn_batch_id` int(11) default NULL,
705 `po_detail_item` int(11) NOT NULL default '0',
706 `item_code` varchar(20) NOT NULL default '',
707 `description` tinytext,
708 `qty_recd` double NOT NULL default '0',
709 `quantity_inv` double NOT NULL default '0',
711 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
714 ### Data of table `0_grn_items` ###
718 ### Structure of table `0_groups` ###
720 DROP TABLE IF EXISTS `0_groups`;
722 CREATE TABLE `0_groups` (
723 `id` smallint(6) unsigned NOT NULL auto_increment,
724 `description` varchar(60) NOT NULL default '',
725 `inactive` tinyint(1) NOT NULL default '0',
727 UNIQUE KEY `description` (`description`)
728 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
731 ### Data of table `0_groups` ###
733 INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
734 INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
735 INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
738 ### Structure of table `0_item_codes` ###
740 DROP TABLE IF EXISTS `0_item_codes`;
742 CREATE TABLE `0_item_codes` (
743 `id` int(11) unsigned NOT NULL auto_increment,
744 `item_code` varchar(20) NOT NULL,
745 `stock_id` varchar(20) NOT NULL,
746 `description` varchar(200) NOT NULL default '',
747 `category_id` smallint(6) unsigned NOT NULL,
748 `quantity` double NOT NULL default '1',
749 `is_foreign` tinyint(1) NOT NULL default '0',
750 `inactive` tinyint(1) NOT NULL default '0',
752 UNIQUE KEY `stock_id` (`stock_id`,`item_code`)
753 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
756 ### Data of table `0_item_codes` ###
760 ### Structure of table `0_item_tax_type_exemptions` ###
762 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
764 CREATE TABLE `0_item_tax_type_exemptions` (
765 `item_tax_type_id` int(11) NOT NULL default '0',
766 `tax_type_id` int(11) NOT NULL default '0',
767 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
771 ### Data of table `0_item_tax_type_exemptions` ###
775 ### Structure of table `0_item_tax_types` ###
777 DROP TABLE IF EXISTS `0_item_tax_types`;
779 CREATE TABLE `0_item_tax_types` (
780 `id` int(11) NOT NULL auto_increment,
781 `name` varchar(60) NOT NULL default '',
782 `exempt` tinyint(1) NOT NULL default '0',
783 `inactive` tinyint(1) NOT NULL default '0',
785 UNIQUE KEY `name` (`name`)
786 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
789 ### Data of table `0_item_tax_types` ###
791 INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0', '0');
794 ### Structure of table `0_item_units` ###
796 DROP TABLE IF EXISTS `0_item_units`;
798 CREATE TABLE `0_item_units` (
799 `abbr` varchar(20) NOT NULL,
800 `name` varchar(40) NOT NULL,
801 `decimals` tinyint(2) NOT NULL,
802 `inactive` tinyint(1) NOT NULL default '0',
803 PRIMARY KEY (`abbr`),
804 UNIQUE KEY `name` (`name`)
808 ### Data of table `0_item_units` ###
810 INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0');
813 ### Structure of table `0_loc_stock` ###
815 DROP TABLE IF EXISTS `0_loc_stock`;
817 CREATE TABLE `0_loc_stock` (
818 `loc_code` char(5) NOT NULL default '',
819 `stock_id` char(20) NOT NULL default '',
820 `reorder_level` bigint(20) NOT NULL default '0',
821 PRIMARY KEY (`loc_code`,`stock_id`),
822 KEY `stock_id` (`stock_id`)
826 ### Data of table `0_loc_stock` ###
830 ### Structure of table `0_locations` ###
832 DROP TABLE IF EXISTS `0_locations`;
834 CREATE TABLE `0_locations` (
835 `loc_code` varchar(5) NOT NULL default '',
836 `location_name` varchar(60) NOT NULL default '',
837 `delivery_address` tinytext NOT NULL,
838 `phone` varchar(30) NOT NULL default '',
839 `phone2` varchar(30) NOT NULL default '',
840 `fax` varchar(30) NOT NULL default '',
841 `email` varchar(100) NOT NULL default '',
842 `contact` varchar(30) NOT NULL default '',
843 `inactive` tinyint(1) NOT NULL default '0',
844 PRIMARY KEY (`loc_code`)
848 ### Data of table `0_locations` ###
850 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '', '0');
853 ### Structure of table `0_movement_types` ###
855 DROP TABLE IF EXISTS `0_movement_types`;
857 CREATE TABLE `0_movement_types` (
858 `id` int(11) NOT NULL auto_increment,
859 `name` varchar(60) NOT NULL default '',
860 `inactive` tinyint(1) NOT NULL default '0',
862 UNIQUE KEY `name` (`name`)
863 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
866 ### Data of table `0_movement_types` ###
868 INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment', '0');
871 ### Structure of table `0_payment_terms` ###
873 DROP TABLE IF EXISTS `0_payment_terms`;
875 CREATE TABLE `0_payment_terms` (
876 `terms_indicator` int(11) NOT NULL auto_increment,
877 `terms` char(80) NOT NULL default '',
878 `days_before_due` smallint(6) NOT NULL default '0',
879 `day_in_following_month` smallint(6) NOT NULL default '0',
880 `inactive` tinyint(1) NOT NULL default '0',
881 PRIMARY KEY (`terms_indicator`),
882 UNIQUE KEY `terms` (`terms`)
883 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
886 ### Data of table `0_payment_terms` ###
888 INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0');
889 INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0');
890 INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0');
891 INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0');
894 ### Structure of table `0_prices` ###
896 DROP TABLE IF EXISTS `0_prices`;
898 CREATE TABLE `0_prices` (
899 `id` int(11) NOT NULL auto_increment,
900 `stock_id` varchar(20) NOT NULL default '',
901 `sales_type_id` int(11) NOT NULL default '0',
902 `curr_abrev` char(3) NOT NULL default '',
903 `price` double NOT NULL default '0',
905 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
906 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
909 ### Data of table `0_prices` ###
913 ### Structure of table `0_print_profiles` ###
915 DROP TABLE IF EXISTS `0_print_profiles`;
917 CREATE TABLE `0_print_profiles` (
918 `id` smallint(6) unsigned NOT NULL auto_increment,
919 `profile` varchar(30) NOT NULL,
920 `report` varchar(5) default NULL,
921 `printer` tinyint(3) unsigned default NULL,
923 UNIQUE KEY `profile` (`profile`,`report`)
924 ) TYPE=MyISAM AUTO_INCREMENT=10 ;
927 ### Data of table `0_print_profiles` ###
929 INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0');
930 INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0');
931 INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2');
932 INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2');
933 INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2');
934 INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2');
935 INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2');
936 INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2');
937 INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2');
940 ### Structure of table `0_printers` ###
942 DROP TABLE IF EXISTS `0_printers`;
944 CREATE TABLE `0_printers` (
945 `id` tinyint(3) unsigned NOT NULL auto_increment,
946 `name` varchar(20) NOT NULL,
947 `description` varchar(60) NOT NULL,
948 `queue` varchar(20) NOT NULL,
949 `host` varchar(40) NOT NULL,
950 `port` smallint(11) unsigned NOT NULL,
951 `timeout` tinyint(3) unsigned NOT NULL,
953 UNIQUE KEY `name` (`name`)
954 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
957 ### Data of table `0_printers` ###
959 INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20');
960 INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5');
961 INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
964 ### Structure of table `0_purch_data` ###
966 DROP TABLE IF EXISTS `0_purch_data`;
968 CREATE TABLE `0_purch_data` (
969 `supplier_id` int(11) NOT NULL default '0',
970 `stock_id` char(20) NOT NULL default '',
971 `price` double NOT NULL default '0',
972 `suppliers_uom` char(50) NOT NULL default '',
973 `conversion_factor` double NOT NULL default '1',
974 `supplier_description` char(50) NOT NULL default '',
975 PRIMARY KEY (`supplier_id`,`stock_id`)
979 ### Data of table `0_purch_data` ###
983 ### Structure of table `0_purch_order_details` ###
985 DROP TABLE IF EXISTS `0_purch_order_details`;
987 CREATE TABLE `0_purch_order_details` (
988 `po_detail_item` int(11) NOT NULL auto_increment,
989 `order_no` int(11) NOT NULL default '0',
990 `item_code` varchar(20) NOT NULL default '',
991 `description` tinytext,
992 `delivery_date` date NOT NULL default '0000-00-00',
993 `qty_invoiced` double NOT NULL default '0',
994 `unit_price` double NOT NULL default '0',
995 `act_price` double NOT NULL default '0',
996 `std_cost_unit` double NOT NULL default '0',
997 `quantity_ordered` double NOT NULL default '0',
998 `quantity_received` double NOT NULL default '0',
999 PRIMARY KEY (`po_detail_item`)
1000 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1003 ### Data of table `0_purch_order_details` ###
1007 ### Structure of table `0_purch_orders` ###
1009 DROP TABLE IF EXISTS `0_purch_orders`;
1011 CREATE TABLE `0_purch_orders` (
1012 `order_no` int(11) NOT NULL auto_increment,
1013 `supplier_id` int(11) NOT NULL default '0',
1014 `comments` tinytext,
1015 `ord_date` date NOT NULL default '0000-00-00',
1016 `reference` tinytext NOT NULL,
1017 `requisition_no` tinytext,
1018 `into_stock_location` varchar(5) NOT NULL default '',
1019 `delivery_address` tinytext NOT NULL,
1020 PRIMARY KEY (`order_no`)
1021 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1024 ### Data of table `0_purch_orders` ###
1028 ### Structure of table `0_quick_entries` ###
1030 DROP TABLE IF EXISTS `0_quick_entries`;
1032 CREATE TABLE `0_quick_entries` (
1033 `id` smallint(6) unsigned NOT NULL auto_increment,
1034 `type` tinyint(1) NOT NULL default '0',
1035 `description` varchar(60) NOT NULL,
1036 `base_amount` double NOT NULL default '0',
1037 `base_desc` varchar(60) default NULL,
1039 KEY `description` (`description`)
1040 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
1043 ### Data of table `0_quick_entries` ###
1045 INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount');
1046 INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount');
1047 INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount');
1050 ### Structure of table `0_quick_entry_lines` ###
1052 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1054 CREATE TABLE `0_quick_entry_lines` (
1055 `id` smallint(6) unsigned NOT NULL auto_increment,
1056 `qid` smallint(6) unsigned NOT NULL,
1057 `amount` double default '0',
1058 `action` varchar(2) NOT NULL,
1059 `dest_id` varchar(11) NOT NULL,
1060 `dimension_id` smallint(6) unsigned default NULL,
1061 `dimension2_id` smallint(6) unsigned default NULL,
1064 ) TYPE=MyISAM AUTO_INCREMENT=7 ;
1067 ### Data of table `0_quick_entry_lines` ###
1069 INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', 't-', '1', '0', '0');
1070 INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', 't-', '1', '0', '0');
1071 INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', 't-', '1', '0', '0');
1072 INSERT INTO `0_quick_entry_lines` VALUES ('4', '3', '0', '=', '4010', '0', '0');
1073 INSERT INTO `0_quick_entry_lines` VALUES ('5', '1', '0', '=', '5765', '0', '0');
1074 INSERT INTO `0_quick_entry_lines` VALUES ('6', '2', '0', '=', '5780', '0', '0');
1077 ### Structure of table `0_recurrent_invoices` ###
1079 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1081 CREATE TABLE `0_recurrent_invoices` (
1082 `id` smallint(6) unsigned NOT NULL auto_increment,
1083 `description` varchar(60) NOT NULL default '',
1084 `order_no` int(11) unsigned NOT NULL,
1085 `debtor_no` int(11) unsigned default NULL,
1086 `group_no` smallint(6) unsigned default NULL,
1087 `days` int(11) NOT NULL default '0',
1088 `monthly` int(11) NOT NULL default '0',
1089 `begin` date NOT NULL default '0000-00-00',
1090 `end` date NOT NULL default '0000-00-00',
1091 `last_sent` date NOT NULL default '0000-00-00',
1093 UNIQUE KEY `description` (`description`)
1094 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1097 ### Data of table `0_recurrent_invoices` ###
1101 ### Structure of table `0_refs` ###
1103 DROP TABLE IF EXISTS `0_refs`;
1105 CREATE TABLE `0_refs` (
1106 `id` int(11) NOT NULL default '0',
1107 `type` int(11) NOT NULL default '0',
1108 `reference` varchar(100) NOT NULL default '',
1109 PRIMARY KEY (`id`,`type`)
1113 ### Data of table `0_refs` ###
1117 ### Structure of table `0_sales_order_details` ###
1119 DROP TABLE IF EXISTS `0_sales_order_details`;
1121 CREATE TABLE `0_sales_order_details` (
1122 `id` int(11) NOT NULL auto_increment,
1123 `order_no` int(11) NOT NULL default '0',
1124 `trans_type` smallint(6) NOT NULL default '30',
1125 `stk_code` varchar(20) NOT NULL default '',
1126 `description` tinytext,
1127 `qty_sent` double NOT NULL default '0',
1128 `unit_price` double NOT NULL default '0',
1129 `quantity` double NOT NULL default '0',
1130 `discount_percent` double NOT NULL default '0',
1132 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1135 ### Data of table `0_sales_order_details` ###
1139 ### Structure of table `0_sales_orders` ###
1141 DROP TABLE IF EXISTS `0_sales_orders`;
1143 CREATE TABLE `0_sales_orders` (
1144 `order_no` int(11) NOT NULL,
1145 `trans_type` smallint(6) NOT NULL default '30',
1146 `version` tinyint(1) unsigned NOT NULL default '0',
1147 `type` tinyint(1) NOT NULL default '0',
1148 `debtor_no` int(11) NOT NULL default '0',
1149 `branch_code` int(11) NOT NULL default '0',
1150 `reference` varchar(100) NOT NULL default '',
1151 `customer_ref` tinytext NOT NULL,
1152 `comments` tinytext,
1153 `ord_date` date NOT NULL default '0000-00-00',
1154 `order_type` int(11) NOT NULL default '0',
1155 `ship_via` int(11) NOT NULL default '0',
1156 `delivery_address` tinytext NOT NULL,
1157 `contact_phone` varchar(30) default NULL,
1158 `contact_email` varchar(100) default NULL,
1159 `deliver_to` tinytext NOT NULL,
1160 `freight_cost` double NOT NULL default '0',
1161 `from_stk_loc` varchar(5) NOT NULL default '',
1162 `delivery_date` date NOT NULL default '0000-00-00',
1163 PRIMARY KEY (`trans_type`, `order_no`)
1167 ### Data of table `0_sales_orders` ###
1171 ### Structure of table `0_sales_pos` ###
1173 DROP TABLE IF EXISTS `0_sales_pos`;
1175 CREATE TABLE `0_sales_pos` (
1176 `id` smallint(6) unsigned NOT NULL auto_increment,
1177 `pos_name` varchar(30) NOT NULL,
1178 `cash_sale` tinyint(1) NOT NULL,
1179 `credit_sale` tinyint(1) NOT NULL,
1180 `pos_location` varchar(5) NOT NULL,
1181 `pos_account` smallint(6) unsigned NOT NULL,
1182 `inactive` tinyint(1) NOT NULL default '0',
1184 UNIQUE KEY `pos_name` (`pos_name`)
1185 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1188 ### Data of table `0_sales_pos` ###
1190 INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '2', '0');
1193 ### Structure of table `0_sales_types` ###
1195 DROP TABLE IF EXISTS `0_sales_types`;
1197 CREATE TABLE `0_sales_types` (
1198 `id` int(11) NOT NULL auto_increment,
1199 `sales_type` char(50) NOT NULL default '',
1200 `tax_included` int(1) NOT NULL default '0',
1201 `factor` double NOT NULL default '1',
1202 `inactive` tinyint(1) NOT NULL default '0',
1204 UNIQUE KEY `sales_type` (`sales_type`)
1205 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
1208 ### Data of table `0_sales_types` ###
1210 INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '1', '1', '0');
1211 INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '0.7', '0');
1214 ### Structure of table `0_salesman` ###
1216 DROP TABLE IF EXISTS `0_salesman`;
1218 CREATE TABLE `0_salesman` (
1219 `salesman_code` int(11) NOT NULL auto_increment,
1220 `salesman_name` char(60) NOT NULL default '',
1221 `salesman_phone` char(30) NOT NULL default '',
1222 `salesman_fax` char(30) NOT NULL default '',
1223 `salesman_email` varchar(100) NOT NULL default '',
1224 `provision` double NOT NULL default '0',
1225 `break_pt` double NOT NULL default '0',
1226 `provision2` double NOT NULL default '0',
1227 `inactive` tinyint(1) NOT NULL default '0',
1228 PRIMARY KEY (`salesman_code`),
1229 UNIQUE KEY `salesman_name` (`salesman_name`)
1230 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1233 ### Data of table `0_salesman` ###
1235 INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1237 ### Structure of table `0_security_roles` ###
1239 DROP TABLE IF EXISTS `0_security_roles`;
1240 CREATE TABLE IF NOT EXISTS `0_security_roles` (
1241 `id` int(11) NOT NULL auto_increment,
1242 `role` varchar(30) NOT NULL,
1243 `description` varchar(50) default NULL,
1246 `inactive` tinyint(1) NOT NULL default '0',
1248 UNIQUE KEY `role` (`role`)
1249 ) TYPE=MyISAM AUTO_INCREMENT=11 ;
1252 -- Data of table `0_security_roles`
1255 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);
1256 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);
1257 INSERT INTO `0_security_roles` VALUES (3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873', 0);
1258 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);
1259 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);
1260 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);
1261 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);
1262 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);
1263 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);
1264 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);
1266 ### Structure of table `0_shippers` ###
1268 DROP TABLE IF EXISTS `0_shippers`;
1270 CREATE TABLE `0_shippers` (
1271 `shipper_id` int(11) NOT NULL auto_increment,
1272 `shipper_name` varchar(60) NOT NULL default '',
1273 `phone` varchar(30) NOT NULL default '',
1274 `phone2` varchar(30) NOT NULL default '',
1275 `contact` tinytext NOT NULL,
1276 `address` tinytext NOT NULL,
1277 `inactive` tinyint(1) NOT NULL default '0',
1278 PRIMARY KEY (`shipper_id`),
1279 UNIQUE KEY `name` (`shipper_name`)
1280 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1283 ### Data of table `0_shippers` ###
1285 INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '', '0');
1288 ### Structure of table `0_sql_trail` ###
1290 DROP TABLE IF EXISTS `0_sql_trail`;
1292 CREATE TABLE `0_sql_trail` (
1293 `id` int(11) unsigned NOT NULL auto_increment,
1294 `sql` text NOT NULL,
1295 `result` tinyint(1) NOT NULL,
1296 `msg` varchar(255) NOT NULL,
1298 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1301 ### Data of table `0_sql_trail` ###
1305 ### Structure of table `0_stock_category` ###
1307 DROP TABLE IF EXISTS `0_stock_category`;
1309 CREATE TABLE `0_stock_category` (
1310 `category_id` int(11) NOT NULL auto_increment,
1311 `description` varchar(60) NOT NULL default '',
1312 `dflt_tax_type` int(11) NOT NULL default '1',
1313 `dflt_units` varchar(20) NOT NULL default 'each',
1314 `dflt_mb_flag` char(1) NOT NULL default 'B',
1315 `dflt_sales_act` varchar(11) NOT NULL default '',
1316 `dflt_cogs_act` varchar(11) NOT NULL default '',
1317 `dflt_inventory_act` varchar(11) NOT NULL default '',
1318 `dflt_adjustment_act` varchar(11) NOT NULL default '',
1319 `dflt_assembly_act` varchar(11) NOT NULL default '',
1320 `dflt_dim1` int(11) default NULL,
1321 `dflt_dim2` int(11) default NULL,
1322 `inactive` tinyint(1) NOT NULL default '0',
1323 `dflt_no_sale` tinyint(1) NOT NULL default '0',
1324 PRIMARY KEY (`category_id`),
1325 UNIQUE KEY `description` (`description`)
1326 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
1329 ### Data of table `0_stock_category` ###
1331 INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1332 INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1333 INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1334 INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1337 ### Structure of table `0_stock_master` ###
1339 DROP TABLE IF EXISTS `0_stock_master`;
1341 CREATE TABLE `0_stock_master` (
1342 `stock_id` varchar(20) NOT NULL default '',
1343 `category_id` int(11) NOT NULL default '0',
1344 `tax_type_id` int(11) NOT NULL default '0',
1345 `description` varchar(200) NOT NULL default '',
1346 `long_description` tinytext NOT NULL,
1347 `units` varchar(20) NOT NULL default 'each',
1348 `mb_flag` char(1) NOT NULL default 'B',
1349 `sales_account` varchar(11) NOT NULL default '',
1350 `cogs_account` varchar(11) NOT NULL default '',
1351 `inventory_account` varchar(11) NOT NULL default '',
1352 `adjustment_account` varchar(11) NOT NULL default '',
1353 `assembly_account` varchar(11) NOT NULL default '',
1354 `dimension_id` int(11) default NULL,
1355 `dimension2_id` int(11) default NULL,
1356 `actual_cost` double NOT NULL default '0',
1357 `last_cost` double NOT NULL default '0',
1358 `material_cost` double NOT NULL default '0',
1359 `labour_cost` double NOT NULL default '0',
1360 `overhead_cost` double NOT NULL default '0',
1361 `inactive` tinyint(1) NOT NULL default '0',
1362 `no_sale` tinyint(1) NOT NULL default '0',
1363 PRIMARY KEY (`stock_id`)
1367 ### Data of table `0_stock_master` ###
1371 ### Structure of table `0_stock_moves` ###
1373 DROP TABLE IF EXISTS `0_stock_moves`;
1375 CREATE TABLE `0_stock_moves` (
1376 `trans_id` int(11) NOT NULL auto_increment,
1377 `trans_no` int(11) NOT NULL default '0',
1378 `stock_id` char(20) NOT NULL default '',
1379 `type` smallint(6) NOT NULL default '0',
1380 `loc_code` char(5) NOT NULL default '',
1381 `tran_date` date NOT NULL default '0000-00-00',
1382 `person_id` int(11) default NULL,
1383 `price` double NOT NULL default '0',
1384 `reference` char(40) NOT NULL default '',
1385 `qty` double NOT NULL default '1',
1386 `discount_percent` double NOT NULL default '0',
1387 `standard_cost` double NOT NULL default '0',
1388 `visible` tinyint(1) NOT NULL default '1',
1389 PRIMARY KEY (`trans_id`),
1390 KEY `type` (`type`,`trans_no`)
1391 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1394 ### Data of table `0_stock_moves` ###
1398 ### Structure of table `0_supp_allocations` ###
1400 DROP TABLE IF EXISTS `0_supp_allocations`;
1402 CREATE TABLE `0_supp_allocations` (
1403 `id` int(11) NOT NULL auto_increment,
1404 `amt` double unsigned default NULL,
1405 `date_alloc` date NOT NULL default '0000-00-00',
1406 `trans_no_from` int(11) default NULL,
1407 `trans_type_from` int(11) default NULL,
1408 `trans_no_to` int(11) default NULL,
1409 `trans_type_to` int(11) default NULL,
1411 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1414 ### Data of table `0_supp_allocations` ###
1418 ### Structure of table `0_supp_invoice_items` ###
1420 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1422 CREATE TABLE `0_supp_invoice_items` (
1423 `id` int(11) NOT NULL auto_increment,
1424 `supp_trans_no` int(11) default NULL,
1425 `supp_trans_type` int(11) default NULL,
1426 `gl_code` varchar(11) NOT NULL default '0',
1427 `grn_item_id` int(11) default NULL,
1428 `po_detail_item_id` int(11) default NULL,
1429 `stock_id` varchar(20) NOT NULL default '',
1430 `description` tinytext,
1431 `quantity` double NOT NULL default '0',
1432 `unit_price` double NOT NULL default '0',
1433 `unit_tax` double NOT NULL default '0',
1436 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1439 ### Data of table `0_supp_invoice_items` ###
1443 ### Structure of table `0_supp_trans` ###
1445 DROP TABLE IF EXISTS `0_supp_trans`;
1447 CREATE TABLE `0_supp_trans` (
1448 `trans_no` int(11) unsigned NOT NULL default '0',
1449 `type` smallint(6) unsigned NOT NULL default '0',
1450 `supplier_id` int(11) unsigned default NULL,
1451 `reference` tinytext NOT NULL,
1452 `supp_reference` varchar(60) NOT NULL default '',
1453 `tran_date` date NOT NULL default '0000-00-00',
1454 `due_date` date NOT NULL default '0000-00-00',
1455 `ov_amount` double NOT NULL default '0',
1456 `ov_discount` double NOT NULL default '0',
1457 `ov_gst` double NOT NULL default '0',
1458 `rate` double NOT NULL default '1',
1459 `alloc` double NOT NULL default '0',
1460 PRIMARY KEY (`trans_no`,`type`),
1461 KEY `supplier_id` (`supplier_id`),
1462 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1467 ### Data of table `0_supp_trans` ###
1471 ### Structure of table `0_suppliers` ###
1473 DROP TABLE IF EXISTS `0_suppliers`;
1475 CREATE TABLE `0_suppliers` (
1476 `supplier_id` int(11) NOT NULL auto_increment,
1477 `supp_name` varchar(60) NOT NULL default '',
1478 `supp_ref` varchar(30) NOT NULL default '',
1479 `address` tinytext NOT NULL,
1480 `supp_address` tinytext NOT NULL,
1481 `phone` varchar(30) NOT NULL default '',
1482 `phone2` varchar(30) NOT NULL default '',
1483 `fax` varchar(30) NOT NULL default '',
1484 `gst_no` varchar(25) NOT NULL default '',
1485 `contact` varchar(60) NOT NULL default '',
1486 `supp_account_no` varchar(40) NOT NULL default '',
1487 `email` varchar(100) NOT NULL default '',
1488 `website` varchar(100) NOT NULL default '',
1489 `bank_account` varchar(60) NOT NULL default '',
1490 `curr_code` char(3) default NULL,
1491 `payment_terms` int(11) default NULL,
1492 `dimension_id` int(11) default '0',
1493 `dimension2_id` int(11) default '0',
1494 `tax_group_id` int(11) default NULL,
1495 `credit_limit` double NOT NULL default '0',
1496 `purchase_account` varchar(11) default NULL,
1497 `payable_account` varchar(11) default NULL,
1498 `payment_discount_account` varchar(11) default NULL,
1499 `notes` tinytext NOT NULL,
1500 `inactive` tinyint(1) NOT NULL default '0',
1501 PRIMARY KEY (`supplier_id`)
1502 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1505 ### Data of table `0_suppliers` ###
1509 ### Structure of table `0_sys_types` ###
1511 DROP TABLE IF EXISTS `0_sys_types`;
1513 CREATE TABLE `0_sys_types` (
1514 `type_id` smallint(6) NOT NULL default '0',
1515 `type_no` int(11) NOT NULL default '1',
1516 `next_reference` varchar(100) NOT NULL default '',
1517 PRIMARY KEY (`type_id`)
1521 ### Data of table `0_sys_types` ###
1523 INSERT INTO `0_sys_types` VALUES ('0', '17', '1');
1524 INSERT INTO `0_sys_types` VALUES ('1', '7', '1');
1525 INSERT INTO `0_sys_types` VALUES ('2', '4', '1');
1526 INSERT INTO `0_sys_types` VALUES ('4', '3', '1');
1527 INSERT INTO `0_sys_types` VALUES ('10', '16', '1');
1528 INSERT INTO `0_sys_types` VALUES ('11', '2', '1');
1529 INSERT INTO `0_sys_types` VALUES ('12', '6', '1');
1530 INSERT INTO `0_sys_types` VALUES ('13', '1', '1');
1531 INSERT INTO `0_sys_types` VALUES ('16', '2', '1');
1532 INSERT INTO `0_sys_types` VALUES ('17', '2', '1');
1533 INSERT INTO `0_sys_types` VALUES ('18', '1', '1');
1534 INSERT INTO `0_sys_types` VALUES ('20', '6', '1');
1535 INSERT INTO `0_sys_types` VALUES ('21', '1', '1');
1536 INSERT INTO `0_sys_types` VALUES ('22', '3', '1');
1537 INSERT INTO `0_sys_types` VALUES ('25', '1', '1');
1538 INSERT INTO `0_sys_types` VALUES ('26', '1', '1');
1539 INSERT INTO `0_sys_types` VALUES ('28', '1', '1');
1540 INSERT INTO `0_sys_types` VALUES ('29', '1', '1');
1541 INSERT INTO `0_sys_types` VALUES ('30', '0', '1');
1542 INSERT INTO `0_sys_types` VALUES ('32', '0', '1');
1543 INSERT INTO `0_sys_types` VALUES ('35', '1', '1');
1544 INSERT INTO `0_sys_types` VALUES ('40', '1', '1');
1547 ### Structure of table `0_tax_group_items` ###
1549 DROP TABLE IF EXISTS `0_tax_group_items`;
1551 CREATE TABLE `0_tax_group_items` (
1552 `tax_group_id` int(11) NOT NULL default '0',
1553 `tax_type_id` int(11) NOT NULL default '0',
1554 `rate` double NOT NULL default '0',
1555 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1559 ### Data of table `0_tax_group_items` ###
1561 INSERT INTO `0_tax_group_items` VALUES ('1', '1', '5');
1564 ### Structure of table `0_tax_groups` ###
1566 DROP TABLE IF EXISTS `0_tax_groups`;
1568 CREATE TABLE `0_tax_groups` (
1569 `id` int(11) NOT NULL auto_increment,
1570 `name` varchar(60) NOT NULL default '',
1571 `tax_shipping` tinyint(1) NOT NULL default '0',
1572 `inactive` tinyint(1) NOT NULL default '0',
1574 UNIQUE KEY `name` (`name`)
1575 ) TYPE=InnoDB AUTO_INCREMENT=3 ;
1578 ### Data of table `0_tax_groups` ###
1580 INSERT INTO `0_tax_groups` VALUES ('1', 'Tax', '0', '0');
1581 INSERT INTO `0_tax_groups` VALUES ('2', 'Tax Exempt', '0', '0');
1584 ### Structure of table `0_tax_types` ###
1586 DROP TABLE IF EXISTS `0_tax_types`;
1588 CREATE TABLE `0_tax_types` (
1589 `id` int(11) NOT NULL auto_increment,
1590 `rate` double NOT NULL default '0',
1591 `sales_gl_code` varchar(11) NOT NULL default '',
1592 `purchasing_gl_code` varchar(11) NOT NULL default '',
1593 `name` varchar(60) NOT NULL default '',
1594 `inactive` tinyint(1) NOT NULL default '0',
1596 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
1599 ### Data of table `0_tax_types` ###
1601 INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2150', 'Tax', '0');
1604 ### Structure of table `0_trans_tax_details` ###
1606 DROP TABLE IF EXISTS `0_trans_tax_details`;
1608 CREATE TABLE `0_trans_tax_details` (
1609 `id` int(11) NOT NULL auto_increment,
1610 `trans_type` smallint(6) default NULL,
1611 `trans_no` int(11) default NULL,
1612 `tran_date` date NOT NULL,
1613 `tax_type_id` int(11) NOT NULL default '0',
1614 `rate` double NOT NULL default '0',
1615 `ex_rate` double NOT NULL default '1',
1616 `included_in_price` tinyint(1) NOT NULL default '0',
1617 `net_amount` double NOT NULL default '0',
1618 `amount` double NOT NULL default '0',
1621 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1624 ### Data of table `0_trans_tax_details` ###
1628 ### Structure of table `0_users` ###
1630 DROP TABLE IF EXISTS `0_users`;
1632 CREATE TABLE `0_users` (
1633 `id` SMALLINT(6) AUTO_INCREMENT,
1634 `user_id` varchar(60) NOT NULL default '',
1635 `password` varchar(100) NOT NULL default '',
1636 `real_name` varchar(100) NOT NULL default '',
1637 `role_id` int(11) NOT NULL default '1',
1638 `phone` varchar(30) NOT NULL default '',
1639 `email` varchar(100) default NULL,
1640 `language` varchar(20) default NULL,
1641 `date_format` tinyint(1) NOT NULL default '0',
1642 `date_sep` tinyint(1) NOT NULL default '0',
1643 `tho_sep` tinyint(1) NOT NULL default '0',
1644 `dec_sep` tinyint(1) NOT NULL default '0',
1645 `theme` varchar(20) NOT NULL default 'default',
1646 `page_size` varchar(20) NOT NULL default 'A4',
1647 `prices_dec` smallint(6) NOT NULL default '2',
1648 `qty_dec` smallint(6) NOT NULL default '2',
1649 `rates_dec` smallint(6) NOT NULL default '4',
1650 `percent_dec` smallint(6) NOT NULL default '1',
1651 `show_gl` tinyint(1) NOT NULL default '1',
1652 `show_codes` tinyint(1) NOT NULL default '0',
1653 `show_hints` tinyint(1) NOT NULL default '0',
1654 `last_visit_date` datetime default NULL,
1655 `query_size` tinyint(1) default '10',
1656 `graphic_links` tinyint(1) default '1',
1657 `pos` smallint(6) default '1',
1658 `print_profile` varchar(30) NOT NULL default '1',
1659 `rep_popup` tinyint(1) default '1',
1660 `sticky_doc_date` tinyint(1) default '0',
1661 `startup_tab` varchar(20) NOT NULL default '',
1662 `inactive` tinyint(1) NOT NULL default '0',
1664 UNIQUE KEY (`user_id`)
1665 ) TYPE=MyISAM AUTO_INCREMENT=2;
1668 ### Data of table `0_users` ###
1670 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');
1672 ### Structure of table `0_voided` ###
1674 DROP TABLE IF EXISTS `0_voided`;
1676 CREATE TABLE `0_voided` (
1677 `type` int(11) NOT NULL default '0',
1678 `id` int(11) NOT NULL default '0',
1679 `date_` date NOT NULL default '0000-00-00',
1680 `memo_` tinytext NOT NULL,
1681 UNIQUE KEY `id` (`type`,`id`)
1685 ### Data of table `0_voided` ###
1689 ### Structure of table `0_wo_issue_items` ###
1691 DROP TABLE IF EXISTS `0_wo_issue_items`;
1693 CREATE TABLE `0_wo_issue_items` (
1694 `id` int(11) NOT NULL auto_increment,
1695 `stock_id` varchar(40) default NULL,
1696 `issue_id` int(11) default NULL,
1697 `qty_issued` double default NULL,
1699 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1702 ### Data of table `0_wo_issue_items` ###
1706 ### Structure of table `0_wo_issues` ###
1708 DROP TABLE IF EXISTS `0_wo_issues`;
1710 CREATE TABLE `0_wo_issues` (
1711 `issue_no` int(11) NOT NULL auto_increment,
1712 `workorder_id` int(11) NOT NULL default '0',
1713 `reference` varchar(100) default NULL,
1714 `issue_date` date default NULL,
1715 `loc_code` varchar(5) default NULL,
1716 `workcentre_id` int(11) default NULL,
1717 PRIMARY KEY (`issue_no`)
1718 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1721 ### Data of table `0_wo_issues` ###
1725 ### Structure of table `0_wo_manufacture` ###
1727 DROP TABLE IF EXISTS `0_wo_manufacture`;
1729 CREATE TABLE `0_wo_manufacture` (
1730 `id` int(11) NOT NULL auto_increment,
1731 `reference` varchar(100) default NULL,
1732 `workorder_id` int(11) NOT NULL default '0',
1733 `quantity` double NOT NULL default '0',
1734 `date_` date NOT NULL default '0000-00-00',
1736 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1739 ### Data of table `0_wo_manufacture` ###
1743 ### Structure of table `0_wo_requirements` ###
1745 DROP TABLE IF EXISTS `0_wo_requirements`;
1747 CREATE TABLE `0_wo_requirements` (
1748 `id` int(11) NOT NULL auto_increment,
1749 `workorder_id` int(11) NOT NULL default '0',
1750 `stock_id` char(20) NOT NULL default '',
1751 `workcentre` int(11) NOT NULL default '0',
1752 `units_req` double NOT NULL default '1',
1753 `std_cost` double NOT NULL default '0',
1754 `loc_code` char(5) NOT NULL default '',
1755 `units_issued` double NOT NULL default '0',
1757 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1760 ### Data of table `0_wo_requirements` ###
1764 ### Structure of table `0_workcentres` ###
1766 DROP TABLE IF EXISTS `0_workcentres`;
1768 CREATE TABLE `0_workcentres` (
1769 `id` int(11) NOT NULL auto_increment,
1770 `name` char(40) NOT NULL default '',
1771 `description` char(50) NOT NULL default '',
1772 `inactive` tinyint(1) NOT NULL default '0',
1774 UNIQUE KEY `name` (`name`)
1775 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1778 ### Data of table `0_workcentres` ###
1782 ### Structure of table `0_workorders` ###
1784 DROP TABLE IF EXISTS `0_workorders`;
1786 CREATE TABLE `0_workorders` (
1787 `id` int(11) NOT NULL auto_increment,
1788 `wo_ref` varchar(60) NOT NULL default '',
1789 `loc_code` varchar(5) NOT NULL default '',
1790 `units_reqd` double NOT NULL default '1',
1791 `stock_id` varchar(20) NOT NULL default '',
1792 `date_` date NOT NULL default '0000-00-00',
1793 `type` tinyint(4) NOT NULL default '0',
1794 `required_by` date NOT NULL default '0000-00-00',
1795 `released_date` date NOT NULL default '0000-00-00',
1796 `units_issued` double NOT NULL default '0',
1797 `closed` tinyint(1) NOT NULL default '0',
1798 `released` tinyint(1) NOT NULL default '0',
1799 `additional_costs` double NOT NULL default '0',
1801 UNIQUE KEY `wo_ref` (`wo_ref`)
1802 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1805 ### Data of table `0_workorders` ###
1809 ### Structure of table `0_tags` ###
1811 DROP TABLE IF EXISTS `0_tags`;
1813 CREATE TABLE `0_tags` (
1814 `id` int(11) NOT NULL auto_increment,
1815 `type` smallint(6) NOT NULL,
1816 `name` varchar(30) NOT NULL,
1817 `description` varchar(60) default NULL,
1818 `inactive` tinyint(1) NOT NULL default '0',
1820 UNIQUE KEY(`type`,`name`)
1821 ) TYPE=MyISAM AUTO_INCREMENT=1;
1824 ### Data of table `0_chart_tags` ###
1828 ### Structure of table `0_tag_associations` ###
1830 DROP TABLE IF EXISTS `0_tag_associations`;
1832 CREATE TABLE `0_tag_associations` (
1833 `record_id` varchar(11) NOT NULL,
1834 `tag_id` int(11) NOT NULL,
1835 UNIQUE KEY(`record_id`,`tag_id`)
1839 ### Data of table `0_tag_associations` ###
1841 DROP TABLE IF EXISTS `0_useronline` ;
1843 CREATE TABLE `0_useronline` (
1844 `id` int(11) NOT NULL AUTO_INCREMENT ,
1845 `timestamp` int(15) NOT NULL default '0',
1846 `ip` varchar(40) NOT NULL default '',
1847 `file` varchar(100) NOT NULL default '',
1848 PRIMARY KEY `id` (`id`) ,
1850 ) TYPE=MYISAM AUTO_INCREMENT=1;