[0000158] Added check for POS usage before deletion.
[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
26 ### Structure of table `0_attachments` ###
27
28 DROP TABLE IF EXISTS `0_attachments`;
29
30 CREATE TABLE `0_attachments` (
31   `id` int(11) unsigned NOT NULL auto_increment,
32   `description` varchar(60) NOT NULL default '',
33   `type_no` int(11) NOT NULL default '0',
34   `trans_no` int(11) NOT NULL default '0',
35   `unique_name` varchar(60) NOT NULL default '',
36   `tran_date` date NOT NULL default '0000-00-00',
37   `filename` varchar(60) NOT NULL default '',
38   `filesize` int(11) NOT NULL default '0',
39   `filetype` varchar(60) NOT NULL default '',
40   PRIMARY KEY  (`id`),
41   KEY `type_no` (`type_no`,`trans_no`)
42 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
43
44
45 ### Data of table `0_attachments` ###
46
47
48
49 ### Structure of table `0_bank_accounts` ###
50
51 DROP TABLE IF EXISTS `0_bank_accounts`;
52
53 CREATE TABLE `0_bank_accounts` (
54   `account_code` varchar(11) NOT NULL default '',
55   `account_type` smallint(6) NOT NULL default '0',
56   `bank_account_name` varchar(60) NOT NULL default '',
57   `bank_account_number` varchar(100) NOT NULL default '',
58   `bank_name` varchar(60) NOT NULL default '',
59   `bank_address` tinytext,
60   `bank_curr_code` char(3) NOT NULL default '',
61   `id` smallint(6) NOT NULL auto_increment,
62   `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00',
63   `ending_reconcile_balance` double NOT NULL default '0',
64   `inactive` tinyint(1) NOT NULL default '0',
65   PRIMARY KEY  (`id`),
66   KEY `bank_account_name` (`bank_account_name`),
67   KEY `bank_account_number` (`bank_account_number`)
68 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
69
70
71 ### Data of table `0_bank_accounts` ###
72
73 INSERT INTO `0_bank_accounts` VALUES ('1060', '0', 'Current account', 'N/A', 'N/A', '', 'USD', '1', '0000-00-00 00:00:00', '0', '0');
74 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');
75
76
77 ### Structure of table `0_bank_trans` ###
78
79 DROP TABLE IF EXISTS `0_bank_trans`;
80
81 CREATE TABLE `0_bank_trans` (
82   `id` int(11) NOT NULL auto_increment,
83   `type` smallint(6) default NULL,
84   `trans_no` int(11) default NULL,
85   `bank_act` varchar(11) default NULL,
86   `ref` varchar(40) default NULL,
87   `trans_date` date NOT NULL default '0000-00-00',
88   `bank_trans_type_id` int(10) unsigned default NULL,
89   `amount` double default NULL,
90   `dimension_id` int(11) NOT NULL default '0',
91   `dimension2_id` int(11) NOT NULL default '0',
92   `person_type_id` int(11) NOT NULL default '0',
93   `person_id` tinyblob,
94   `reconciled` date default NULL,
95   PRIMARY KEY  (`id`),
96   KEY `bank_act` (`bank_act`,`ref`),
97   KEY `type` (`type`,`trans_no`)
98 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
99
100
101 ### Data of table `0_bank_trans` ###
102
103
104
105 ### Structure of table `0_bom` ###
106
107 DROP TABLE IF EXISTS `0_bom`;
108
109 CREATE TABLE `0_bom` (
110   `id` int(11) NOT NULL auto_increment,
111   `parent` char(20) NOT NULL default '',
112   `component` char(20) NOT NULL default '',
113   `workcentre_added` int(11) NOT NULL default '0',
114   `loc_code` char(5) NOT NULL default '',
115   `quantity` double NOT NULL default '1',
116   PRIMARY KEY  (`parent`,`component`,`workcentre_added`,`loc_code`),
117   KEY `component` (`component`),
118   KEY `id` (`id`),
119   KEY `loc_code` (`loc_code`),
120   KEY `parent` (`parent`,`loc_code`),
121   KEY `Parent_2` (`parent`),
122   KEY `workcentre_added` (`workcentre_added`)
123 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
124
125
126 ### Data of table `0_bom` ###
127
128
129
130 ### Structure of table `0_budget_trans` ###
131
132 DROP TABLE IF EXISTS `0_budget_trans`;
133
134 CREATE TABLE `0_budget_trans` (
135   `counter` int(11) NOT NULL auto_increment,
136   `type` smallint(6) NOT NULL default '0',
137   `type_no` bigint(16) NOT NULL default '1',
138   `tran_date` date NOT NULL default '0000-00-00',
139   `account` varchar(11) NOT NULL default '',
140   `memo_` tinytext NOT NULL,
141   `amount` double NOT NULL default '0',
142   `dimension_id` int(11) default '0',
143   `dimension2_id` int(11) default '0',
144   `person_type_id` int(11) default NULL,
145   `person_id` tinyblob,
146   PRIMARY KEY  (`counter`),
147   KEY `Type_and_Number` (`type`,`type_no`)
148 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
149
150
151 ### Data of table `0_budget_trans` ###
152
153
154
155 ### Structure of table `0_chart_class` ###
156
157 DROP TABLE IF EXISTS `0_chart_class`;
158
159 CREATE TABLE `0_chart_class` (
160   `cid` int(11) NOT NULL default '0',
161   `class_name` varchar(60) NOT NULL default '',
162   `balance_sheet` tinyint(1) NOT NULL default '0',
163   PRIMARY KEY  (`cid`)
164 ) TYPE=MyISAM  ;
165
166
167 ### Data of table `0_chart_class` ###
168
169 INSERT INTO `0_chart_class` VALUES ('1', 'Assets', '1');
170 INSERT INTO `0_chart_class` VALUES ('2', 'Liabilities', '2');
171 INSERT INTO `0_chart_class` VALUES ('3', 'Income', '4');
172 INSERT INTO `0_chart_class` VALUES ('4', 'Costs', '6');
173
174
175 ### Structure of table `0_chart_master` ###
176
177 DROP TABLE IF EXISTS `0_chart_master`;
178
179 CREATE TABLE `0_chart_master` (
180   `account_code` varchar(11) NOT NULL default '',
181   `account_code2` varchar(11) default '',
182   `account_name` varchar(60) NOT NULL default '',
183   `account_type` int(11) NOT NULL default '0',
184   `inactive` tinyint(1) NOT NULL default '0',
185   PRIMARY KEY  (`account_code`),
186   KEY `account_code` (`account_code`),
187   KEY `account_name` (`account_name`)
188 ) TYPE=MyISAM  ;
189
190
191 ### Data of table `0_chart_master` ###
192
193 INSERT INTO `0_chart_master` VALUES ('1060', '', 'Checking Account', '1', '0');
194 INSERT INTO `0_chart_master` VALUES ('1065', '', 'Petty Cash', '1', '0');
195 INSERT INTO `0_chart_master` VALUES ('1200', '', 'Accounts Receivables', '1', '0');
196 INSERT INTO `0_chart_master` VALUES ('1205', '', 'Allowance for doubtful accounts', '1', '0');
197 INSERT INTO `0_chart_master` VALUES ('1510', '', 'Inventory', '2', '0');
198 INSERT INTO `0_chart_master` VALUES ('1520', '', 'Stocks of Raw Materials', '2', '0');
199 INSERT INTO `0_chart_master` VALUES ('1530', '', 'Stocks of Work In Progress', '2', '0');
200 INSERT INTO `0_chart_master` VALUES ('1540', '', 'Stocks of Finsihed Goods', '2', '0');
201 INSERT INTO `0_chart_master` VALUES ('1550', '', 'Goods Received Clearing account', '2', '0');
202 INSERT INTO `0_chart_master` VALUES ('1820', '', 'Office Furniture & Equipment', '3', '0');
203 INSERT INTO `0_chart_master` VALUES ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0');
204 INSERT INTO `0_chart_master` VALUES ('1840', '', 'Vehicle', '3', '0');
205 INSERT INTO `0_chart_master` VALUES ('1845', '', 'Accum. Amort. -Vehicle', '3', '0');
206 INSERT INTO `0_chart_master` VALUES ('2100', '', 'Accounts Payable', '4', '0');
207 INSERT INTO `0_chart_master` VALUES ('2110', '', 'Accrued Income Tax - Federal', '4', '0');
208 INSERT INTO `0_chart_master` VALUES ('2120', '', 'Accrued Income Tax - State', '4', '0');
209 INSERT INTO `0_chart_master` VALUES ('2130', '', 'Accrued Franchise Tax', '4', '0');
210 INSERT INTO `0_chart_master` VALUES ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0');
211 INSERT INTO `0_chart_master` VALUES ('2150', '', 'Sales Tax', '4', '0');
212 INSERT INTO `0_chart_master` VALUES ('2160', '', 'Accrued Use Tax Payable', '4', '0');
213 INSERT INTO `0_chart_master` VALUES ('2210', '', 'Accrued Wages', '4', '0');
214 INSERT INTO `0_chart_master` VALUES ('2220', '', 'Accrued Comp Time', '4', '0');
215 INSERT INTO `0_chart_master` VALUES ('2230', '', 'Accrued Holiday Pay', '4', '0');
216 INSERT INTO `0_chart_master` VALUES ('2240', '', 'Accrued Vacation Pay', '4', '0');
217 INSERT INTO `0_chart_master` VALUES ('2310', '', 'Accr. Benefits - 401K', '4', '0');
218 INSERT INTO `0_chart_master` VALUES ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0');
219 INSERT INTO `0_chart_master` VALUES ('2330', '', 'Accr. Benefits - Med, Den', '4', '0');
220 INSERT INTO `0_chart_master` VALUES ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0');
221 INSERT INTO `0_chart_master` VALUES ('2350', '', 'Accr. Benefits - Credit Union', '4', '0');
222 INSERT INTO `0_chart_master` VALUES ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0');
223 INSERT INTO `0_chart_master` VALUES ('2370', '', 'Accr. Benefits - Garnish', '4', '0');
224 INSERT INTO `0_chart_master` VALUES ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0');
225 INSERT INTO `0_chart_master` VALUES ('2620', '', 'Bank Loans', '5', '0');
226 INSERT INTO `0_chart_master` VALUES ('2680', '', 'Loans from Shareholders', '5', '0');
227 INSERT INTO `0_chart_master` VALUES ('3350', '', 'Common Shares', '6', '0');
228 INSERT INTO `0_chart_master` VALUES ('3590', '', 'Retained Earnings - prior years', '7', '0');
229 INSERT INTO `0_chart_master` VALUES ('4010', '', 'Sales', '8', '0');
230 INSERT INTO `0_chart_master` VALUES ('4430', '', 'Shipping & Handling', '9', '0');
231 INSERT INTO `0_chart_master` VALUES ('4440', '', 'Interest', '9', '0');
232 INSERT INTO `0_chart_master` VALUES ('4450', '', 'Foreign Exchange Gain', '9', '0');
233 INSERT INTO `0_chart_master` VALUES ('4500', '', 'Prompt Payment Discounts', '9', '0');
234 INSERT INTO `0_chart_master` VALUES ('4510', '', 'Discounts Given', '9', '0');
235 INSERT INTO `0_chart_master` VALUES ('5010', '', 'Cost of Goods Sold - Retail', '10', '0');
236 INSERT INTO `0_chart_master` VALUES ('5020', '', 'Material Usage Varaiance', '10', '0');
237 INSERT INTO `0_chart_master` VALUES ('5030', '', 'Consumable Materials', '10', '0');
238 INSERT INTO `0_chart_master` VALUES ('5040', '', 'Purchase price Variance', '10', '0');
239 INSERT INTO `0_chart_master` VALUES ('5050', '', 'Purchases of materials', '10', '0');
240 INSERT INTO `0_chart_master` VALUES ('5060', '', 'Discounts Received', '10', '0');
241 INSERT INTO `0_chart_master` VALUES ('5100', '', 'Freight', '10', '0');
242 INSERT INTO `0_chart_master` VALUES ('5410', '', 'Wages & Salaries', '11', '0');
243 INSERT INTO `0_chart_master` VALUES ('5420', '', 'Wages - Overtime', '11', '0');
244 INSERT INTO `0_chart_master` VALUES ('5430', '', 'Benefits - Comp Time', '11', '0');
245 INSERT INTO `0_chart_master` VALUES ('5440', '', 'Benefits - Payroll Taxes', '11', '0');
246 INSERT INTO `0_chart_master` VALUES ('5450', '', 'Benefits - Workers Comp', '11', '0');
247 INSERT INTO `0_chart_master` VALUES ('5460', '', 'Benefits - Pension', '11', '0');
248 INSERT INTO `0_chart_master` VALUES ('5470', '', 'Benefits - General Benefits', '11', '0');
249 INSERT INTO `0_chart_master` VALUES ('5510', '', 'Inc Tax Exp - Federal', '11', '0');
250 INSERT INTO `0_chart_master` VALUES ('5520', '', 'Inc Tax Exp - State', '11', '0');
251 INSERT INTO `0_chart_master` VALUES ('5530', '', 'Taxes - Real Estate', '11', '0');
252 INSERT INTO `0_chart_master` VALUES ('5540', '', 'Taxes - Personal Property', '11', '0');
253 INSERT INTO `0_chart_master` VALUES ('5550', '', 'Taxes - Franchise', '11', '0');
254 INSERT INTO `0_chart_master` VALUES ('5560', '', 'Taxes - Foreign Withholding', '11', '0');
255 INSERT INTO `0_chart_master` VALUES ('5610', '', 'Accounting & Legal', '12', '0');
256 INSERT INTO `0_chart_master` VALUES ('5615', '', 'Advertising & Promotions', '12', '0');
257 INSERT INTO `0_chart_master` VALUES ('5620', '', 'Bad Debts', '12', '0');
258 INSERT INTO `0_chart_master` VALUES ('5660', '', 'Amortization Expense', '12', '0');
259 INSERT INTO `0_chart_master` VALUES ('5685', '', 'Insurance', '12', '0');
260 INSERT INTO `0_chart_master` VALUES ('5690', '', 'Interest & Bank Charges', '12', '0');
261 INSERT INTO `0_chart_master` VALUES ('5700', '', 'Office Supplies', '12', '0');
262 INSERT INTO `0_chart_master` VALUES ('5760', '', 'Rent', '12', '0');
263 INSERT INTO `0_chart_master` VALUES ('5765', '', 'Repair & Maintenance', '12', '0');
264 INSERT INTO `0_chart_master` VALUES ('5780', '', 'Telephone', '12', '0');
265 INSERT INTO `0_chart_master` VALUES ('5785', '', 'Travel & Entertainment', '12', '0');
266 INSERT INTO `0_chart_master` VALUES ('5790', '', 'Utilities', '12', '0');
267 INSERT INTO `0_chart_master` VALUES ('5795', '', 'Registrations', '12', '0');
268 INSERT INTO `0_chart_master` VALUES ('5800', '', 'Licenses', '12', '0');
269 INSERT INTO `0_chart_master` VALUES ('5810', '', 'Foreign Exchange Loss', '12', '0');
270 INSERT INTO `0_chart_master` VALUES ('9990', '', 'Year Profit/Loss', '12', '0');
271
272
273 ### Structure of table `0_chart_types` ###
274
275 DROP TABLE IF EXISTS `0_chart_types`;
276
277 CREATE TABLE `0_chart_types` (
278   `id` int(11) NOT NULL auto_increment,
279   `name` varchar(60) NOT NULL default '',
280   `class_id` tinyint(1) NOT NULL default '0',
281   `parent` int(11) NOT NULL default '-1',
282   PRIMARY KEY  (`id`),
283   KEY `name` (`name`)
284 ) TYPE=MyISAM AUTO_INCREMENT=13 ;
285
286
287 ### Data of table `0_chart_types` ###
288
289 INSERT INTO `0_chart_types` VALUES ('1', 'Current Assets', '1', '0');
290 INSERT INTO `0_chart_types` VALUES ('2', 'Inventory Assets', '1', '0');
291 INSERT INTO `0_chart_types` VALUES ('3', 'Capital Assets', '1', '0');
292 INSERT INTO `0_chart_types` VALUES ('4', 'Current Liabilities', '2', '0');
293 INSERT INTO `0_chart_types` VALUES ('5', 'Long Term Liabilities', '2', '0');
294 INSERT INTO `0_chart_types` VALUES ('6', 'Share Capital', '2', '0');
295 INSERT INTO `0_chart_types` VALUES ('7', 'Retained Earnings', '2', '0');
296 INSERT INTO `0_chart_types` VALUES ('8', 'Sales Revenue', '3', '0');
297 INSERT INTO `0_chart_types` VALUES ('9', 'Other Revenue', '3', '0');
298 INSERT INTO `0_chart_types` VALUES ('10', 'Cost of Goods Sold', '4', '0');
299 INSERT INTO `0_chart_types` VALUES ('11', 'Payroll Expenses', '4', '0');
300 INSERT INTO `0_chart_types` VALUES ('12', 'General & Administrative expenses', '4', '0');
301
302
303 ### Structure of table `0_comments` ###
304
305 DROP TABLE IF EXISTS `0_comments`;
306
307 CREATE TABLE `0_comments` (
308   `type` int(11) NOT NULL default '0',
309   `id` int(11) NOT NULL default '0',
310   `date_` date default '0000-00-00',
311   `memo_` tinytext
312 ) TYPE=InnoDB  ;
313
314
315 ### Data of table `0_comments` ###
316
317
318
319 ### Structure of table `0_company` ###
320
321 DROP TABLE IF EXISTS `0_company`;
322
323 CREATE TABLE `0_company` (
324   `coy_code` int(11) NOT NULL default '1',
325   `coy_name` varchar(60) NOT NULL default '',
326   `gst_no` varchar(25) NOT NULL default '',
327   `coy_no` varchar(25) NOT NULL default '0',
328   `tax_prd` int(11) NOT NULL default '1',
329   `tax_last` int(11) NOT NULL default '1',
330   `postal_address` tinytext NOT NULL,
331   `phone` varchar(30) NOT NULL default '',
332   `fax` varchar(30) NOT NULL default '',
333   `email` varchar(100) NOT NULL default '',
334   `coy_logo` varchar(100) NOT NULL default '',
335   `domicile` varchar(55) NOT NULL default '',
336   `curr_default` char(3) NOT NULL default '',
337   `debtors_act` varchar(11) NOT NULL default '',
338   `pyt_discount_act` varchar(11) NOT NULL default '',
339   `creditors_act` varchar(11) NOT NULL default '',
340   `grn_act` varchar(11) NOT NULL default '',
341   `exchange_diff_act` varchar(11) NOT NULL default '',
342   `purch_exchange_diff_act` varchar(11) NOT NULL default '',
343   `retained_earnings_act` varchar(11) NOT NULL default '',
344   `freight_act` varchar(11) NOT NULL default '',
345   `default_sales_act` varchar(11) NOT NULL default '',
346   `default_sales_discount_act` varchar(11) NOT NULL default '',
347   `default_prompt_payment_act` varchar(11) NOT NULL default '',
348   `default_inventory_act` varchar(11) NOT NULL default '',
349   `default_cogs_act` varchar(11) NOT NULL default '',
350   `default_adj_act` varchar(11) NOT NULL default '',
351   `default_inv_sales_act` varchar(11) NOT NULL default '',
352   `default_assembly_act` varchar(11) NOT NULL default '',
353   `payroll_act` varchar(11) NOT NULL default '',
354   `custom1_name` varchar(60) NOT NULL default '',
355   `custom2_name` varchar(60) NOT NULL default '',
356   `custom3_name` varchar(60) NOT NULL default '',
357   `custom1_value` varchar(100) NOT NULL default '',
358   `custom2_value` varchar(100) NOT NULL default '',
359   `custom3_value` varchar(100) NOT NULL default '',
360   `allow_negative_stock` tinyint(1) NOT NULL default '0',
361   `po_over_receive` int(11) NOT NULL default '10',
362   `po_over_charge` int(11) NOT NULL default '10',
363   `default_credit_limit` int(11) NOT NULL default '1000',
364   `default_workorder_required` int(11) NOT NULL default '20',
365   `default_dim_required` int(11) NOT NULL default '20',
366   `past_due_days` int(11) NOT NULL default '30',
367   `use_dimension` tinyint(1) default '0',
368   `f_year` int(11) NOT NULL default '1',
369   `no_item_list` tinyint(1) NOT NULL default '0',
370   `no_customer_list` tinyint(1) NOT NULL default '0',
371   `no_supplier_list` tinyint(1) NOT NULL default '0',
372   `base_sales` int(11) NOT NULL default '-1',
373   `foreign_codes` tinyint(1) NOT NULL default '0',
374   `accumulate_shipping` tinyint(1) NOT NULL default '0',
375   `legal_text` tinytext NOT NULL,
376   PRIMARY KEY  (`coy_code`)
377 ) TYPE=MyISAM  ;
378
379
380 ### Data of table `0_company` ###
381
382 INSERT INTO `0_company` VALUES ('1', 'Company name', '', '', '1', '1', 'N/A', '', '', '', '', '', 'USD', '1200', '5060', '2100', '1430', '4450', '4220', '2050', '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', '');
383
384
385 ### Structure of table `0_credit_status` ###
386
387 DROP TABLE IF EXISTS `0_credit_status`;
388
389 CREATE TABLE `0_credit_status` (
390   `id` int(11) NOT NULL auto_increment,
391   `reason_description` char(100) NOT NULL default '',
392   `dissallow_invoices` tinyint(1) NOT NULL default '0',
393   `inactive` tinyint(1) NOT NULL default '0',
394   PRIMARY KEY  (`id`),
395   UNIQUE KEY `reason_description` (`reason_description`)
396 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
397
398
399 ### Data of table `0_credit_status` ###
400
401 INSERT INTO `0_credit_status` VALUES ('1', 'Good History', '0', '0');
402 INSERT INTO `0_credit_status` VALUES ('3', 'No more work until payment received', '1', '0');
403 INSERT INTO `0_credit_status` VALUES ('4', 'In liquidation', '1', '0');
404
405
406 ### Structure of table `0_currencies` ###
407
408 DROP TABLE IF EXISTS `0_currencies`;
409
410 CREATE TABLE `0_currencies` (
411   `currency` varchar(60) NOT NULL default '',
412   `curr_abrev` char(3) NOT NULL default '',
413   `curr_symbol` varchar(10) NOT NULL default '',
414   `country` varchar(100) NOT NULL default '',
415   `hundreds_name` varchar(15) NOT NULL default '',
416   `inactive` tinyint(1) NOT NULL default '0',
417   PRIMARY KEY  (`curr_abrev`)
418 ) TYPE=MyISAM  ;
419
420
421 ### Data of table `0_currencies` ###
422
423 INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents', '0');
424 INSERT INTO `0_currencies` VALUES ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '0');
425 INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents', '0');
426 INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence', '0');
427
428
429 ### Structure of table `0_cust_allocations` ###
430
431 DROP TABLE IF EXISTS `0_cust_allocations`;
432
433 CREATE TABLE `0_cust_allocations` (
434   `id` int(11) NOT NULL auto_increment,
435   `amt` double unsigned default NULL,
436   `date_alloc` date NOT NULL default '0000-00-00',
437   `trans_no_from` int(11) default NULL,
438   `trans_type_from` int(11) default NULL,
439   `trans_no_to` int(11) default NULL,
440   `trans_type_to` int(11) default NULL,
441   PRIMARY KEY  (`id`)
442 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
443
444
445 ### Data of table `0_cust_allocations` ###
446
447
448
449 ### Structure of table `0_cust_branch` ###
450
451 DROP TABLE IF EXISTS `0_cust_branch`;
452
453 CREATE TABLE `0_cust_branch` (
454   `branch_code` int(11) NOT NULL auto_increment,
455   `debtor_no` int(11) NOT NULL default '0',
456   `br_name` varchar(60) NOT NULL default '',
457   `br_address` tinytext NOT NULL,
458   `area` int(11) default NULL,
459   `salesman` int(11) NOT NULL default '0',
460   `phone` varchar(30) NOT NULL default '',
461   `fax` varchar(30) NOT NULL default '',
462   `contact_name` varchar(60) NOT NULL default '',
463   `email` varchar(100) NOT NULL default '',
464   `default_location` varchar(5) NOT NULL default '',
465   `tax_group_id` int(11) default NULL,
466   `sales_account` varchar(11) default NULL,
467   `sales_discount_account` varchar(11) default NULL,
468   `receivables_account` varchar(11) default NULL,
469   `payment_discount_account` varchar(11) default NULL,
470   `default_ship_via` int(11) NOT NULL default '1',
471   `disable_trans` tinyint(4) NOT NULL default '0',
472   `br_post_address` tinytext NOT NULL,
473   `group_no` int(11) NOT NULL default '0',
474   PRIMARY KEY  (`branch_code`,`debtor_no`),
475   KEY `branch_code` (`branch_code`),
476   KEY `br_name` (`br_name`)
477 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
478
479
480 ### Data of table `0_cust_branch` ###
481
482
483
484 ### Structure of table `0_debtor_trans` ###
485
486 DROP TABLE IF EXISTS `0_debtor_trans`;
487
488 CREATE TABLE `0_debtor_trans` (
489   `trans_no` int(11) unsigned NOT NULL default '0',
490   `type` smallint(6) unsigned NOT NULL default '0',
491   `version` tinyint(1) unsigned NOT NULL default '0',
492   `debtor_no` int(11) unsigned default NULL,
493   `branch_code` int(11) NOT NULL default '-1',
494   `tran_date` date NOT NULL default '0000-00-00',
495   `due_date` date NOT NULL default '0000-00-00',
496   `reference` varchar(60) NOT NULL default '',
497   `tpe` int(11) NOT NULL default '0',
498   `order_` int(11) NOT NULL default '0',
499   `ov_amount` double NOT NULL default '0',
500   `ov_gst` double NOT NULL default '0',
501   `ov_freight` double NOT NULL default '0',
502   `ov_freight_tax` double NOT NULL default '0',
503   `ov_discount` double NOT NULL default '0',
504   `alloc` double NOT NULL default '0',
505   `rate` double NOT NULL default '1',
506   `ship_via` int(11) default NULL,
507   `trans_link` int(11) NOT NULL default '0',
508   `dimension_id` int(11) NOT NULL default '0',
509   `dimension2_id` int(11) NOT NULL default '0',
510   PRIMARY KEY  (`trans_no`,`type`),
511   KEY `debtor_no` (`debtor_no`,`branch_code`)
512 ) TYPE=InnoDB  ;
513
514
515 ### Data of table `0_debtor_trans` ###
516
517
518
519 ### Structure of table `0_debtor_trans_details` ###
520
521 DROP TABLE IF EXISTS `0_debtor_trans_details`;
522
523 CREATE TABLE `0_debtor_trans_details` (
524   `id` int(11) NOT NULL auto_increment,
525   `debtor_trans_no` int(11) default NULL,
526   `debtor_trans_type` int(11) default NULL,
527   `stock_id` varchar(20) NOT NULL default '',
528   `description` tinytext,
529   `unit_price` double NOT NULL default '0',
530   `unit_tax` double NOT NULL default '0',
531   `quantity` double NOT NULL default '0',
532   `discount_percent` double NOT NULL default '0',
533   `standard_cost` double NOT NULL default '0',
534   `qty_done` double NOT NULL default '0',
535   PRIMARY KEY  (`id`)
536 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
537
538
539 ### Data of table `0_debtor_trans_details` ###
540
541
542
543 ### Structure of table `0_debtors_master` ###
544
545 DROP TABLE IF EXISTS `0_debtors_master`;
546
547 CREATE TABLE `0_debtors_master` (
548   `debtor_no` int(11) NOT NULL auto_increment,
549   `name` varchar(60) NOT NULL default '',
550   `address` tinytext,
551   `email` varchar(100) NOT NULL default '',
552   `tax_id` varchar(55) NOT NULL default '',
553   `curr_code` char(3) NOT NULL default '',
554   `sales_type` int(11) NOT NULL default '1',
555   `dimension_id` int(11) NOT NULL default '0',
556   `dimension2_id` int(11) NOT NULL default '0',
557   `credit_status` int(11) NOT NULL default '0',
558   `payment_terms` int(11) default NULL,
559   `discount` double NOT NULL default '0',
560   `pymt_discount` double NOT NULL default '0',
561   `credit_limit` float NOT NULL default '1000',
562   `inactive` tinyint(1) NOT NULL default '0',
563   PRIMARY KEY  (`debtor_no`),
564   UNIQUE KEY `name` (`name`)
565 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
566
567
568 ### Data of table `0_debtors_master` ###
569
570
571
572 ### Structure of table `0_dimensions` ###
573
574 DROP TABLE IF EXISTS `0_dimensions`;
575
576 CREATE TABLE `0_dimensions` (
577   `id` int(11) NOT NULL auto_increment,
578   `reference` varchar(60) NOT NULL default '',
579   `name` varchar(60) NOT NULL default '',
580   `type_` tinyint(1) NOT NULL default '1',
581   `closed` tinyint(1) NOT NULL default '0',
582   `date_` date NOT NULL default '0000-00-00',
583   `due_date` date NOT NULL default '0000-00-00',
584   PRIMARY KEY  (`id`),
585   UNIQUE KEY `reference` (`reference`)
586 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
587
588
589 ### Data of table `0_dimensions` ###
590
591
592
593 ### Structure of table `0_exchange_rates` ###
594
595 DROP TABLE IF EXISTS `0_exchange_rates`;
596
597 CREATE TABLE `0_exchange_rates` (
598   `id` int(11) NOT NULL auto_increment,
599   `curr_code` char(3) NOT NULL default '',
600   `rate_buy` double NOT NULL default '0',
601   `rate_sell` double NOT NULL default '0',
602   `date_` date NOT NULL default '0000-00-00',
603   PRIMARY KEY  (`id`),
604   UNIQUE KEY `curr_code` (`curr_code`,`date_`)
605 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
606
607
608 ### Data of table `0_exchange_rates` ###
609
610
611
612 ### Structure of table `0_fiscal_year` ###
613
614 DROP TABLE IF EXISTS `0_fiscal_year`;
615
616 CREATE TABLE `0_fiscal_year` (
617   `id` int(11) NOT NULL auto_increment,
618   `begin` date default '0000-00-00',
619   `end` date default '0000-00-00',
620   `closed` tinyint(1) NOT NULL default '0',
621   PRIMARY KEY  (`id`)
622 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
623
624
625 ### Data of table `0_fiscal_year` ###
626
627 INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0');
628
629
630 ### Structure of table `0_gl_trans` ###
631
632 DROP TABLE IF EXISTS `0_gl_trans`;
633
634 CREATE TABLE `0_gl_trans` (
635   `counter` int(11) NOT NULL auto_increment,
636   `type` smallint(6) NOT NULL default '0',
637   `type_no` bigint(16) NOT NULL default '1',
638   `tran_date` date NOT NULL default '0000-00-00',
639   `account` varchar(11) NOT NULL default '',
640   `memo_` tinytext NOT NULL,
641   `amount` double NOT NULL default '0',
642   `dimension_id` int(11) NOT NULL default '0',
643   `dimension2_id` int(11) NOT NULL default '0',
644   `person_type_id` int(11) default NULL,
645   `person_id` tinyblob,
646   PRIMARY KEY  (`counter`),
647   KEY `Type_and_Number` (`type`,`type_no`)
648 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
649
650
651 ### Data of table `0_gl_trans` ###
652
653
654
655 ### Structure of table `0_grn_batch` ###
656
657 DROP TABLE IF EXISTS `0_grn_batch`;
658
659 CREATE TABLE `0_grn_batch` (
660   `id` int(11) NOT NULL auto_increment,
661   `supplier_id` int(11) NOT NULL default '0',
662   `purch_order_no` int(11) default NULL,
663   `reference` varchar(60) NOT NULL default '',
664   `delivery_date` date NOT NULL default '0000-00-00',
665   `loc_code` varchar(5) default NULL,
666   PRIMARY KEY  (`id`)
667 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
668
669
670 ### Data of table `0_grn_batch` ###
671
672
673
674 ### Structure of table `0_grn_items` ###
675
676 DROP TABLE IF EXISTS `0_grn_items`;
677
678 CREATE TABLE `0_grn_items` (
679   `id` int(11) NOT NULL auto_increment,
680   `grn_batch_id` int(11) default NULL,
681   `po_detail_item` int(11) NOT NULL default '0',
682   `item_code` varchar(20) NOT NULL default '',
683   `description` tinytext,
684   `qty_recd` double NOT NULL default '0',
685   `quantity_inv` double NOT NULL default '0',
686   PRIMARY KEY  (`id`)
687 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
688
689
690 ### Data of table `0_grn_items` ###
691
692
693
694 ### Structure of table `0_groups` ###
695
696 DROP TABLE IF EXISTS `0_groups`;
697
698 CREATE TABLE `0_groups` (
699   `id` smallint(6) unsigned NOT NULL auto_increment,
700   `description` varchar(60) NOT NULL default '',
701   `inactive` tinyint(1) NOT NULL default '0',
702   PRIMARY KEY  (`id`),
703   UNIQUE KEY `description` (`description`)
704 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
705
706
707 ### Data of table `0_groups` ###
708
709 INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
710 INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
711 INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
712
713
714 ### Structure of table `0_item_codes` ###
715
716 DROP TABLE IF EXISTS `0_item_codes`;
717
718 CREATE TABLE `0_item_codes` (
719   `id` int(11) unsigned NOT NULL auto_increment,
720   `item_code` varchar(20) NOT NULL,
721   `stock_id` varchar(20) NOT NULL,
722   `description` varchar(200) NOT NULL default '',
723   `category_id` smallint(6) unsigned NOT NULL,
724   `quantity` double NOT NULL default '1',
725   `is_foreign` tinyint(1) NOT NULL default '0',
726   `inactive` tinyint(1) NOT NULL default '0',
727   PRIMARY KEY  (`id`),
728   UNIQUE KEY `stock_id` (`stock_id`,`item_code`)
729 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
730
731
732 ### Data of table `0_item_codes` ###
733
734
735
736 ### Structure of table `0_item_tax_type_exemptions` ###
737
738 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
739
740 CREATE TABLE `0_item_tax_type_exemptions` (
741   `item_tax_type_id` int(11) NOT NULL default '0',
742   `tax_type_id` int(11) NOT NULL default '0',
743   PRIMARY KEY  (`item_tax_type_id`,`tax_type_id`)
744 ) TYPE=InnoDB  ;
745
746
747 ### Data of table `0_item_tax_type_exemptions` ###
748
749
750
751 ### Structure of table `0_item_tax_types` ###
752
753 DROP TABLE IF EXISTS `0_item_tax_types`;
754
755 CREATE TABLE `0_item_tax_types` (
756   `id` int(11) NOT NULL auto_increment,
757   `name` varchar(60) NOT NULL default '',
758   `exempt` tinyint(1) NOT NULL default '0',
759   PRIMARY KEY  (`id`),
760   UNIQUE KEY `name` (`name`)
761 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
762
763
764 ### Data of table `0_item_tax_types` ###
765
766 INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0');
767
768
769 ### Structure of table `0_item_units` ###
770
771 DROP TABLE IF EXISTS `0_item_units`;
772
773 CREATE TABLE `0_item_units` (
774   `abbr` varchar(20) NOT NULL,
775   `name` varchar(40) NOT NULL,
776   `decimals` tinyint(2) NOT NULL,
777   `inactive` tinyint(1) NOT NULL default '0',
778   PRIMARY KEY  (`abbr`),
779   UNIQUE KEY `name` (`name`)
780 ) TYPE=MyISAM  ;
781
782
783 ### Data of table `0_item_units` ###
784
785 INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0');
786
787
788 ### Structure of table `0_loc_stock` ###
789
790 DROP TABLE IF EXISTS `0_loc_stock`;
791
792 CREATE TABLE `0_loc_stock` (
793   `loc_code` char(5) NOT NULL default '',
794   `stock_id` char(20) NOT NULL default '',
795   `reorder_level` bigint(20) NOT NULL default '0',
796   PRIMARY KEY  (`loc_code`,`stock_id`),
797   KEY `stock_id` (`stock_id`)
798 ) TYPE=InnoDB  ;
799
800
801 ### Data of table `0_loc_stock` ###
802
803
804
805 ### Structure of table `0_locations` ###
806
807 DROP TABLE IF EXISTS `0_locations`;
808
809 CREATE TABLE `0_locations` (
810   `loc_code` varchar(5) NOT NULL default '',
811   `location_name` varchar(60) NOT NULL default '',
812   `delivery_address` tinytext NOT NULL,
813   `phone` varchar(30) NOT NULL default '',
814   `fax` varchar(30) NOT NULL default '',
815   `email` varchar(100) NOT NULL default '',
816   `contact` varchar(30) NOT NULL default '',
817   `inactive` tinyint(1) NOT NULL default '0',
818   PRIMARY KEY  (`loc_code`)
819 ) TYPE=MyISAM  ;
820
821
822 ### Data of table `0_locations` ###
823
824 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '0');
825
826
827 ### Structure of table `0_movement_types` ###
828
829 DROP TABLE IF EXISTS `0_movement_types`;
830
831 CREATE TABLE `0_movement_types` (
832   `id` int(11) NOT NULL auto_increment,
833   `name` varchar(60) NOT NULL default '',
834   PRIMARY KEY  (`id`),
835   UNIQUE KEY `name` (`name`)
836 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
837
838
839 ### Data of table `0_movement_types` ###
840
841 INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment');
842
843
844 ### Structure of table `0_payment_terms` ###
845
846 DROP TABLE IF EXISTS `0_payment_terms`;
847
848 CREATE TABLE `0_payment_terms` (
849   `terms_indicator` int(11) NOT NULL auto_increment,
850   `terms` char(80) NOT NULL default '',
851   `days_before_due` smallint(6) NOT NULL default '0',
852   `day_in_following_month` smallint(6) NOT NULL default '0',
853   `inactive` tinyint(1) NOT NULL default '0',
854   PRIMARY KEY  (`terms_indicator`),
855   UNIQUE KEY `terms` (`terms`)
856 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
857
858
859 ### Data of table `0_payment_terms` ###
860
861 INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0');
862 INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0');
863 INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0');
864 INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0');
865
866
867 ### Structure of table `0_prices` ###
868
869 DROP TABLE IF EXISTS `0_prices`;
870
871 CREATE TABLE `0_prices` (
872   `id` int(11) NOT NULL auto_increment,
873   `stock_id` varchar(20) NOT NULL default '',
874   `sales_type_id` int(11) NOT NULL default '0',
875   `curr_abrev` char(3) NOT NULL default '',
876   `price` double NOT NULL default '0',
877   PRIMARY KEY  (`id`),
878   UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
879 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
880
881
882 ### Data of table `0_prices` ###
883
884
885
886 ### Structure of table `0_print_profiles` ###
887
888 DROP TABLE IF EXISTS `0_print_profiles`;
889
890 CREATE TABLE `0_print_profiles` (
891   `id` smallint(6) unsigned NOT NULL auto_increment,
892   `profile` varchar(30) NOT NULL,
893   `report` varchar(5) default NULL,
894   `printer` tinyint(3) unsigned default NULL,
895   PRIMARY KEY  (`id`),
896   UNIQUE KEY `profile` (`profile`,`report`)
897 ) TYPE=MyISAM AUTO_INCREMENT=10 ;
898
899
900 ### Data of table `0_print_profiles` ###
901
902 INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0');
903 INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0');
904 INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2');
905 INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2');
906 INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2');
907 INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2');
908 INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2');
909 INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2');
910 INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2');
911
912
913 ### Structure of table `0_printers` ###
914
915 DROP TABLE IF EXISTS `0_printers`;
916
917 CREATE TABLE `0_printers` (
918   `id` tinyint(3) unsigned NOT NULL auto_increment,
919   `name` varchar(20) NOT NULL,
920   `description` varchar(60) NOT NULL,
921   `queue` varchar(20) NOT NULL,
922   `host` varchar(40) NOT NULL,
923   `port` smallint(11) unsigned NOT NULL,
924   `timeout` tinyint(3) unsigned NOT NULL,
925   PRIMARY KEY  (`id`),
926   UNIQUE KEY `name` (`name`)
927 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
928
929
930 ### Data of table `0_printers` ###
931
932 INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20');
933 INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5');
934 INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
935
936
937 ### Structure of table `0_purch_data` ###
938
939 DROP TABLE IF EXISTS `0_purch_data`;
940
941 CREATE TABLE `0_purch_data` (
942   `supplier_id` int(11) NOT NULL default '0',
943   `stock_id` char(20) NOT NULL default '',
944   `price` double NOT NULL default '0',
945   `suppliers_uom` char(50) NOT NULL default '',
946   `conversion_factor` double NOT NULL default '1',
947   `supplier_description` char(50) NOT NULL default '',
948   PRIMARY KEY  (`supplier_id`,`stock_id`)
949 ) TYPE=MyISAM  ;
950
951
952 ### Data of table `0_purch_data` ###
953
954
955
956 ### Structure of table `0_purch_order_details` ###
957
958 DROP TABLE IF EXISTS `0_purch_order_details`;
959
960 CREATE TABLE `0_purch_order_details` (
961   `po_detail_item` int(11) NOT NULL auto_increment,
962   `order_no` int(11) NOT NULL default '0',
963   `item_code` varchar(20) NOT NULL default '',
964   `description` tinytext,
965   `delivery_date` date NOT NULL default '0000-00-00',
966   `qty_invoiced` double NOT NULL default '0',
967   `unit_price` double NOT NULL default '0',
968   `act_price` double NOT NULL default '0',
969   `std_cost_unit` double NOT NULL default '0',
970   `quantity_ordered` double NOT NULL default '0',
971   `quantity_received` double NOT NULL default '0',
972   PRIMARY KEY  (`po_detail_item`)
973 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
974
975
976 ### Data of table `0_purch_order_details` ###
977
978
979
980 ### Structure of table `0_purch_orders` ###
981
982 DROP TABLE IF EXISTS `0_purch_orders`;
983
984 CREATE TABLE `0_purch_orders` (
985   `order_no` int(11) NOT NULL auto_increment,
986   `supplier_id` int(11) NOT NULL default '0',
987   `comments` tinytext,
988   `ord_date` date NOT NULL default '0000-00-00',
989   `reference` tinytext NOT NULL,
990   `requisition_no` tinytext,
991   `into_stock_location` varchar(5) NOT NULL default '',
992   `delivery_address` tinytext NOT NULL,
993   PRIMARY KEY  (`order_no`)
994 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
995
996
997 ### Data of table `0_purch_orders` ###
998
999
1000
1001 ### Structure of table `0_quick_entries` ###
1002
1003 DROP TABLE IF EXISTS `0_quick_entries`;
1004
1005 CREATE TABLE `0_quick_entries` (
1006   `id` smallint(6) unsigned NOT NULL auto_increment,
1007   `type` tinyint(1) NOT NULL default '0',
1008   `description` varchar(60) NOT NULL,
1009   `base_amount` double NOT NULL default '0',
1010   `base_desc` varchar(60) default NULL,
1011   PRIMARY KEY  (`id`),
1012   KEY `description` (`description`)
1013 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
1014
1015
1016 ### Data of table `0_quick_entries` ###
1017
1018 INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount');
1019 INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount');
1020 INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount');
1021
1022
1023 ### Structure of table `0_quick_entry_lines` ###
1024
1025 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1026
1027 CREATE TABLE `0_quick_entry_lines` (
1028   `id` smallint(6) unsigned NOT NULL auto_increment,
1029   `qid` smallint(6) unsigned NOT NULL,
1030   `amount` double default '0',
1031   `action` varchar(2) NOT NULL,
1032   `dest_id` varchar(11) NOT NULL,
1033   `dimension_id` smallint(6) unsigned default NULL,
1034   `dimension2_id` smallint(6) unsigned default NULL,
1035   PRIMARY KEY  (`id`),
1036   KEY `qid` (`qid`)
1037 ) TYPE=MyISAM AUTO_INCREMENT=7 ;
1038
1039
1040 ### Data of table `0_quick_entry_lines` ###
1041
1042 INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', 't-', '1', '0', '0');
1043 INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', 't-', '1', '0', '0');
1044 INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', 't-', '1', '0', '0');
1045 INSERT INTO `0_quick_entry_lines` VALUES ('4', '3', '0', '=', '4010', '0', '0');
1046 INSERT INTO `0_quick_entry_lines` VALUES ('5', '1', '0', '=', '5765', '0', '0');
1047 INSERT INTO `0_quick_entry_lines` VALUES ('6', '2', '0', '=', '5780', '0', '0');
1048
1049
1050 ### Structure of table `0_recurrent_invoices` ###
1051
1052 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1053
1054 CREATE TABLE `0_recurrent_invoices` (
1055   `id` smallint(6) unsigned NOT NULL auto_increment,
1056   `description` varchar(60) NOT NULL default '',
1057   `order_no` int(11) unsigned NOT NULL,
1058   `debtor_no` int(11) unsigned default NULL,
1059   `group_no` smallint(6) unsigned default NULL,
1060   `days` int(11) NOT NULL default '0',
1061   `monthly` int(11) NOT NULL default '0',
1062   `begin` date NOT NULL default '0000-00-00',
1063   `end` date NOT NULL default '0000-00-00',
1064   `last_sent` date NOT NULL default '0000-00-00',
1065   PRIMARY KEY  (`id`),
1066   UNIQUE KEY `description` (`description`)
1067 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1068
1069
1070 ### Data of table `0_recurrent_invoices` ###
1071
1072
1073
1074 ### Structure of table `0_refs` ###
1075
1076 DROP TABLE IF EXISTS `0_refs`;
1077
1078 CREATE TABLE `0_refs` (
1079   `id` int(11) NOT NULL default '0',
1080   `type` int(11) NOT NULL default '0',
1081   `reference` varchar(100) NOT NULL default '',
1082   PRIMARY KEY  (`id`,`type`)
1083 ) TYPE=InnoDB  ;
1084
1085
1086 ### Data of table `0_refs` ###
1087
1088
1089
1090 ### Structure of table `0_sales_order_details` ###
1091
1092 DROP TABLE IF EXISTS `0_sales_order_details`;
1093
1094 CREATE TABLE `0_sales_order_details` (
1095   `id` int(11) NOT NULL auto_increment,
1096   `order_no` int(11) NOT NULL default '0',
1097   `stk_code` varchar(20) NOT NULL default '',
1098   `description` tinytext,
1099   `qty_sent` double NOT NULL default '0',
1100   `unit_price` double NOT NULL default '0',
1101   `quantity` double NOT NULL default '0',
1102   `discount_percent` double NOT NULL default '0',
1103   PRIMARY KEY  (`id`)
1104 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1105
1106
1107 ### Data of table `0_sales_order_details` ###
1108
1109
1110
1111 ### Structure of table `0_sales_orders` ###
1112
1113 DROP TABLE IF EXISTS `0_sales_orders`;
1114
1115 CREATE TABLE `0_sales_orders` (
1116   `order_no` int(11) NOT NULL auto_increment,
1117   `version` tinyint(1) unsigned NOT NULL default '0',
1118   `type` tinyint(1) NOT NULL default '0',
1119   `debtor_no` int(11) NOT NULL default '0',
1120   `branch_code` int(11) NOT NULL default '0',
1121   `customer_ref` tinytext NOT NULL,
1122   `comments` tinytext,
1123   `ord_date` date NOT NULL default '0000-00-00',
1124   `order_type` int(11) NOT NULL default '0',
1125   `ship_via` int(11) NOT NULL default '0',
1126   `delivery_address` tinytext NOT NULL,
1127   `contact_phone` varchar(30) default NULL,
1128   `contact_email` varchar(100) default NULL,
1129   `deliver_to` tinytext NOT NULL,
1130   `freight_cost` double NOT NULL default '0',
1131   `from_stk_loc` varchar(5) NOT NULL default '',
1132   `delivery_date` date NOT NULL default '0000-00-00',
1133   PRIMARY KEY  (`order_no`)
1134 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1135
1136
1137 ### Data of table `0_sales_orders` ###
1138
1139
1140
1141 ### Structure of table `0_sales_pos` ###
1142
1143 DROP TABLE IF EXISTS `0_sales_pos`;
1144
1145 CREATE TABLE `0_sales_pos` (
1146   `id` smallint(6) unsigned NOT NULL auto_increment,
1147   `pos_name` varchar(30) NOT NULL,
1148   `cash_sale` tinyint(1) NOT NULL,
1149   `credit_sale` tinyint(1) NOT NULL,
1150   `pos_location` varchar(5) NOT NULL,
1151   `pos_account` smallint(6) unsigned NOT NULL,
1152   `inactive` tinyint(1) NOT NULL default '0',
1153   PRIMARY KEY  (`id`),
1154   UNIQUE KEY `pos_name` (`pos_name`)
1155 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1156
1157
1158 ### Data of table `0_sales_pos` ###
1159
1160 INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '2', '0');
1161
1162
1163 ### Structure of table `0_sales_types` ###
1164
1165 DROP TABLE IF EXISTS `0_sales_types`;
1166
1167 CREATE TABLE `0_sales_types` (
1168   `id` int(11) NOT NULL auto_increment,
1169   `sales_type` char(50) NOT NULL default '',
1170   `tax_included` int(1) NOT NULL default '0',
1171   `factor` double NOT NULL default '1',
1172   `inactive` tinyint(1) NOT NULL default '0',
1173   PRIMARY KEY  (`id`),
1174   UNIQUE KEY `sales_type` (`sales_type`)
1175 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
1176
1177
1178 ### Data of table `0_sales_types` ###
1179
1180 INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '1', '1', '0');
1181 INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '0.7', '0');
1182
1183
1184 ### Structure of table `0_salesman` ###
1185
1186 DROP TABLE IF EXISTS `0_salesman`;
1187
1188 CREATE TABLE `0_salesman` (
1189   `salesman_code` int(11) NOT NULL auto_increment,
1190   `salesman_name` char(60) NOT NULL default '',
1191   `salesman_phone` char(30) NOT NULL default '',
1192   `salesman_fax` char(30) NOT NULL default '',
1193   `salesman_email` varchar(100) NOT NULL default '',
1194   `provision` double NOT NULL default '0',
1195   `break_pt` double NOT NULL default '0',
1196   `provision2` double NOT NULL default '0',
1197   `inactive` tinyint(1) NOT NULL default '0',
1198   PRIMARY KEY  (`salesman_code`),
1199   UNIQUE KEY `salesman_name` (`salesman_name`)
1200 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1201
1202
1203 ### Data of table `0_salesman` ###
1204
1205 INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1206
1207
1208 ### Structure of table `0_shippers` ###
1209
1210 DROP TABLE IF EXISTS `0_shippers`;
1211
1212 CREATE TABLE `0_shippers` (
1213   `shipper_id` int(11) NOT NULL auto_increment,
1214   `shipper_name` varchar(60) NOT NULL default '',
1215   `phone` varchar(30) NOT NULL default '',
1216   `contact` tinytext NOT NULL,
1217   `address` tinytext NOT NULL,
1218   `inactive` tinyint(1) NOT NULL default '0',
1219   PRIMARY KEY  (`shipper_id`),
1220   UNIQUE KEY `name` (`shipper_name`)
1221 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1222
1223
1224 ### Data of table `0_shippers` ###
1225
1226 INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '0');
1227
1228
1229 ### Structure of table `0_sql_trail` ###
1230
1231 DROP TABLE IF EXISTS `0_sql_trail`;
1232
1233 CREATE TABLE `0_sql_trail` (
1234   `id` int(11) unsigned NOT NULL auto_increment,
1235   `sql` text NOT NULL,
1236   `result` tinyint(1) NOT NULL,
1237   `msg` varchar(255) NOT NULL,
1238   PRIMARY KEY  (`id`)
1239 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
1240
1241
1242 ### Data of table `0_sql_trail` ###
1243
1244
1245
1246 ### Structure of table `0_stock_category` ###
1247
1248 DROP TABLE IF EXISTS `0_stock_category`;
1249
1250 CREATE TABLE `0_stock_category` (
1251   `category_id` int(11) NOT NULL auto_increment,
1252   `description` varchar(60) NOT NULL default '',
1253   `stock_act` varchar(11) default NULL,
1254   `cogs_act` varchar(11) default NULL,
1255   `adj_gl_act` varchar(11) default NULL,
1256   `purch_price_var_act` varchar(11) default NULL,
1257   `inactive` tinyint(1) NOT NULL default '0',
1258   PRIMARY KEY  (`category_id`),
1259   UNIQUE KEY `description` (`description`)
1260 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
1261
1262
1263 ### Data of table `0_stock_category` ###
1264
1265 INSERT INTO `0_stock_category` VALUES ('1', 'Components', '', '', '', '', '0');
1266 INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '', '', '', '', '0');
1267 INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '', '', '', '', '0');
1268 INSERT INTO `0_stock_category` VALUES ('4', 'Services', '', '', '', '', '0');
1269
1270
1271 ### Structure of table `0_stock_master` ###
1272
1273 DROP TABLE IF EXISTS `0_stock_master`;
1274
1275 CREATE TABLE `0_stock_master` (
1276   `stock_id` varchar(20) NOT NULL default '',
1277   `category_id` int(11) NOT NULL default '0',
1278   `tax_type_id` int(11) NOT NULL default '0',
1279   `description` varchar(200) NOT NULL default '',
1280   `long_description` tinytext NOT NULL,
1281   `units` varchar(20) NOT NULL default 'each',
1282   `mb_flag` char(1) NOT NULL default 'B',
1283   `sales_account` varchar(11) NOT NULL default '',
1284   `cogs_account` varchar(11) NOT NULL default '',
1285   `inventory_account` varchar(11) NOT NULL default '',
1286   `adjustment_account` varchar(11) NOT NULL default '',
1287   `assembly_account` varchar(11) NOT NULL default '',
1288   `dimension_id` int(11) default NULL,
1289   `dimension2_id` int(11) default NULL,
1290   `actual_cost` double NOT NULL default '0',
1291   `last_cost` double NOT NULL default '0',
1292   `material_cost` double NOT NULL default '0',
1293   `labour_cost` double NOT NULL default '0',
1294   `overhead_cost` double NOT NULL default '0',
1295   `inactive` tinyint(1) NOT NULL default '0',
1296   PRIMARY KEY  (`stock_id`)
1297 ) TYPE=InnoDB  ;
1298
1299
1300 ### Data of table `0_stock_master` ###
1301
1302
1303
1304 ### Structure of table `0_stock_moves` ###
1305
1306 DROP TABLE IF EXISTS `0_stock_moves`;
1307
1308 CREATE TABLE `0_stock_moves` (
1309   `trans_id` int(11) NOT NULL auto_increment,
1310   `trans_no` int(11) NOT NULL default '0',
1311   `stock_id` char(20) NOT NULL default '',
1312   `type` smallint(6) NOT NULL default '0',
1313   `loc_code` char(5) NOT NULL default '',
1314   `tran_date` date NOT NULL default '0000-00-00',
1315   `person_id` int(11) default NULL,
1316   `price` double NOT NULL default '0',
1317   `reference` char(40) NOT NULL default '',
1318   `qty` double NOT NULL default '1',
1319   `discount_percent` double NOT NULL default '0',
1320   `standard_cost` double NOT NULL default '0',
1321   `visible` tinyint(1) NOT NULL default '1',
1322   PRIMARY KEY  (`trans_id`),
1323   KEY `type` (`type`,`trans_no`)
1324 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1325
1326
1327 ### Data of table `0_stock_moves` ###
1328
1329
1330
1331 ### Structure of table `0_supp_allocations` ###
1332
1333 DROP TABLE IF EXISTS `0_supp_allocations`;
1334
1335 CREATE TABLE `0_supp_allocations` (
1336   `id` int(11) NOT NULL auto_increment,
1337   `amt` double unsigned default NULL,
1338   `date_alloc` date NOT NULL default '0000-00-00',
1339   `trans_no_from` int(11) default NULL,
1340   `trans_type_from` int(11) default NULL,
1341   `trans_no_to` int(11) default NULL,
1342   `trans_type_to` int(11) default NULL,
1343   PRIMARY KEY  (`id`)
1344 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1345
1346
1347 ### Data of table `0_supp_allocations` ###
1348
1349
1350
1351 ### Structure of table `0_supp_invoice_items` ###
1352
1353 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1354
1355 CREATE TABLE `0_supp_invoice_items` (
1356   `id` int(11) NOT NULL auto_increment,
1357   `supp_trans_no` int(11) default NULL,
1358   `supp_trans_type` int(11) default NULL,
1359   `gl_code` varchar(11) NOT NULL default '0',
1360   `grn_item_id` int(11) default NULL,
1361   `po_detail_item_id` int(11) default NULL,
1362   `stock_id` varchar(20) NOT NULL default '',
1363   `description` tinytext,
1364   `quantity` double NOT NULL default '0',
1365   `unit_price` double NOT NULL default '0',
1366   `unit_tax` double NOT NULL default '0',
1367   `memo_` tinytext,
1368   PRIMARY KEY  (`id`)
1369 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1370
1371
1372 ### Data of table `0_supp_invoice_items` ###
1373
1374
1375
1376 ### Structure of table `0_supp_trans` ###
1377
1378 DROP TABLE IF EXISTS `0_supp_trans`;
1379
1380 CREATE TABLE `0_supp_trans` (
1381   `trans_no` int(11) unsigned NOT NULL default '0',
1382   `type` smallint(6) unsigned NOT NULL default '0',
1383   `supplier_id` int(11) unsigned default NULL,
1384   `reference` tinytext NOT NULL,
1385   `supp_reference` varchar(60) NOT NULL default '',
1386   `tran_date` date NOT NULL default '0000-00-00',
1387   `due_date` date NOT NULL default '0000-00-00',
1388   `ov_amount` double NOT NULL default '0',
1389   `ov_discount` double NOT NULL default '0',
1390   `ov_gst` double NOT NULL default '0',
1391   `rate` double NOT NULL default '1',
1392   `alloc` double NOT NULL default '0',
1393   PRIMARY KEY  (`trans_no`,`type`),
1394   KEY `supplier_id` (`supplier_id`),
1395   KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1396   KEY `type` (`type`)
1397 ) TYPE=InnoDB  ;
1398
1399
1400 ### Data of table `0_supp_trans` ###
1401
1402
1403
1404 ### Structure of table `0_suppliers` ###
1405
1406 DROP TABLE IF EXISTS `0_suppliers`;
1407
1408 CREATE TABLE `0_suppliers` (
1409   `supplier_id` int(11) NOT NULL auto_increment,
1410   `supp_name` varchar(60) NOT NULL default '',
1411   `address` tinytext NOT NULL,
1412   `supp_address` tinytext NOT NULL,
1413   `phone` varchar(30) NOT NULL default '',
1414   `fax` varchar(30) NOT NULL default '',
1415   `gst_no` varchar(25) NOT NULL default '',
1416   `contact` varchar(60) NOT NULL default '',
1417   `supp_account_no` varchar(40) NOT NULL default '',
1418   `email` varchar(100) NOT NULL default '',
1419   `website` varchar(100) NOT NULL default '',
1420   `bank_account` varchar(60) NOT NULL default '',
1421   `curr_code` char(3) default NULL,
1422   `payment_terms` int(11) default NULL,
1423   `dimension_id` int(11) default '0',
1424   `dimension2_id` int(11) default '0',
1425   `tax_group_id` int(11) default NULL,
1426   `credit_limit` double NOT NULL default '0',
1427   `purchase_account` varchar(11) default NULL,
1428   `payable_account` varchar(11) default NULL,
1429   `payment_discount_account` varchar(11) default NULL,
1430   `notes` tinytext NOT NULL,
1431   `inactive` tinyint(1) NOT NULL default '0',
1432   PRIMARY KEY  (`supplier_id`)
1433 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
1434
1435
1436 ### Data of table `0_suppliers` ###
1437
1438
1439
1440 ### Structure of table `0_sys_types` ###
1441
1442 DROP TABLE IF EXISTS `0_sys_types`;
1443
1444 CREATE TABLE `0_sys_types` (
1445   `type_id` smallint(6) NOT NULL default '0',
1446   `type_name` varchar(60) NOT NULL default '',
1447   `type_no` int(11) NOT NULL default '1',
1448   `next_reference` varchar(100) NOT NULL default '',
1449   PRIMARY KEY  (`type_id`)
1450 ) TYPE=InnoDB  ;
1451
1452
1453 ### Data of table `0_sys_types` ###
1454
1455 INSERT INTO `0_sys_types` VALUES ('0', 'Journal - GL', '17', '1');
1456 INSERT INTO `0_sys_types` VALUES ('1', 'Payment - GL', '7', '1');
1457 INSERT INTO `0_sys_types` VALUES ('2', 'Receipt - GL', '4', '1');
1458 INSERT INTO `0_sys_types` VALUES ('4', 'Funds Transfer', '3', '1');
1459 INSERT INTO `0_sys_types` VALUES ('10', 'Sales Invoice', '16', '1');
1460 INSERT INTO `0_sys_types` VALUES ('11', 'Credit Note', '2', '1');
1461 INSERT INTO `0_sys_types` VALUES ('12', 'Receipt', '6', '1');
1462 INSERT INTO `0_sys_types` VALUES ('13', 'Delivery', '1', '1');
1463 INSERT INTO `0_sys_types` VALUES ('16', 'Location Transfer', '2', '1');
1464 INSERT INTO `0_sys_types` VALUES ('17', 'Inventory Adjustment', '2', '1');
1465 INSERT INTO `0_sys_types` VALUES ('18', 'Purchase Order', '1', '1');
1466 INSERT INTO `0_sys_types` VALUES ('20', 'Supplier Invoice', '6', '1');
1467 INSERT INTO `0_sys_types` VALUES ('21', 'Supplier Credit Note', '1', '1');
1468 INSERT INTO `0_sys_types` VALUES ('22', 'Supplier Payment', '3', '1');
1469 INSERT INTO `0_sys_types` VALUES ('25', 'Purchase Order Delivery', '1', '1');
1470 INSERT INTO `0_sys_types` VALUES ('26', 'Work Order', '1', '1');
1471 INSERT INTO `0_sys_types` VALUES ('28', 'Work Order Issue', '1', '1');
1472 INSERT INTO `0_sys_types` VALUES ('29', 'Work Order Production', '1', '1');
1473 INSERT INTO `0_sys_types` VALUES ('30', 'Sales Order', '1', '1');
1474 INSERT INTO `0_sys_types` VALUES ('35', 'Cost Update', '1', '1');
1475 INSERT INTO `0_sys_types` VALUES ('40', 'Dimension', '1', '1');
1476
1477
1478 ### Structure of table `0_tax_group_items` ###
1479
1480 DROP TABLE IF EXISTS `0_tax_group_items`;
1481
1482 CREATE TABLE `0_tax_group_items` (
1483   `tax_group_id` int(11) NOT NULL default '0',
1484   `tax_type_id` int(11) NOT NULL default '0',
1485   `rate` double NOT NULL default '0',
1486   PRIMARY KEY  (`tax_group_id`,`tax_type_id`)
1487 ) TYPE=InnoDB  ;
1488
1489
1490 ### Data of table `0_tax_group_items` ###
1491
1492 INSERT INTO `0_tax_group_items` VALUES ('1', '1', '5');
1493
1494
1495 ### Structure of table `0_tax_groups` ###
1496
1497 DROP TABLE IF EXISTS `0_tax_groups`;
1498
1499 CREATE TABLE `0_tax_groups` (
1500   `id` int(11) NOT NULL auto_increment,
1501   `name` varchar(60) NOT NULL default '',
1502   `tax_shipping` tinyint(1) NOT NULL default '0',
1503   PRIMARY KEY  (`id`),
1504   UNIQUE KEY `name` (`name`)
1505 ) TYPE=InnoDB AUTO_INCREMENT=3 ;
1506
1507
1508 ### Data of table `0_tax_groups` ###
1509
1510 INSERT INTO `0_tax_groups` VALUES ('1', 'Tax', '0');
1511 INSERT INTO `0_tax_groups` VALUES ('2', 'Tax Exempt', '0');
1512
1513
1514 ### Structure of table `0_tax_types` ###
1515
1516 DROP TABLE IF EXISTS `0_tax_types`;
1517
1518 CREATE TABLE `0_tax_types` (
1519   `id` int(11) NOT NULL auto_increment,
1520   `rate` double NOT NULL default '0',
1521   `sales_gl_code` varchar(11) NOT NULL default '',
1522   `purchasing_gl_code` varchar(11) NOT NULL default '',
1523   `name` varchar(60) NOT NULL default '',
1524   PRIMARY KEY  (`id`),
1525   UNIQUE KEY `name` (`name`,`rate`)
1526 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
1527
1528
1529 ### Data of table `0_tax_types` ###
1530
1531 INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2150', 'Tax');
1532
1533
1534 ### Structure of table `0_trans_tax_details` ###
1535
1536 DROP TABLE IF EXISTS `0_trans_tax_details`;
1537
1538 CREATE TABLE `0_trans_tax_details` (
1539   `id` int(11) NOT NULL auto_increment,
1540   `trans_type` smallint(6) default NULL,
1541   `trans_no` int(11) default NULL,
1542   `tran_date` date NOT NULL,
1543   `tax_type_id` int(11) NOT NULL default '0',
1544   `rate` double NOT NULL default '0',
1545   `ex_rate` double NOT NULL default '1',
1546   `included_in_price` tinyint(1) NOT NULL default '0',
1547   `net_amount` double NOT NULL default '0',
1548   `amount` double NOT NULL default '0',
1549   `memo` tinytext,
1550   PRIMARY KEY  (`id`)
1551 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1552
1553
1554 ### Data of table `0_trans_tax_details` ###
1555
1556
1557
1558 ### Structure of table `0_users` ###
1559
1560 DROP TABLE IF EXISTS `0_users`;
1561
1562 CREATE TABLE `0_users` (
1563   `user_id` varchar(60) NOT NULL default '',
1564   `password` varchar(100) NOT NULL default '',
1565   `real_name` varchar(100) NOT NULL default '',
1566   `full_access` int(11) NOT NULL default '1',
1567   `phone` varchar(30) NOT NULL default '',
1568   `email` varchar(100) default NULL,
1569   `language` varchar(20) default NULL,
1570   `date_format` tinyint(1) NOT NULL default '0',
1571   `date_sep` tinyint(1) NOT NULL default '0',
1572   `tho_sep` tinyint(1) NOT NULL default '0',
1573   `dec_sep` tinyint(1) NOT NULL default '0',
1574   `theme` varchar(20) NOT NULL default 'default',
1575   `page_size` varchar(20) NOT NULL default 'A4',
1576   `prices_dec` smallint(6) NOT NULL default '2',
1577   `qty_dec` smallint(6) NOT NULL default '2',
1578   `rates_dec` smallint(6) NOT NULL default '4',
1579   `percent_dec` smallint(6) NOT NULL default '1',
1580   `show_gl` tinyint(1) NOT NULL default '1',
1581   `show_codes` tinyint(1) NOT NULL default '0',
1582   `show_hints` tinyint(1) NOT NULL default '0',
1583   `last_visit_date` datetime default NULL,
1584   `query_size` tinyint(1) default '10',
1585   `graphic_links` tinyint(1) default '1',
1586   `pos` smallint(6) default '1',
1587   `print_profile` varchar(30) NOT NULL default '1',
1588   `rep_popup` tinyint(1) default '1',
1589   PRIMARY KEY  (`user_id`)
1590 ) TYPE=MyISAM  ;
1591
1592
1593 ### Data of table `0_users` ###
1594
1595 INSERT INTO `0_users` VALUES ('admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', '2', '', 'adm@adm.com', 'en_US', '0', '0', '2', '1', 'default', 'Letter', '2', '2', '4', '1', '1', '0', '0', '2008-04-04 12:34:29', '10', '1', '1', '', '1');
1596
1597
1598 ### Structure of table `0_voided` ###
1599
1600 DROP TABLE IF EXISTS `0_voided`;
1601
1602 CREATE TABLE `0_voided` (
1603   `type` int(11) NOT NULL default '0',
1604   `id` int(11) NOT NULL default '0',
1605   `date_` date NOT NULL default '0000-00-00',
1606   `memo_` tinytext NOT NULL,
1607   UNIQUE KEY `id` (`type`,`id`)
1608 ) TYPE=InnoDB  ;
1609
1610
1611 ### Data of table `0_voided` ###
1612
1613
1614
1615 ### Structure of table `0_wo_issue_items` ###
1616
1617 DROP TABLE IF EXISTS `0_wo_issue_items`;
1618
1619 CREATE TABLE `0_wo_issue_items` (
1620   `id` int(11) NOT NULL auto_increment,
1621   `stock_id` varchar(40) default NULL,
1622   `issue_id` int(11) default NULL,
1623   `qty_issued` double default NULL,
1624   PRIMARY KEY  (`id`)
1625 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1626
1627
1628 ### Data of table `0_wo_issue_items` ###
1629
1630
1631
1632 ### Structure of table `0_wo_issues` ###
1633
1634 DROP TABLE IF EXISTS `0_wo_issues`;
1635
1636 CREATE TABLE `0_wo_issues` (
1637   `issue_no` int(11) NOT NULL auto_increment,
1638   `workorder_id` int(11) NOT NULL default '0',
1639   `reference` varchar(100) default NULL,
1640   `issue_date` date default NULL,
1641   `loc_code` varchar(5) default NULL,
1642   `workcentre_id` int(11) default NULL,
1643   PRIMARY KEY  (`issue_no`)
1644 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1645
1646
1647 ### Data of table `0_wo_issues` ###
1648
1649
1650
1651 ### Structure of table `0_wo_manufacture` ###
1652
1653 DROP TABLE IF EXISTS `0_wo_manufacture`;
1654
1655 CREATE TABLE `0_wo_manufacture` (
1656   `id` int(11) NOT NULL auto_increment,
1657   `reference` varchar(100) default NULL,
1658   `workorder_id` int(11) NOT NULL default '0',
1659   `quantity` double NOT NULL default '0',
1660   `date_` date NOT NULL default '0000-00-00',
1661   PRIMARY KEY  (`id`)
1662 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1663
1664
1665 ### Data of table `0_wo_manufacture` ###
1666
1667
1668
1669 ### Structure of table `0_wo_requirements` ###
1670
1671 DROP TABLE IF EXISTS `0_wo_requirements`;
1672
1673 CREATE TABLE `0_wo_requirements` (
1674   `id` int(11) NOT NULL auto_increment,
1675   `workorder_id` int(11) NOT NULL default '0',
1676   `stock_id` char(20) NOT NULL default '',
1677   `workcentre` int(11) NOT NULL default '0',
1678   `units_req` double NOT NULL default '1',
1679   `std_cost` double NOT NULL default '0',
1680   `loc_code` char(5) NOT NULL default '',
1681   `units_issued` double NOT NULL default '0',
1682   PRIMARY KEY  (`id`)
1683 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1684
1685
1686 ### Data of table `0_wo_requirements` ###
1687
1688
1689
1690 ### Structure of table `0_workcentres` ###
1691
1692 DROP TABLE IF EXISTS `0_workcentres`;
1693
1694 CREATE TABLE `0_workcentres` (
1695   `id` int(11) NOT NULL auto_increment,
1696   `name` char(40) NOT NULL default '',
1697   `description` char(50) NOT NULL default '',
1698   `inactive` tinyint(1) NOT NULL default '0',
1699   PRIMARY KEY  (`id`),
1700   UNIQUE KEY `name` (`name`)
1701 ) TYPE=MyISAM  AUTO_INCREMENT=1 ;
1702
1703
1704 ### Data of table `0_workcentres` ###
1705
1706
1707
1708 ### Structure of table `0_workorders` ###
1709
1710 DROP TABLE IF EXISTS `0_workorders`;
1711
1712 CREATE TABLE `0_workorders` (
1713   `id` int(11) NOT NULL auto_increment,
1714   `wo_ref` varchar(60) NOT NULL default '',
1715   `loc_code` varchar(5) NOT NULL default '',
1716   `units_reqd` double NOT NULL default '1',
1717   `stock_id` varchar(20) NOT NULL default '',
1718   `date_` date NOT NULL default '0000-00-00',
1719   `type` tinyint(4) NOT NULL default '0',
1720   `required_by` date NOT NULL default '0000-00-00',
1721   `released_date` date NOT NULL default '0000-00-00',
1722   `units_issued` double NOT NULL default '0',
1723   `closed` tinyint(1) NOT NULL default '0',
1724   `released` tinyint(1) NOT NULL default '0',
1725   `additional_costs` double NOT NULL default '0',
1726   PRIMARY KEY  (`id`),
1727   UNIQUE KEY `wo_ref` (`wo_ref`)
1728 ) TYPE=InnoDB  AUTO_INCREMENT=1 ;
1729
1730
1731 ### Data of table `0_workorders` ###
1732