Implemented customizable authentication timeout.
[fa-stable.git] / sql / en_US-new.sql
1 # Built by FrontAccounting 2.1.2
2 # http://frontaccounting.net
3 # Company: Company name
4 # User: Administrator
5 # COA: en_US-new.sql
6
7
8 ### Structure of table `0_areas` ###
9
10 DROP TABLE IF EXISTS `0_areas`;
11
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 ;
19
20
21 ### Data of table `0_areas` ###
22
23 INSERT INTO `0_areas` VALUES ('1', 'Global', '0');
24
25 ### Structure of table `0_attachments` ###
26
27 DROP TABLE IF EXISTS `0_attachments`;
28
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 '',
39   PRIMARY KEY  (`id`),
40   KEY `type_no` (`type_no`,`trans_no`)
41 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
42
43
44 ### Data of table `0_attachments` ###
45
46 ### Structure of table `0_audit_trail` ###
47
48 DROP TABLE IF EXISTS `0_audit_trail`;
49
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,
60    PRIMARY KEY (`id`),
61   KEY (`fiscal_year`, `gl_seq`)
62 ) TYPE=InnoDB  ;
63
64 ### Data of table `0_audit_trail` ###
65
66
67
68 ### Structure of table `0_bank_accounts` ###
69
70 DROP TABLE IF EXISTS `0_bank_accounts`;
71
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',
84   PRIMARY KEY  (`id`),
85   KEY `bank_account_name` (`bank_account_name`),
86   KEY `bank_account_number` (`bank_account_number`)
87 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
88
89
90 ### Data of table `0_bank_accounts` ###
91
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');
94
95
96 ### Structure of table `0_bank_trans` ###
97
98 DROP TABLE IF EXISTS `0_bank_trans`;
99
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   `bank_trans_type_id` int(10) unsigned default NULL,
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,
114   PRIMARY KEY  (`id`),
115   KEY `bank_act` (`bank_act`,`ref`),
116   KEY `type` (`type`,`trans_no`)
117 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
118
119
120 ### Data of table `0_bank_trans` ###
121
122
123
124 ### Structure of table `0_bom` ###
125
126 DROP TABLE IF EXISTS `0_bom`;
127
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`),
137   KEY `id` (`id`),
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 ;
143
144
145 ### Data of table `0_bom` ###
146
147
148
149 ### Structure of table `0_budget_trans` ###
150
151 DROP TABLE IF EXISTS `0_budget_trans`;
152
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 ;
168
169
170 ### Data of table `0_budget_trans` ###
171
172
173
174 ### Structure of table `0_chart_class` ###
175
176 DROP TABLE IF EXISTS `0_chart_class`;
177
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',
183   PRIMARY KEY  (`cid`)
184 ) TYPE=MyISAM  ;
185
186
187 ### Data of table `0_chart_class` ###
188
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');
193
194 ### Structure of table `0_chart_master` ###
195
196 DROP TABLE IF EXISTS `0_chart_master`;
197
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`)
207 ) TYPE=MyISAM  ;
208
209
210 ### Data of table `0_chart_master` ###
211
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');
290
291
292 ### Structure of table `0_chart_types` ###
293
294 DROP TABLE IF EXISTS `0_chart_types`;
295
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',
302   PRIMARY KEY  (`id`),
303   KEY `name` (`name`)
304 ) TYPE=MyISAM AUTO_INCREMENT=13 ;
305
306
307 ### Data of table `0_chart_types` ###
308
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');
321
322
323 ### Structure of table `0_comments` ###
324
325 DROP TABLE IF EXISTS `0_comments`;
326
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',
331   `memo_` tinytext
332 ) TYPE=InnoDB  ;
333
334
335 ### Data of table `0_comments` ###
336
337
338
339 ### Structure of table `0_company` ###
340
341 DROP TABLE IF EXISTS `0_company`;
342
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`)
397 ) TYPE=MyISAM  ;
398
399
400 ### Data of table `0_company` ###
401
402 INSERT INTO `0_company` VALUES ('1', 'Company name', '', '', '1', '1', 'N/A', '', '', '', '', '', 'USD', '1200', '5060', '2100', '5690', '4450', '9990', '3590', '4430', '4010', '4510', '4500', '1510', '5010', '5040', '4010', '1530', '5000', '0', '10', '10', '1000', '20', '20', '30', '1', '1', '0', '0', '0', '1', '0', '0', '', '1', '2.2', '0', '-1', '1', '600');
403
404 ### Structure of table `0_credit_status` ###
405
406 DROP TABLE IF EXISTS `0_credit_status`;
407
408 CREATE TABLE `0_credit_status` (
409   `id` int(11) NOT NULL auto_increment,
410   `reason_description` char(100) NOT NULL default '',
411   `dissallow_invoices` tinyint(1) NOT NULL default '0',
412   `inactive` tinyint(1) NOT NULL default '0',
413   PRIMARY KEY  (`id`),
414   UNIQUE KEY `reason_description` (`reason_description`)
415 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
416
417
418 ### Data of table `0_credit_status` ###
419
420 INSERT INTO `0_credit_status` VALUES ('1', 'Good History', '0', '0');
421 INSERT INTO `0_credit_status` VALUES ('3', 'No more work until payment received', '1', '0');
422 INSERT INTO `0_credit_status` VALUES ('4', 'In liquidation', '1', '0');
423
424
425 ### Structure of table `0_currencies` ###
426
427 DROP TABLE IF EXISTS `0_currencies`;
428
429 CREATE TABLE `0_currencies` (
430   `currency` varchar(60) NOT NULL default '',
431   `curr_abrev` char(3) NOT NULL default '',
432   `curr_symbol` varchar(10) NOT NULL default '',
433   `country` varchar(100) NOT NULL default '',
434   `hundreds_name` varchar(15) NOT NULL default '',
435   `auto_update` tinyint(1) NOT NULL default '1',
436   `inactive` tinyint(1) NOT NULL default '0',
437   PRIMARY KEY  (`curr_abrev`)
438 ) TYPE=MyISAM  ;
439
440
441 ### Data of table `0_currencies` ###
442
443 INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0');
444 INSERT INTO `0_currencies` VALUES ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0');
445 INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents', '1', '0');
446 INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence', '1', '0');
447
448 ### Structure of table `0_cust_allocations` ###
449
450 DROP TABLE IF EXISTS `0_cust_allocations`;
451
452 CREATE TABLE `0_cust_allocations` (
453   `id` int(11) NOT NULL auto_increment,
454   `amt` double unsigned default NULL,
455   `date_alloc` date NOT NULL default '0000-00-00',
456   `trans_no_from` int(11) default NULL,
457   `trans_type_from` int(11) default NULL,
458   `trans_no_to` int(11) default NULL,
459   `trans_type_to` int(11) default NULL,
460   PRIMARY KEY  (`id`)
461 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
462
463
464 ### Data of table `0_cust_allocations` ###
465
466
467
468 ### Structure of table `0_cust_branch` ###
469
470 DROP TABLE IF EXISTS `0_cust_branch`;
471
472 CREATE TABLE `0_cust_branch` (
473   `branch_code` int(11) NOT NULL auto_increment,
474   `debtor_no` int(11) NOT NULL default '0',
475   `br_name` varchar(60) NOT NULL default '',
476   `branch_ref`  varchar(30) NOT NULL default '',
477   `br_address` tinytext NOT NULL,
478   `area` int(11) default NULL,
479   `salesman` int(11) NOT NULL default '0',
480   `phone` varchar(30) NOT NULL default '',
481   `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   `inactive` tinyint(1) NOT NULL default '0',
495   PRIMARY KEY  (`branch_code`,`debtor_no`),
496   KEY `branch_code` (`branch_code`),
497   KEY `br_name` (`br_name`)
498 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
499
500
501 ### Data of table `0_cust_branch` ###
502
503
504
505 ### Structure of table `0_debtor_trans` ###
506
507 DROP TABLE IF EXISTS `0_debtor_trans`;
508
509 CREATE TABLE `0_debtor_trans` (
510   `trans_no` int(11) unsigned NOT NULL default '0',
511   `type` smallint(6) unsigned NOT NULL default '0',
512   `version` tinyint(1) unsigned NOT NULL default '0',
513   `debtor_no` int(11) unsigned default NULL,
514   `branch_code` int(11) NOT NULL default '-1',
515   `tran_date` date NOT NULL default '0000-00-00',
516   `due_date` date NOT NULL default '0000-00-00',
517   `reference` varchar(60) NOT NULL default '',
518   `tpe` int(11) NOT NULL default '0',
519   `order_` int(11) NOT NULL default '0',
520   `ov_amount` double NOT NULL default '0',
521   `ov_gst` double NOT NULL default '0',
522   `ov_freight` double NOT NULL default '0',
523   `ov_freight_tax` double NOT NULL default '0',
524   `ov_discount` double NOT NULL default '0',
525   `alloc` double NOT NULL default '0',
526   `rate` double NOT NULL default '1',
527   `ship_via` int(11) default NULL,
528   `trans_link` int(11) NOT NULL default '0',
529   `dimension_id` int(11) NOT NULL default '0',
530   `dimension2_id` int(11) NOT NULL default '0',
531   PRIMARY KEY  (`trans_no`,`type`),
532   KEY `debtor_no` (`debtor_no`,`branch_code`)
533 ) TYPE=InnoDB  ;
534
535
536 ### Data of table `0_debtor_trans` ###
537
538
539
540 ### Structure of table `0_debtor_trans_details` ###
541
542 DROP TABLE IF EXISTS `0_debtor_trans_details`;
543
544 CREATE TABLE `0_debtor_trans_details` (
545   `id` int(11) NOT NULL auto_increment,
546   `debtor_trans_no` int(11) default NULL,
547   `debtor_trans_type` int(11) default NULL,
548   `stock_id` varchar(20) NOT NULL default '',
549   `description` tinytext,
550   `unit_price` double NOT NULL default '0',
551   `unit_tax` double NOT NULL default '0',
552   `quantity` double NOT NULL default '0',
553   `discount_percent` double NOT NULL default '0',
554   `standard_cost` double NOT NULL default '0',
555   `qty_done` double NOT NULL default '0',
556   PRIMARY KEY  (`id`)
557 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
558
559
560 ### Data of table `0_debtor_trans_details` ###
561
562
563
564 ### Structure of table `0_debtors_master` ###
565
566 DROP TABLE IF EXISTS `0_debtors_master`;
567
568 CREATE TABLE `0_debtors_master` (
569   `debtor_no` int(11) NOT NULL auto_increment,
570   `name` varchar(80) NOT NULL default '',
571   `debtor_ref` varchar(30) NOT NULL,
572   `address` tinytext,
573   `email` varchar(100) NOT NULL default '',
574   `tax_id` varchar(55) NOT NULL default '',
575   `curr_code` char(3) NOT NULL default '',
576   `sales_type` int(11) NOT NULL default '1',
577   `dimension_id` int(11) NOT NULL default '0',
578   `dimension2_id` int(11) NOT NULL default '0',
579   `credit_status` int(11) NOT NULL default '0',
580   `payment_terms` int(11) default NULL,
581   `discount` double NOT NULL default '0',
582   `pymt_discount` double NOT NULL default '0',
583   `credit_limit` float NOT NULL default '1000',
584   `inactive` tinyint(1) NOT NULL default '0',
585   PRIMARY KEY  (`debtor_no`),
586   UNIQUE KEY `name` (`name`)
587 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
588
589
590 ### Data of table `0_debtors_master` ###
591
592
593
594 ### Structure of table `0_dimensions` ###
595
596 DROP TABLE IF EXISTS `0_dimensions`;
597
598 CREATE TABLE `0_dimensions` (
599   `id` int(11) NOT NULL auto_increment,
600   `reference` varchar(60) NOT NULL default '',
601   `name` varchar(60) NOT NULL default '',
602   `type_` tinyint(1) NOT NULL default '1',
603   `closed` tinyint(1) NOT NULL default '0',
604   `date_` date NOT NULL default '0000-00-00',
605   `due_date` date NOT NULL default '0000-00-00',
606   PRIMARY KEY  (`id`),
607   UNIQUE KEY `reference` (`reference`)
608 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
609
610
611 ### Data of table `0_dimensions` ###
612
613
614
615 ### Structure of table `0_exchange_rates` ###
616
617 DROP TABLE IF EXISTS `0_exchange_rates`;
618
619 CREATE TABLE `0_exchange_rates` (
620   `id` int(11) NOT NULL auto_increment,
621   `curr_code` char(3) NOT NULL default '',
622   `rate_buy` double NOT NULL default '0',
623   `rate_sell` double NOT NULL default '0',
624   `date_` date NOT NULL default '0000-00-00',
625   PRIMARY KEY  (`id`),
626   UNIQUE KEY `curr_code` (`curr_code`,`date_`)
627 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
628
629
630 ### Data of table `0_exchange_rates` ###
631
632
633
634 ### Structure of table `0_fiscal_year` ###
635
636 DROP TABLE IF EXISTS `0_fiscal_year`;
637
638 CREATE TABLE `0_fiscal_year` (
639   `id` int(11) NOT NULL auto_increment,
640   `begin` date default '0000-00-00',
641   `end` date default '0000-00-00',
642   `closed` tinyint(1) NOT NULL default '0',
643   PRIMARY KEY  (`id`)
644 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
645
646
647 ### Data of table `0_fiscal_year` ###
648
649 INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0');
650
651
652 ### Structure of table `0_gl_trans` ###
653
654 DROP TABLE IF EXISTS `0_gl_trans`;
655
656 CREATE TABLE `0_gl_trans` (
657   `counter` int(11) NOT NULL auto_increment,
658   `type` smallint(6) NOT NULL default '0',
659   `type_no` bigint(16) NOT NULL default '1',
660   `tran_date` date NOT NULL default '0000-00-00',
661   `account` varchar(11) NOT NULL default '',
662   `memo_` tinytext NOT NULL,
663   `amount` double NOT NULL default '0',
664   `dimension_id` int(11) NOT NULL default '0',
665   `dimension2_id` int(11) NOT NULL default '0',
666   `person_type_id` int(11) default NULL,
667   `person_id` tinyblob,
668   PRIMARY KEY  (`counter`),
669   KEY `Type_and_Number` (`type`,`type_no`)
670 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
671
672
673 ### Data of table `0_gl_trans` ###
674
675
676
677 ### Structure of table `0_grn_batch` ###
678
679 DROP TABLE IF EXISTS `0_grn_batch`;
680
681 CREATE TABLE `0_grn_batch` (
682   `id` int(11) NOT NULL auto_increment,
683   `supplier_id` int(11) NOT NULL default '0',
684   `purch_order_no` int(11) default NULL,
685   `reference` varchar(60) NOT NULL default '',
686   `delivery_date` date NOT NULL default '0000-00-00',
687   `loc_code` varchar(5) default NULL,
688   PRIMARY KEY  (`id`)
689 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
690
691
692 ### Data of table `0_grn_batch` ###
693
694
695
696 ### Structure of table `0_grn_items` ###
697
698 DROP TABLE IF EXISTS `0_grn_items`;
699
700 CREATE TABLE `0_grn_items` (
701   `id` int(11) NOT NULL auto_increment,
702   `grn_batch_id` int(11) default NULL,
703   `po_detail_item` int(11) NOT NULL default '0',
704   `item_code` varchar(20) NOT NULL default '',
705   `description` tinytext,
706   `qty_recd` double NOT NULL default '0',
707   `quantity_inv` double NOT NULL default '0',
708   PRIMARY KEY  (`id`)
709 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
710
711
712 ### Data of table `0_grn_items` ###
713
714
715
716 ### Structure of table `0_groups` ###
717
718 DROP TABLE IF EXISTS `0_groups`;
719
720 CREATE TABLE `0_groups` (
721   `id` smallint(6) unsigned NOT NULL auto_increment,
722   `description` varchar(60) NOT NULL default '',
723   `inactive` tinyint(1) NOT NULL default '0',
724   PRIMARY KEY  (`id`),
725   UNIQUE KEY `description` (`description`)
726 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
727
728
729 ### Data of table `0_groups` ###
730
731 INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
732 INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
733 INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
734
735
736 ### Structure of table `0_item_codes` ###
737
738 DROP TABLE IF EXISTS `0_item_codes`;
739
740 CREATE TABLE `0_item_codes` (
741   `id` int(11) unsigned NOT NULL auto_increment,
742   `item_code` varchar(20) NOT NULL,
743   `stock_id` varchar(20) NOT NULL,
744   `description` varchar(200) NOT NULL default '',
745   `category_id` smallint(6) unsigned NOT NULL,
746   `quantity` double NOT NULL default '1',
747   `is_foreign` tinyint(1) NOT NULL default '0',
748   `inactive` tinyint(1) NOT NULL default '0',
749   PRIMARY KEY  (`id`),
750   UNIQUE KEY `stock_id` (`stock_id`,`item_code`)
751 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
752
753
754 ### Data of table `0_item_codes` ###
755
756
757
758 ### Structure of table `0_item_tax_type_exemptions` ###
759
760 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
761
762 CREATE TABLE `0_item_tax_type_exemptions` (
763   `item_tax_type_id` int(11) NOT NULL default '0',
764   `tax_type_id` int(11) NOT NULL default '0',
765   PRIMARY KEY  (`item_tax_type_id`,`tax_type_id`)
766 ) TYPE=InnoDB  ;
767
768
769 ### Data of table `0_item_tax_type_exemptions` ###
770
771
772
773 ### Structure of table `0_item_tax_types` ###
774
775 DROP TABLE IF EXISTS `0_item_tax_types`;
776
777 CREATE TABLE `0_item_tax_types` (
778   `id` int(11) NOT NULL auto_increment,
779   `name` varchar(60) NOT NULL default '',
780   `exempt` tinyint(1) NOT NULL default '0',
781   `inactive` tinyint(1) NOT NULL default '0',
782   PRIMARY KEY  (`id`),
783   UNIQUE KEY `name` (`name`)
784 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
785
786
787 ### Data of table `0_item_tax_types` ###
788
789 INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0', '0');
790
791
792 ### Structure of table `0_item_units` ###
793
794 DROP TABLE IF EXISTS `0_item_units`;
795
796 CREATE TABLE `0_item_units` (
797   `abbr` varchar(20) NOT NULL,
798   `name` varchar(40) NOT NULL,
799   `decimals` tinyint(2) NOT NULL,
800   `inactive` tinyint(1) NOT NULL default '0',
801   PRIMARY KEY  (`abbr`),
802   UNIQUE KEY `name` (`name`)
803 ) TYPE=MyISAM  ;
804
805
806 ### Data of table `0_item_units` ###
807
808 INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0');
809
810
811 ### Structure of table `0_loc_stock` ###
812
813 DROP TABLE IF EXISTS `0_loc_stock`;
814
815 CREATE TABLE `0_loc_stock` (
816   `loc_code` char(5) NOT NULL default '',
817   `stock_id` char(20) NOT NULL default '',
818   `reorder_level` bigint(20) NOT NULL default '0',
819   PRIMARY KEY  (`loc_code`,`stock_id`),
820   KEY `stock_id` (`stock_id`)
821 ) TYPE=InnoDB  ;
822
823
824 ### Data of table `0_loc_stock` ###
825
826
827
828 ### Structure of table `0_locations` ###
829
830 DROP TABLE IF EXISTS `0_locations`;
831
832 CREATE TABLE `0_locations` (
833   `loc_code` varchar(5) NOT NULL default '',
834   `location_name` varchar(60) NOT NULL default '',
835   `delivery_address` tinytext NOT NULL,
836   `phone` varchar(30) NOT NULL default '',
837   `fax` varchar(30) NOT NULL default '',
838   `email` varchar(100) NOT NULL default '',
839   `contact` varchar(30) NOT NULL default '',
840   `inactive` tinyint(1) NOT NULL default '0',
841   PRIMARY KEY  (`loc_code`)
842 ) TYPE=MyISAM  ;
843
844
845 ### Data of table `0_locations` ###
846
847 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '0');
848
849
850 ### Structure of table `0_movement_types` ###
851
852 DROP TABLE IF EXISTS `0_movement_types`;
853
854 CREATE TABLE `0_movement_types` (
855   `id` int(11) NOT NULL auto_increment,
856   `name` varchar(60) NOT NULL default '',
857   `inactive` tinyint(1) NOT NULL default '0',
858   PRIMARY KEY  (`id`),
859   UNIQUE KEY `name` (`name`)
860 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
861
862
863 ### Data of table `0_movement_types` ###
864
865 INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment', '0');
866
867
868 ### Structure of table `0_payment_terms` ###
869
870 DROP TABLE IF EXISTS `0_payment_terms`;
871
872 CREATE TABLE `0_payment_terms` (
873   `terms_indicator` int(11) NOT NULL auto_increment,
874   `terms` char(80) NOT NULL default '',
875   `days_before_due` smallint(6) NOT NULL default '0',
876   `day_in_following_month` smallint(6) NOT NULL default '0',
877   `inactive` tinyint(1) NOT NULL default '0',
878   PRIMARY KEY  (`terms_indicator`),
879   UNIQUE KEY `terms` (`terms`)
880 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
881
882
883 ### Data of table `0_payment_terms` ###
884
885 INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0');
886 INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0');
887 INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0');
888 INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0');
889
890
891 ### Structure of table `0_prices` ###
892
893 DROP TABLE IF EXISTS `0_prices`;
894
895 CREATE TABLE `0_prices` (
896   `id` int(11) NOT NULL auto_increment,
897   `stock_id` varchar(20) NOT NULL default '',
898   `sales_type_id` int(11) NOT NULL default '0',
899   `curr_abrev` char(3) NOT NULL default '',
900   `price` double NOT NULL default '0',
901   PRIMARY KEY  (`id`),
902   UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
903 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
904
905
906 ### Data of table `0_prices` ###
907
908
909
910 ### Structure of table `0_print_profiles` ###
911
912 DROP TABLE IF EXISTS `0_print_profiles`;
913
914 CREATE TABLE `0_print_profiles` (
915   `id` smallint(6) unsigned NOT NULL auto_increment,
916   `profile` varchar(30) NOT NULL,
917   `report` varchar(5) default NULL,
918   `printer` tinyint(3) unsigned default NULL,
919   PRIMARY KEY  (`id`),
920   UNIQUE KEY `profile` (`profile`,`report`)
921 ) TYPE=MyISAM AUTO_INCREMENT=10 ;
922
923
924 ### Data of table `0_print_profiles` ###
925
926 INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0');
927 INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0');
928 INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2');
929 INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2');
930 INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2');
931 INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2');
932 INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2');
933 INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2');
934 INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2');
935
936
937 ### Structure of table `0_printers` ###
938
939 DROP TABLE IF EXISTS `0_printers`;
940
941 CREATE TABLE `0_printers` (
942   `id` tinyint(3) unsigned NOT NULL auto_increment,
943   `name` varchar(20) NOT NULL,
944   `description` varchar(60) NOT NULL,
945   `queue` varchar(20) NOT NULL,
946   `host` varchar(40) NOT NULL,
947   `port` smallint(11) unsigned NOT NULL,
948   `timeout` tinyint(3) unsigned NOT NULL,
949   PRIMARY KEY  (`id`),
950   UNIQUE KEY `name` (`name`)
951 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
952
953
954 ### Data of table `0_printers` ###
955
956 INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20');
957 INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5');
958 INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
959
960
961 ### Structure of table `0_purch_data` ###
962
963 DROP TABLE IF EXISTS `0_purch_data`;
964
965 CREATE TABLE `0_purch_data` (
966   `supplier_id` int(11) NOT NULL default '0',
967   `stock_id` char(20) NOT NULL default '',
968   `price` double NOT NULL default '0',
969   `suppliers_uom` char(50) NOT NULL default '',
970   `conversion_factor` double NOT NULL default '1',
971   `supplier_description` char(50) NOT NULL default '',
972   PRIMARY KEY  (`supplier_id`,`stock_id`)
973 ) TYPE=MyISAM  ;
974
975
976 ### Data of table `0_purch_data` ###
977
978
979
980 ### Structure of table `0_purch_order_details` ###
981
982 DROP TABLE IF EXISTS `0_purch_order_details`;
983
984 CREATE TABLE `0_purch_order_details` (
985   `po_detail_item` int(11) NOT NULL auto_increment,
986   `order_no` int(11) NOT NULL default '0',
987   `item_code` varchar(20) NOT NULL default '',
988   `description` tinytext,
989   `delivery_date` date NOT NULL default '0000-00-00',
990   `qty_invoiced` double NOT NULL default '0',
991   `unit_price` double NOT NULL default '0',
992   `act_price` double NOT NULL default '0',
993   `std_cost_unit` double NOT NULL default '0',
994   `quantity_ordered` double NOT NULL default '0',
995   `quantity_received` double NOT NULL default '0',
996   PRIMARY KEY  (`po_detail_item`)
997 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
998
999
1000 ### Data of table `0_purch_order_details` ###
1001
1002
1003
1004 ### Structure of table `0_purch_orders` ###
1005
1006 DROP TABLE IF EXISTS `0_purch_orders`;
1007
1008 CREATE TABLE `0_purch_orders` (
1009   `order_no` int(11) NOT NULL auto_increment,
1010   `supplier_id` int(11) NOT NULL default '0',
1011   `comments` tinytext,
1012   `ord_date` date NOT NULL default '0000-00-00',
1013   `reference` tinytext NOT NULL,
1014   `requisition_no` tinytext,
1015   `into_stock_location` varchar(5) NOT NULL default '',
1016   `delivery_address` tinytext NOT NULL,
1017   PRIMARY KEY  (`order_no`)
1018 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1019
1020
1021 ### Data of table `0_purch_orders` ###
1022
1023
1024
1025 ### Structure of table `0_quick_entries` ###
1026
1027 DROP TABLE IF EXISTS `0_quick_entries`;
1028
1029 CREATE TABLE `0_quick_entries` (
1030   `id` smallint(6) unsigned NOT NULL auto_increment,
1031   `type` tinyint(1) NOT NULL default '0',
1032   `description` varchar(60) NOT NULL,
1033   `base_amount` double NOT NULL default '0',
1034   `base_desc` varchar(60) default NULL,
1035   PRIMARY KEY  (`id`),
1036   KEY `description` (`description`)
1037 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
1038
1039
1040 ### Data of table `0_quick_entries` ###
1041
1042 INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount');
1043 INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount');
1044 INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount');
1045
1046
1047 ### Structure of table `0_quick_entry_lines` ###
1048
1049 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1050
1051 CREATE TABLE `0_quick_entry_lines` (
1052   `id` smallint(6) unsigned NOT NULL auto_increment,
1053   `qid` smallint(6) unsigned NOT NULL,
1054   `amount` double default '0',
1055   `action` varchar(2) NOT NULL,
1056   `dest_id` varchar(11) NOT NULL,
1057   `dimension_id` smallint(6) unsigned default NULL,
1058   `dimension2_id` smallint(6) unsigned default NULL,
1059   PRIMARY KEY  (`id`),
1060   KEY `qid` (`qid`)
1061 ) TYPE=MyISAM AUTO_INCREMENT=7 ;
1062
1063
1064 ### Data of table `0_quick_entry_lines` ###
1065
1066 INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', 't-', '1', '0', '0');
1067 INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', 't-', '1', '0', '0');
1068 INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', 't-', '1', '0', '0');
1069 INSERT INTO `0_quick_entry_lines` VALUES ('4', '3', '0', '=', '4010', '0', '0');
1070 INSERT INTO `0_quick_entry_lines` VALUES ('5', '1', '0', '=', '5765', '0', '0');
1071 INSERT INTO `0_quick_entry_lines` VALUES ('6', '2', '0', '=', '5780', '0', '0');
1072
1073
1074 ### Structure of table `0_recurrent_invoices` ###
1075
1076 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1077
1078 CREATE TABLE `0_recurrent_invoices` (
1079   `id` smallint(6) unsigned NOT NULL auto_increment,
1080   `description` varchar(60) NOT NULL default '',
1081   `order_no` int(11) unsigned NOT NULL,
1082   `debtor_no` int(11) unsigned default NULL,
1083   `group_no` smallint(6) unsigned default NULL,
1084   `days` int(11) NOT NULL default '0',
1085   `monthly` int(11) NOT NULL default '0',
1086   `begin` date NOT NULL default '0000-00-00',
1087   `end` date NOT NULL default '0000-00-00',
1088   `last_sent` date NOT NULL default '0000-00-00',
1089   PRIMARY KEY  (`id`),
1090   UNIQUE KEY `description` (`description`)
1091 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1092
1093
1094 ### Data of table `0_recurrent_invoices` ###
1095
1096
1097
1098 ### Structure of table `0_refs` ###
1099
1100 DROP TABLE IF EXISTS `0_refs`;
1101
1102 CREATE TABLE `0_refs` (
1103   `id` int(11) NOT NULL default '0',
1104   `type` int(11) NOT NULL default '0',
1105   `reference` varchar(100) NOT NULL default '',
1106   PRIMARY KEY  (`id`,`type`)
1107 ) TYPE=InnoDB  ;
1108
1109
1110 ### Data of table `0_refs` ###
1111
1112
1113
1114 ### Structure of table `0_sales_order_details` ###
1115
1116 DROP TABLE IF EXISTS `0_sales_order_details`;
1117
1118 CREATE TABLE `0_sales_order_details` (
1119   `id` int(11) NOT NULL auto_increment,
1120   `order_no` int(11) NOT NULL default '0',
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',
1127   PRIMARY KEY  (`id`)
1128 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1129
1130
1131 ### Data of table `0_sales_order_details` ###
1132
1133
1134
1135 ### Structure of table `0_sales_orders` ###
1136
1137 DROP TABLE IF EXISTS `0_sales_orders`;
1138
1139 CREATE TABLE `0_sales_orders` (
1140   `order_no` int(11) NOT NULL auto_increment,
1141   `version` tinyint(1) unsigned NOT NULL default '0',
1142   `type` tinyint(1) NOT NULL default '0',
1143   `debtor_no` int(11) NOT NULL default '0',
1144   `branch_code` int(11) NOT NULL default '0',
1145   `customer_ref` tinytext NOT NULL,
1146   `comments` tinytext,
1147   `ord_date` date NOT NULL default '0000-00-00',
1148   `order_type` int(11) NOT NULL default '0',
1149   `ship_via` int(11) NOT NULL default '0',
1150   `delivery_address` tinytext NOT NULL,
1151   `contact_phone` varchar(30) default NULL,
1152   `contact_email` varchar(100) default NULL,
1153   `deliver_to` tinytext NOT NULL,
1154   `freight_cost` double NOT NULL default '0',
1155   `from_stk_loc` varchar(5) NOT NULL default '',
1156   `delivery_date` date NOT NULL default '0000-00-00',
1157   PRIMARY KEY  (`order_no`)
1158 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1159
1160
1161 ### Data of table `0_sales_orders` ###
1162
1163
1164
1165 ### Structure of table `0_sales_pos` ###
1166
1167 DROP TABLE IF EXISTS `0_sales_pos`;
1168
1169 CREATE TABLE `0_sales_pos` (
1170   `id` smallint(6) unsigned NOT NULL auto_increment,
1171   `pos_name` varchar(30) NOT NULL,
1172   `cash_sale` tinyint(1) NOT NULL,
1173   `credit_sale` tinyint(1) NOT NULL,
1174   `pos_location` varchar(5) NOT NULL,
1175   `pos_account` smallint(6) unsigned NOT NULL,
1176   `inactive` tinyint(1) NOT NULL default '0',
1177   PRIMARY KEY  (`id`),
1178   UNIQUE KEY `pos_name` (`pos_name`)
1179 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1180
1181
1182 ### Data of table `0_sales_pos` ###
1183
1184 INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '2', '0');
1185
1186
1187 ### Structure of table `0_sales_types` ###
1188
1189 DROP TABLE IF EXISTS `0_sales_types`;
1190
1191 CREATE TABLE `0_sales_types` (
1192   `id` int(11) NOT NULL auto_increment,
1193   `sales_type` char(50) NOT NULL default '',
1194   `tax_included` int(1) NOT NULL default '0',
1195   `factor` double NOT NULL default '1',
1196   `inactive` tinyint(1) NOT NULL default '0',
1197   PRIMARY KEY  (`id`),
1198   UNIQUE KEY `sales_type` (`sales_type`)
1199 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
1200
1201
1202 ### Data of table `0_sales_types` ###
1203
1204 INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '1', '1', '0');
1205 INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '0.7', '0');
1206
1207
1208 ### Structure of table `0_salesman` ###
1209
1210 DROP TABLE IF EXISTS `0_salesman`;
1211
1212 CREATE TABLE `0_salesman` (
1213   `salesman_code` int(11) NOT NULL auto_increment,
1214   `salesman_name` char(60) NOT NULL default '',
1215   `salesman_phone` char(30) NOT NULL default '',
1216   `salesman_fax` char(30) NOT NULL default '',
1217   `salesman_email` varchar(100) NOT NULL default '',
1218   `provision` double NOT NULL default '0',
1219   `break_pt` double NOT NULL default '0',
1220   `provision2` double NOT NULL default '0',
1221   `inactive` tinyint(1) NOT NULL default '0',
1222   PRIMARY KEY  (`salesman_code`),
1223   UNIQUE KEY `salesman_name` (`salesman_name`)
1224 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1225
1226
1227 ### Data of table `0_salesman` ###
1228
1229 INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1230
1231
1232 ### Structure of table `0_shippers` ###
1233
1234 DROP TABLE IF EXISTS `0_shippers`;
1235
1236 CREATE TABLE `0_shippers` (
1237   `shipper_id` int(11) NOT NULL auto_increment,
1238   `shipper_name` varchar(60) NOT NULL default '',
1239   `phone` varchar(30) NOT NULL default '',
1240   `contact` tinytext NOT NULL,
1241   `address` tinytext NOT NULL,
1242   `inactive` tinyint(1) NOT NULL default '0',
1243   PRIMARY KEY  (`shipper_id`),
1244   UNIQUE KEY `name` (`shipper_name`)
1245 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1246
1247
1248 ### Data of table `0_shippers` ###
1249
1250 INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '0');
1251
1252
1253 ### Structure of table `0_sql_trail` ###
1254
1255 DROP TABLE IF EXISTS `0_sql_trail`;
1256
1257 CREATE TABLE `0_sql_trail` (
1258   `id` int(11) unsigned NOT NULL auto_increment,
1259   `sql` text NOT NULL,
1260   `result` tinyint(1) NOT NULL,
1261   `msg` varchar(255) NOT NULL,
1262   PRIMARY KEY  (`id`)
1263 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
1264
1265
1266 ### Data of table `0_sql_trail` ###
1267
1268
1269
1270 ### Structure of table `0_stock_category` ###
1271
1272 DROP TABLE IF EXISTS `0_stock_category`;
1273
1274 CREATE TABLE `0_stock_category` (
1275   `category_id` int(11) NOT NULL auto_increment,
1276   `description` varchar(60) NOT NULL default '',
1277   `dflt_tax_type` int(11) NOT NULL default '0',
1278   `dflt_units` varchar(20) NOT NULL default 'each',
1279   `dflt_mb_flag` char(1) NOT NULL default 'B',
1280   `dflt_sales_act` varchar(11) NOT NULL default '',
1281   `dflt_cogs_act` varchar(11) NOT NULL default '',
1282   `dflt_inventory_act` varchar(11) NOT NULL default '',
1283   `dflt_adjustment_act` varchar(11) NOT NULL default '',
1284   `dflt_assembly_act` varchar(11) NOT NULL default '',
1285   `dflt_dim1` int(11) default NULL,
1286   `dflt_dim2` int(11) default NULL,
1287   `inactive` tinyint(1) NOT NULL default '0',
1288   `dflt_no_sale` tinyint(1) NOT NULL default '0',
1289   PRIMARY KEY  (`category_id`),
1290   UNIQUE KEY `description` (`description`)
1291 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
1292
1293
1294 ### Data of table `0_stock_category` ###
1295
1296 INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1297 INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1298 INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1299 INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1300
1301
1302 ### Structure of table `0_stock_master` ###
1303
1304 DROP TABLE IF EXISTS `0_stock_master`;
1305
1306 CREATE TABLE `0_stock_master` (
1307   `stock_id` varchar(20) NOT NULL default '',
1308   `category_id` int(11) NOT NULL default '0',
1309   `tax_type_id` int(11) NOT NULL default '0',
1310   `description` varchar(200) NOT NULL default '',
1311   `long_description` tinytext NOT NULL,
1312   `units` varchar(20) NOT NULL default 'each',
1313   `mb_flag` char(1) NOT NULL default 'B',
1314   `sales_account` varchar(11) NOT NULL default '',
1315   `cogs_account` varchar(11) NOT NULL default '',
1316   `inventory_account` varchar(11) NOT NULL default '',
1317   `adjustment_account` varchar(11) NOT NULL default '',
1318   `assembly_account` varchar(11) NOT NULL default '',
1319   `dimension_id` int(11) default NULL,
1320   `dimension2_id` int(11) default NULL,
1321   `actual_cost` double NOT NULL default '0',
1322   `last_cost` double NOT NULL default '0',
1323   `material_cost` double NOT NULL default '0',
1324   `labour_cost` double NOT NULL default '0',
1325   `overhead_cost` double NOT NULL default '0',
1326   `inactive` tinyint(1) NOT NULL default '0',
1327   `no_sale` tinyint(1) NOT NULL default '0',
1328   PRIMARY KEY  (`stock_id`)
1329 ) TYPE=InnoDB  ;
1330
1331
1332 ### Data of table `0_stock_master` ###
1333
1334
1335
1336 ### Structure of table `0_stock_moves` ###
1337
1338 DROP TABLE IF EXISTS `0_stock_moves`;
1339
1340 CREATE TABLE `0_stock_moves` (
1341   `trans_id` int(11) NOT NULL auto_increment,
1342   `trans_no` int(11) NOT NULL default '0',
1343   `stock_id` char(20) NOT NULL default '',
1344   `type` smallint(6) NOT NULL default '0',
1345   `loc_code` char(5) NOT NULL default '',
1346   `tran_date` date NOT NULL default '0000-00-00',
1347   `person_id` int(11) default NULL,
1348   `price` double NOT NULL default '0',
1349   `reference` char(40) NOT NULL default '',
1350   `qty` double NOT NULL default '1',
1351   `discount_percent` double NOT NULL default '0',
1352   `standard_cost` double NOT NULL default '0',
1353   `visible` tinyint(1) NOT NULL default '1',
1354   PRIMARY KEY  (`trans_id`),
1355   KEY `type` (`type`,`trans_no`)
1356 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1357
1358
1359 ### Data of table `0_stock_moves` ###
1360
1361
1362
1363 ### Structure of table `0_supp_allocations` ###
1364
1365 DROP TABLE IF EXISTS `0_supp_allocations`;
1366
1367 CREATE TABLE `0_supp_allocations` (
1368   `id` int(11) NOT NULL auto_increment,
1369   `amt` double unsigned default NULL,
1370   `date_alloc` date NOT NULL default '0000-00-00',
1371   `trans_no_from` int(11) default NULL,
1372   `trans_type_from` int(11) default NULL,
1373   `trans_no_to` int(11) default NULL,
1374   `trans_type_to` int(11) default NULL,
1375   PRIMARY KEY  (`id`)
1376 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1377
1378
1379 ### Data of table `0_supp_allocations` ###
1380
1381
1382
1383 ### Structure of table `0_supp_invoice_items` ###
1384
1385 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1386
1387 CREATE TABLE `0_supp_invoice_items` (
1388   `id` int(11) NOT NULL auto_increment,
1389   `supp_trans_no` int(11) default NULL,
1390   `supp_trans_type` int(11) default NULL,
1391   `gl_code` varchar(11) NOT NULL default '0',
1392   `grn_item_id` int(11) default NULL,
1393   `po_detail_item_id` int(11) default NULL,
1394   `stock_id` varchar(20) NOT NULL default '',
1395   `description` tinytext,
1396   `quantity` double NOT NULL default '0',
1397   `unit_price` double NOT NULL default '0',
1398   `unit_tax` double NOT NULL default '0',
1399   `memo_` tinytext,
1400   PRIMARY KEY  (`id`)
1401 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1402
1403
1404 ### Data of table `0_supp_invoice_items` ###
1405
1406
1407
1408 ### Structure of table `0_supp_trans` ###
1409
1410 DROP TABLE IF EXISTS `0_supp_trans`;
1411
1412 CREATE TABLE `0_supp_trans` (
1413   `trans_no` int(11) unsigned NOT NULL default '0',
1414   `type` smallint(6) unsigned NOT NULL default '0',
1415   `supplier_id` int(11) unsigned default NULL,
1416   `reference` tinytext NOT NULL,
1417   `supp_reference` varchar(60) NOT NULL default '',
1418   `tran_date` date NOT NULL default '0000-00-00',
1419   `due_date` date NOT NULL default '0000-00-00',
1420   `ov_amount` double NOT NULL default '0',
1421   `ov_discount` double NOT NULL default '0',
1422   `ov_gst` double NOT NULL default '0',
1423   `rate` double NOT NULL default '1',
1424   `alloc` double NOT NULL default '0',
1425   PRIMARY KEY  (`trans_no`,`type`),
1426   KEY `supplier_id` (`supplier_id`),
1427   KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1428   KEY `type` (`type`)
1429 ) TYPE=InnoDB  ;
1430
1431
1432 ### Data of table `0_supp_trans` ###
1433
1434
1435
1436 ### Structure of table `0_suppliers` ###
1437
1438 DROP TABLE IF EXISTS `0_suppliers`;
1439
1440 CREATE TABLE `0_suppliers` (
1441   `supplier_id` int(11) NOT NULL auto_increment,
1442   `supp_name` varchar(60) NOT NULL default '',
1443   `supp_ref` varchar(30) NOT NULL default '',
1444   `address` tinytext NOT NULL,
1445   `supp_address` tinytext NOT NULL,
1446   `phone` varchar(30) NOT NULL default '',
1447   `fax` varchar(30) NOT NULL default '',
1448   `gst_no` varchar(25) NOT NULL default '',
1449   `contact` varchar(60) NOT NULL default '',
1450   `supp_account_no` varchar(40) NOT NULL default '',
1451   `email` varchar(100) NOT NULL default '',
1452   `website` varchar(100) NOT NULL default '',
1453   `bank_account` varchar(60) NOT NULL default '',
1454   `curr_code` char(3) default NULL,
1455   `payment_terms` int(11) default NULL,
1456   `dimension_id` int(11) default '0',
1457   `dimension2_id` int(11) default '0',
1458   `tax_group_id` int(11) default NULL,
1459   `credit_limit` double NOT NULL default '0',
1460   `purchase_account` varchar(11) default NULL,
1461   `payable_account` varchar(11) default NULL,
1462   `payment_discount_account` varchar(11) default NULL,
1463   `notes` tinytext NOT NULL,
1464   `inactive` tinyint(1) NOT NULL default '0',
1465   PRIMARY KEY  (`supplier_id`)
1466 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
1467
1468
1469 ### Data of table `0_suppliers` ###
1470
1471
1472
1473 ### Structure of table `0_sys_types` ###
1474
1475 DROP TABLE IF EXISTS `0_sys_types`;
1476
1477 CREATE TABLE `0_sys_types` (
1478   `type_id` smallint(6) NOT NULL default '0',
1479   `type_name` varchar(60) NOT NULL default '',
1480   `type_no` int(11) NOT NULL default '1',
1481   `next_reference` varchar(100) NOT NULL default '',
1482   PRIMARY KEY  (`type_id`)
1483 ) TYPE=InnoDB  ;
1484
1485
1486 ### Data of table `0_sys_types` ###
1487
1488 INSERT INTO `0_sys_types` VALUES ('0', 'Journal - GL', '17', '1');
1489 INSERT INTO `0_sys_types` VALUES ('1', 'Payment - GL', '7', '1');
1490 INSERT INTO `0_sys_types` VALUES ('2', 'Receipt - GL', '4', '1');
1491 INSERT INTO `0_sys_types` VALUES ('4', 'Funds Transfer', '3', '1');
1492 INSERT INTO `0_sys_types` VALUES ('10', 'Sales Invoice', '16', '1');
1493 INSERT INTO `0_sys_types` VALUES ('11', 'Credit Note', '2', '1');
1494 INSERT INTO `0_sys_types` VALUES ('12', 'Receipt', '6', '1');
1495 INSERT INTO `0_sys_types` VALUES ('13', 'Delivery', '1', '1');
1496 INSERT INTO `0_sys_types` VALUES ('16', 'Location Transfer', '2', '1');
1497 INSERT INTO `0_sys_types` VALUES ('17', 'Inventory Adjustment', '2', '1');
1498 INSERT INTO `0_sys_types` VALUES ('18', 'Purchase Order', '1', '1');
1499 INSERT INTO `0_sys_types` VALUES ('20', 'Supplier Invoice', '6', '1');
1500 INSERT INTO `0_sys_types` VALUES ('21', 'Supplier Credit Note', '1', '1');
1501 INSERT INTO `0_sys_types` VALUES ('22', 'Supplier Payment', '3', '1');
1502 INSERT INTO `0_sys_types` VALUES ('25', 'Purchase Order Delivery', '1', '1');
1503 INSERT INTO `0_sys_types` VALUES ('26', 'Work Order', '1', '1');
1504 INSERT INTO `0_sys_types` VALUES ('28', 'Work Order Issue', '1', '1');
1505 INSERT INTO `0_sys_types` VALUES ('29', 'Work Order Production', '1', '1');
1506 INSERT INTO `0_sys_types` VALUES ('30', 'Sales Order', '1', '1');
1507 INSERT INTO `0_sys_types` VALUES ('35', 'Cost Update', '1', '1');
1508 INSERT INTO `0_sys_types` VALUES ('40', 'Dimension', '1', '1');
1509
1510
1511 ### Structure of table `0_tax_group_items` ###
1512
1513 DROP TABLE IF EXISTS `0_tax_group_items`;
1514
1515 CREATE TABLE `0_tax_group_items` (
1516   `tax_group_id` int(11) NOT NULL default '0',
1517   `tax_type_id` int(11) NOT NULL default '0',
1518   `rate` double NOT NULL default '0',
1519   PRIMARY KEY  (`tax_group_id`,`tax_type_id`)
1520 ) TYPE=InnoDB  ;
1521
1522
1523 ### Data of table `0_tax_group_items` ###
1524
1525 INSERT INTO `0_tax_group_items` VALUES ('1', '1', '5');
1526
1527
1528 ### Structure of table `0_tax_groups` ###
1529
1530 DROP TABLE IF EXISTS `0_tax_groups`;
1531
1532 CREATE TABLE `0_tax_groups` (
1533   `id` int(11) NOT NULL auto_increment,
1534   `name` varchar(60) NOT NULL default '',
1535   `tax_shipping` tinyint(1) NOT NULL default '0',
1536   `inactive` tinyint(1) NOT NULL default '0',
1537   PRIMARY KEY  (`id`),
1538   UNIQUE KEY `name` (`name`)
1539 ) TYPE=InnoDB AUTO_INCREMENT=3 ;
1540
1541
1542 ### Data of table `0_tax_groups` ###
1543
1544 INSERT INTO `0_tax_groups` VALUES ('1', 'Tax', '0', '0');
1545 INSERT INTO `0_tax_groups` VALUES ('2', 'Tax Exempt', '0', '0');
1546
1547
1548 ### Structure of table `0_tax_types` ###
1549
1550 DROP TABLE IF EXISTS `0_tax_types`;
1551
1552 CREATE TABLE `0_tax_types` (
1553   `id` int(11) NOT NULL auto_increment,
1554   `rate` double NOT NULL default '0',
1555   `sales_gl_code` varchar(11) NOT NULL default '',
1556   `purchasing_gl_code` varchar(11) NOT NULL default '',
1557   `name` varchar(60) NOT NULL default '',
1558   `inactive` tinyint(1) NOT NULL default '0',
1559   PRIMARY KEY  (`id`),
1560   UNIQUE KEY `name` (`name`,`rate`)
1561 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
1562
1563
1564 ### Data of table `0_tax_types` ###
1565
1566 INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2150', 'Tax', '0');
1567
1568
1569 ### Structure of table `0_trans_tax_details` ###
1570
1571 DROP TABLE IF EXISTS `0_trans_tax_details`;
1572
1573 CREATE TABLE `0_trans_tax_details` (
1574   `id` int(11) NOT NULL auto_increment,
1575   `trans_type` smallint(6) default NULL,
1576   `trans_no` int(11) default NULL,
1577   `tran_date` date NOT NULL,
1578   `tax_type_id` int(11) NOT NULL default '0',
1579   `rate` double NOT NULL default '0',
1580   `ex_rate` double NOT NULL default '1',
1581   `included_in_price` tinyint(1) NOT NULL default '0',
1582   `net_amount` double NOT NULL default '0',
1583   `amount` double NOT NULL default '0',
1584   `memo` tinytext,
1585   PRIMARY KEY  (`id`)
1586 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1587
1588
1589 ### Data of table `0_trans_tax_details` ###
1590
1591
1592
1593 ### Structure of table `0_users` ###
1594
1595 DROP TABLE IF EXISTS `0_users`;
1596
1597 CREATE TABLE `0_users` (
1598   `id` SMALLINT(6) AUTO_INCREMENT,
1599   `user_id` varchar(60) NOT NULL default '',
1600   `password` varchar(100) NOT NULL default '',
1601   `real_name` varchar(100) NOT NULL default '',
1602   `full_access` int(11) NOT NULL default '1',
1603   `phone` varchar(30) NOT NULL default '',
1604   `email` varchar(100) default NULL,
1605   `language` varchar(20) default NULL,
1606   `date_format` tinyint(1) NOT NULL default '0',
1607   `date_sep` tinyint(1) NOT NULL default '0',
1608   `tho_sep` tinyint(1) NOT NULL default '0',
1609   `dec_sep` tinyint(1) NOT NULL default '0',
1610   `theme` varchar(20) NOT NULL default 'default',
1611   `page_size` varchar(20) NOT NULL default 'A4',
1612   `prices_dec` smallint(6) NOT NULL default '2',
1613   `qty_dec` smallint(6) NOT NULL default '2',
1614   `rates_dec` smallint(6) NOT NULL default '4',
1615   `percent_dec` smallint(6) NOT NULL default '1',
1616   `show_gl` tinyint(1) NOT NULL default '1',
1617   `show_codes` tinyint(1) NOT NULL default '0',
1618   `show_hints` tinyint(1) NOT NULL default '0',
1619   `last_visit_date` datetime default NULL,
1620   `query_size` tinyint(1) default '10',
1621   `graphic_links` tinyint(1) default '1',
1622   `pos` smallint(6) default '1',
1623   `print_profile` varchar(30) NOT NULL default '1',
1624   `rep_popup` tinyint(1) default '1',
1625   `sticky_doc_date` tinyint(1) default '0',
1626   `inactive` tinyint(1) NOT NULL default '0',
1627   PRIMARY KEY  (`id`),
1628   UNIQUE KEY  (`user_id`)
1629 ) TYPE=MyISAM  AUTO_INCREMENT=2;
1630
1631
1632 ### Data of table `0_users` ###
1633
1634 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', '0');
1635
1636 ### Structure of table `0_voided` ###
1637
1638 DROP TABLE IF EXISTS `0_voided`;
1639
1640 CREATE TABLE `0_voided` (
1641   `type` int(11) NOT NULL default '0',
1642   `id` int(11) NOT NULL default '0',
1643   `date_` date NOT NULL default '0000-00-00',
1644   `memo_` tinytext NOT NULL,
1645   UNIQUE KEY `id` (`type`,`id`)
1646 ) TYPE=InnoDB  ;
1647
1648
1649 ### Data of table `0_voided` ###
1650
1651
1652
1653 ### Structure of table `0_wo_issue_items` ###
1654
1655 DROP TABLE IF EXISTS `0_wo_issue_items`;
1656
1657 CREATE TABLE `0_wo_issue_items` (
1658   `id` int(11) NOT NULL auto_increment,
1659   `stock_id` varchar(40) default NULL,
1660   `issue_id` int(11) default NULL,
1661   `qty_issued` double default NULL,
1662   PRIMARY KEY  (`id`)
1663 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1664
1665
1666 ### Data of table `0_wo_issue_items` ###
1667
1668
1669
1670 ### Structure of table `0_wo_issues` ###
1671
1672 DROP TABLE IF EXISTS `0_wo_issues`;
1673
1674 CREATE TABLE `0_wo_issues` (
1675   `issue_no` int(11) NOT NULL auto_increment,
1676   `workorder_id` int(11) NOT NULL default '0',
1677   `reference` varchar(100) default NULL,
1678   `issue_date` date default NULL,
1679   `loc_code` varchar(5) default NULL,
1680   `workcentre_id` int(11) default NULL,
1681   PRIMARY KEY  (`issue_no`)
1682 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1683
1684
1685 ### Data of table `0_wo_issues` ###
1686
1687
1688
1689 ### Structure of table `0_wo_manufacture` ###
1690
1691 DROP TABLE IF EXISTS `0_wo_manufacture`;
1692
1693 CREATE TABLE `0_wo_manufacture` (
1694   `id` int(11) NOT NULL auto_increment,
1695   `reference` varchar(100) default NULL,
1696   `workorder_id` int(11) NOT NULL default '0',
1697   `quantity` double NOT NULL default '0',
1698   `date_` date NOT NULL default '0000-00-00',
1699   PRIMARY KEY  (`id`)
1700 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1701
1702
1703 ### Data of table `0_wo_manufacture` ###
1704
1705
1706
1707 ### Structure of table `0_wo_requirements` ###
1708
1709 DROP TABLE IF EXISTS `0_wo_requirements`;
1710
1711 CREATE TABLE `0_wo_requirements` (
1712   `id` int(11) NOT NULL auto_increment,
1713   `workorder_id` int(11) NOT NULL default '0',
1714   `stock_id` char(20) NOT NULL default '',
1715   `workcentre` int(11) NOT NULL default '0',
1716   `units_req` double NOT NULL default '1',
1717   `std_cost` double NOT NULL default '0',
1718   `loc_code` char(5) NOT NULL default '',
1719   `units_issued` double NOT NULL default '0',
1720   PRIMARY KEY  (`id`)
1721 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1722
1723
1724 ### Data of table `0_wo_requirements` ###
1725
1726
1727
1728 ### Structure of table `0_workcentres` ###
1729
1730 DROP TABLE IF EXISTS `0_workcentres`;
1731
1732 CREATE TABLE `0_workcentres` (
1733   `id` int(11) NOT NULL auto_increment,
1734   `name` char(40) NOT NULL default '',
1735   `description` char(50) NOT NULL default '',
1736   `inactive` tinyint(1) NOT NULL default '0',
1737   PRIMARY KEY  (`id`),
1738   UNIQUE KEY `name` (`name`)
1739 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
1740
1741
1742 ### Data of table `0_workcentres` ###
1743
1744
1745
1746 ### Structure of table `0_workorders` ###
1747
1748 DROP TABLE IF EXISTS `0_workorders`;
1749
1750 CREATE TABLE `0_workorders` (
1751   `id` int(11) NOT NULL auto_increment,
1752   `wo_ref` varchar(60) NOT NULL default '',
1753   `loc_code` varchar(5) NOT NULL default '',
1754   `units_reqd` double NOT NULL default '1',
1755   `stock_id` varchar(20) NOT NULL default '',
1756   `date_` date NOT NULL default '0000-00-00',
1757   `type` tinyint(4) NOT NULL default '0',
1758   `required_by` date NOT NULL default '0000-00-00',
1759   `released_date` date NOT NULL default '0000-00-00',
1760   `units_issued` double NOT NULL default '0',
1761   `closed` tinyint(1) NOT NULL default '0',
1762   `released` tinyint(1) NOT NULL default '0',
1763   `additional_costs` double NOT NULL default '0',
1764   PRIMARY KEY  (`id`),
1765   UNIQUE KEY `wo_ref` (`wo_ref`)
1766 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1767
1768
1769 ### Data of table `0_workorders` ###
1770