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 `id` smallint(6) NOT NULL auto_increment,
81 `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00',
82 `ending_reconcile_balance` double NOT NULL default '0',
83 `inactive` tinyint(1) NOT NULL default '0',
85 KEY `bank_account_name` (`bank_account_name`),
86 KEY `bank_account_number` (`bank_account_number`)
87 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
90 ### Data of table `0_bank_accounts` ###
92 INSERT INTO `0_bank_accounts` VALUES ('1060', '0', 'Current account', 'N/A', 'N/A', '', 'USD', '1', '0000-00-00 00:00:00', '0', '0');
93 INSERT INTO `0_bank_accounts` VALUES ('1065', '3', 'Petty Cash account', 'N/A', 'N/A', '', 'USD', '2', '0000-00-00 00:00:00', '0', '0');
96 ### Structure of table `0_bank_trans` ###
98 DROP TABLE IF EXISTS `0_bank_trans`;
100 CREATE TABLE `0_bank_trans` (
101 `id` int(11) NOT NULL auto_increment,
102 `type` smallint(6) default NULL,
103 `trans_no` int(11) default NULL,
104 `bank_act` varchar(11) default NULL,
105 `ref` varchar(40) default NULL,
106 `trans_date` date NOT NULL default '0000-00-00',
107 `amount` double default NULL,
108 `dimension_id` int(11) NOT NULL default '0',
109 `dimension2_id` int(11) NOT NULL default '0',
110 `person_type_id` int(11) NOT NULL default '0',
111 `person_id` tinyblob,
112 `reconciled` date default NULL,
114 KEY `bank_act` (`bank_act`,`ref`),
115 KEY `type` (`type`,`trans_no`)
116 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
119 ### Data of table `0_bank_trans` ###
123 ### Structure of table `0_bom` ###
125 DROP TABLE IF EXISTS `0_bom`;
127 CREATE TABLE `0_bom` (
128 `id` int(11) NOT NULL auto_increment,
129 `parent` char(20) NOT NULL default '',
130 `component` char(20) NOT NULL default '',
131 `workcentre_added` int(11) NOT NULL default '0',
132 `loc_code` char(5) NOT NULL default '',
133 `quantity` double NOT NULL default '1',
134 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
135 KEY `component` (`component`),
137 KEY `loc_code` (`loc_code`),
138 KEY `parent` (`parent`,`loc_code`),
139 KEY `Parent_2` (`parent`),
140 KEY `workcentre_added` (`workcentre_added`)
141 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
144 ### Data of table `0_bom` ###
148 ### Structure of table `0_budget_trans` ###
150 DROP TABLE IF EXISTS `0_budget_trans`;
152 CREATE TABLE `0_budget_trans` (
153 `counter` int(11) NOT NULL auto_increment,
154 `type` smallint(6) NOT NULL default '0',
155 `type_no` bigint(16) NOT NULL default '1',
156 `tran_date` date NOT NULL default '0000-00-00',
157 `account` varchar(11) NOT NULL default '',
158 `memo_` tinytext NOT NULL,
159 `amount` double NOT NULL default '0',
160 `dimension_id` int(11) default '0',
161 `dimension2_id` int(11) default '0',
162 `person_type_id` int(11) default NULL,
163 `person_id` tinyblob,
164 PRIMARY KEY (`counter`),
165 KEY `Type_and_Number` (`type`,`type_no`)
166 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
169 ### Data of table `0_budget_trans` ###
173 ### Structure of table `0_chart_class` ###
175 DROP TABLE IF EXISTS `0_chart_class`;
177 CREATE TABLE `0_chart_class` (
178 `cid` int(11) NOT NULL default '0',
179 `class_name` varchar(60) NOT NULL default '',
180 `ctype` tinyint(1) NOT NULL default '0',
181 `inactive` tinyint(1) NOT NULL default '0',
186 ### Data of table `0_chart_class` ###
188 INSERT INTO `0_chart_class` VALUES ('1', 'Assets', '1', '0');
189 INSERT INTO `0_chart_class` VALUES ('2', 'Liabilities', '2', '0');
190 INSERT INTO `0_chart_class` VALUES ('3', 'Income', '4', '0');
191 INSERT INTO `0_chart_class` VALUES ('4', 'Costs', '6', '0');
193 ### Structure of table `0_chart_master` ###
195 DROP TABLE IF EXISTS `0_chart_master`;
197 CREATE TABLE `0_chart_master` (
198 `account_code` varchar(11) NOT NULL default '',
199 `account_code2` varchar(11) default '',
200 `account_name` varchar(60) NOT NULL default '',
201 `account_type` int(11) NOT NULL default '0',
202 `inactive` tinyint(1) NOT NULL default '0',
203 PRIMARY KEY (`account_code`),
204 KEY `account_code` (`account_code`),
205 KEY `account_name` (`account_name`)
209 ### Data of table `0_chart_master` ###
211 INSERT INTO `0_chart_master` VALUES ('1060', '', 'Checking Account', '1', '0');
212 INSERT INTO `0_chart_master` VALUES ('1065', '', 'Petty Cash', '1', '0');
213 INSERT INTO `0_chart_master` VALUES ('1200', '', 'Accounts Receivables', '1', '0');
214 INSERT INTO `0_chart_master` VALUES ('1205', '', 'Allowance for doubtful accounts', '1', '0');
215 INSERT INTO `0_chart_master` VALUES ('1510', '', 'Inventory', '2', '0');
216 INSERT INTO `0_chart_master` VALUES ('1520', '', 'Stocks of Raw Materials', '2', '0');
217 INSERT INTO `0_chart_master` VALUES ('1530', '', 'Stocks of Work In Progress', '2', '0');
218 INSERT INTO `0_chart_master` VALUES ('1540', '', 'Stocks of Finsihed Goods', '2', '0');
219 INSERT INTO `0_chart_master` VALUES ('1550', '', 'Goods Received Clearing account', '2', '0');
220 INSERT INTO `0_chart_master` VALUES ('1820', '', 'Office Furniture & Equipment', '3', '0');
221 INSERT INTO `0_chart_master` VALUES ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0');
222 INSERT INTO `0_chart_master` VALUES ('1840', '', 'Vehicle', '3', '0');
223 INSERT INTO `0_chart_master` VALUES ('1845', '', 'Accum. Amort. -Vehicle', '3', '0');
224 INSERT INTO `0_chart_master` VALUES ('2100', '', 'Accounts Payable', '4', '0');
225 INSERT INTO `0_chart_master` VALUES ('2110', '', 'Accrued Income Tax - Federal', '4', '0');
226 INSERT INTO `0_chart_master` VALUES ('2120', '', 'Accrued Income Tax - State', '4', '0');
227 INSERT INTO `0_chart_master` VALUES ('2130', '', 'Accrued Franchise Tax', '4', '0');
228 INSERT INTO `0_chart_master` VALUES ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0');
229 INSERT INTO `0_chart_master` VALUES ('2150', '', 'Sales Tax', '4', '0');
230 INSERT INTO `0_chart_master` VALUES ('2160', '', 'Accrued Use Tax Payable', '4', '0');
231 INSERT INTO `0_chart_master` VALUES ('2210', '', 'Accrued Wages', '4', '0');
232 INSERT INTO `0_chart_master` VALUES ('2220', '', 'Accrued Comp Time', '4', '0');
233 INSERT INTO `0_chart_master` VALUES ('2230', '', 'Accrued Holiday Pay', '4', '0');
234 INSERT INTO `0_chart_master` VALUES ('2240', '', 'Accrued Vacation Pay', '4', '0');
235 INSERT INTO `0_chart_master` VALUES ('2310', '', 'Accr. Benefits - 401K', '4', '0');
236 INSERT INTO `0_chart_master` VALUES ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0');
237 INSERT INTO `0_chart_master` VALUES ('2330', '', 'Accr. Benefits - Med, Den', '4', '0');
238 INSERT INTO `0_chart_master` VALUES ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0');
239 INSERT INTO `0_chart_master` VALUES ('2350', '', 'Accr. Benefits - Credit Union', '4', '0');
240 INSERT INTO `0_chart_master` VALUES ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0');
241 INSERT INTO `0_chart_master` VALUES ('2370', '', 'Accr. Benefits - Garnish', '4', '0');
242 INSERT INTO `0_chart_master` VALUES ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0');
243 INSERT INTO `0_chart_master` VALUES ('2620', '', 'Bank Loans', '5', '0');
244 INSERT INTO `0_chart_master` VALUES ('2680', '', 'Loans from Shareholders', '5', '0');
245 INSERT INTO `0_chart_master` VALUES ('3350', '', 'Common Shares', '6', '0');
246 INSERT INTO `0_chart_master` VALUES ('3590', '', 'Retained Earnings - prior years', '7', '0');
247 INSERT INTO `0_chart_master` VALUES ('4010', '', 'Sales', '8', '0');
248 INSERT INTO `0_chart_master` VALUES ('4430', '', 'Shipping & Handling', '9', '0');
249 INSERT INTO `0_chart_master` VALUES ('4440', '', 'Interest', '9', '0');
250 INSERT INTO `0_chart_master` VALUES ('4450', '', 'Foreign Exchange Gain', '9', '0');
251 INSERT INTO `0_chart_master` VALUES ('4500', '', 'Prompt Payment Discounts', '9', '0');
252 INSERT INTO `0_chart_master` VALUES ('4510', '', 'Discounts Given', '9', '0');
253 INSERT INTO `0_chart_master` VALUES ('5010', '', 'Cost of Goods Sold - Retail', '10', '0');
254 INSERT INTO `0_chart_master` VALUES ('5020', '', 'Material Usage Varaiance', '10', '0');
255 INSERT INTO `0_chart_master` VALUES ('5030', '', 'Consumable Materials', '10', '0');
256 INSERT INTO `0_chart_master` VALUES ('5040', '', 'Purchase price Variance', '10', '0');
257 INSERT INTO `0_chart_master` VALUES ('5050', '', 'Purchases of materials', '10', '0');
258 INSERT INTO `0_chart_master` VALUES ('5060', '', 'Discounts Received', '10', '0');
259 INSERT INTO `0_chart_master` VALUES ('5100', '', 'Freight', '10', '0');
260 INSERT INTO `0_chart_master` VALUES ('5410', '', 'Wages & Salaries', '11', '0');
261 INSERT INTO `0_chart_master` VALUES ('5420', '', 'Wages - Overtime', '11', '0');
262 INSERT INTO `0_chart_master` VALUES ('5430', '', 'Benefits - Comp Time', '11', '0');
263 INSERT INTO `0_chart_master` VALUES ('5440', '', 'Benefits - Payroll Taxes', '11', '0');
264 INSERT INTO `0_chart_master` VALUES ('5450', '', 'Benefits - Workers Comp', '11', '0');
265 INSERT INTO `0_chart_master` VALUES ('5460', '', 'Benefits - Pension', '11', '0');
266 INSERT INTO `0_chart_master` VALUES ('5470', '', 'Benefits - General Benefits', '11', '0');
267 INSERT INTO `0_chart_master` VALUES ('5510', '', 'Inc Tax Exp - Federal', '11', '0');
268 INSERT INTO `0_chart_master` VALUES ('5520', '', 'Inc Tax Exp - State', '11', '0');
269 INSERT INTO `0_chart_master` VALUES ('5530', '', 'Taxes - Real Estate', '11', '0');
270 INSERT INTO `0_chart_master` VALUES ('5540', '', 'Taxes - Personal Property', '11', '0');
271 INSERT INTO `0_chart_master` VALUES ('5550', '', 'Taxes - Franchise', '11', '0');
272 INSERT INTO `0_chart_master` VALUES ('5560', '', 'Taxes - Foreign Withholding', '11', '0');
273 INSERT INTO `0_chart_master` VALUES ('5610', '', 'Accounting & Legal', '12', '0');
274 INSERT INTO `0_chart_master` VALUES ('5615', '', 'Advertising & Promotions', '12', '0');
275 INSERT INTO `0_chart_master` VALUES ('5620', '', 'Bad Debts', '12', '0');
276 INSERT INTO `0_chart_master` VALUES ('5660', '', 'Amortization Expense', '12', '0');
277 INSERT INTO `0_chart_master` VALUES ('5685', '', 'Insurance', '12', '0');
278 INSERT INTO `0_chart_master` VALUES ('5690', '', 'Interest & Bank Charges', '12', '0');
279 INSERT INTO `0_chart_master` VALUES ('5700', '', 'Office Supplies', '12', '0');
280 INSERT INTO `0_chart_master` VALUES ('5760', '', 'Rent', '12', '0');
281 INSERT INTO `0_chart_master` VALUES ('5765', '', 'Repair & Maintenance', '12', '0');
282 INSERT INTO `0_chart_master` VALUES ('5780', '', 'Telephone', '12', '0');
283 INSERT INTO `0_chart_master` VALUES ('5785', '', 'Travel & Entertainment', '12', '0');
284 INSERT INTO `0_chart_master` VALUES ('5790', '', 'Utilities', '12', '0');
285 INSERT INTO `0_chart_master` VALUES ('5795', '', 'Registrations', '12', '0');
286 INSERT INTO `0_chart_master` VALUES ('5800', '', 'Licenses', '12', '0');
287 INSERT INTO `0_chart_master` VALUES ('5810', '', 'Foreign Exchange Loss', '12', '0');
288 INSERT INTO `0_chart_master` VALUES ('9990', '', 'Year Profit/Loss', '12', '0');
291 ### Structure of table `0_chart_types` ###
293 DROP TABLE IF EXISTS `0_chart_types`;
295 CREATE TABLE `0_chart_types` (
296 `id` int(11) NOT NULL auto_increment,
297 `name` varchar(60) NOT NULL default '',
298 `class_id` tinyint(1) NOT NULL default '0',
299 `parent` int(11) NOT NULL default '-1',
300 `inactive` tinyint(1) NOT NULL default '0',
303 ) TYPE=MyISAM AUTO_INCREMENT=13 ;
306 ### Data of table `0_chart_types` ###
308 INSERT INTO `0_chart_types` VALUES ('1', 'Current Assets', '1', '-1', '0');
309 INSERT INTO `0_chart_types` VALUES ('2', 'Inventory Assets', '1', '-1', '0');
310 INSERT INTO `0_chart_types` VALUES ('3', 'Capital Assets', '1', '-1', '0');
311 INSERT INTO `0_chart_types` VALUES ('4', 'Current Liabilities', '2', '-1', '0');
312 INSERT INTO `0_chart_types` VALUES ('5', 'Long Term Liabilities', '2', '-1', '0');
313 INSERT INTO `0_chart_types` VALUES ('6', 'Share Capital', '2', '-1', '0');
314 INSERT INTO `0_chart_types` VALUES ('7', 'Retained Earnings', '2', '-1', '0');
315 INSERT INTO `0_chart_types` VALUES ('8', 'Sales Revenue', '3', '-1', '0');
316 INSERT INTO `0_chart_types` VALUES ('9', 'Other Revenue', '3', '-1', '0');
317 INSERT INTO `0_chart_types` VALUES ('10', 'Cost of Goods Sold', '4', '-1', '0');
318 INSERT INTO `0_chart_types` VALUES ('11', 'Payroll Expenses', '4', '-1', '0');
319 INSERT INTO `0_chart_types` VALUES ('12', 'General & Administrative expenses', '4', -1, '0');
322 ### Structure of table `0_comments` ###
324 DROP TABLE IF EXISTS `0_comments`;
326 CREATE TABLE `0_comments` (
327 `type` int(11) NOT NULL default '0',
328 `id` int(11) NOT NULL default '0',
329 `date_` date default '0000-00-00',
334 ### Data of table `0_comments` ###
338 ### Structure of table `0_company` ###
340 DROP TABLE IF EXISTS `0_company`;
342 CREATE TABLE `0_company` (
343 `coy_code` int(11) NOT NULL default '1',
344 `coy_name` varchar(60) NOT NULL default '',
345 `gst_no` varchar(25) NOT NULL default '',
346 `coy_no` varchar(25) NOT NULL default '0',
347 `tax_prd` int(11) NOT NULL default '1',
348 `tax_last` int(11) NOT NULL default '1',
349 `postal_address` tinytext NOT NULL,
350 `phone` varchar(30) NOT NULL default '',
351 `fax` varchar(30) NOT NULL default '',
352 `email` varchar(100) NOT NULL default '',
353 `coy_logo` varchar(100) NOT NULL default '',
354 `domicile` varchar(55) NOT NULL default '',
355 `curr_default` char(3) NOT NULL default '',
356 `debtors_act` varchar(11) NOT NULL default '',
357 `pyt_discount_act` varchar(11) NOT NULL default '',
358 `creditors_act` varchar(11) NOT NULL default '',
359 `bank_charge_act` varchar(11) NOT NULL default '',
360 `exchange_diff_act` varchar(11) NOT NULL default '',
361 `profit_loss_year_act` varchar(11) NOT NULL default '',
362 `retained_earnings_act` varchar(11) NOT NULL default '',
363 `freight_act` varchar(11) NOT NULL default '',
364 `default_sales_act` varchar(11) NOT NULL default '',
365 `default_sales_discount_act` varchar(11) NOT NULL default '',
366 `default_prompt_payment_act` varchar(11) NOT NULL default '',
367 `default_inventory_act` varchar(11) NOT NULL default '',
368 `default_cogs_act` varchar(11) NOT NULL default '',
369 `default_adj_act` varchar(11) NOT NULL default '',
370 `default_inv_sales_act` varchar(11) NOT NULL default '',
371 `default_assembly_act` varchar(11) NOT NULL default '',
372 `payroll_act` varchar(11) NOT NULL default '',
373 `allow_negative_stock` tinyint(1) NOT NULL default '0',
374 `po_over_receive` int(11) NOT NULL default '10',
375 `po_over_charge` int(11) NOT NULL default '10',
376 `default_credit_limit` int(11) NOT NULL default '1000',
377 `default_workorder_required` int(11) NOT NULL default '20',
378 `default_dim_required` int(11) NOT NULL default '20',
379 `past_due_days` int(11) NOT NULL default '30',
380 `use_dimension` tinyint(1) default '0',
381 `f_year` int(11) NOT NULL default '1',
382 `no_item_list` tinyint(1) NOT NULL default '0',
383 `no_customer_list` tinyint(1) NOT NULL default '0',
384 `no_supplier_list` tinyint(1) NOT NULL default '0',
385 `base_sales` int(11) NOT NULL default '-1',
386 `foreign_codes` tinyint(1) NOT NULL default '0',
387 `accumulate_shipping` tinyint(1) NOT NULL default '0',
388 `legal_text` tinytext NOT NULL,
389 `default_delivery_required` smallint(6) NOT NULL default '1',
390 `version_id` varchar(11) NOT NULL default '',
391 `time_zone` tinyint(1) NOT NULL default '0',
392 `add_pct` int(5) NOT NULL default '-1',
393 `round_to` int(5) NOT NULL default '1',
394 `login_tout` SMALLINT(6) NOT NULL DEFAULT '600',
395 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 `fax` varchar(30) NOT NULL default '',
481 `contact_name` varchar(60) NOT NULL default '',
482 `email` varchar(100) NOT NULL default '',
483 `default_location` varchar(5) NOT NULL default '',
484 `tax_group_id` int(11) default NULL,
485 `sales_account` varchar(11) default NULL,
486 `sales_discount_account` varchar(11) default NULL,
487 `receivables_account` varchar(11) default NULL,
488 `payment_discount_account` varchar(11) default NULL,
489 `default_ship_via` int(11) NOT NULL default '1',
490 `disable_trans` tinyint(4) NOT NULL default '0',
491 `br_post_address` tinytext NOT NULL,
492 `group_no` int(11) NOT NULL default '0',
493 `inactive` tinyint(1) NOT NULL default '0',
494 PRIMARY KEY (`branch_code`,`debtor_no`),
495 KEY `branch_code` (`branch_code`),
496 KEY `br_name` (`br_name`)
497 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
500 ### Data of table `0_cust_branch` ###
504 ### Structure of table `0_debtor_trans` ###
506 DROP TABLE IF EXISTS `0_debtor_trans`;
508 CREATE TABLE `0_debtor_trans` (
509 `trans_no` int(11) unsigned NOT NULL default '0',
510 `type` smallint(6) unsigned NOT NULL default '0',
511 `version` tinyint(1) unsigned NOT NULL default '0',
512 `debtor_no` int(11) unsigned default NULL,
513 `branch_code` int(11) NOT NULL default '-1',
514 `tran_date` date NOT NULL default '0000-00-00',
515 `due_date` date NOT NULL default '0000-00-00',
516 `reference` varchar(60) NOT NULL default '',
517 `tpe` int(11) NOT NULL default '0',
518 `order_` int(11) NOT NULL default '0',
519 `ov_amount` double NOT NULL default '0',
520 `ov_gst` double NOT NULL default '0',
521 `ov_freight` double NOT NULL default '0',
522 `ov_freight_tax` double NOT NULL default '0',
523 `ov_discount` double NOT NULL default '0',
524 `alloc` double NOT NULL default '0',
525 `rate` double NOT NULL default '1',
526 `ship_via` int(11) default NULL,
527 `trans_link` int(11) NOT NULL default '0',
528 `dimension_id` int(11) NOT NULL default '0',
529 `dimension2_id` int(11) NOT NULL default '0',
530 PRIMARY KEY (`trans_no`,`type`),
531 KEY `debtor_no` (`debtor_no`,`branch_code`)
535 ### Data of table `0_debtor_trans` ###
539 ### Structure of table `0_debtor_trans_details` ###
541 DROP TABLE IF EXISTS `0_debtor_trans_details`;
543 CREATE TABLE `0_debtor_trans_details` (
544 `id` int(11) NOT NULL auto_increment,
545 `debtor_trans_no` int(11) default NULL,
546 `debtor_trans_type` int(11) default NULL,
547 `stock_id` varchar(20) NOT NULL default '',
548 `description` tinytext,
549 `unit_price` double NOT NULL default '0',
550 `unit_tax` double NOT NULL default '0',
551 `quantity` double NOT NULL default '0',
552 `discount_percent` double NOT NULL default '0',
553 `standard_cost` double NOT NULL default '0',
554 `qty_done` double NOT NULL default '0',
556 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
559 ### Data of table `0_debtor_trans_details` ###
563 ### Structure of table `0_debtors_master` ###
565 DROP TABLE IF EXISTS `0_debtors_master`;
567 CREATE TABLE `0_debtors_master` (
568 `debtor_no` int(11) NOT NULL auto_increment,
569 `name` varchar(80) NOT NULL default '',
570 `debtor_ref` varchar(30) NOT NULL,
572 `email` varchar(100) NOT NULL default '',
573 `tax_id` varchar(55) NOT NULL default '',
574 `curr_code` char(3) NOT NULL default '',
575 `sales_type` int(11) NOT NULL default '1',
576 `dimension_id` int(11) NOT NULL default '0',
577 `dimension2_id` int(11) NOT NULL default '0',
578 `credit_status` int(11) NOT NULL default '0',
579 `payment_terms` int(11) default NULL,
580 `discount` double NOT NULL default '0',
581 `pymt_discount` double NOT NULL default '0',
582 `credit_limit` float NOT NULL default '1000',
583 `inactive` tinyint(1) NOT NULL default '0',
584 PRIMARY KEY (`debtor_no`),
585 UNIQUE KEY `name` (`name`)
586 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
589 ### Data of table `0_debtors_master` ###
593 ### Structure of table `0_dimensions` ###
595 DROP TABLE IF EXISTS `0_dimensions`;
597 CREATE TABLE `0_dimensions` (
598 `id` int(11) NOT NULL auto_increment,
599 `reference` varchar(60) NOT NULL default '',
600 `name` varchar(60) NOT NULL default '',
601 `type_` tinyint(1) NOT NULL default '1',
602 `closed` tinyint(1) NOT NULL default '0',
603 `date_` date NOT NULL default '0000-00-00',
604 `due_date` date NOT NULL default '0000-00-00',
606 UNIQUE KEY `reference` (`reference`)
607 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
610 ### Data of table `0_dimensions` ###
614 ### Structure of table `0_exchange_rates` ###
616 DROP TABLE IF EXISTS `0_exchange_rates`;
618 CREATE TABLE `0_exchange_rates` (
619 `id` int(11) NOT NULL auto_increment,
620 `curr_code` char(3) NOT NULL default '',
621 `rate_buy` double NOT NULL default '0',
622 `rate_sell` double NOT NULL default '0',
623 `date_` date NOT NULL default '0000-00-00',
625 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
626 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
629 ### Data of table `0_exchange_rates` ###
633 ### Structure of table `0_fiscal_year` ###
635 DROP TABLE IF EXISTS `0_fiscal_year`;
637 CREATE TABLE `0_fiscal_year` (
638 `id` int(11) NOT NULL auto_increment,
639 `begin` date default '0000-00-00',
640 `end` date default '0000-00-00',
641 `closed` tinyint(1) NOT NULL default '0',
643 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
646 ### Data of table `0_fiscal_year` ###
648 INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0');
651 ### Structure of table `0_gl_trans` ###
653 DROP TABLE IF EXISTS `0_gl_trans`;
655 CREATE TABLE `0_gl_trans` (
656 `counter` int(11) NOT NULL auto_increment,
657 `type` smallint(6) NOT NULL default '0',
658 `type_no` bigint(16) NOT NULL default '1',
659 `tran_date` date NOT NULL default '0000-00-00',
660 `account` varchar(11) NOT NULL default '',
661 `memo_` tinytext NOT NULL,
662 `amount` double NOT NULL default '0',
663 `dimension_id` int(11) NOT NULL default '0',
664 `dimension2_id` int(11) NOT NULL default '0',
665 `person_type_id` int(11) default NULL,
666 `person_id` tinyblob,
667 PRIMARY KEY (`counter`),
668 KEY `Type_and_Number` (`type`,`type_no`)
669 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
672 ### Data of table `0_gl_trans` ###
676 ### Structure of table `0_grn_batch` ###
678 DROP TABLE IF EXISTS `0_grn_batch`;
680 CREATE TABLE `0_grn_batch` (
681 `id` int(11) NOT NULL auto_increment,
682 `supplier_id` int(11) NOT NULL default '0',
683 `purch_order_no` int(11) default NULL,
684 `reference` varchar(60) NOT NULL default '',
685 `delivery_date` date NOT NULL default '0000-00-00',
686 `loc_code` varchar(5) default NULL,
688 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
691 ### Data of table `0_grn_batch` ###
695 ### Structure of table `0_grn_items` ###
697 DROP TABLE IF EXISTS `0_grn_items`;
699 CREATE TABLE `0_grn_items` (
700 `id` int(11) NOT NULL auto_increment,
701 `grn_batch_id` int(11) default NULL,
702 `po_detail_item` int(11) NOT NULL default '0',
703 `item_code` varchar(20) NOT NULL default '',
704 `description` tinytext,
705 `qty_recd` double NOT NULL default '0',
706 `quantity_inv` double NOT NULL default '0',
708 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
711 ### Data of table `0_grn_items` ###
715 ### Structure of table `0_groups` ###
717 DROP TABLE IF EXISTS `0_groups`;
719 CREATE TABLE `0_groups` (
720 `id` smallint(6) unsigned NOT NULL auto_increment,
721 `description` varchar(60) NOT NULL default '',
722 `inactive` tinyint(1) NOT NULL default '0',
724 UNIQUE KEY `description` (`description`)
725 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
728 ### Data of table `0_groups` ###
730 INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
731 INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
732 INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
735 ### Structure of table `0_item_codes` ###
737 DROP TABLE IF EXISTS `0_item_codes`;
739 CREATE TABLE `0_item_codes` (
740 `id` int(11) unsigned NOT NULL auto_increment,
741 `item_code` varchar(20) NOT NULL,
742 `stock_id` varchar(20) NOT NULL,
743 `description` varchar(200) NOT NULL default '',
744 `category_id` smallint(6) unsigned NOT NULL,
745 `quantity` double NOT NULL default '1',
746 `is_foreign` tinyint(1) NOT NULL default '0',
747 `inactive` tinyint(1) NOT NULL default '0',
749 UNIQUE KEY `stock_id` (`stock_id`,`item_code`)
750 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
753 ### Data of table `0_item_codes` ###
757 ### Structure of table `0_item_tax_type_exemptions` ###
759 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
761 CREATE TABLE `0_item_tax_type_exemptions` (
762 `item_tax_type_id` int(11) NOT NULL default '0',
763 `tax_type_id` int(11) NOT NULL default '0',
764 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
768 ### Data of table `0_item_tax_type_exemptions` ###
772 ### Structure of table `0_item_tax_types` ###
774 DROP TABLE IF EXISTS `0_item_tax_types`;
776 CREATE TABLE `0_item_tax_types` (
777 `id` int(11) NOT NULL auto_increment,
778 `name` varchar(60) NOT NULL default '',
779 `exempt` tinyint(1) NOT NULL default '0',
780 `inactive` tinyint(1) NOT NULL default '0',
782 UNIQUE KEY `name` (`name`)
783 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
786 ### Data of table `0_item_tax_types` ###
788 INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0', '0');
791 ### Structure of table `0_item_units` ###
793 DROP TABLE IF EXISTS `0_item_units`;
795 CREATE TABLE `0_item_units` (
796 `abbr` varchar(20) NOT NULL,
797 `name` varchar(40) NOT NULL,
798 `decimals` tinyint(2) NOT NULL,
799 `inactive` tinyint(1) NOT NULL default '0',
800 PRIMARY KEY (`abbr`),
801 UNIQUE KEY `name` (`name`)
805 ### Data of table `0_item_units` ###
807 INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0');
810 ### Structure of table `0_loc_stock` ###
812 DROP TABLE IF EXISTS `0_loc_stock`;
814 CREATE TABLE `0_loc_stock` (
815 `loc_code` char(5) NOT NULL default '',
816 `stock_id` char(20) NOT NULL default '',
817 `reorder_level` bigint(20) NOT NULL default '0',
818 PRIMARY KEY (`loc_code`,`stock_id`),
819 KEY `stock_id` (`stock_id`)
823 ### Data of table `0_loc_stock` ###
827 ### Structure of table `0_locations` ###
829 DROP TABLE IF EXISTS `0_locations`;
831 CREATE TABLE `0_locations` (
832 `loc_code` varchar(5) NOT NULL default '',
833 `location_name` varchar(60) NOT NULL default '',
834 `delivery_address` tinytext NOT NULL,
835 `phone` varchar(30) NOT NULL default '',
836 `fax` varchar(30) NOT NULL default '',
837 `email` varchar(100) NOT NULL default '',
838 `contact` varchar(30) NOT NULL default '',
839 `inactive` tinyint(1) NOT NULL default '0',
840 PRIMARY KEY (`loc_code`)
844 ### Data of table `0_locations` ###
846 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '0');
849 ### Structure of table `0_movement_types` ###
851 DROP TABLE IF EXISTS `0_movement_types`;
853 CREATE TABLE `0_movement_types` (
854 `id` int(11) NOT NULL auto_increment,
855 `name` varchar(60) NOT NULL default '',
856 `inactive` tinyint(1) NOT NULL default '0',
858 UNIQUE KEY `name` (`name`)
859 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
862 ### Data of table `0_movement_types` ###
864 INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment', '0');
867 ### Structure of table `0_payment_terms` ###
869 DROP TABLE IF EXISTS `0_payment_terms`;
871 CREATE TABLE `0_payment_terms` (
872 `terms_indicator` int(11) NOT NULL auto_increment,
873 `terms` char(80) NOT NULL default '',
874 `days_before_due` smallint(6) NOT NULL default '0',
875 `day_in_following_month` smallint(6) NOT NULL default '0',
876 `inactive` tinyint(1) NOT NULL default '0',
877 PRIMARY KEY (`terms_indicator`),
878 UNIQUE KEY `terms` (`terms`)
879 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
882 ### Data of table `0_payment_terms` ###
884 INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0');
885 INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0');
886 INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0');
887 INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0');
890 ### Structure of table `0_prices` ###
892 DROP TABLE IF EXISTS `0_prices`;
894 CREATE TABLE `0_prices` (
895 `id` int(11) NOT NULL auto_increment,
896 `stock_id` varchar(20) NOT NULL default '',
897 `sales_type_id` int(11) NOT NULL default '0',
898 `curr_abrev` char(3) NOT NULL default '',
899 `price` double NOT NULL default '0',
901 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
902 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
905 ### Data of table `0_prices` ###
909 ### Structure of table `0_print_profiles` ###
911 DROP TABLE IF EXISTS `0_print_profiles`;
913 CREATE TABLE `0_print_profiles` (
914 `id` smallint(6) unsigned NOT NULL auto_increment,
915 `profile` varchar(30) NOT NULL,
916 `report` varchar(5) default NULL,
917 `printer` tinyint(3) unsigned default NULL,
919 UNIQUE KEY `profile` (`profile`,`report`)
920 ) TYPE=MyISAM AUTO_INCREMENT=10 ;
923 ### Data of table `0_print_profiles` ###
925 INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0');
926 INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0');
927 INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2');
928 INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2');
929 INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2');
930 INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2');
931 INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2');
932 INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2');
933 INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2');
936 ### Structure of table `0_printers` ###
938 DROP TABLE IF EXISTS `0_printers`;
940 CREATE TABLE `0_printers` (
941 `id` tinyint(3) unsigned NOT NULL auto_increment,
942 `name` varchar(20) NOT NULL,
943 `description` varchar(60) NOT NULL,
944 `queue` varchar(20) NOT NULL,
945 `host` varchar(40) NOT NULL,
946 `port` smallint(11) unsigned NOT NULL,
947 `timeout` tinyint(3) unsigned NOT NULL,
949 UNIQUE KEY `name` (`name`)
950 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
953 ### Data of table `0_printers` ###
955 INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20');
956 INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5');
957 INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
960 ### Structure of table `0_purch_data` ###
962 DROP TABLE IF EXISTS `0_purch_data`;
964 CREATE TABLE `0_purch_data` (
965 `supplier_id` int(11) NOT NULL default '0',
966 `stock_id` char(20) NOT NULL default '',
967 `price` double NOT NULL default '0',
968 `suppliers_uom` char(50) NOT NULL default '',
969 `conversion_factor` double NOT NULL default '1',
970 `supplier_description` char(50) NOT NULL default '',
971 PRIMARY KEY (`supplier_id`,`stock_id`)
975 ### Data of table `0_purch_data` ###
979 ### Structure of table `0_purch_order_details` ###
981 DROP TABLE IF EXISTS `0_purch_order_details`;
983 CREATE TABLE `0_purch_order_details` (
984 `po_detail_item` int(11) NOT NULL auto_increment,
985 `order_no` int(11) NOT NULL default '0',
986 `item_code` varchar(20) NOT NULL default '',
987 `description` tinytext,
988 `delivery_date` date NOT NULL default '0000-00-00',
989 `qty_invoiced` double NOT NULL default '0',
990 `unit_price` double NOT NULL default '0',
991 `act_price` double NOT NULL default '0',
992 `std_cost_unit` double NOT NULL default '0',
993 `quantity_ordered` double NOT NULL default '0',
994 `quantity_received` double NOT NULL default '0',
995 PRIMARY KEY (`po_detail_item`)
996 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
999 ### Data of table `0_purch_order_details` ###
1003 ### Structure of table `0_purch_orders` ###
1005 DROP TABLE IF EXISTS `0_purch_orders`;
1007 CREATE TABLE `0_purch_orders` (
1008 `order_no` int(11) NOT NULL auto_increment,
1009 `supplier_id` int(11) NOT NULL default '0',
1010 `comments` tinytext,
1011 `ord_date` date NOT NULL default '0000-00-00',
1012 `reference` tinytext NOT NULL,
1013 `requisition_no` tinytext,
1014 `into_stock_location` varchar(5) NOT NULL default '',
1015 `delivery_address` tinytext NOT NULL,
1016 PRIMARY KEY (`order_no`)
1017 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1020 ### Data of table `0_purch_orders` ###
1024 ### Structure of table `0_quick_entries` ###
1026 DROP TABLE IF EXISTS `0_quick_entries`;
1028 CREATE TABLE `0_quick_entries` (
1029 `id` smallint(6) unsigned NOT NULL auto_increment,
1030 `type` tinyint(1) NOT NULL default '0',
1031 `description` varchar(60) NOT NULL,
1032 `base_amount` double NOT NULL default '0',
1033 `base_desc` varchar(60) default NULL,
1035 KEY `description` (`description`)
1036 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
1039 ### Data of table `0_quick_entries` ###
1041 INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount');
1042 INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount');
1043 INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount');
1046 ### Structure of table `0_quick_entry_lines` ###
1048 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1050 CREATE TABLE `0_quick_entry_lines` (
1051 `id` smallint(6) unsigned NOT NULL auto_increment,
1052 `qid` smallint(6) unsigned NOT NULL,
1053 `amount` double default '0',
1054 `action` varchar(2) NOT NULL,
1055 `dest_id` varchar(11) NOT NULL,
1056 `dimension_id` smallint(6) unsigned default NULL,
1057 `dimension2_id` smallint(6) unsigned default NULL,
1060 ) TYPE=MyISAM AUTO_INCREMENT=7 ;
1063 ### Data of table `0_quick_entry_lines` ###
1065 INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', 't-', '1', '0', '0');
1066 INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', 't-', '1', '0', '0');
1067 INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', 't-', '1', '0', '0');
1068 INSERT INTO `0_quick_entry_lines` VALUES ('4', '3', '0', '=', '4010', '0', '0');
1069 INSERT INTO `0_quick_entry_lines` VALUES ('5', '1', '0', '=', '5765', '0', '0');
1070 INSERT INTO `0_quick_entry_lines` VALUES ('6', '2', '0', '=', '5780', '0', '0');
1073 ### Structure of table `0_recurrent_invoices` ###
1075 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1077 CREATE TABLE `0_recurrent_invoices` (
1078 `id` smallint(6) unsigned NOT NULL auto_increment,
1079 `description` varchar(60) NOT NULL default '',
1080 `order_no` int(11) unsigned NOT NULL,
1081 `debtor_no` int(11) unsigned default NULL,
1082 `group_no` smallint(6) unsigned default NULL,
1083 `days` int(11) NOT NULL default '0',
1084 `monthly` int(11) NOT NULL default '0',
1085 `begin` date NOT NULL default '0000-00-00',
1086 `end` date NOT NULL default '0000-00-00',
1087 `last_sent` date NOT NULL default '0000-00-00',
1089 UNIQUE KEY `description` (`description`)
1090 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1093 ### Data of table `0_recurrent_invoices` ###
1097 ### Structure of table `0_refs` ###
1099 DROP TABLE IF EXISTS `0_refs`;
1101 CREATE TABLE `0_refs` (
1102 `id` int(11) NOT NULL default '0',
1103 `type` int(11) NOT NULL default '0',
1104 `reference` varchar(100) NOT NULL default '',
1105 PRIMARY KEY (`id`,`type`)
1109 ### Data of table `0_refs` ###
1113 ### Structure of table `0_sales_order_details` ###
1115 DROP TABLE IF EXISTS `0_sales_order_details`;
1117 CREATE TABLE `0_sales_order_details` (
1118 `id` int(11) NOT NULL auto_increment,
1119 `order_no` int(11) NOT NULL default '0',
1120 `trans_type` smallint(6) NOT NULL default '30',
1121 `stk_code` varchar(20) NOT NULL default '',
1122 `description` tinytext,
1123 `qty_sent` double NOT NULL default '0',
1124 `unit_price` double NOT NULL default '0',
1125 `quantity` double NOT NULL default '0',
1126 `discount_percent` double NOT NULL default '0',
1128 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1131 ### Data of table `0_sales_order_details` ###
1135 ### Structure of table `0_sales_orders` ###
1137 DROP TABLE IF EXISTS `0_sales_orders`;
1139 CREATE TABLE `0_sales_orders` (
1140 `order_no` int(11) NOT NULL auto_increment,
1141 `trans_type` smallint(6) NOT NULL default '30',
1142 `version` tinyint(1) unsigned NOT NULL default '0',
1143 `type` tinyint(1) NOT NULL default '0',
1144 `debtor_no` int(11) NOT NULL default '0',
1145 `branch_code` int(11) NOT NULL default '0',
1146 `reference` varchar(100) NOT NULL default '',
1147 `customer_ref` tinytext NOT NULL,
1148 `comments` tinytext,
1149 `ord_date` date NOT NULL default '0000-00-00',
1150 `order_type` int(11) NOT NULL default '0',
1151 `ship_via` int(11) NOT NULL default '0',
1152 `delivery_address` tinytext NOT NULL,
1153 `contact_phone` varchar(30) default NULL,
1154 `contact_email` varchar(100) default NULL,
1155 `deliver_to` tinytext NOT NULL,
1156 `freight_cost` double NOT NULL default '0',
1157 `from_stk_loc` varchar(5) NOT NULL default '',
1158 `delivery_date` date NOT NULL default '0000-00-00',
1159 PRIMARY KEY (`trans_type`, `order_no`)
1163 ### Data of table `0_sales_orders` ###
1167 ### Structure of table `0_sales_pos` ###
1169 DROP TABLE IF EXISTS `0_sales_pos`;
1171 CREATE TABLE `0_sales_pos` (
1172 `id` smallint(6) unsigned NOT NULL auto_increment,
1173 `pos_name` varchar(30) NOT NULL,
1174 `cash_sale` tinyint(1) NOT NULL,
1175 `credit_sale` tinyint(1) NOT NULL,
1176 `pos_location` varchar(5) NOT NULL,
1177 `pos_account` smallint(6) unsigned NOT NULL,
1178 `inactive` tinyint(1) NOT NULL default '0',
1180 UNIQUE KEY `pos_name` (`pos_name`)
1181 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1184 ### Data of table `0_sales_pos` ###
1186 INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '2', '0');
1189 ### Structure of table `0_sales_types` ###
1191 DROP TABLE IF EXISTS `0_sales_types`;
1193 CREATE TABLE `0_sales_types` (
1194 `id` int(11) NOT NULL auto_increment,
1195 `sales_type` char(50) NOT NULL default '',
1196 `tax_included` int(1) NOT NULL default '0',
1197 `factor` double NOT NULL default '1',
1198 `inactive` tinyint(1) NOT NULL default '0',
1200 UNIQUE KEY `sales_type` (`sales_type`)
1201 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
1204 ### Data of table `0_sales_types` ###
1206 INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '1', '1', '0');
1207 INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '0.7', '0');
1210 ### Structure of table `0_salesman` ###
1212 DROP TABLE IF EXISTS `0_salesman`;
1214 CREATE TABLE `0_salesman` (
1215 `salesman_code` int(11) NOT NULL auto_increment,
1216 `salesman_name` char(60) NOT NULL default '',
1217 `salesman_phone` char(30) NOT NULL default '',
1218 `salesman_fax` char(30) NOT NULL default '',
1219 `salesman_email` varchar(100) NOT NULL default '',
1220 `provision` double NOT NULL default '0',
1221 `break_pt` double NOT NULL default '0',
1222 `provision2` double NOT NULL default '0',
1223 `inactive` tinyint(1) NOT NULL default '0',
1224 PRIMARY KEY (`salesman_code`),
1225 UNIQUE KEY `salesman_name` (`salesman_name`)
1226 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1229 ### Data of table `0_salesman` ###
1231 INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1233 ### Structure of table `0_security_roles` ###
1235 DROP TABLE IF EXISTS `0_security_roles`;
1236 CREATE TABLE IF NOT EXISTS `0_security_roles` (
1237 `id` int(11) NOT NULL auto_increment,
1238 `role` varchar(30) NOT NULL,
1239 `description` varchar(50) default NULL,
1242 `inactive` tinyint(1) NOT NULL default '0',
1244 UNIQUE KEY `role` (`role`)
1245 ) TYPE=MyISAM AUTO_INCREMENT=11 ;
1248 -- Data of table `0_security_roles`
1251 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;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);
1252 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;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;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5636;5637;5638;5639;5640;5641;5889;5891;7937;7938;7939;7940;8193;8194;8195;8196;8197;8449;8450;8451;10497;10753;10754;10755;10756;10757;11009;11010;11012;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15625;15626;15873;15874;15875;15876;15877;15878;15879;15880;15881;15882;15883;16129;16130;16131;16132', 0);
1253 INSERT INTO `0_security_roles` VALUES(3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873', 0);
1254 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;5891;8193;8194;8450;8451;10753;11009;11010;11012;13313;13315;15882;16129;16130;16131;16132', 0);
1255 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;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);
1256 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;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);
1257 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;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);
1258 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', '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;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);
1259 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;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);
1260 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', '521;523;524;771;772;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;5377;5633;5633;5634;5635;5637;5638;5639;5640;5640;5889;5891;8193;8194;8194;8196;8197;8449;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15873;15873;15874;15876;15877;15878;15879;15880;15882;16129;16129;16130;16130;16131;16132', 0);
1262 ### Structure of table `0_shippers` ###
1264 DROP TABLE IF EXISTS `0_shippers`;
1266 CREATE TABLE `0_shippers` (
1267 `shipper_id` int(11) NOT NULL auto_increment,
1268 `shipper_name` varchar(60) NOT NULL default '',
1269 `phone` varchar(30) NOT NULL default '',
1270 `contact` tinytext NOT NULL,
1271 `address` tinytext NOT NULL,
1272 `inactive` tinyint(1) NOT NULL default '0',
1273 PRIMARY KEY (`shipper_id`),
1274 UNIQUE KEY `name` (`shipper_name`)
1275 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1278 ### Data of table `0_shippers` ###
1280 INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '0');
1283 ### Structure of table `0_sql_trail` ###
1285 DROP TABLE IF EXISTS `0_sql_trail`;
1287 CREATE TABLE `0_sql_trail` (
1288 `id` int(11) unsigned NOT NULL auto_increment,
1289 `sql` text NOT NULL,
1290 `result` tinyint(1) NOT NULL,
1291 `msg` varchar(255) NOT NULL,
1293 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1296 ### Data of table `0_sql_trail` ###
1300 ### Structure of table `0_stock_category` ###
1302 DROP TABLE IF EXISTS `0_stock_category`;
1304 CREATE TABLE `0_stock_category` (
1305 `category_id` int(11) NOT NULL auto_increment,
1306 `description` varchar(60) NOT NULL default '',
1307 `dflt_tax_type` int(11) NOT NULL default '0',
1308 `dflt_units` varchar(20) NOT NULL default 'each',
1309 `dflt_mb_flag` char(1) NOT NULL default 'B',
1310 `dflt_sales_act` varchar(11) NOT NULL default '',
1311 `dflt_cogs_act` varchar(11) NOT NULL default '',
1312 `dflt_inventory_act` varchar(11) NOT NULL default '',
1313 `dflt_adjustment_act` varchar(11) NOT NULL default '',
1314 `dflt_assembly_act` varchar(11) NOT NULL default '',
1315 `dflt_dim1` int(11) default NULL,
1316 `dflt_dim2` int(11) default NULL,
1317 `inactive` tinyint(1) NOT NULL default '0',
1318 `dflt_no_sale` tinyint(1) NOT NULL default '0',
1319 PRIMARY KEY (`category_id`),
1320 UNIQUE KEY `description` (`description`)
1321 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
1324 ### Data of table `0_stock_category` ###
1326 INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1327 INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1328 INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1329 INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1332 ### Structure of table `0_stock_master` ###
1334 DROP TABLE IF EXISTS `0_stock_master`;
1336 CREATE TABLE `0_stock_master` (
1337 `stock_id` varchar(20) NOT NULL default '',
1338 `category_id` int(11) NOT NULL default '0',
1339 `tax_type_id` int(11) NOT NULL default '0',
1340 `description` varchar(200) NOT NULL default '',
1341 `long_description` tinytext NOT NULL,
1342 `units` varchar(20) NOT NULL default 'each',
1343 `mb_flag` char(1) NOT NULL default 'B',
1344 `sales_account` varchar(11) NOT NULL default '',
1345 `cogs_account` varchar(11) NOT NULL default '',
1346 `inventory_account` varchar(11) NOT NULL default '',
1347 `adjustment_account` varchar(11) NOT NULL default '',
1348 `assembly_account` varchar(11) NOT NULL default '',
1349 `dimension_id` int(11) default NULL,
1350 `dimension2_id` int(11) default NULL,
1351 `actual_cost` double NOT NULL default '0',
1352 `last_cost` double NOT NULL default '0',
1353 `material_cost` double NOT NULL default '0',
1354 `labour_cost` double NOT NULL default '0',
1355 `overhead_cost` double NOT NULL default '0',
1356 `inactive` tinyint(1) NOT NULL default '0',
1357 `no_sale` tinyint(1) NOT NULL default '0',
1358 PRIMARY KEY (`stock_id`)
1362 ### Data of table `0_stock_master` ###
1366 ### Structure of table `0_stock_moves` ###
1368 DROP TABLE IF EXISTS `0_stock_moves`;
1370 CREATE TABLE `0_stock_moves` (
1371 `trans_id` int(11) NOT NULL auto_increment,
1372 `trans_no` int(11) NOT NULL default '0',
1373 `stock_id` char(20) NOT NULL default '',
1374 `type` smallint(6) NOT NULL default '0',
1375 `loc_code` char(5) NOT NULL default '',
1376 `tran_date` date NOT NULL default '0000-00-00',
1377 `person_id` int(11) default NULL,
1378 `price` double NOT NULL default '0',
1379 `reference` char(40) NOT NULL default '',
1380 `qty` double NOT NULL default '1',
1381 `discount_percent` double NOT NULL default '0',
1382 `standard_cost` double NOT NULL default '0',
1383 `visible` tinyint(1) NOT NULL default '1',
1384 PRIMARY KEY (`trans_id`),
1385 KEY `type` (`type`,`trans_no`)
1386 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1389 ### Data of table `0_stock_moves` ###
1393 ### Structure of table `0_supp_allocations` ###
1395 DROP TABLE IF EXISTS `0_supp_allocations`;
1397 CREATE TABLE `0_supp_allocations` (
1398 `id` int(11) NOT NULL auto_increment,
1399 `amt` double unsigned default NULL,
1400 `date_alloc` date NOT NULL default '0000-00-00',
1401 `trans_no_from` int(11) default NULL,
1402 `trans_type_from` int(11) default NULL,
1403 `trans_no_to` int(11) default NULL,
1404 `trans_type_to` int(11) default NULL,
1406 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1409 ### Data of table `0_supp_allocations` ###
1413 ### Structure of table `0_supp_invoice_items` ###
1415 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1417 CREATE TABLE `0_supp_invoice_items` (
1418 `id` int(11) NOT NULL auto_increment,
1419 `supp_trans_no` int(11) default NULL,
1420 `supp_trans_type` int(11) default NULL,
1421 `gl_code` varchar(11) NOT NULL default '0',
1422 `grn_item_id` int(11) default NULL,
1423 `po_detail_item_id` int(11) default NULL,
1424 `stock_id` varchar(20) NOT NULL default '',
1425 `description` tinytext,
1426 `quantity` double NOT NULL default '0',
1427 `unit_price` double NOT NULL default '0',
1428 `unit_tax` double NOT NULL default '0',
1431 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1434 ### Data of table `0_supp_invoice_items` ###
1438 ### Structure of table `0_supp_trans` ###
1440 DROP TABLE IF EXISTS `0_supp_trans`;
1442 CREATE TABLE `0_supp_trans` (
1443 `trans_no` int(11) unsigned NOT NULL default '0',
1444 `type` smallint(6) unsigned NOT NULL default '0',
1445 `supplier_id` int(11) unsigned default NULL,
1446 `reference` tinytext NOT NULL,
1447 `supp_reference` varchar(60) NOT NULL default '',
1448 `tran_date` date NOT NULL default '0000-00-00',
1449 `due_date` date NOT NULL default '0000-00-00',
1450 `ov_amount` double NOT NULL default '0',
1451 `ov_discount` double NOT NULL default '0',
1452 `ov_gst` double NOT NULL default '0',
1453 `rate` double NOT NULL default '1',
1454 `alloc` double NOT NULL default '0',
1455 PRIMARY KEY (`trans_no`,`type`),
1456 KEY `supplier_id` (`supplier_id`),
1457 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1462 ### Data of table `0_supp_trans` ###
1466 ### Structure of table `0_suppliers` ###
1468 DROP TABLE IF EXISTS `0_suppliers`;
1470 CREATE TABLE `0_suppliers` (
1471 `supplier_id` int(11) NOT NULL auto_increment,
1472 `supp_name` varchar(60) NOT NULL default '',
1473 `supp_ref` varchar(30) NOT NULL default '',
1474 `address` tinytext NOT NULL,
1475 `supp_address` tinytext NOT NULL,
1476 `phone` varchar(30) NOT NULL default '',
1477 `fax` varchar(30) NOT NULL default '',
1478 `gst_no` varchar(25) NOT NULL default '',
1479 `contact` varchar(60) NOT NULL default '',
1480 `supp_account_no` varchar(40) NOT NULL default '',
1481 `email` varchar(100) NOT NULL default '',
1482 `website` varchar(100) NOT NULL default '',
1483 `bank_account` varchar(60) NOT NULL default '',
1484 `curr_code` char(3) default NULL,
1485 `payment_terms` int(11) default NULL,
1486 `dimension_id` int(11) default '0',
1487 `dimension2_id` int(11) default '0',
1488 `tax_group_id` int(11) default NULL,
1489 `credit_limit` double NOT NULL default '0',
1490 `purchase_account` varchar(11) default NULL,
1491 `payable_account` varchar(11) default NULL,
1492 `payment_discount_account` varchar(11) default NULL,
1493 `notes` tinytext NOT NULL,
1494 `inactive` tinyint(1) NOT NULL default '0',
1495 PRIMARY KEY (`supplier_id`)
1496 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1499 ### Data of table `0_suppliers` ###
1503 ### Structure of table `0_sys_types` ###
1505 DROP TABLE IF EXISTS `0_sys_types`;
1507 CREATE TABLE `0_sys_types` (
1508 `type_id` smallint(6) NOT NULL default '0',
1509 `type_no` int(11) NOT NULL default '1',
1510 `next_reference` varchar(100) NOT NULL default '',
1511 PRIMARY KEY (`type_id`)
1515 ### Data of table `0_sys_types` ###
1517 INSERT INTO `0_sys_types` VALUES ('0', '17', '1');
1518 INSERT INTO `0_sys_types` VALUES ('1', '7', '1');
1519 INSERT INTO `0_sys_types` VALUES ('2', '4', '1');
1520 INSERT INTO `0_sys_types` VALUES ('4', '3', '1');
1521 INSERT INTO `0_sys_types` VALUES ('10', '16', '1');
1522 INSERT INTO `0_sys_types` VALUES ('11', '2', '1');
1523 INSERT INTO `0_sys_types` VALUES ('12', '6', '1');
1524 INSERT INTO `0_sys_types` VALUES ('13', '1', '1');
1525 INSERT INTO `0_sys_types` VALUES ('16', '2', '1');
1526 INSERT INTO `0_sys_types` VALUES ('17', '2', '1');
1527 INSERT INTO `0_sys_types` VALUES ('18', '1', '1');
1528 INSERT INTO `0_sys_types` VALUES ('20', '6', '1');
1529 INSERT INTO `0_sys_types` VALUES ('21', '1', '1');
1530 INSERT INTO `0_sys_types` VALUES ('22', '3', '1');
1531 INSERT INTO `0_sys_types` VALUES ('25', '1', '1');
1532 INSERT INTO `0_sys_types` VALUES ('26', '1', '1');
1533 INSERT INTO `0_sys_types` VALUES ('28', '1', '1');
1534 INSERT INTO `0_sys_types` VALUES ('29', '1', '1');
1535 INSERT INTO `0_sys_types` VALUES ('30', '0', '1');
1536 INSERT INTO `0_sys_types` VALUES ('32', '0', '1');
1537 INSERT INTO `0_sys_types` VALUES ('35', '1', '1');
1538 INSERT INTO `0_sys_types` VALUES ('40', '1', '1');
1541 ### Structure of table `0_tax_group_items` ###
1543 DROP TABLE IF EXISTS `0_tax_group_items`;
1545 CREATE TABLE `0_tax_group_items` (
1546 `tax_group_id` int(11) NOT NULL default '0',
1547 `tax_type_id` int(11) NOT NULL default '0',
1548 `rate` double NOT NULL default '0',
1549 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1553 ### Data of table `0_tax_group_items` ###
1555 INSERT INTO `0_tax_group_items` VALUES ('1', '1', '5');
1558 ### Structure of table `0_tax_groups` ###
1560 DROP TABLE IF EXISTS `0_tax_groups`;
1562 CREATE TABLE `0_tax_groups` (
1563 `id` int(11) NOT NULL auto_increment,
1564 `name` varchar(60) NOT NULL default '',
1565 `tax_shipping` tinyint(1) NOT NULL default '0',
1566 `inactive` tinyint(1) NOT NULL default '0',
1568 UNIQUE KEY `name` (`name`)
1569 ) TYPE=InnoDB AUTO_INCREMENT=3 ;
1572 ### Data of table `0_tax_groups` ###
1574 INSERT INTO `0_tax_groups` VALUES ('1', 'Tax', '0', '0');
1575 INSERT INTO `0_tax_groups` VALUES ('2', 'Tax Exempt', '0', '0');
1578 ### Structure of table `0_tax_types` ###
1580 DROP TABLE IF EXISTS `0_tax_types`;
1582 CREATE TABLE `0_tax_types` (
1583 `id` int(11) NOT NULL auto_increment,
1584 `rate` double NOT NULL default '0',
1585 `sales_gl_code` varchar(11) NOT NULL default '',
1586 `purchasing_gl_code` varchar(11) NOT NULL default '',
1587 `name` varchar(60) NOT NULL default '',
1588 `inactive` tinyint(1) NOT NULL default '0',
1590 UNIQUE KEY `name` (`name`,`rate`)
1591 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
1594 ### Data of table `0_tax_types` ###
1596 INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2150', 'Tax', '0');
1599 ### Structure of table `0_trans_tax_details` ###
1601 DROP TABLE IF EXISTS `0_trans_tax_details`;
1603 CREATE TABLE `0_trans_tax_details` (
1604 `id` int(11) NOT NULL auto_increment,
1605 `trans_type` smallint(6) default NULL,
1606 `trans_no` int(11) default NULL,
1607 `tran_date` date NOT NULL,
1608 `tax_type_id` int(11) NOT NULL default '0',
1609 `rate` double NOT NULL default '0',
1610 `ex_rate` double NOT NULL default '1',
1611 `included_in_price` tinyint(1) NOT NULL default '0',
1612 `net_amount` double NOT NULL default '0',
1613 `amount` double NOT NULL default '0',
1616 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1619 ### Data of table `0_trans_tax_details` ###
1623 ### Structure of table `0_users` ###
1625 DROP TABLE IF EXISTS `0_users`;
1627 CREATE TABLE `0_users` (
1628 `id` SMALLINT(6) AUTO_INCREMENT,
1629 `user_id` varchar(60) NOT NULL default '',
1630 `password` varchar(100) NOT NULL default '',
1631 `real_name` varchar(100) NOT NULL default '',
1632 `role_id` int(11) NOT NULL default '1',
1633 `phone` varchar(30) NOT NULL default '',
1634 `email` varchar(100) default NULL,
1635 `language` varchar(20) default NULL,
1636 `date_format` tinyint(1) NOT NULL default '0',
1637 `date_sep` tinyint(1) NOT NULL default '0',
1638 `tho_sep` tinyint(1) NOT NULL default '0',
1639 `dec_sep` tinyint(1) NOT NULL default '0',
1640 `theme` varchar(20) NOT NULL default 'default',
1641 `page_size` varchar(20) NOT NULL default 'A4',
1642 `prices_dec` smallint(6) NOT NULL default '2',
1643 `qty_dec` smallint(6) NOT NULL default '2',
1644 `rates_dec` smallint(6) NOT NULL default '4',
1645 `percent_dec` smallint(6) NOT NULL default '1',
1646 `show_gl` tinyint(1) NOT NULL default '1',
1647 `show_codes` tinyint(1) NOT NULL default '0',
1648 `show_hints` tinyint(1) NOT NULL default '0',
1649 `last_visit_date` datetime default NULL,
1650 `query_size` tinyint(1) default '10',
1651 `graphic_links` tinyint(1) default '1',
1652 `pos` smallint(6) default '1',
1653 `print_profile` varchar(30) NOT NULL default '1',
1654 `rep_popup` tinyint(1) default '1',
1655 `sticky_doc_date` tinyint(1) default '0',
1656 `startup_tab` varchar(20) NOT NULL default '',
1657 `inactive` tinyint(1) NOT NULL default '0',
1659 UNIQUE KEY (`user_id`)
1660 ) TYPE=MyISAM AUTO_INCREMENT=2;
1663 ### Data of table `0_users` ###
1665 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');
1667 ### Structure of table `0_voided` ###
1669 DROP TABLE IF EXISTS `0_voided`;
1671 CREATE TABLE `0_voided` (
1672 `type` int(11) NOT NULL default '0',
1673 `id` int(11) NOT NULL default '0',
1674 `date_` date NOT NULL default '0000-00-00',
1675 `memo_` tinytext NOT NULL,
1676 UNIQUE KEY `id` (`type`,`id`)
1680 ### Data of table `0_voided` ###
1684 ### Structure of table `0_wo_issue_items` ###
1686 DROP TABLE IF EXISTS `0_wo_issue_items`;
1688 CREATE TABLE `0_wo_issue_items` (
1689 `id` int(11) NOT NULL auto_increment,
1690 `stock_id` varchar(40) default NULL,
1691 `issue_id` int(11) default NULL,
1692 `qty_issued` double default NULL,
1694 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1697 ### Data of table `0_wo_issue_items` ###
1701 ### Structure of table `0_wo_issues` ###
1703 DROP TABLE IF EXISTS `0_wo_issues`;
1705 CREATE TABLE `0_wo_issues` (
1706 `issue_no` int(11) NOT NULL auto_increment,
1707 `workorder_id` int(11) NOT NULL default '0',
1708 `reference` varchar(100) default NULL,
1709 `issue_date` date default NULL,
1710 `loc_code` varchar(5) default NULL,
1711 `workcentre_id` int(11) default NULL,
1712 PRIMARY KEY (`issue_no`)
1713 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1716 ### Data of table `0_wo_issues` ###
1720 ### Structure of table `0_wo_manufacture` ###
1722 DROP TABLE IF EXISTS `0_wo_manufacture`;
1724 CREATE TABLE `0_wo_manufacture` (
1725 `id` int(11) NOT NULL auto_increment,
1726 `reference` varchar(100) default NULL,
1727 `workorder_id` int(11) NOT NULL default '0',
1728 `quantity` double NOT NULL default '0',
1729 `date_` date NOT NULL default '0000-00-00',
1731 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1734 ### Data of table `0_wo_manufacture` ###
1738 ### Structure of table `0_wo_requirements` ###
1740 DROP TABLE IF EXISTS `0_wo_requirements`;
1742 CREATE TABLE `0_wo_requirements` (
1743 `id` int(11) NOT NULL auto_increment,
1744 `workorder_id` int(11) NOT NULL default '0',
1745 `stock_id` char(20) NOT NULL default '',
1746 `workcentre` int(11) NOT NULL default '0',
1747 `units_req` double NOT NULL default '1',
1748 `std_cost` double NOT NULL default '0',
1749 `loc_code` char(5) NOT NULL default '',
1750 `units_issued` double NOT NULL default '0',
1752 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1755 ### Data of table `0_wo_requirements` ###
1759 ### Structure of table `0_workcentres` ###
1761 DROP TABLE IF EXISTS `0_workcentres`;
1763 CREATE TABLE `0_workcentres` (
1764 `id` int(11) NOT NULL auto_increment,
1765 `name` char(40) NOT NULL default '',
1766 `description` char(50) NOT NULL default '',
1767 `inactive` tinyint(1) NOT NULL default '0',
1769 UNIQUE KEY `name` (`name`)
1770 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1773 ### Data of table `0_workcentres` ###
1777 ### Structure of table `0_workorders` ###
1779 DROP TABLE IF EXISTS `0_workorders`;
1781 CREATE TABLE `0_workorders` (
1782 `id` int(11) NOT NULL auto_increment,
1783 `wo_ref` varchar(60) NOT NULL default '',
1784 `loc_code` varchar(5) NOT NULL default '',
1785 `units_reqd` double NOT NULL default '1',
1786 `stock_id` varchar(20) NOT NULL default '',
1787 `date_` date NOT NULL default '0000-00-00',
1788 `type` tinyint(4) NOT NULL default '0',
1789 `required_by` date NOT NULL default '0000-00-00',
1790 `released_date` date NOT NULL default '0000-00-00',
1791 `units_issued` double NOT NULL default '0',
1792 `closed` tinyint(1) NOT NULL default '0',
1793 `released` tinyint(1) NOT NULL default '0',
1794 `additional_costs` double NOT NULL default '0',
1796 UNIQUE KEY `wo_ref` (`wo_ref`)
1797 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1800 ### Data of table `0_workorders` ###