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