Changes user admin email address from adm@adm.com to adm@example.com. Also minor...
[fa-stable.git] / sql / en_US-demo.sql
1 # MySQL dump of database 'en_US-demo' on host 'localhost'
2 # Backup Date and Time: 2015-05-07 14:03
3 # Built by FrontAccounting 2.4.Beta
4 # http://frontaccounting.com
5 # Company: Training Co
6 # User: Administrator
7
8 # Compatibility: 2.4.Beta
9
10
11 SET NAMES latin1;
12
13
14 ### Structure of table `0_areas` ###
15
16 DROP TABLE IF EXISTS `0_areas`;
17
18 CREATE TABLE `0_areas` (
19   `area_code` int(11) NOT NULL AUTO_INCREMENT,
20   `description` varchar(60) NOT NULL DEFAULT '',
21   `inactive` tinyint(1) NOT NULL DEFAULT '0',
22   PRIMARY KEY (`area_code`),
23   UNIQUE KEY `description` (`description`)
24 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
25
26 ### Data of table `0_areas` ###
27
28 INSERT INTO `0_areas` VALUES
29 ('1', 'Global', '0');
30
31 ### Structure of table `0_attachments` ###
32
33 DROP TABLE IF EXISTS `0_attachments`;
34
35 CREATE TABLE `0_attachments` (
36   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
37   `description` varchar(60) NOT NULL DEFAULT '',
38   `type_no` int(11) NOT NULL DEFAULT '0',
39   `trans_no` int(11) NOT NULL DEFAULT '0',
40   `unique_name` varchar(60) NOT NULL DEFAULT '',
41   `tran_date` date NOT NULL DEFAULT '0000-00-00',
42   `filename` varchar(60) NOT NULL DEFAULT '',
43   `filesize` int(11) NOT NULL DEFAULT '0',
44   `filetype` varchar(60) NOT NULL DEFAULT '',
45   PRIMARY KEY (`id`),
46   KEY `type_no` (`type_no`,`trans_no`)
47 ) ENGINE=InnoDB ;
48
49 ### Data of table `0_attachments` ###
50
51
52 ### Structure of table `0_audit_trail` ###
53
54 DROP TABLE IF EXISTS `0_audit_trail`;
55
56 CREATE TABLE `0_audit_trail` (
57   `id` int(11) NOT NULL AUTO_INCREMENT,
58   `type` smallint(6) unsigned NOT NULL DEFAULT '0',
59   `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
60   `user` smallint(6) unsigned NOT NULL DEFAULT '0',
61   `stamp` timestamp NOT NULL,
62   `description` varchar(60) DEFAULT NULL,
63   `fiscal_year` int(11) NOT NULL DEFAULT '0',
64   `gl_date` date NOT NULL DEFAULT '0000-00-00',
65   `gl_seq` int(11) unsigned DEFAULT NULL,
66   PRIMARY KEY (`id`),
67   KEY `Seq` (`fiscal_year`,`gl_date`,`gl_seq`),
68   KEY `Type_and_Number` (`type`,`trans_no`)
69 ) ENGINE=InnoDB AUTO_INCREMENT=29 ;
70
71 ### Data of table `0_audit_trail` ###
72
73 INSERT INTO `0_audit_trail` VALUES
74 ('1', '18', '1', '1', '2015-05-05 14:08:02', NULL, '1', '2015-05-05', '0'),
75 ('2', '25', '1', '1', '2015-05-05 14:08:14', NULL, '1', '2015-05-05', '0'),
76 ('3', '30', '1', '1', '2015-05-05 14:09:54', NULL, '1', '2015-05-10', '0'),
77 ('4', '13', '1', '1', '2015-05-05 14:09:55', NULL, '1', '2015-05-10', '0'),
78 ('5', '10', '1', '1', '2015-05-05 14:09:55', NULL, '1', '2015-05-10', '0'),
79 ('6', '12', '1', '1', '2015-05-05 14:09:55', NULL, '1', '2015-05-10', '0'),
80 ('7', '26', '1', '1', '2015-05-05 14:18:49', 'Quick production.', '1', '2015-05-05', '0'),
81 ('8', '18', '2', '1', '2015-05-05 14:22:32', NULL, '1', '2015-05-05', '0'),
82 ('9', '25', '2', '1', '2015-05-05 14:22:32', NULL, '1', '2015-05-05', '0'),
83 ('10', '20', '1', '1', '2015-05-05 14:22:32', NULL, '1', '2015-05-05', '0'),
84 ('11', '30', '2', '1', '2015-05-07 07:55:15', NULL, '1', '2015-05-07', '0'),
85 ('12', '13', '2', '1', '2015-05-07 07:55:16', NULL, '1', '2015-05-07', '0'),
86 ('13', '10', '2', '1', '2015-05-07 07:55:16', NULL, '1', '2015-05-07', '0'),
87 ('14', '12', '2', '1', '2015-05-07 07:55:16', NULL, '1', '2015-05-07', '0'),
88 ('15', '30', '3', '1', '2015-05-07 08:08:24', NULL, '1', '2015-05-07', '0'),
89 ('16', '30', '4', '1', '2015-05-07 09:18:44', NULL, '1', '2015-05-07', '0'),
90 ('17', '30', '5', '1', '2015-05-07 11:42:41', NULL, '1', '2015-05-07', '0'),
91 ('18', '13', '3', '1', '2015-05-07 11:42:41', NULL, '1', '2015-05-07', '0'),
92 ('19', '10', '3', '1', '2015-05-07 11:42:41', NULL, '1', '2015-05-07', '0'),
93 ('20', '30', '6', '1', '2015-05-07 14:02:35', NULL, '1', '2015-05-07', '0'),
94 ('21', '30', '7', '1', '2015-05-07 14:05:38', NULL, '1', '2015-05-07', '0'),
95 ('22', '13', '4', '1', '2015-05-07 14:05:38', NULL, '1', '2015-05-07', '0'),
96 ('23', '10', '4', '1', '2015-05-07 14:05:38', NULL, '1', '2015-05-07', '0'),
97 ('24', '12', '3', '1', '2015-05-07 14:05:38', NULL, '1', '2015-05-07', '0'),
98 ('25', '26', '2', '1', '2015-05-07 15:59:34', NULL, '1', '2015-05-07', NULL),
99 ('26', '26', '3', '1', '2015-05-07 15:59:01', NULL, '1', '2015-05-07', '0'),
100 ('27', '26', '2', '1', '2015-05-07 15:59:34', 'Released.', '1', '2015-05-07', '0'),
101 ('28', '1', '1', '1', '2015-05-07 16:01:00', NULL, '1', '2015-05-07', '0');
102
103 ### Structure of table `0_bank_accounts` ###
104
105 DROP TABLE IF EXISTS `0_bank_accounts`;
106
107 CREATE TABLE `0_bank_accounts` (
108   `account_code` varchar(15) NOT NULL DEFAULT '',
109   `account_type` smallint(6) NOT NULL DEFAULT '0',
110   `bank_account_name` varchar(60) NOT NULL DEFAULT '',
111   `bank_account_number` varchar(100) NOT NULL DEFAULT '',
112   `bank_name` varchar(60) NOT NULL DEFAULT '',
113   `bank_address` tinytext,
114   `bank_curr_code` char(3) NOT NULL DEFAULT '',
115   `dflt_curr_act` tinyint(1) NOT NULL DEFAULT '0',
116   `id` smallint(6) NOT NULL AUTO_INCREMENT,
117   `bank_charge_act` varchar(15) NOT NULL DEFAULT '',
118   `last_reconciled_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
119   `ending_reconcile_balance` double NOT NULL DEFAULT '0',
120   `inactive` tinyint(1) NOT NULL DEFAULT '0',
121   PRIMARY KEY (`id`),
122   KEY `bank_account_name` (`bank_account_name`),
123   KEY `bank_account_number` (`bank_account_number`),
124   KEY `account_code` (`account_code`)
125 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
126
127 ### Data of table `0_bank_accounts` ###
128
129 INSERT INTO `0_bank_accounts` VALUES
130 ('1060', '0', 'Current account', 'N/A', 'N/A', NULL, 'USD', '1', '1', '5690', '0000-00-00 00:00:00', '0', '0'),
131 ('1065', '3', 'Petty Cash account', 'N/A', 'N/A', NULL, 'USD', '0', '2', '5690', '0000-00-00 00:00:00', '0', '0');
132
133 ### Structure of table `0_bank_trans` ###
134
135 DROP TABLE IF EXISTS `0_bank_trans`;
136
137 CREATE TABLE `0_bank_trans` (
138   `id` int(11) NOT NULL AUTO_INCREMENT,
139   `type` smallint(6) DEFAULT NULL,
140   `trans_no` int(11) DEFAULT NULL,
141   `bank_act` varchar(15) NOT NULL DEFAULT '',
142   `ref` varchar(40) DEFAULT NULL,
143   `trans_date` date NOT NULL DEFAULT '0000-00-00',
144   `amount` double DEFAULT NULL,
145   `dimension_id` int(11) NOT NULL DEFAULT '0',
146   `dimension2_id` int(11) NOT NULL DEFAULT '0',
147   `person_type_id` int(11) NOT NULL DEFAULT '0',
148   `person_id` tinyblob,
149   `reconciled` date DEFAULT NULL,
150   PRIMARY KEY (`id`),
151   KEY `bank_act` (`bank_act`,`ref`),
152   KEY `type` (`type`,`trans_no`),
153   KEY `bank_act_2` (`bank_act`,`reconciled`),
154   KEY `bank_act_3` (`bank_act`,`trans_date`)
155 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
156
157 ### Data of table `0_bank_trans` ###
158
159 INSERT INTO `0_bank_trans` VALUES
160 ('1', '12', '1', '2', '001/2015', '2015-05-10', '6240', '0', '0', '2', '1', NULL),
161 ('2', '12', '2', '2', '002/2015', '2015-05-07', '300', '0', '0', '2', '1', NULL),
162 ('3', '12', '3', '2', '003/2015', '2015-05-07', '0', '0', '0', '2', '1', NULL),
163 ('4', '1', '1', '1', '001/2015', '2015-05-07', '-5', '0', '0', '0', 'Goods received', NULL);
164
165 ### Structure of table `0_bom` ###
166
167 DROP TABLE IF EXISTS `0_bom`;
168
169 CREATE TABLE `0_bom` (
170   `id` int(11) NOT NULL AUTO_INCREMENT,
171   `parent` char(20) NOT NULL DEFAULT '',
172   `component` char(20) NOT NULL DEFAULT '',
173   `workcentre_added` int(11) NOT NULL DEFAULT '0',
174   `loc_code` char(5) NOT NULL DEFAULT '',
175   `quantity` double NOT NULL DEFAULT '1',
176   PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
177   KEY `component` (`component`),
178   KEY `id` (`id`),
179   KEY `loc_code` (`loc_code`),
180   KEY `parent` (`parent`,`loc_code`),
181   KEY `workcentre_added` (`workcentre_added`)
182 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
183
184 ### Data of table `0_bom` ###
185
186 INSERT INTO `0_bom` VALUES
187 ('1', '201', '101', '1', 'DEF', '1'),
188 ('2', '201', '102', '1', 'DEF', '1'),
189 ('3', '201', '103', '1', 'DEF', '1'),
190 ('4', '201', '301', '1', 'DEF', '1');
191
192 ### Structure of table `0_budget_trans` ###
193
194 DROP TABLE IF EXISTS `0_budget_trans`;
195
196 CREATE TABLE `0_budget_trans` (
197   `id` int(11) NOT NULL AUTO_INCREMENT,
198   `tran_date` date NOT NULL DEFAULT '0000-00-00',
199   `account` varchar(15) NOT NULL DEFAULT '',
200   `memo_` tinytext NOT NULL,
201   `amount` double NOT NULL DEFAULT '0',
202   `dimension_id` int(11) DEFAULT '0',
203   `dimension2_id` int(11) DEFAULT '0',
204   PRIMARY KEY (`id`),
205   KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`)
206 ) ENGINE=InnoDB ;
207
208 ### Data of table `0_budget_trans` ###
209
210
211 ### Structure of table `0_chart_class` ###
212
213 DROP TABLE IF EXISTS `0_chart_class`;
214
215 CREATE TABLE `0_chart_class` (
216   `cid` varchar(3) NOT NULL,
217   `class_name` varchar(60) NOT NULL DEFAULT '',
218   `ctype` tinyint(1) NOT NULL DEFAULT '0',
219   `inactive` tinyint(1) NOT NULL DEFAULT '0',
220   PRIMARY KEY (`cid`)
221 ) ENGINE=InnoDB ;
222
223 ### Data of table `0_chart_class` ###
224
225 INSERT INTO `0_chart_class` VALUES
226 ('1', 'Assets', '1', '0'),
227 ('2', 'Liabilities', '2', '0'),
228 ('3', 'Income', '4', '0'),
229 ('4', 'Costs', '6', '0');
230
231 ### Structure of table `0_chart_master` ###
232
233 DROP TABLE IF EXISTS `0_chart_master`;
234
235 CREATE TABLE `0_chart_master` (
236   `account_code` varchar(15) NOT NULL DEFAULT '',
237   `account_code2` varchar(15) NOT NULL DEFAULT '',
238   `account_name` varchar(60) NOT NULL DEFAULT '',
239   `account_type` varchar(10) NOT NULL DEFAULT '0',
240   `inactive` tinyint(1) NOT NULL DEFAULT '0',
241   PRIMARY KEY (`account_code`),
242   KEY `account_name` (`account_name`),
243   KEY `accounts_by_type` (`account_type`,`account_code`)
244 ) ENGINE=InnoDB ;
245
246 ### Data of table `0_chart_master` ###
247
248 INSERT INTO `0_chart_master` VALUES
249 ('1060', '', 'Checking Account', '1', '0'),
250 ('1065', '', 'Petty Cash', '1', '0'),
251 ('1200', '', 'Accounts Receivables', '1', '0'),
252 ('1205', '', 'Allowance for doubtful accounts', '1', '0'),
253 ('1510', '', 'Inventory', '2', '0'),
254 ('1520', '', 'Stocks of Raw Materials', '2', '0'),
255 ('1530', '', 'Stocks of Work In Progress', '2', '0'),
256 ('1540', '', 'Stocks of Finsihed Goods', '2', '0'),
257 ('1550', '', 'Goods Received Clearing account', '2', '0'),
258 ('1820', '', 'Office Furniture & Equipment', '3', '0'),
259 ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0'),
260 ('1840', '', 'Vehicle', '3', '0'),
261 ('1845', '', 'Accum. Amort. -Vehicle', '3', '0'),
262 ('2100', '', 'Accounts Payable', '4', '0'),
263 ('2110', '', 'Accrued Income Tax - Federal', '4', '0'),
264 ('2120', '', 'Accrued Income Tax - State', '4', '0'),
265 ('2130', '', 'Accrued Franchise Tax', '4', '0'),
266 ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0'),
267 ('2150', '', 'Sales Tax', '4', '0'),
268 ('2160', '', 'Accrued Use Tax Payable', '4', '0'),
269 ('2210', '', 'Accrued Wages', '4', '0'),
270 ('2220', '', 'Accrued Comp Time', '4', '0'),
271 ('2230', '', 'Accrued Holiday Pay', '4', '0'),
272 ('2240', '', 'Accrued Vacation Pay', '4', '0'),
273 ('2310', '', 'Accr. Benefits - 401K', '4', '0'),
274 ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0'),
275 ('2330', '', 'Accr. Benefits - Med, Den', '4', '0'),
276 ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0'),
277 ('2350', '', 'Accr. Benefits - Credit Union', '4', '0'),
278 ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0'),
279 ('2370', '', 'Accr. Benefits - Garnish', '4', '0'),
280 ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0'),
281 ('2620', '', 'Bank Loans', '5', '0'),
282 ('2680', '', 'Loans from Shareholders', '5', '0'),
283 ('3350', '', 'Common Shares', '6', '0'),
284 ('3590', '', 'Retained Earnings - prior years', '7', '0'),
285 ('4010', '', 'Sales', '8', '0'),
286 ('4430', '', 'Shipping & Handling', '9', '0'),
287 ('4440', '', 'Interest', '9', '0'),
288 ('4450', '', 'Foreign Exchange Gain', '9', '0'),
289 ('4500', '', 'Prompt Payment Discounts', '9', '0'),
290 ('4510', '', 'Discounts Given', '9', '0'),
291 ('5010', '', 'Cost of Goods Sold - Retail', '10', '0'),
292 ('5020', '', 'Material Usage Varaiance', '10', '0'),
293 ('5030', '', 'Consumable Materials', '10', '0'),
294 ('5040', '', 'Purchase price Variance', '10', '0'),
295 ('5050', '', 'Purchases of materials', '10', '0'),
296 ('5060', '', 'Discounts Received', '10', '0'),
297 ('5100', '', 'Freight', '10', '0'),
298 ('5410', '', 'Wages & Salaries', '11', '0'),
299 ('5420', '', 'Wages - Overtime', '11', '0'),
300 ('5430', '', 'Benefits - Comp Time', '11', '0'),
301 ('5440', '', 'Benefits - Payroll Taxes', '11', '0'),
302 ('5450', '', 'Benefits - Workers Comp', '11', '0'),
303 ('5460', '', 'Benefits - Pension', '11', '0'),
304 ('5470', '', 'Benefits - General Benefits', '11', '0'),
305 ('5510', '', 'Inc Tax Exp - Federal', '11', '0'),
306 ('5520', '', 'Inc Tax Exp - State', '11', '0'),
307 ('5530', '', 'Taxes - Real Estate', '11', '0'),
308 ('5540', '', 'Taxes - Personal Property', '11', '0'),
309 ('5550', '', 'Taxes - Franchise', '11', '0'),
310 ('5560', '', 'Taxes - Foreign Withholding', '11', '0'),
311 ('5610', '', 'Accounting & Legal', '12', '0'),
312 ('5615', '', 'Advertising & Promotions', '12', '0'),
313 ('5620', '', 'Bad Debts', '12', '0'),
314 ('5660', '', 'Amortization Expense', '12', '0'),
315 ('5685', '', 'Insurance', '12', '0'),
316 ('5690', '', 'Interest & Bank Charges', '12', '0'),
317 ('5700', '', 'Office Supplies', '12', '0'),
318 ('5760', '', 'Rent', '12', '0'),
319 ('5765', '', 'Repair & Maintenance', '12', '0'),
320 ('5780', '', 'Telephone', '12', '0'),
321 ('5785', '', 'Travel & Entertainment', '12', '0'),
322 ('5790', '', 'Utilities', '12', '0'),
323 ('5795', '', 'Registrations', '12', '0'),
324 ('5800', '', 'Licenses', '12', '0'),
325 ('5810', '', 'Foreign Exchange Loss', '12', '0'),
326 ('9990', '', 'Year Profit/Loss', '12', '0');
327
328 ### Structure of table `0_chart_types` ###
329
330 DROP TABLE IF EXISTS `0_chart_types`;
331
332 CREATE TABLE `0_chart_types` (
333   `id` varchar(10) NOT NULL,
334   `name` varchar(60) NOT NULL DEFAULT '',
335   `class_id` varchar(3) NOT NULL DEFAULT '',
336   `parent` varchar(10) NOT NULL DEFAULT '-1',
337   `inactive` tinyint(1) NOT NULL DEFAULT '0',
338   PRIMARY KEY (`id`),
339   KEY `name` (`name`),
340   KEY `class_id` (`class_id`)
341 ) ENGINE=InnoDB ;
342
343 ### Data of table `0_chart_types` ###
344
345 INSERT INTO `0_chart_types` VALUES
346 ('1', 'Current Assets', '1', '', '0'),
347 ('10', 'Cost of Goods Sold', '4', '', '0'),
348 ('11', 'Payroll Expenses', '4', '', '0'),
349 ('12', 'General & Administrative expenses', '4', '', '0'),
350 ('2', 'Inventory Assets', '1', '', '0'),
351 ('3', 'Capital Assets', '1', '', '0'),
352 ('4', 'Current Liabilities', '2', '', '0'),
353 ('5', 'Long Term Liabilities', '2', '', '0'),
354 ('6', 'Share Capital', '2', '', '0'),
355 ('7', 'Retained Earnings', '2', '', '0'),
356 ('8', 'Sales Revenue', '3', '', '0'),
357 ('9', 'Other Revenue', '3', '', '0');
358
359 ### Structure of table `0_comments` ###
360
361 DROP TABLE IF EXISTS `0_comments`;
362
363 CREATE TABLE `0_comments` (
364   `type` int(11) NOT NULL DEFAULT '0',
365   `id` int(11) NOT NULL DEFAULT '0',
366   `date_` date DEFAULT '0000-00-00',
367   `memo_` tinytext,
368   KEY `type_and_id` (`type`,`id`)
369 ) ENGINE=InnoDB ;
370
371 ### Data of table `0_comments` ###
372
373 INSERT INTO `0_comments` VALUES
374 ('12', '1', '2015-05-10', 'Cash invoice 1'),
375 ('12', '2', '2015-05-07', 'Cash invoice 2'),
376 ('13', '4', '2015-05-07', 'Recurrent Invoice covers period 04/01/2015 - 04/07/2015.'),
377 ('10', '4', '2015-05-07', 'Recurrent Invoice covers period 04/01/2015 - 04/07/2015.'),
378 ('12', '3', '2015-05-07', 'Cash invoice 4');
379
380 ### Structure of table `0_credit_status` ###
381
382 DROP TABLE IF EXISTS `0_credit_status`;
383
384 CREATE TABLE `0_credit_status` (
385   `id` int(11) NOT NULL AUTO_INCREMENT,
386   `reason_description` char(100) NOT NULL DEFAULT '',
387   `dissallow_invoices` tinyint(1) NOT NULL DEFAULT '0',
388   `inactive` tinyint(1) NOT NULL DEFAULT '0',
389   PRIMARY KEY (`id`),
390   UNIQUE KEY `reason_description` (`reason_description`)
391 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
392
393 ### Data of table `0_credit_status` ###
394
395 INSERT INTO `0_credit_status` VALUES
396 ('1', 'Good History', '0', '0'),
397 ('3', 'No more work until payment received', '1', '0'),
398 ('4', 'In liquidation', '1', '0');
399
400 ### Structure of table `0_crm_categories` ###
401
402 DROP TABLE IF EXISTS `0_crm_categories`;
403
404 CREATE TABLE `0_crm_categories` (
405   `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pure technical key',
406   `type` varchar(20) NOT NULL COMMENT 'contact type e.g. customer',
407   `action` varchar(20) NOT NULL COMMENT 'detailed usage e.g. department',
408   `name` varchar(30) NOT NULL COMMENT 'for category selector',
409   `description` tinytext NOT NULL COMMENT 'usage description',
410   `system` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'nonzero for core system usage',
411   `inactive` tinyint(1) NOT NULL DEFAULT '0',
412   PRIMARY KEY (`id`),
413   UNIQUE KEY `type` (`type`,`action`),
414   UNIQUE KEY `type_2` (`type`,`name`)
415 ) ENGINE=InnoDB AUTO_INCREMENT=13 ;
416
417 ### Data of table `0_crm_categories` ###
418
419 INSERT INTO `0_crm_categories` VALUES
420 ('1', 'cust_branch', 'general', 'General', 'General contact data for customer branch (overrides company setting)', '1', '0'),
421 ('2', 'cust_branch', 'invoice', 'Invoices', 'Invoice posting (overrides company setting)', '1', '0'),
422 ('3', 'cust_branch', 'order', 'Orders', 'Order confirmation (overrides company setting)', '1', '0'),
423 ('4', 'cust_branch', 'delivery', 'Deliveries', 'Delivery coordination (overrides company setting)', '1', '0'),
424 ('5', 'customer', 'general', 'General', 'General contact data for customer', '1', '0'),
425 ('6', 'customer', 'order', 'Orders', 'Order confirmation', '1', '0'),
426 ('7', 'customer', 'delivery', 'Deliveries', 'Delivery coordination', '1', '0'),
427 ('8', 'customer', 'invoice', 'Invoices', 'Invoice posting', '1', '0'),
428 ('9', 'supplier', 'general', 'General', 'General contact data for supplier', '1', '0'),
429 ('10', 'supplier', 'order', 'Orders', 'Order confirmation', '1', '0'),
430 ('11', 'supplier', 'delivery', 'Deliveries', 'Delivery coordination', '1', '0'),
431 ('12', 'supplier', 'invoice', 'Invoices', 'Invoice posting', '1', '0');
432
433 ### Structure of table `0_crm_contacts` ###
434
435 DROP TABLE IF EXISTS `0_crm_contacts`;
436
437 CREATE TABLE `0_crm_contacts` (
438   `id` int(11) NOT NULL AUTO_INCREMENT,
439   `person_id` int(11) NOT NULL DEFAULT '0' COMMENT 'foreign key to crm_contacts',
440   `type` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
441   `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
442   `entity_id` varchar(11) DEFAULT NULL COMMENT 'entity id in related class table',
443   PRIMARY KEY (`id`),
444   KEY `type` (`type`,`action`)
445 ) ENGINE=InnoDB AUTO_INCREMENT=11 ;
446
447 ### Data of table `0_crm_contacts` ###
448
449 INSERT INTO `0_crm_contacts` VALUES
450 ('4', '2', 'supplier', 'general', '2'),
451 ('5', '3', 'cust_branch', 'general', '1'),
452 ('7', '3', 'customer', 'general', '1'),
453 ('8', '1', 'supplier', 'general', '1'),
454 ('9', '4', 'cust_branch', 'general', '2'),
455 ('10', '4', 'customer', 'general', '2');
456
457 ### Structure of table `0_crm_persons` ###
458
459 DROP TABLE IF EXISTS `0_crm_persons`;
460
461 CREATE TABLE `0_crm_persons` (
462   `id` int(11) NOT NULL AUTO_INCREMENT,
463   `ref` varchar(30) NOT NULL,
464   `name` varchar(60) NOT NULL,
465   `name2` varchar(60) DEFAULT NULL,
466   `address` tinytext,
467   `phone` varchar(30) DEFAULT NULL,
468   `phone2` varchar(30) DEFAULT NULL,
469   `fax` varchar(30) DEFAULT NULL,
470   `email` varchar(100) DEFAULT NULL,
471   `lang` char(5) DEFAULT NULL,
472   `notes` tinytext NOT NULL,
473   `inactive` tinyint(1) NOT NULL DEFAULT '0',
474   PRIMARY KEY (`id`),
475   KEY `ref` (`ref`)
476 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
477
478 ### Data of table `0_crm_persons` ###
479
480 INSERT INTO `0_crm_persons` VALUES
481 ('1', 'Dino Saurius', 'John Doe', NULL, 'N/A', NULL, NULL, NULL, NULL, NULL, '', '0'),
482 ('2', 'Beefeater', 'Joe Oversea', NULL, 'N/A', NULL, NULL, NULL, NULL, NULL, '', '0'),
483 ('3', 'Donald Easter', 'Donald Easter LLC', NULL, 'N/A', NULL, NULL, NULL, NULL, NULL, '', '0'),
484 ('4', 'MoneyMaker', 'MoneyMaker Ltd.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '0');
485
486 ### Structure of table `0_currencies` ###
487
488 DROP TABLE IF EXISTS `0_currencies`;
489
490 CREATE TABLE `0_currencies` (
491   `currency` varchar(60) NOT NULL DEFAULT '',
492   `curr_abrev` char(3) NOT NULL DEFAULT '',
493   `curr_symbol` varchar(10) NOT NULL DEFAULT '',
494   `country` varchar(100) NOT NULL DEFAULT '',
495   `hundreds_name` varchar(15) NOT NULL DEFAULT '',
496   `auto_update` tinyint(1) NOT NULL DEFAULT '1',
497   `inactive` tinyint(1) NOT NULL DEFAULT '0',
498   PRIMARY KEY (`curr_abrev`)
499 ) ENGINE=InnoDB ;
500
501 ### Data of table `0_currencies` ###
502
503 INSERT INTO `0_currencies` VALUES
504 ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0'),
505 ('Euro', 'EUR', '?', 'Europe', 'Cents', '1', '0'),
506 ('Pounds', 'GBP', '?', 'England', 'Pence', '1', '0'),
507 ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0');
508
509 ### Structure of table `0_cust_allocations` ###
510
511 DROP TABLE IF EXISTS `0_cust_allocations`;
512
513 CREATE TABLE `0_cust_allocations` (
514   `id` int(11) NOT NULL AUTO_INCREMENT,
515   `person_id` int(11) DEFAULT NULL,
516   `amt` double unsigned DEFAULT NULL,
517   `date_alloc` date NOT NULL DEFAULT '0000-00-00',
518   `trans_no_from` int(11) DEFAULT NULL,
519   `trans_type_from` int(11) DEFAULT NULL,
520   `trans_no_to` int(11) DEFAULT NULL,
521   `trans_type_to` int(11) DEFAULT NULL,
522   PRIMARY KEY (`id`),
523   UNIQUE KEY `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
524   KEY `From` (`trans_type_from`,`trans_no_from`),
525   KEY `To` (`trans_type_to`,`trans_no_to`)
526 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
527
528 ### Data of table `0_cust_allocations` ###
529
530 INSERT INTO `0_cust_allocations` VALUES
531 ('1', '1', '6240', '2015-05-10', '1', '12', '1', '10'),
532 ('2', '1', '300', '2015-05-07', '2', '12', '2', '10'),
533 ('3', '1', '0', '2015-05-07', '3', '12', '4', '10');
534
535 ### Structure of table `0_cust_branch` ###
536
537 DROP TABLE IF EXISTS `0_cust_branch`;
538
539 CREATE TABLE `0_cust_branch` (
540   `branch_code` int(11) NOT NULL AUTO_INCREMENT,
541   `debtor_no` int(11) NOT NULL DEFAULT '0',
542   `br_name` varchar(60) NOT NULL DEFAULT '',
543   `branch_ref` varchar(30) NOT NULL DEFAULT '',
544   `br_address` tinytext NOT NULL,
545   `area` int(11) DEFAULT NULL,
546   `salesman` int(11) NOT NULL DEFAULT '0',
547   `default_location` varchar(5) NOT NULL DEFAULT '',
548   `tax_group_id` int(11) DEFAULT NULL,
549   `sales_account` varchar(15) NOT NULL DEFAULT '',
550   `sales_discount_account` varchar(15) NOT NULL DEFAULT '',
551   `receivables_account` varchar(15) NOT NULL DEFAULT '',
552   `payment_discount_account` varchar(15) NOT NULL DEFAULT '',
553   `default_ship_via` int(11) NOT NULL DEFAULT '1',
554   `br_post_address` tinytext NOT NULL,
555   `group_no` int(11) NOT NULL DEFAULT '0',
556   `notes` tinytext NOT NULL,
557   `bank_account` varchar(60) DEFAULT NULL,
558   `inactive` tinyint(1) NOT NULL DEFAULT '0',
559   PRIMARY KEY (`branch_code`,`debtor_no`),
560   KEY `branch_ref` (`branch_ref`),
561   KEY `group_no` (`group_no`)
562 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
563
564 ### Data of table `0_cust_branch` ###
565
566 INSERT INTO `0_cust_branch` VALUES
567 ('1', '1', 'Donald Easter LLC', 'Donald Easter', 'N/A', '1', '1', 'DEF', '1', '', '4510', '1200', '4500', '1', 'N/A', '0', '', NULL, '0'),
568 ('2', '2', 'MoneyMaker Ltd.', 'MoneyMaker', '', '1', '1', 'DEF', '2', '', '4510', '1200', '4500', '1', '', '0', '', NULL, '0');
569
570 ### Structure of table `0_debtor_trans` ###
571
572 DROP TABLE IF EXISTS `0_debtor_trans`;
573
574 CREATE TABLE `0_debtor_trans` (
575   `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
576   `type` smallint(6) unsigned NOT NULL DEFAULT '0',
577   `version` tinyint(1) unsigned NOT NULL DEFAULT '0',
578   `debtor_no` int(11) unsigned DEFAULT NULL,
579   `branch_code` int(11) NOT NULL DEFAULT '-1',
580   `tran_date` date NOT NULL DEFAULT '0000-00-00',
581   `due_date` date NOT NULL DEFAULT '0000-00-00',
582   `reference` varchar(60) NOT NULL DEFAULT '',
583   `tpe` int(11) NOT NULL DEFAULT '0',
584   `order_` int(11) NOT NULL DEFAULT '0',
585   `ov_amount` double NOT NULL DEFAULT '0',
586   `ov_gst` double NOT NULL DEFAULT '0',
587   `ov_freight` double NOT NULL DEFAULT '0',
588   `ov_freight_tax` double NOT NULL DEFAULT '0',
589   `ov_discount` double NOT NULL DEFAULT '0',
590   `alloc` double NOT NULL DEFAULT '0',
591   `prep_amount` double NOT NULL DEFAULT '0',
592   `rate` double NOT NULL DEFAULT '1',
593   `ship_via` int(11) DEFAULT NULL,
594   `dimension_id` int(11) NOT NULL DEFAULT '0',
595   `dimension2_id` int(11) NOT NULL DEFAULT '0',
596   `payment_terms` int(11) DEFAULT NULL,
597   `tax_included` tinyint(1) unsigned NOT NULL DEFAULT '0',
598   PRIMARY KEY (`type`,`trans_no`),
599   KEY `debtor_no` (`debtor_no`,`branch_code`),
600   KEY `tran_date` (`tran_date`),
601   KEY `order_` (`order_`)
602 ) ENGINE=InnoDB ;
603
604 ### Data of table `0_debtor_trans` ###
605
606 INSERT INTO `0_debtor_trans` VALUES
607 ('1', '10', '0', '1', '1', '2015-05-10', '2015-05-05', '001/2015', '1', '1', '6240', '0', '0', '0', '0', '6240', '0', '1', '1', '0', '0', '4', '1'),
608 ('2', '10', '0', '1', '1', '2015-05-07', '2015-05-07', '002/2015', '1', '2', '300', '0', '0', '0', '0', '300', '0', '1', '1', '0', '0', '4', '1'),
609 ('3', '10', '0', '2', '2', '2015-05-07', '2015-06-17', '003/2015', '1', '5', '267.14', '0', '0', '0', '0', '0', '0', '1.123', '1', '1', '0', '1', '1'),
610 ('4', '10', '0', '1', '1', '2015-05-07', '2015-05-07', '004/2015', '1', '7', '0', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '4', '1'),
611 ('1', '12', '0', '1', '1', '2015-05-10', '0000-00-00', '001/2015', '0', '0', '6240', '0', '0', '0', '0', '6240', '0', '1', '0', '0', '0', NULL, '0'),
612 ('2', '12', '0', '1', '1', '2015-05-07', '0000-00-00', '002/2015', '0', '0', '300', '0', '0', '0', '0', '300', '0', '1', '0', '0', '0', NULL, '0'),
613 ('3', '12', '0', '1', '1', '2015-05-07', '0000-00-00', '003/2015', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', NULL, '0'),
614 ('1', '13', '1', '1', '1', '2015-05-10', '2015-05-05', 'auto', '1', '1', '6240', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '4', '1'),
615 ('2', '13', '1', '1', '1', '2015-05-07', '2015-05-07', 'auto', '1', '2', '300', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '4', '1'),
616 ('3', '13', '1', '2', '2', '2015-05-07', '2015-06-17', 'auto', '1', '5', '267.14', '0', '0', '0', '0', '0', '0', '1.123', '1', '1', '0', '1', '1'),
617 ('4', '13', '1', '1', '1', '2015-05-07', '2015-05-07', 'auto', '1', '7', '0', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '4', '1');
618
619 ### Structure of table `0_debtor_trans_details` ###
620
621 DROP TABLE IF EXISTS `0_debtor_trans_details`;
622
623 CREATE TABLE `0_debtor_trans_details` (
624   `id` int(11) NOT NULL AUTO_INCREMENT,
625   `debtor_trans_no` int(11) DEFAULT NULL,
626   `debtor_trans_type` int(11) DEFAULT NULL,
627   `stock_id` varchar(20) NOT NULL DEFAULT '',
628   `description` tinytext,
629   `unit_price` double NOT NULL DEFAULT '0',
630   `unit_tax` double NOT NULL DEFAULT '0',
631   `quantity` double NOT NULL DEFAULT '0',
632   `discount_percent` double NOT NULL DEFAULT '0',
633   `standard_cost` double NOT NULL DEFAULT '0',
634   `qty_done` double NOT NULL DEFAULT '0',
635   `src_id` int(11) NOT NULL,
636   PRIMARY KEY (`id`),
637   KEY `Transaction` (`debtor_trans_type`,`debtor_trans_no`),
638   KEY `src_id` (`src_id`)
639 ) ENGINE=InnoDB AUTO_INCREMENT=13 ;
640
641 ### Data of table `0_debtor_trans_details` ###
642
643 INSERT INTO `0_debtor_trans_details` VALUES
644 ('1', '1', '13', '101', 'iPad Air 2 16GB', '300', '14.29', '20', '0', '200', '20', '1'),
645 ('2', '1', '13', '301', 'Support', '80', '3.81', '3', '0', '0', '3', '2'),
646 ('3', '1', '10', '101', 'iPad Air 2 16GB', '300', '14.2855', '20', '0', '200', '0', '1'),
647 ('4', '1', '10', '301', 'Support', '80', '3.81', '3', '0', '0', '0', '2'),
648 ('5', '2', '13', '101', 'iPad Air 2 16GB', '300', '14.29', '1', '0', '200', '1', '3'),
649 ('6', '2', '10', '101', 'iPad Air 2 16GB', '300', '14.29', '1', '0', '200', '0', '5'),
650 ('7', '3', '13', '102', 'iPhone 6 64GB', '222.62', '0', '1', '0', '150', '1', '7'),
651 ('8', '3', '13', '103', 'iPhone Cover Case', '44.52', '0', '1', '0', '10', '1', '8'),
652 ('9', '3', '10', '102', 'iPhone 6 64GB', '222.62', '0', '1', '0', '150', '0', '7'),
653 ('10', '3', '10', '103', 'iPhone Cover Case', '44.52', '0', '1', '0', '10', '0', '8'),
654 ('11', '4', '13', '202', 'Maintenance', '0', '0', '5', '0', '0', '5', '10'),
655 ('12', '4', '10', '202', 'Maintenance', '0', '0', '5', '0', '0', '0', '11');
656
657 ### Structure of table `0_debtors_master` ###
658
659 DROP TABLE IF EXISTS `0_debtors_master`;
660
661 CREATE TABLE `0_debtors_master` (
662   `debtor_no` int(11) NOT NULL AUTO_INCREMENT,
663   `name` varchar(100) NOT NULL DEFAULT '',
664   `debtor_ref` varchar(30) NOT NULL,
665   `address` tinytext,
666   `tax_id` varchar(55) NOT NULL DEFAULT '',
667   `curr_code` char(3) NOT NULL DEFAULT '',
668   `sales_type` int(11) NOT NULL DEFAULT '1',
669   `dimension_id` int(11) NOT NULL DEFAULT '0',
670   `dimension2_id` int(11) NOT NULL DEFAULT '0',
671   `credit_status` int(11) NOT NULL DEFAULT '0',
672   `payment_terms` int(11) DEFAULT NULL,
673   `discount` double NOT NULL DEFAULT '0',
674   `pymt_discount` double NOT NULL DEFAULT '0',
675   `credit_limit` float NOT NULL DEFAULT '1000',
676   `notes` tinytext NOT NULL,
677   `inactive` tinyint(1) NOT NULL DEFAULT '0',
678   PRIMARY KEY (`debtor_no`),
679   UNIQUE KEY `debtor_ref` (`debtor_ref`),
680   KEY `name` (`name`)
681 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
682
683 ### Data of table `0_debtors_master` ###
684
685 INSERT INTO `0_debtors_master` VALUES
686 ('1', 'Donald Easter LLC', 'Donald Easter', 'N/A', '123456789', 'USD', '1', '0', '0', '1', '4', '0', '0', '1000', '', '0'),
687 ('2', 'MoneyMaker Ltd.', 'MoneyMaker', 'N/A', '54354333', 'EUR', '1', '1', '0', '1', '1', '0', '0', '1000', '', '0');
688
689 ### Structure of table `0_dimensions` ###
690
691 DROP TABLE IF EXISTS `0_dimensions`;
692
693 CREATE TABLE `0_dimensions` (
694   `id` int(11) NOT NULL AUTO_INCREMENT,
695   `reference` varchar(60) NOT NULL DEFAULT '',
696   `name` varchar(60) NOT NULL DEFAULT '',
697   `type_` tinyint(1) NOT NULL DEFAULT '1',
698   `closed` tinyint(1) NOT NULL DEFAULT '0',
699   `date_` date NOT NULL DEFAULT '0000-00-00',
700   `due_date` date NOT NULL DEFAULT '0000-00-00',
701   PRIMARY KEY (`id`),
702   UNIQUE KEY `reference` (`reference`),
703   KEY `date_` (`date_`),
704   KEY `due_date` (`due_date`),
705   KEY `type_` (`type_`)
706 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
707
708 ### Data of table `0_dimensions` ###
709
710 INSERT INTO `0_dimensions` VALUES
711 ('1', '001/2015', 'Cost Centre', '1', '0', '2015-05-05', '2015-05-25');
712
713 ### Structure of table `0_exchange_rates` ###
714
715 DROP TABLE IF EXISTS `0_exchange_rates`;
716
717 CREATE TABLE `0_exchange_rates` (
718   `id` int(11) NOT NULL AUTO_INCREMENT,
719   `curr_code` char(3) NOT NULL DEFAULT '',
720   `rate_buy` double NOT NULL DEFAULT '0',
721   `rate_sell` double NOT NULL DEFAULT '0',
722   `date_` date NOT NULL DEFAULT '0000-00-00',
723   PRIMARY KEY (`id`),
724   UNIQUE KEY `curr_code` (`curr_code`,`date_`)
725 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
726
727 ### Data of table `0_exchange_rates` ###
728
729 INSERT INTO `0_exchange_rates` VALUES
730 ('1', 'EUR', '1.123', '1.123', '2015-05-07');
731
732 ### Structure of table `0_fiscal_year` ###
733
734 DROP TABLE IF EXISTS `0_fiscal_year`;
735
736 CREATE TABLE `0_fiscal_year` (
737   `id` int(11) NOT NULL AUTO_INCREMENT,
738   `begin` date DEFAULT '0000-00-00',
739   `end` date DEFAULT '0000-00-00',
740   `closed` tinyint(1) NOT NULL DEFAULT '0',
741   PRIMARY KEY (`id`),
742   UNIQUE KEY `begin` (`begin`),
743   UNIQUE KEY `end` (`end`)
744 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
745
746 ### Data of table `0_fiscal_year` ###
747
748 INSERT INTO `0_fiscal_year` VALUES
749 ('1', '2015-01-01', '2015-12-31', '0');
750
751 ### Structure of table `0_gl_trans` ###
752
753 DROP TABLE IF EXISTS `0_gl_trans`;
754
755 CREATE TABLE `0_gl_trans` (
756   `counter` int(11) NOT NULL AUTO_INCREMENT,
757   `type` smallint(6) NOT NULL DEFAULT '0',
758   `type_no` int(11) NOT NULL DEFAULT '0',
759   `tran_date` date NOT NULL DEFAULT '0000-00-00',
760   `account` varchar(15) NOT NULL DEFAULT '',
761   `memo_` tinytext NOT NULL,
762   `amount` double NOT NULL DEFAULT '0',
763   `dimension_id` int(11) NOT NULL DEFAULT '0',
764   `dimension2_id` int(11) NOT NULL DEFAULT '0',
765   `person_type_id` int(11) DEFAULT NULL,
766   `person_id` tinyblob,
767   PRIMARY KEY (`counter`),
768   KEY `Type_and_Number` (`type`,`type_no`),
769   KEY `dimension_id` (`dimension_id`),
770   KEY `dimension2_id` (`dimension2_id`),
771   KEY `tran_date` (`tran_date`),
772   KEY `account_and_tran_date` (`account`,`tran_date`)
773 ) ENGINE=InnoDB AUTO_INCREMENT=39 ;
774
775 ### Data of table `0_gl_trans` ###
776
777 INSERT INTO `0_gl_trans` VALUES
778 ('1', '25', '1', '2015-05-05', '1510', '101', '20000', '0', '0', NULL, NULL),
779 ('2', '25', '1', '2015-05-05', '1510', '102', '15000', '0', '0', NULL, NULL),
780 ('3', '25', '1', '2015-05-05', '1510', '103', '1000', '0', '0', NULL, NULL),
781 ('4', '25', '1', '2015-05-05', '1550', '', '-36000', '0', '0', NULL, NULL),
782 ('5', '13', '1', '2015-05-10', '5010', '', '4000', '0', '0', NULL, NULL),
783 ('6', '13', '1', '2015-05-10', '1510', '', '-4000', '0', '0', NULL, NULL),
784 ('7', '10', '1', '2015-05-10', '4010', '', '-5714.29', '0', '0', NULL, NULL),
785 ('8', '10', '1', '2015-05-10', '4010', '', '-228.57', '0', '0', NULL, NULL),
786 ('9', '10', '1', '2015-05-10', '1200', '', '6240', '0', '0', '2', '1'),
787 ('10', '10', '1', '2015-05-10', '2150', '', '-297.14', '0', '0', NULL, NULL),
788 ('11', '12', '1', '2015-05-10', '1065', '', '6240', '0', '0', NULL, NULL),
789 ('12', '12', '1', '2015-05-10', '1200', '', '-6240', '0', '0', '2', '1'),
790 ('13', '26', '1', '2015-05-05', '1510', '1 * iPad Air 2 16GB', '-400', '0', '0', NULL, NULL),
791 ('14', '26', '1', '2015-05-05', '1510', '1 * iPhone 6 64GB', '-300', '0', '0', NULL, NULL),
792 ('15', '26', '1', '2015-05-05', '1510', '1 * iPhone Cover Case', '-20', '0', '0', NULL, NULL),
793 ('16', '26', '1', '2015-05-05', '1510', 'Produced 2 * AP Surf Set', '720', '0', '0', NULL, NULL),
794 ('17', '25', '2', '2015-05-05', '1510', '101', '3000', '0', '0', NULL, NULL),
795 ('18', '25', '2', '2015-05-05', '1550', '', '-3000', '0', '0', NULL, NULL),
796 ('19', '20', '1', '2015-05-05', '2150', '', '150', '0', '0', NULL, NULL),
797 ('20', '20', '1', '2015-05-05', '2100', '', '-3150', '0', '0', '3', '1'),
798 ('21', '20', '1', '2015-05-05', '1550', '', '3000', '0', '0', NULL, NULL),
799 ('22', '13', '2', '2015-05-07', '5010', '', '200', '0', '0', NULL, NULL),
800 ('23', '13', '2', '2015-05-07', '1510', '', '-200', '0', '0', NULL, NULL),
801 ('24', '10', '2', '2015-05-07', '4010', '', '-285.71', '0', '0', NULL, NULL),
802 ('25', '10', '2', '2015-05-07', '1200', '', '300', '0', '0', '2', '1'),
803 ('26', '10', '2', '2015-05-07', '2150', '', '-14.29', '0', '0', NULL, NULL),
804 ('27', '12', '2', '2015-05-07', '1065', '', '300', '0', '0', NULL, NULL),
805 ('28', '12', '2', '2015-05-07', '1200', '', '-300', '0', '0', '2', '1'),
806 ('29', '13', '3', '2015-05-07', '5010', '', '150', '1', '0', NULL, NULL),
807 ('30', '13', '3', '2015-05-07', '1510', '', '-150', '0', '0', NULL, NULL),
808 ('31', '13', '3', '2015-05-07', '5010', '', '10', '1', '0', NULL, NULL),
809 ('32', '13', '3', '2015-05-07', '1510', '', '-10', '0', '0', NULL, NULL),
810 ('33', '10', '3', '2015-05-07', '4010', '', '-250', '1', '0', NULL, NULL),
811 ('34', '10', '3', '2015-05-07', '4010', '', '-50', '1', '0', NULL, NULL),
812 ('35', '10', '3', '2015-05-07', '1200', '', '300', '0', '0', '2', '2'),
813 ('36', '12', '3', '2015-05-07', '1065', '', '0', '0', '0', NULL, NULL),
814 ('37', '1', '1', '2015-05-07', '5010', '', '5', '1', '0', NULL, NULL),
815 ('38', '1', '1', '2015-05-07', '1060', '', '-5', '0', '0', NULL, NULL);
816
817 ### Structure of table `0_grn_batch` ###
818
819 DROP TABLE IF EXISTS `0_grn_batch`;
820
821 CREATE TABLE `0_grn_batch` (
822   `id` int(11) NOT NULL AUTO_INCREMENT,
823   `supplier_id` int(11) NOT NULL DEFAULT '0',
824   `purch_order_no` int(11) DEFAULT NULL,
825   `reference` varchar(60) NOT NULL DEFAULT '',
826   `delivery_date` date NOT NULL DEFAULT '0000-00-00',
827   `loc_code` varchar(5) DEFAULT NULL,
828   `rate` double DEFAULT '1',
829   PRIMARY KEY (`id`),
830   KEY `delivery_date` (`delivery_date`),
831   KEY `purch_order_no` (`purch_order_no`)
832 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
833
834 ### Data of table `0_grn_batch` ###
835
836 INSERT INTO `0_grn_batch` VALUES
837 ('1', '1', '1', '001/2015', '2015-05-05', 'DEF', '1'),
838 ('2', '1', '2', 'auto', '2015-05-05', 'DEF', '1');
839
840 ### Structure of table `0_grn_items` ###
841
842 DROP TABLE IF EXISTS `0_grn_items`;
843
844 CREATE TABLE `0_grn_items` (
845   `id` int(11) NOT NULL AUTO_INCREMENT,
846   `grn_batch_id` int(11) DEFAULT NULL,
847   `po_detail_item` int(11) NOT NULL DEFAULT '0',
848   `item_code` varchar(20) NOT NULL DEFAULT '',
849   `description` tinytext,
850   `qty_recd` double NOT NULL DEFAULT '0',
851   `quantity_inv` double NOT NULL DEFAULT '0',
852   PRIMARY KEY (`id`),
853   KEY `grn_batch_id` (`grn_batch_id`)
854 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
855
856 ### Data of table `0_grn_items` ###
857
858 INSERT INTO `0_grn_items` VALUES
859 ('1', '1', '1', '101', 'iPad Air 2 16GB', '100', '0'),
860 ('2', '1', '2', '102', 'iPhone 6 64GB', '100', '0'),
861 ('3', '1', '3', '103', 'iPhone Cover Case', '100', '0'),
862 ('4', '2', '4', '101', 'iPad Air 2 16GB', '15', '15');
863
864 ### Structure of table `0_groups` ###
865
866 DROP TABLE IF EXISTS `0_groups`;
867
868 CREATE TABLE `0_groups` (
869   `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
870   `description` varchar(60) NOT NULL DEFAULT '',
871   `inactive` tinyint(1) NOT NULL DEFAULT '0',
872   PRIMARY KEY (`id`),
873   UNIQUE KEY `description` (`description`)
874 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
875
876 ### Data of table `0_groups` ###
877
878 INSERT INTO `0_groups` VALUES
879 ('1', 'Small', '0'),
880 ('2', 'Medium', '0'),
881 ('3', 'Large', '0');
882
883 ### Structure of table `0_item_codes` ###
884
885 DROP TABLE IF EXISTS `0_item_codes`;
886
887 CREATE TABLE `0_item_codes` (
888   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
889   `item_code` varchar(20) NOT NULL,
890   `stock_id` varchar(20) NOT NULL,
891   `description` varchar(200) NOT NULL DEFAULT '',
892   `category_id` smallint(6) unsigned NOT NULL,
893   `quantity` double NOT NULL DEFAULT '1',
894   `is_foreign` tinyint(1) NOT NULL DEFAULT '0',
895   `inactive` tinyint(1) NOT NULL DEFAULT '0',
896   PRIMARY KEY (`id`),
897   UNIQUE KEY `stock_id` (`stock_id`,`item_code`),
898   KEY `item_code` (`item_code`)
899 ) ENGINE=InnoDB AUTO_INCREMENT=9 ;
900
901 ### Data of table `0_item_codes` ###
902
903 INSERT INTO `0_item_codes` VALUES
904 ('1', '101', '101', 'iPad Air 2 16GB', '1', '1', '0', '0'),
905 ('2', '102', '102', 'iPhone 6 64GB', '1', '1', '0', '0'),
906 ('3', '103', '103', 'iPhone Cover Case', '1', '1', '0', '0'),
907 ('4', '201', '201', 'AP Surf Set', '3', '1', '0', '0'),
908 ('5', '301', '301', 'Support', '4', '1', '0', '0'),
909 ('6', '501', '102', 'iPhone Pack', '1', '1', '0', '0'),
910 ('7', '501', '103', 'iPhone Pack', '1', '1', '0', '0'),
911 ('8', '202', '202', 'Maintenance', '4', '1', '0', '0');
912
913 ### Structure of table `0_item_tax_type_exemptions` ###
914
915 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
916
917 CREATE TABLE `0_item_tax_type_exemptions` (
918   `item_tax_type_id` int(11) NOT NULL DEFAULT '0',
919   `tax_type_id` int(11) NOT NULL DEFAULT '0',
920   PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
921 ) ENGINE=InnoDB ;
922
923 ### Data of table `0_item_tax_type_exemptions` ###
924
925
926 ### Structure of table `0_item_tax_types` ###
927
928 DROP TABLE IF EXISTS `0_item_tax_types`;
929
930 CREATE TABLE `0_item_tax_types` (
931   `id` int(11) NOT NULL AUTO_INCREMENT,
932   `name` varchar(60) NOT NULL DEFAULT '',
933   `exempt` tinyint(1) NOT NULL DEFAULT '0',
934   `inactive` tinyint(1) NOT NULL DEFAULT '0',
935   PRIMARY KEY (`id`),
936   UNIQUE KEY `name` (`name`)
937 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
938
939 ### Data of table `0_item_tax_types` ###
940
941 INSERT INTO `0_item_tax_types` VALUES
942 ('1', 'Regular', '0', '0');
943
944 ### Structure of table `0_item_units` ###
945
946 DROP TABLE IF EXISTS `0_item_units`;
947
948 CREATE TABLE `0_item_units` (
949   `abbr` varchar(20) NOT NULL,
950   `name` varchar(40) NOT NULL,
951   `decimals` tinyint(2) NOT NULL,
952   `inactive` tinyint(1) NOT NULL DEFAULT '0',
953   PRIMARY KEY (`abbr`),
954   UNIQUE KEY `name` (`name`)
955 ) ENGINE=InnoDB ;
956
957 ### Data of table `0_item_units` ###
958
959 INSERT INTO `0_item_units` VALUES
960 ('each', 'Each', '0', '0'),
961 ('hr', 'Hours', '0', '0');
962
963 ### Structure of table `0_journal` ###
964
965 DROP TABLE IF EXISTS `0_journal`;
966
967 CREATE TABLE `0_journal` (
968   `type` smallint(6) NOT NULL DEFAULT '0',
969   `trans_no` int(11) NOT NULL DEFAULT '0',
970   `tran_date` date DEFAULT '0000-00-00',
971   `reference` varchar(60) NOT NULL DEFAULT '',
972   `source_ref` varchar(60) NOT NULL DEFAULT '',
973   `event_date` date DEFAULT '0000-00-00',
974   `doc_date` date NOT NULL DEFAULT '0000-00-00',
975   `currency` char(3) NOT NULL DEFAULT '',
976   `amount` double NOT NULL DEFAULT '0',
977   `rate` double NOT NULL DEFAULT '1',
978   PRIMARY KEY (`type`,`trans_no`),
979   KEY `tran_date` (`tran_date`)
980 ) ENGINE=InnoDB ;
981
982 ### Data of table `0_journal` ###
983
984
985 ### Structure of table `0_loc_stock` ###
986
987 DROP TABLE IF EXISTS `0_loc_stock`;
988
989 CREATE TABLE `0_loc_stock` (
990   `loc_code` char(5) NOT NULL DEFAULT '',
991   `stock_id` char(20) NOT NULL DEFAULT '',
992   `reorder_level` double NOT NULL DEFAULT '0',
993   PRIMARY KEY (`loc_code`,`stock_id`),
994   KEY `stock_id` (`stock_id`)
995 ) ENGINE=InnoDB ;
996
997 ### Data of table `0_loc_stock` ###
998
999 INSERT INTO `0_loc_stock` VALUES
1000 ('DEF', '101', '0'),
1001 ('DEF', '102', '0'),
1002 ('DEF', '103', '0'),
1003 ('DEF', '201', '0'),
1004 ('DEF', '202', '0'),
1005 ('DEF', '301', '0');
1006
1007 ### Structure of table `0_locations` ###
1008
1009 DROP TABLE IF EXISTS `0_locations`;
1010
1011 CREATE TABLE `0_locations` (
1012   `loc_code` varchar(5) NOT NULL DEFAULT '',
1013   `location_name` varchar(60) NOT NULL DEFAULT '',
1014   `delivery_address` tinytext NOT NULL,
1015   `phone` varchar(30) NOT NULL DEFAULT '',
1016   `phone2` varchar(30) NOT NULL DEFAULT '',
1017   `fax` varchar(30) NOT NULL DEFAULT '',
1018   `email` varchar(100) NOT NULL DEFAULT '',
1019   `contact` varchar(30) NOT NULL DEFAULT '',
1020   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1021   PRIMARY KEY (`loc_code`)
1022 ) ENGINE=InnoDB ;
1023
1024 ### Data of table `0_locations` ###
1025
1026 INSERT INTO `0_locations` VALUES
1027 ('DEF', 'Default', 'N/A', '', '', '', '', '', '0');
1028
1029 ### Structure of table `0_movement_types` ###
1030
1031 DROP TABLE IF EXISTS `0_movement_types`;
1032
1033 CREATE TABLE `0_movement_types` (
1034   `id` int(11) NOT NULL AUTO_INCREMENT,
1035   `name` varchar(60) NOT NULL DEFAULT '',
1036   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1037   PRIMARY KEY (`id`),
1038   UNIQUE KEY `name` (`name`)
1039 ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ;
1040
1041 ### Data of table `0_movement_types` ###
1042
1043 INSERT INTO `0_movement_types` VALUES
1044 ('1', 'Adjustment', '0');
1045
1046 ### Structure of table `0_payment_terms` ###
1047
1048 DROP TABLE IF EXISTS `0_payment_terms`;
1049
1050 CREATE TABLE `0_payment_terms` (
1051   `terms_indicator` int(11) NOT NULL AUTO_INCREMENT,
1052   `terms` char(80) NOT NULL DEFAULT '',
1053   `days_before_due` smallint(6) NOT NULL DEFAULT '0',
1054   `day_in_following_month` smallint(6) NOT NULL DEFAULT '0',
1055   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1056   PRIMARY KEY (`terms_indicator`),
1057   UNIQUE KEY `terms` (`terms`)
1058 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
1059
1060 ### Data of table `0_payment_terms` ###
1061
1062 INSERT INTO `0_payment_terms` VALUES
1063 ('1', 'Due 15th Of the Following Month', '0', '17', '0'),
1064 ('2', 'Due By End Of The Following Month', '0', '30', '0'),
1065 ('3', 'Payment due within 10 days', '10', '0', '0'),
1066 ('4', 'Cash Only', '0', '0', '0');
1067
1068 ### Structure of table `0_prices` ###
1069
1070 DROP TABLE IF EXISTS `0_prices`;
1071
1072 CREATE TABLE `0_prices` (
1073   `id` int(11) NOT NULL AUTO_INCREMENT,
1074   `stock_id` varchar(20) NOT NULL DEFAULT '',
1075   `sales_type_id` int(11) NOT NULL DEFAULT '0',
1076   `curr_abrev` char(3) NOT NULL DEFAULT '',
1077   `price` double NOT NULL DEFAULT '0',
1078   PRIMARY KEY (`id`),
1079   UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
1080 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1081
1082 ### Data of table `0_prices` ###
1083
1084 INSERT INTO `0_prices` VALUES
1085 ('1', '101', '1', 'USD', '300'),
1086 ('2', '102', '1', 'USD', '250'),
1087 ('3', '103', '1', 'USD', '50');
1088
1089 ### Structure of table `0_print_profiles` ###
1090
1091 DROP TABLE IF EXISTS `0_print_profiles`;
1092
1093 CREATE TABLE `0_print_profiles` (
1094   `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1095   `profile` varchar(30) NOT NULL,
1096   `report` varchar(5) DEFAULT NULL,
1097   `printer` tinyint(3) unsigned DEFAULT NULL,
1098   PRIMARY KEY (`id`),
1099   UNIQUE KEY `profile` (`profile`,`report`)
1100 ) ENGINE=InnoDB AUTO_INCREMENT=10 ;
1101
1102 ### Data of table `0_print_profiles` ###
1103
1104 INSERT INTO `0_print_profiles` VALUES
1105 ('1', 'Out of office', NULL, '0'),
1106 ('2', 'Sales Department', NULL, '0'),
1107 ('3', 'Central', NULL, '2'),
1108 ('4', 'Sales Department', '104', '2'),
1109 ('5', 'Sales Department', '105', '2'),
1110 ('6', 'Sales Department', '107', '2'),
1111 ('7', 'Sales Department', '109', '2'),
1112 ('8', 'Sales Department', '110', '2'),
1113 ('9', 'Sales Department', '201', '2');
1114
1115 ### Structure of table `0_printers` ###
1116
1117 DROP TABLE IF EXISTS `0_printers`;
1118
1119 CREATE TABLE `0_printers` (
1120   `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
1121   `name` varchar(20) NOT NULL,
1122   `description` varchar(60) NOT NULL,
1123   `queue` varchar(20) NOT NULL,
1124   `host` varchar(40) NOT NULL,
1125   `port` smallint(11) unsigned NOT NULL,
1126   `timeout` tinyint(3) unsigned NOT NULL,
1127   PRIMARY KEY (`id`),
1128   UNIQUE KEY `name` (`name`)
1129 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1130
1131 ### Data of table `0_printers` ###
1132
1133 INSERT INTO `0_printers` VALUES
1134 ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20'),
1135 ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5'),
1136 ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
1137
1138 ### Structure of table `0_purch_data` ###
1139
1140 DROP TABLE IF EXISTS `0_purch_data`;
1141
1142 CREATE TABLE `0_purch_data` (
1143   `supplier_id` int(11) NOT NULL DEFAULT '0',
1144   `stock_id` char(20) NOT NULL DEFAULT '',
1145   `price` double NOT NULL DEFAULT '0',
1146   `suppliers_uom` char(50) NOT NULL DEFAULT '',
1147   `conversion_factor` double NOT NULL DEFAULT '1',
1148   `supplier_description` char(50) NOT NULL DEFAULT '',
1149   PRIMARY KEY (`supplier_id`,`stock_id`)
1150 ) ENGINE=InnoDB ;
1151
1152 ### Data of table `0_purch_data` ###
1153
1154 INSERT INTO `0_purch_data` VALUES
1155 ('1', '101', '200', '', '1', 'iPad Air 2 16GB'),
1156 ('1', '102', '150', '', '1', 'iPhone 6 64GB'),
1157 ('1', '103', '10', '', '1', 'iPhone Cover Case');
1158
1159 ### Structure of table `0_purch_order_details` ###
1160
1161 DROP TABLE IF EXISTS `0_purch_order_details`;
1162
1163 CREATE TABLE `0_purch_order_details` (
1164   `po_detail_item` int(11) NOT NULL AUTO_INCREMENT,
1165   `order_no` int(11) NOT NULL DEFAULT '0',
1166   `item_code` varchar(20) NOT NULL DEFAULT '',
1167   `description` tinytext,
1168   `delivery_date` date NOT NULL DEFAULT '0000-00-00',
1169   `qty_invoiced` double NOT NULL DEFAULT '0',
1170   `unit_price` double NOT NULL DEFAULT '0',
1171   `act_price` double NOT NULL DEFAULT '0',
1172   `std_cost_unit` double NOT NULL DEFAULT '0',
1173   `quantity_ordered` double NOT NULL DEFAULT '0',
1174   `quantity_received` double NOT NULL DEFAULT '0',
1175   PRIMARY KEY (`po_detail_item`),
1176   KEY `order` (`order_no`,`po_detail_item`),
1177   KEY `itemcode` (`item_code`)
1178 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
1179
1180 ### Data of table `0_purch_order_details` ###
1181
1182 INSERT INTO `0_purch_order_details` VALUES
1183 ('1', '1', '101', 'iPad Air 2 16GB', '2015-05-15', '0', '200', '200', '200', '100', '100'),
1184 ('2', '1', '102', 'iPhone 6 64GB', '2015-05-15', '0', '150', '150', '150', '100', '100'),
1185 ('3', '1', '103', 'iPhone Cover Case', '2015-05-15', '0', '10', '10', '10', '100', '100'),
1186 ('4', '2', '101', 'iPad Air 2 16GB', '2015-05-05', '15', '200', '200', '200', '15', '15');
1187
1188 ### Structure of table `0_purch_orders` ###
1189
1190 DROP TABLE IF EXISTS `0_purch_orders`;
1191
1192 CREATE TABLE `0_purch_orders` (
1193   `order_no` int(11) NOT NULL AUTO_INCREMENT,
1194   `supplier_id` int(11) NOT NULL DEFAULT '0',
1195   `comments` tinytext,
1196   `ord_date` date NOT NULL DEFAULT '0000-00-00',
1197   `reference` tinytext NOT NULL,
1198   `requisition_no` tinytext,
1199   `into_stock_location` varchar(5) NOT NULL DEFAULT '',
1200   `delivery_address` tinytext NOT NULL,
1201   `total` double NOT NULL DEFAULT '0',
1202   `prep_amount` double NOT NULL DEFAULT '0',
1203   `alloc` double NOT NULL DEFAULT '0',
1204   `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1205   PRIMARY KEY (`order_no`),
1206   KEY `ord_date` (`ord_date`)
1207 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1208
1209 ### Data of table `0_purch_orders` ###
1210
1211 INSERT INTO `0_purch_orders` VALUES
1212 ('1', '1', NULL, '2015-05-05', '001/2015', NULL, 'DEF', 'N/A', '37800', '0', '0', '0'),
1213 ('2', '1', NULL, '2015-05-05', 'auto', 'rr4', 'DEF', 'N/A', '3150', '0', '0', '0');
1214
1215 ### Structure of table `0_quick_entries` ###
1216
1217 DROP TABLE IF EXISTS `0_quick_entries`;
1218
1219 CREATE TABLE `0_quick_entries` (
1220   `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1221   `type` tinyint(1) NOT NULL DEFAULT '0',
1222   `description` varchar(60) NOT NULL,
1223   `usage` varchar(120) DEFAULT NULL,
1224   `base_amount` double NOT NULL DEFAULT '0',
1225   `base_desc` varchar(60) DEFAULT NULL,
1226   `bal_type` tinyint(1) NOT NULL DEFAULT '0',
1227   PRIMARY KEY (`id`),
1228   KEY `description` (`description`)
1229 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1230
1231 ### Data of table `0_quick_entries` ###
1232
1233 INSERT INTO `0_quick_entries` VALUES
1234 ('1', '1', 'Maintenance', NULL, '0', 'Amount', '0'),
1235 ('2', '4', 'Phone', NULL, '0', 'Amount', '0'),
1236 ('3', '2', 'Cash Sales', 'Retail sales without invoice', '0', 'Amount', '0');
1237
1238 ### Structure of table `0_quick_entry_lines` ###
1239
1240 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1241
1242 CREATE TABLE `0_quick_entry_lines` (
1243   `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1244   `qid` smallint(6) unsigned NOT NULL,
1245   `amount` double DEFAULT '0',
1246   `memo` tinytext NOT NULL,
1247   `action` varchar(2) NOT NULL,
1248   `dest_id` varchar(15) NOT NULL DEFAULT '',
1249   `dimension_id` smallint(6) unsigned DEFAULT NULL,
1250   `dimension2_id` smallint(6) unsigned DEFAULT NULL,
1251   PRIMARY KEY (`id`),
1252   KEY `qid` (`qid`)
1253 ) ENGINE=InnoDB AUTO_INCREMENT=7 ;
1254
1255 ### Data of table `0_quick_entry_lines` ###
1256
1257 INSERT INTO `0_quick_entry_lines` VALUES
1258 ('1', '1', '0', '', 't-', '1', '0', '0'),
1259 ('2', '2', '0', '', 't-', '1', '0', '0'),
1260 ('3', '3', '0', '', 't-', '1', '0', '0'),
1261 ('4', '3', '0', '', '=', '4010', '0', '0'),
1262 ('5', '1', '0', '', '=', '5765', '0', '0'),
1263 ('6', '2', '0', '', '=', '5780', '0', '0');
1264
1265 ### Structure of table `0_recurrent_invoices` ###
1266
1267 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1268
1269 CREATE TABLE `0_recurrent_invoices` (
1270   `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1271   `description` varchar(60) NOT NULL DEFAULT '',
1272   `order_no` int(11) unsigned NOT NULL,
1273   `debtor_no` int(11) unsigned DEFAULT NULL,
1274   `group_no` smallint(6) unsigned DEFAULT NULL,
1275   `days` int(11) NOT NULL DEFAULT '0',
1276   `monthly` int(11) NOT NULL DEFAULT '0',
1277   `begin` date NOT NULL DEFAULT '0000-00-00',
1278   `end` date NOT NULL DEFAULT '0000-00-00',
1279   `last_sent` date NOT NULL DEFAULT '0000-00-00',
1280   PRIMARY KEY (`id`),
1281   UNIQUE KEY `description` (`description`)
1282 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1283
1284 ### Data of table `0_recurrent_invoices` ###
1285
1286 INSERT INTO `0_recurrent_invoices` VALUES
1287 ('1', 'Weekly Maintenance', '6', '1', '1', '7', '0', '2015-04-01', '2020-05-07', '2015-04-08');
1288
1289 ### Structure of table `0_reflines` ###
1290
1291 DROP TABLE IF EXISTS `0_reflines`;
1292
1293 CREATE TABLE `0_reflines` (
1294   `id` int(11) NOT NULL AUTO_INCREMENT,
1295   `trans_type` int(11) NOT NULL,
1296   `prefix` char(5) NOT NULL DEFAULT '',
1297   `pattern` varchar(35) NOT NULL DEFAULT '1',
1298   `description` varchar(60) NOT NULL DEFAULT '',
1299   `default` tinyint(1) NOT NULL DEFAULT '0',
1300   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1301   PRIMARY KEY (`id`),
1302   UNIQUE KEY `prefix` (`trans_type`,`prefix`)
1303 ) ENGINE=InnoDB AUTO_INCREMENT=23 ;
1304
1305 ### Data of table `0_reflines` ###
1306
1307 INSERT INTO `0_reflines` VALUES
1308 ('1', '0', '', '{001}/{YYYY}', '', '1', '0'),
1309 ('2', '1', '', '{001}/{YYYY}', '', '1', '0'),
1310 ('3', '2', '', '{001}/{YYYY}', '', '1', '0'),
1311 ('4', '4', '', '{001}/{YYYY}', '', '1', '0'),
1312 ('5', '10', '', '{001}/{YYYY}', '', '1', '0'),
1313 ('6', '11', '', '{001}/{YYYY}', '', '1', '0'),
1314 ('7', '12', '', '{001}/{YYYY}', '', '1', '0'),
1315 ('8', '13', '', '{001}/{YYYY}', '', '1', '0'),
1316 ('9', '16', '', '{001}/{YYYY}', '', '1', '0'),
1317 ('10', '17', '', '{001}/{YYYY}', '', '1', '0'),
1318 ('11', '18', '', '{001}/{YYYY}', '', '1', '0'),
1319 ('12', '20', '', '{001}/{YYYY}', '', '1', '0'),
1320 ('13', '21', '', '{001}/{YYYY}', '', '1', '0'),
1321 ('14', '22', '', '{001}/{YYYY}', '', '1', '0'),
1322 ('15', '25', '', '{001}/{YYYY}', '', '1', '0'),
1323 ('16', '26', '', '{001}/{YYYY}', '', '1', '0'),
1324 ('17', '28', '', '{001}/{YYYY}', '', '1', '0'),
1325 ('18', '29', '', '{001}/{YYYY}', '', '1', '0'),
1326 ('19', '30', '', '{001}/{YYYY}', '', '1', '0'),
1327 ('20', '32', '', '{001}/{YYYY}', '', '1', '0'),
1328 ('21', '35', '', '{001}/{YYYY}', '', '1', '0'),
1329 ('22', '40', '', '{001}/{YYYY}', '', '1', '0');
1330
1331 ### Structure of table `0_refs` ###
1332
1333 DROP TABLE IF EXISTS `0_refs`;
1334
1335 CREATE TABLE `0_refs` (
1336   `id` int(11) NOT NULL DEFAULT '0',
1337   `type` int(11) NOT NULL DEFAULT '0',
1338   `reference` varchar(100) NOT NULL DEFAULT '',
1339   PRIMARY KEY (`id`,`type`),
1340   KEY `Type_and_Reference` (`type`,`reference`)
1341 ) ENGINE=InnoDB ;
1342
1343 ### Data of table `0_refs` ###
1344
1345 INSERT INTO `0_refs` VALUES
1346 ('1', '1', '001/2015'),
1347 ('1', '10', '001/2015'),
1348 ('2', '10', '002/2015'),
1349 ('3', '10', '003/2015'),
1350 ('4', '10', '004/2015'),
1351 ('1', '12', '001/2015'),
1352 ('2', '12', '002/2015'),
1353 ('3', '12', '003/2015'),
1354 ('1', '18', '001/2015'),
1355 ('1', '20', '001/2015'),
1356 ('1', '25', '001/2015'),
1357 ('1', '26', '001/2015'),
1358 ('2', '26', '002/2015'),
1359 ('3', '26', '003/2015'),
1360 ('3', '30', '001/2015'),
1361 ('4', '30', '002/2015'),
1362 ('6', '30', '003/2015'),
1363 ('1', '40', '001/2015');
1364
1365 ### Structure of table `0_sales_order_details` ###
1366
1367 DROP TABLE IF EXISTS `0_sales_order_details`;
1368
1369 CREATE TABLE `0_sales_order_details` (
1370   `id` int(11) NOT NULL AUTO_INCREMENT,
1371   `order_no` int(11) NOT NULL DEFAULT '0',
1372   `trans_type` smallint(6) NOT NULL DEFAULT '30',
1373   `stk_code` varchar(20) NOT NULL DEFAULT '',
1374   `description` tinytext,
1375   `qty_sent` double NOT NULL DEFAULT '0',
1376   `unit_price` double NOT NULL DEFAULT '0',
1377   `quantity` double NOT NULL DEFAULT '0',
1378   `invoiced` double NOT NULL DEFAULT '0',
1379   `discount_percent` double NOT NULL DEFAULT '0',
1380   PRIMARY KEY (`id`),
1381   KEY `sorder` (`trans_type`,`order_no`),
1382   KEY `stkcode` (`stk_code`)
1383 ) ENGINE=InnoDB AUTO_INCREMENT=11 ;
1384
1385 ### Data of table `0_sales_order_details` ###
1386
1387 INSERT INTO `0_sales_order_details` VALUES
1388 ('1', '1', '30', '101', 'iPad Air 2 16GB', '20', '300', '20', '0', '0'),
1389 ('2', '1', '30', '301', 'Support', '3', '80', '3', '0', '0'),
1390 ('3', '2', '30', '101', 'iPad Air 2 16GB', '1', '300', '1', '0', '0'),
1391 ('4', '3', '30', '102', 'iPhone 6 64GB', '0', '250', '1', '0', '0'),
1392 ('5', '3', '30', '103', 'iPhone Cover Case', '0', '50', '1', '0', '0'),
1393 ('6', '4', '30', '101', 'iPad Air 2 16GB', '0', '267.14', '1', '0', '0'),
1394 ('7', '5', '30', '102', 'iPhone 6 64GB', '1', '222.62', '1', '0', '0'),
1395 ('8', '5', '30', '103', 'iPhone Cover Case', '1', '44.52', '1', '0', '0'),
1396 ('9', '6', '30', '202', 'Maintenance', '0', '90', '5', '0', '0'),
1397 ('10', '7', '30', '202', 'Maintenance', '5', '0', '5', '0', '0');
1398
1399 ### Structure of table `0_sales_orders` ###
1400
1401 DROP TABLE IF EXISTS `0_sales_orders`;
1402
1403 CREATE TABLE `0_sales_orders` (
1404   `order_no` int(11) NOT NULL,
1405   `trans_type` smallint(6) NOT NULL DEFAULT '30',
1406   `version` tinyint(1) unsigned NOT NULL DEFAULT '0',
1407   `type` tinyint(1) NOT NULL DEFAULT '0',
1408   `debtor_no` int(11) NOT NULL DEFAULT '0',
1409   `branch_code` int(11) NOT NULL DEFAULT '0',
1410   `reference` varchar(100) NOT NULL DEFAULT '',
1411   `customer_ref` tinytext NOT NULL,
1412   `comments` tinytext,
1413   `ord_date` date NOT NULL DEFAULT '0000-00-00',
1414   `order_type` int(11) NOT NULL DEFAULT '0',
1415   `ship_via` int(11) NOT NULL DEFAULT '0',
1416   `delivery_address` tinytext NOT NULL,
1417   `contact_phone` varchar(30) DEFAULT NULL,
1418   `contact_email` varchar(100) DEFAULT NULL,
1419   `deliver_to` tinytext NOT NULL,
1420   `freight_cost` double NOT NULL DEFAULT '0',
1421   `from_stk_loc` varchar(5) NOT NULL DEFAULT '',
1422   `delivery_date` date NOT NULL DEFAULT '0000-00-00',
1423   `payment_terms` int(11) DEFAULT NULL,
1424   `total` double NOT NULL DEFAULT '0',
1425   `prep_amount` double NOT NULL DEFAULT '0',
1426   `alloc` double NOT NULL DEFAULT '0',
1427   PRIMARY KEY (`trans_type`,`order_no`)
1428 ) ENGINE=InnoDB ;
1429
1430 ### Data of table `0_sales_orders` ###
1431
1432 INSERT INTO `0_sales_orders` VALUES
1433 ('1', '30', '1', '0', '1', '1', 'auto', '', NULL, '2015-05-10', '1', '1', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2015-05-05', '4', '6240', '0', '0'),
1434 ('2', '30', '1', '0', '1', '1', 'auto', '', NULL, '2015-05-07', '1', '1', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2015-05-07', '4', '300', '0', '0'),
1435 ('3', '30', '0', '0', '1', '1', '001/2015', '', NULL, '2015-05-07', '1', '1', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2015-05-08', '4', '300', '0', '0'),
1436 ('4', '30', '0', '0', '2', '2', '002/2015', '', NULL, '2015-05-07', '1', '1', 'N/A', NULL, NULL, 'MoneyMaker Ltd.', '0', 'DEF', '2015-05-08', '1', '267.14', '0', '0'),
1437 ('5', '30', '1', '0', '2', '2', 'auto', '', NULL, '2015-05-07', '1', '1', 'N/A', NULL, NULL, 'MoneyMaker Ltd.', '0', 'DEF', '2015-06-17', '1', '267.14', '0', '0'),
1438 ('6', '30', '0', '1', '1', '1', '003/2015', '', NULL, '2015-05-07', '1', '1', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2015-05-08', '4', '450', '0', '0'),
1439 ('7', '30', '1', '0', '1', '1', 'auto', '', 'Recurrent Invoice covers period 04/01/2015 - 04/07/2015.', '2015-05-07', '1', '1', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2015-05-07', '4', '0', '0', '0');
1440
1441 ### Structure of table `0_sales_pos` ###
1442
1443 DROP TABLE IF EXISTS `0_sales_pos`;
1444
1445 CREATE TABLE `0_sales_pos` (
1446   `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1447   `pos_name` varchar(30) NOT NULL,
1448   `cash_sale` tinyint(1) NOT NULL,
1449   `credit_sale` tinyint(1) NOT NULL,
1450   `pos_location` varchar(5) NOT NULL,
1451   `pos_account` smallint(6) unsigned NOT NULL,
1452   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1453   PRIMARY KEY (`id`),
1454   UNIQUE KEY `pos_name` (`pos_name`)
1455 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1456
1457 ### Data of table `0_sales_pos` ###
1458
1459 INSERT INTO `0_sales_pos` VALUES
1460 ('1', 'Default', '1', '1', 'DEF', '2', '0');
1461
1462 ### Structure of table `0_sales_types` ###
1463
1464 DROP TABLE IF EXISTS `0_sales_types`;
1465
1466 CREATE TABLE `0_sales_types` (
1467   `id` int(11) NOT NULL AUTO_INCREMENT,
1468   `sales_type` char(50) NOT NULL DEFAULT '',
1469   `tax_included` int(1) NOT NULL DEFAULT '0',
1470   `factor` double NOT NULL DEFAULT '1',
1471   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1472   PRIMARY KEY (`id`),
1473   UNIQUE KEY `sales_type` (`sales_type`)
1474 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1475
1476 ### Data of table `0_sales_types` ###
1477
1478 INSERT INTO `0_sales_types` VALUES
1479 ('1', 'Retail', '1', '1', '0'),
1480 ('2', 'Wholesale', '0', '0.7', '0');
1481
1482 ### Structure of table `0_salesman` ###
1483
1484 DROP TABLE IF EXISTS `0_salesman`;
1485
1486 CREATE TABLE `0_salesman` (
1487   `salesman_code` int(11) NOT NULL AUTO_INCREMENT,
1488   `salesman_name` char(60) NOT NULL DEFAULT '',
1489   `salesman_phone` char(30) NOT NULL DEFAULT '',
1490   `salesman_fax` char(30) NOT NULL DEFAULT '',
1491   `salesman_email` varchar(100) NOT NULL DEFAULT '',
1492   `provision` double NOT NULL DEFAULT '0',
1493   `break_pt` double NOT NULL DEFAULT '0',
1494   `provision2` double NOT NULL DEFAULT '0',
1495   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1496   PRIMARY KEY (`salesman_code`),
1497   UNIQUE KEY `salesman_name` (`salesman_name`)
1498 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1499
1500 ### Data of table `0_salesman` ###
1501
1502 INSERT INTO `0_salesman` VALUES
1503 ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1504
1505 ### Structure of table `0_security_roles` ###
1506
1507 DROP TABLE IF EXISTS `0_security_roles`;
1508
1509 CREATE TABLE `0_security_roles` (
1510   `id` int(11) NOT NULL AUTO_INCREMENT,
1511   `role` varchar(30) NOT NULL,
1512   `description` varchar(50) DEFAULT NULL,
1513   `sections` text,
1514   `areas` text,
1515   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1516   PRIMARY KEY (`id`),
1517   UNIQUE KEY `role` (`role`)
1518 ) ENGINE=InnoDB AUTO_INCREMENT=11 ;
1519
1520 ### Data of table `0_security_roles` ###
1521
1522 INSERT INTO `0_security_roles` VALUES
1523 ('1', 'Inquiries', 'Inquiries', '768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;773;774;2822;3073;3075;3076;3077;3329;3330;3331;3332;3333;3334;3335;5377;5633;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8450;8451;10497;10753;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15622;15623;15624;15625;15626;15873;15882;16129;16130;16131;16132;775', '0'),
1524 ('2', 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;10496;10752;11008;13056;13312;15616;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;526;769;770;771;772;773;774;2817;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5636;5637;5641;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8195;8196;8197;8449;8450;8451;10497;10753;10754;10755;10756;10757;11009;11010;11011;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15628;15625;15626;15627;15873;15874;15875;15876;15877;15878;15879;15880;15883;15881;15882;16129;16130;16131;16132;775', '0'),
1525 ('3', 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873;775', '0'),
1526 ('4', 'Stock Manager', 'Stock Manager', '768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '2818;2822;3073;3076;3077;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5889;5890;5891;8193;8194;8450;8451;10753;11009;11010;11012;13313;13315;15882;16129;16130;16131;16132;775', '0'),
1527 ('5', 'Production Manager', 'Production Manager', '512;768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5640;5889;5890;5891;8193;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132;775', '0'),
1528 ('6', 'Purchase Officer', 'Purchase Officer', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5377;5633;5635;5640;5640;5889;5890;5891;8193;8194;8196;8197;8449;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132;775', '0'),
1529 ('7', 'AR Officer', 'AR Officer', '512;768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;771;773;774;2818;2819;2820;2821;2822;2823;3073;3073;3074;3075;3076;3077;3078;3079;3080;3081;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5633;5634;5637;5638;5639;5640;5640;5889;5890;5891;8193;8194;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132;775', '0'),
1530 ('8', 'AP Officer', 'AP Officer', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;769;770;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5635;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15876;15877;15880;15882;16129;16130;16131;16132;775', '0'),
1531 ('9', 'Accountant', 'New Accountant', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132;775', '0'),
1532 ('10', 'Sub Admin', 'Sub Admin', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15873;15874;15876;15877;15878;15879;15880;15882;16129;16130;16131;16132;775', '0');
1533
1534 ### Structure of table `0_shippers` ###
1535
1536 DROP TABLE IF EXISTS `0_shippers`;
1537
1538 CREATE TABLE `0_shippers` (
1539   `shipper_id` int(11) NOT NULL AUTO_INCREMENT,
1540   `shipper_name` varchar(60) NOT NULL DEFAULT '',
1541   `phone` varchar(30) NOT NULL DEFAULT '',
1542   `phone2` varchar(30) NOT NULL DEFAULT '',
1543   `contact` tinytext NOT NULL,
1544   `address` tinytext NOT NULL,
1545   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1546   PRIMARY KEY (`shipper_id`),
1547   UNIQUE KEY `name` (`shipper_name`)
1548 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1549
1550 ### Data of table `0_shippers` ###
1551
1552 INSERT INTO `0_shippers` VALUES
1553 ('1', 'Default', '', '', '', '', '0');
1554
1555 ### Structure of table `0_sql_trail` ###
1556
1557 DROP TABLE IF EXISTS `0_sql_trail`;
1558
1559 CREATE TABLE `0_sql_trail` (
1560   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
1561   `sql` text NOT NULL,
1562   `result` tinyint(1) NOT NULL,
1563   `msg` varchar(255) NOT NULL,
1564   PRIMARY KEY (`id`)
1565 ) ENGINE=InnoDB ;
1566
1567 ### Data of table `0_sql_trail` ###
1568
1569
1570 ### Structure of table `0_stock_category` ###
1571
1572 DROP TABLE IF EXISTS `0_stock_category`;
1573
1574 CREATE TABLE `0_stock_category` (
1575   `category_id` int(11) NOT NULL AUTO_INCREMENT,
1576   `description` varchar(60) NOT NULL DEFAULT '',
1577   `dflt_tax_type` int(11) NOT NULL DEFAULT '1',
1578   `dflt_units` varchar(20) NOT NULL DEFAULT 'each',
1579   `dflt_mb_flag` char(1) NOT NULL DEFAULT 'B',
1580   `dflt_sales_act` varchar(15) NOT NULL DEFAULT '',
1581   `dflt_cogs_act` varchar(15) NOT NULL DEFAULT '',
1582   `dflt_inventory_act` varchar(15) NOT NULL DEFAULT '',
1583   `dflt_adjustment_act` varchar(15) NOT NULL DEFAULT '',
1584   `dflt_assembly_act` varchar(15) NOT NULL DEFAULT '',
1585   `dflt_dim1` int(11) DEFAULT NULL,
1586   `dflt_dim2` int(11) DEFAULT NULL,
1587   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1588   `dflt_no_sale` tinyint(1) NOT NULL DEFAULT '0',
1589   `dflt_no_purchase` tinyint(1) NOT NULL DEFAULT '0',
1590   PRIMARY KEY (`category_id`),
1591   UNIQUE KEY `description` (`description`)
1592 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
1593
1594 ### Data of table `0_stock_category` ###
1595
1596 INSERT INTO `0_stock_category` VALUES
1597 ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0'),
1598 ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0'),
1599 ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0'),
1600 ('4', 'Services', '1', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0');
1601
1602 ### Structure of table `0_stock_master` ###
1603
1604 DROP TABLE IF EXISTS `0_stock_master`;
1605
1606 CREATE TABLE `0_stock_master` (
1607   `stock_id` varchar(20) NOT NULL DEFAULT '',
1608   `category_id` int(11) NOT NULL DEFAULT '0',
1609   `tax_type_id` int(11) NOT NULL DEFAULT '0',
1610   `description` varchar(200) NOT NULL DEFAULT '',
1611   `long_description` tinytext NOT NULL,
1612   `units` varchar(20) NOT NULL DEFAULT 'each',
1613   `mb_flag` char(1) NOT NULL DEFAULT 'B',
1614   `sales_account` varchar(15) NOT NULL DEFAULT '',
1615   `cogs_account` varchar(15) NOT NULL DEFAULT '',
1616   `inventory_account` varchar(15) NOT NULL DEFAULT '',
1617   `adjustment_account` varchar(15) NOT NULL DEFAULT '',
1618   `assembly_account` varchar(15) NOT NULL DEFAULT '',
1619   `dimension_id` int(11) DEFAULT NULL,
1620   `dimension2_id` int(11) DEFAULT NULL,
1621   `actual_cost` double NOT NULL DEFAULT '0',
1622   `last_cost` double NOT NULL DEFAULT '0',
1623   `material_cost` double NOT NULL DEFAULT '0',
1624   `labour_cost` double NOT NULL DEFAULT '0',
1625   `overhead_cost` double NOT NULL DEFAULT '0',
1626   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1627   `no_sale` tinyint(1) NOT NULL DEFAULT '0',
1628   `no_purchase` tinyint(1) NOT NULL DEFAULT '0',
1629   `editable` tinyint(1) NOT NULL DEFAULT '0',
1630   PRIMARY KEY (`stock_id`)
1631 ) ENGINE=InnoDB ;
1632
1633 ### Data of table `0_stock_master` ###
1634
1635 INSERT INTO `0_stock_master` VALUES
1636 ('101', '1', '1', 'iPad Air 2 16GB', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '200', '0', '0', '0', '0', '0', '0'),
1637 ('102', '1', '1', 'iPhone 6 64GB', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '150', '0', '0', '0', '0', '0', '0'),
1638 ('103', '1', '1', 'iPhone Cover Case', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '10', '0', '0', '0', '0', '0', '0'),
1639 ('201', '3', '1', 'AP Surf Set', '', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '360', '0', '0', '0', '0', '0', '0'),
1640 ('202', '4', '1', 'Maintenance', '', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1'),
1641 ('301', '4', '1', 'Support', '', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
1642
1643 ### Structure of table `0_stock_moves` ###
1644
1645 DROP TABLE IF EXISTS `0_stock_moves`;
1646
1647 CREATE TABLE `0_stock_moves` (
1648   `trans_id` int(11) NOT NULL AUTO_INCREMENT,
1649   `trans_no` int(11) NOT NULL DEFAULT '0',
1650   `stock_id` char(20) NOT NULL DEFAULT '',
1651   `type` smallint(6) NOT NULL DEFAULT '0',
1652   `loc_code` char(5) NOT NULL DEFAULT '',
1653   `tran_date` date NOT NULL DEFAULT '0000-00-00',
1654   `price` double NOT NULL DEFAULT '0',
1655   `reference` char(40) NOT NULL DEFAULT '',
1656   `qty` double NOT NULL DEFAULT '1',
1657   `standard_cost` double NOT NULL DEFAULT '0',
1658   PRIMARY KEY (`trans_id`),
1659   KEY `type` (`type`,`trans_no`),
1660   KEY `Move` (`stock_id`,`loc_code`,`tran_date`)
1661 ) ENGINE=InnoDB AUTO_INCREMENT=16 ;
1662
1663 ### Data of table `0_stock_moves` ###
1664
1665 INSERT INTO `0_stock_moves` VALUES
1666 ('1', '1', '101', '25', 'DEF', '2015-05-05', '200', '', '100', '200'),
1667 ('2', '1', '102', '25', 'DEF', '2015-05-05', '150', '', '100', '150'),
1668 ('3', '1', '103', '25', 'DEF', '2015-05-05', '10', '', '100', '10'),
1669 ('4', '1', '101', '13', 'DEF', '2015-05-10', '300', 'auto', '-20', '200'),
1670 ('5', '1', '301', '13', 'DEF', '2015-05-10', '80', 'auto', '-3', '0'),
1671 ('6', '1', '101', '26', 'DEF', '2015-05-05', '200', '001/2015', '-2', '200'),
1672 ('7', '1', '102', '26', 'DEF', '2015-05-05', '150', '001/2015', '-2', '150'),
1673 ('8', '1', '103', '26', 'DEF', '2015-05-05', '10', '001/2015', '-2', '10'),
1674 ('9', '1', '301', '26', 'DEF', '2015-05-05', '0', '001/2015', '-2', '0'),
1675 ('10', '1', '201', '26', 'DEF', '2015-05-05', '0', '001/2015', '2', '0'),
1676 ('11', '2', '101', '25', 'DEF', '2015-05-05', '200', '', '15', '200'),
1677 ('12', '2', '101', '13', 'DEF', '2015-05-07', '300', 'auto', '-1', '200'),
1678 ('13', '3', '102', '13', 'DEF', '2015-05-07', '222.62', 'auto', '-1', '150'),
1679 ('14', '3', '103', '13', 'DEF', '2015-05-07', '44.52', 'auto', '-1', '10'),
1680 ('15', '4', '202', '13', 'DEF', '2015-05-07', '0', 'auto', '-5', '0');
1681
1682 ### Structure of table `0_supp_allocations` ###
1683
1684 DROP TABLE IF EXISTS `0_supp_allocations`;
1685
1686 CREATE TABLE `0_supp_allocations` (
1687   `id` int(11) NOT NULL AUTO_INCREMENT,
1688   `person_id` int(11) DEFAULT NULL,
1689   `amt` double unsigned DEFAULT NULL,
1690   `date_alloc` date NOT NULL DEFAULT '0000-00-00',
1691   `trans_no_from` int(11) DEFAULT NULL,
1692   `trans_type_from` int(11) DEFAULT NULL,
1693   `trans_no_to` int(11) DEFAULT NULL,
1694   `trans_type_to` int(11) DEFAULT NULL,
1695   PRIMARY KEY (`id`),
1696   UNIQUE KEY `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
1697   KEY `From` (`trans_type_from`,`trans_no_from`),
1698   KEY `To` (`trans_type_to`,`trans_no_to`)
1699 ) ENGINE=InnoDB ;
1700
1701 ### Data of table `0_supp_allocations` ###
1702
1703
1704 ### Structure of table `0_supp_invoice_items` ###
1705
1706 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1707
1708 CREATE TABLE `0_supp_invoice_items` (
1709   `id` int(11) NOT NULL AUTO_INCREMENT,
1710   `supp_trans_no` int(11) DEFAULT NULL,
1711   `supp_trans_type` int(11) DEFAULT NULL,
1712   `gl_code` varchar(15) NOT NULL DEFAULT '',
1713   `grn_item_id` int(11) DEFAULT NULL,
1714   `po_detail_item_id` int(11) DEFAULT NULL,
1715   `stock_id` varchar(20) NOT NULL DEFAULT '',
1716   `description` tinytext,
1717   `quantity` double NOT NULL DEFAULT '0',
1718   `unit_price` double NOT NULL DEFAULT '0',
1719   `unit_tax` double NOT NULL DEFAULT '0',
1720   `memo_` tinytext,
1721   `dimension_id` int(11) NOT NULL DEFAULT '0',
1722   `dimension2_id` int(11) NOT NULL DEFAULT '0',
1723   PRIMARY KEY (`id`),
1724   KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`)
1725 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1726
1727 ### Data of table `0_supp_invoice_items` ###
1728
1729 INSERT INTO `0_supp_invoice_items` VALUES
1730 ('1', '1', '20', '0', '4', '4', '101', 'iPad Air 2 16GB', '15', '200', '10', NULL, '0', '0');
1731
1732 ### Structure of table `0_supp_trans` ###
1733
1734 DROP TABLE IF EXISTS `0_supp_trans`;
1735
1736 CREATE TABLE `0_supp_trans` (
1737   `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
1738   `type` smallint(6) unsigned NOT NULL DEFAULT '0',
1739   `supplier_id` int(11) unsigned DEFAULT NULL,
1740   `reference` tinytext NOT NULL,
1741   `supp_reference` varchar(60) NOT NULL DEFAULT '',
1742   `tran_date` date NOT NULL DEFAULT '0000-00-00',
1743   `due_date` date NOT NULL DEFAULT '0000-00-00',
1744   `ov_amount` double NOT NULL DEFAULT '0',
1745   `ov_discount` double NOT NULL DEFAULT '0',
1746   `ov_gst` double NOT NULL DEFAULT '0',
1747   `rate` double NOT NULL DEFAULT '1',
1748   `alloc` double NOT NULL DEFAULT '0',
1749   `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1750   PRIMARY KEY (`type`,`trans_no`),
1751   KEY `supplier_id` (`supplier_id`),
1752   KEY `tran_date` (`tran_date`)
1753 ) ENGINE=InnoDB ;
1754
1755 ### Data of table `0_supp_trans` ###
1756
1757 INSERT INTO `0_supp_trans` VALUES
1758 ('1', '20', '1', '001/2015', 'rr4', '2015-05-05', '2015-05-15', '3000', '0', '150', '1', '0', '0');
1759
1760 ### Structure of table `0_suppliers` ###
1761
1762 DROP TABLE IF EXISTS `0_suppliers`;
1763
1764 CREATE TABLE `0_suppliers` (
1765   `supplier_id` int(11) NOT NULL AUTO_INCREMENT,
1766   `supp_name` varchar(60) NOT NULL DEFAULT '',
1767   `supp_ref` varchar(30) NOT NULL DEFAULT '',
1768   `address` tinytext NOT NULL,
1769   `supp_address` tinytext NOT NULL,
1770   `gst_no` varchar(25) NOT NULL DEFAULT '',
1771   `contact` varchar(60) NOT NULL DEFAULT '',
1772   `supp_account_no` varchar(40) NOT NULL DEFAULT '',
1773   `website` varchar(100) NOT NULL DEFAULT '',
1774   `bank_account` varchar(60) NOT NULL DEFAULT '',
1775   `curr_code` char(3) DEFAULT NULL,
1776   `payment_terms` int(11) DEFAULT NULL,
1777   `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1778   `dimension_id` int(11) DEFAULT '0',
1779   `dimension2_id` int(11) DEFAULT '0',
1780   `tax_group_id` int(11) DEFAULT NULL,
1781   `credit_limit` double NOT NULL DEFAULT '0',
1782   `purchase_account` varchar(15) NOT NULL DEFAULT '',
1783   `payable_account` varchar(15) NOT NULL DEFAULT '',
1784   `payment_discount_account` varchar(15) NOT NULL DEFAULT '',
1785   `notes` tinytext NOT NULL,
1786   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1787   PRIMARY KEY (`supplier_id`),
1788   KEY `supp_ref` (`supp_ref`)
1789 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1790
1791 ### Data of table `0_suppliers` ###
1792
1793 INSERT INTO `0_suppliers` VALUES
1794 ('1', 'Dino Saurius Inc.', 'Dino Saurius', 'N/A', '', '987654321', '', '', '', '', 'USD', '3', '0', '0', '0', '1', '0', '', '2100', '5060', '', '0'),
1795 ('2', 'Beefeater Ltd.', 'Beefeater', 'N/A', '', '67565590', '', '', '', '', 'GBP', '4', '0', '0', '0', '1', '0', '', '2100', '5060', '', '0');
1796
1797 ### Structure of table `0_sys_prefs` ###
1798
1799 DROP TABLE IF EXISTS `0_sys_prefs`;
1800
1801 CREATE TABLE `0_sys_prefs` (
1802   `name` varchar(35) NOT NULL DEFAULT '',
1803   `category` varchar(30) DEFAULT NULL,
1804   `type` varchar(20) NOT NULL DEFAULT '',
1805   `length` smallint(6) DEFAULT NULL,
1806   `value` text NOT NULL,
1807   PRIMARY KEY (`name`),
1808   KEY `category` (`category`)
1809 ) ENGINE=InnoDB ;
1810
1811 ### Data of table `0_sys_prefs` ###
1812
1813 INSERT INTO `0_sys_prefs` VALUES
1814 ('accounts_alpha', 'glsetup.general', 'tinyint', '1', '0'),
1815 ('accumulate_shipping', 'glsetup.customer', 'tinyint', '1', '0'),
1816 ('add_pct', 'setup.company', 'int', '5', '-1'),
1817 ('allow_negative_prices', 'glsetup.inventory', 'tinyint', '1', '1'),
1818 ('allow_negative_stock', 'glsetup.inventory', 'tinyint', '1', '0'),
1819 ('alternative_tax_include_on_docs', 'setup.company', 'tinyint', '1', ''),
1820 ('auto_curr_reval', 'setup.company', 'smallint', '6', '1'),
1821 ('bank_charge_act', 'glsetup.general', 'varchar', '15', '5690'),
1822 ('base_sales', 'setup.company', 'int', '11', '1'),
1823 ('bcc_email', 'setup.company', 'varchar', '100', ''),
1824 ('coy_logo', 'setup.company', 'varchar', '100', 'logo_frontaccounting.jpg'),
1825 ('coy_name', 'setup.company', 'varchar', '60', 'Training Co.'),
1826 ('coy_no', 'setup.company', 'varchar', '25', ''),
1827 ('creditors_act', 'glsetup.purchase', 'varchar', '15', '2100'),
1828 ('curr_default', 'setup.company', 'char', '3', 'USD'),
1829 ('debtors_act', 'glsetup.sales', 'varchar', '15', '1200'),
1830 ('default_adj_act', 'glsetup.items', 'varchar', '15', '5040'),
1831 ('default_assembly_act', 'glsetup.items', 'varchar', '15', '1530'),
1832 ('default_cogs_act', 'glsetup.items', 'varchar', '15', '5010'),
1833 ('default_credit_limit', 'glsetup.customer', 'int', '11', '1000'),
1834 ('default_delivery_required', 'glsetup.sales', 'smallint', '6', '1'),
1835 ('default_dim_required', 'glsetup.dims', 'int', '11', '20'),
1836 ('default_inv_sales_act', 'glsetup.items', 'varchar', '15', '4010'),
1837 ('default_inventory_act', 'glsetup.items', 'varchar', '15', '1510'),
1838 ('default_prompt_payment_act', 'glsetup.sales', 'varchar', '15', '4500'),
1839 ('default_quote_valid_days', 'glsetup.sales', 'smallint', '6', '30'),
1840 ('default_receival_required', 'glsetup.purchase', 'smallint', '6', '10'),
1841 ('default_sales_act', 'glsetup.sales', 'varchar', '15', '4010'),
1842 ('default_sales_discount_act', 'glsetup.sales', 'varchar', '15', '4510'),
1843 ('default_workorder_required', 'glsetup.manuf', 'int', '11', '20'),
1844 ('deferred_income_act', 'glsetup.sales', 'varchar', '15', ''),
1845 ('domicile', 'setup.company', 'varchar', '55', ''),
1846 ('email', 'setup.company', 'varchar', '100', 'delta@delta.com'),
1847 ('exchange_diff_act', 'glsetup.general', 'varchar', '15', '4450'),
1848 ('f_year', 'setup.company', 'int', '11', '1'),
1849 ('fax', 'setup.company', 'varchar', '30', ''),
1850 ('freight_act', 'glsetup.customer', 'varchar', '15', '4430'),
1851 ('gl_closing_date', 'setup.closing_date', 'date', '8', ''),
1852 ('grn_clearing_act', 'glsetup.purchase', 'varchar', '15', '1550'),
1853 ('gst_no', 'setup.company', 'varchar', '25', '33445566'),
1854 ('legal_text', 'glsetup.customer', 'tinytext', '0', ''),
1855 ('loc_notification', 'glsetup.inventory', 'tinyint', '1', '0'),
1856 ('login_tout', 'setup.company', 'smallint', '6', '600'),
1857 ('no_customer_list', 'setup.company', 'tinyint', '1', '0'),
1858 ('no_item_list', 'setup.company', 'tinyint', '1', '0'),
1859 ('no_supplier_list', 'setup.company', 'tinyint', '1', '0'),
1860 ('no_zero_lines_amount', 'glsetup.sales', 'tinyint', '1', '1'),
1861 ('past_due_days', 'glsetup.general', 'int', '11', '30'),
1862 ('phone', 'setup.company', 'varchar', '30', ''),
1863 ('po_over_charge', 'glsetup.purchase', 'int', '11', '10'),
1864 ('po_over_receive', 'glsetup.purchase', 'int', '11', '10'),
1865 ('postal_address', 'setup.company', 'tinytext', '0', 'N/A'),
1866 ('print_invoice_no', 'glsetup.sales', 'tinyint', '1', '0'),
1867 ('print_item_images_on_quote', 'glsetup.inventory', 'tinyint', '1', '0'),
1868 ('profit_loss_year_act', 'glsetup.general', 'varchar', '15', '9990'),
1869 ('pyt_discount_act', 'glsetup.purchase', 'varchar', '15', '5060'),
1870 ('retained_earnings_act', 'glsetup.general', 'varchar', '15', '3590'),
1871 ('round_to', 'setup.company', 'int', '5', '1'),
1872 ('show_po_item_codes', 'glsetup.purchase', 'tinyint', '1', '0'),
1873 ('suppress_tax_rates', 'setup.company', 'tinyint', '1', ''),
1874 ('tax_algorithm', 'glsetup.customer', 'tinyint', '1', '1'),
1875 ('tax_last', 'setup.company', 'int', '11', '1'),
1876 ('tax_prd', 'setup.company', 'int', '11', '1'),
1877 ('time_zone', 'setup.company', 'tinyint', '1', '0'),
1878 ('use_dimension', 'setup.company', 'tinyint', '1', '1'),
1879 ('version_id', 'system', 'varchar', '11', '2.4.0');
1880
1881 ### Structure of table `0_sys_types` ###
1882
1883 DROP TABLE IF EXISTS `0_sys_types`;
1884
1885 CREATE TABLE `0_sys_types` (
1886   `type_id` smallint(6) NOT NULL DEFAULT '0',
1887   `type_no` int(11) NOT NULL DEFAULT '1',
1888   `next_reference` varchar(100) NOT NULL DEFAULT '',
1889   PRIMARY KEY (`type_id`)
1890 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
1891
1892 ### Data of table `0_sys_types` ###
1893
1894 INSERT INTO `0_sys_types` VALUES
1895 ('0', '19', '3'),
1896 ('1', '8', '2'),
1897 ('2', '5', '2'),
1898 ('4', '3', '1'),
1899 ('10', '19', '4'),
1900 ('11', '3', '2'),
1901 ('12', '6', '1'),
1902 ('13', '5', '2'),
1903 ('16', '2', '1'),
1904 ('17', '2', '1'),
1905 ('18', '1', '3'),
1906 ('20', '8', '3'),
1907 ('21', '1', '1'),
1908 ('22', '4', '2'),
1909 ('25', '1', '2'),
1910 ('26', '1', '8'),
1911 ('28', '1', '1'),
1912 ('29', '1', '2'),
1913 ('30', '5', '6'),
1914 ('32', '0', '1'),
1915 ('35', '1', '1'),
1916 ('40', '1', '3');
1917
1918 ### Structure of table `0_tag_associations` ###
1919
1920 DROP TABLE IF EXISTS `0_tag_associations`;
1921
1922 CREATE TABLE `0_tag_associations` (
1923   `record_id` varchar(15) NOT NULL,
1924   `tag_id` int(11) NOT NULL,
1925   UNIQUE KEY `record_id` (`record_id`,`tag_id`)
1926 ) ENGINE=InnoDB ;
1927
1928 ### Data of table `0_tag_associations` ###
1929
1930
1931 ### Structure of table `0_tags` ###
1932
1933 DROP TABLE IF EXISTS `0_tags`;
1934
1935 CREATE TABLE `0_tags` (
1936   `id` int(11) NOT NULL AUTO_INCREMENT,
1937   `type` smallint(6) NOT NULL,
1938   `name` varchar(30) NOT NULL,
1939   `description` varchar(60) DEFAULT NULL,
1940   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1941   PRIMARY KEY (`id`),
1942   UNIQUE KEY `type` (`type`,`name`)
1943 ) ENGINE=InnoDB ;
1944
1945 ### Data of table `0_tags` ###
1946
1947
1948 ### Structure of table `0_tax_group_items` ###
1949
1950 DROP TABLE IF EXISTS `0_tax_group_items`;
1951
1952 CREATE TABLE `0_tax_group_items` (
1953   `tax_group_id` int(11) NOT NULL DEFAULT '0',
1954   `tax_type_id` int(11) NOT NULL DEFAULT '0',
1955   `tax_shipping` tinyint(1) NOT NULL DEFAULT '0',
1956   PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1957 ) ENGINE=InnoDB ;
1958
1959 ### Data of table `0_tax_group_items` ###
1960
1961 INSERT INTO `0_tax_group_items` VALUES
1962 ('1', '1', '1');
1963
1964 ### Structure of table `0_tax_groups` ###
1965
1966 DROP TABLE IF EXISTS `0_tax_groups`;
1967
1968 CREATE TABLE `0_tax_groups` (
1969   `id` int(11) NOT NULL AUTO_INCREMENT,
1970   `name` varchar(60) NOT NULL DEFAULT '',
1971   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1972   PRIMARY KEY (`id`),
1973   UNIQUE KEY `name` (`name`)
1974 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1975
1976 ### Data of table `0_tax_groups` ###
1977
1978 INSERT INTO `0_tax_groups` VALUES
1979 ('1', 'Tax', '0'),
1980 ('2', 'Tax Exempt', '0');
1981
1982 ### Structure of table `0_tax_types` ###
1983
1984 DROP TABLE IF EXISTS `0_tax_types`;
1985
1986 CREATE TABLE `0_tax_types` (
1987   `id` int(11) NOT NULL AUTO_INCREMENT,
1988   `rate` double NOT NULL DEFAULT '0',
1989   `sales_gl_code` varchar(15) NOT NULL DEFAULT '',
1990   `purchasing_gl_code` varchar(15) NOT NULL DEFAULT '',
1991   `name` varchar(60) NOT NULL DEFAULT '',
1992   `inactive` tinyint(1) NOT NULL DEFAULT '0',
1993   PRIMARY KEY (`id`)
1994 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1995
1996 ### Data of table `0_tax_types` ###
1997
1998 INSERT INTO `0_tax_types` VALUES
1999 ('1', '5', '2150', '2150', 'Tax', '0');
2000
2001 ### Structure of table `0_trans_tax_details` ###
2002
2003 DROP TABLE IF EXISTS `0_trans_tax_details`;
2004
2005 CREATE TABLE `0_trans_tax_details` (
2006   `id` int(11) NOT NULL AUTO_INCREMENT,
2007   `trans_type` smallint(6) DEFAULT NULL,
2008   `trans_no` int(11) DEFAULT NULL,
2009   `tran_date` date NOT NULL,
2010   `tax_type_id` int(11) NOT NULL DEFAULT '0',
2011   `rate` double NOT NULL DEFAULT '0',
2012   `ex_rate` double NOT NULL DEFAULT '1',
2013   `included_in_price` tinyint(1) NOT NULL DEFAULT '0',
2014   `net_amount` double NOT NULL DEFAULT '0',
2015   `amount` double NOT NULL DEFAULT '0',
2016   `memo` tinytext,
2017   `reg_type` tinyint(1) DEFAULT NULL,
2018   PRIMARY KEY (`id`),
2019   KEY `Type_and_Number` (`trans_type`,`trans_no`),
2020   KEY `tran_date` (`tran_date`)
2021 ) ENGINE=InnoDB AUTO_INCREMENT=8 ;
2022
2023 ### Data of table `0_trans_tax_details` ###
2024
2025 INSERT INTO `0_trans_tax_details` VALUES
2026 ('1', '13', '1', '2015-05-10', '1', '5', '1', '1', '5942.86', '297.14', 'auto', NULL),
2027 ('2', '10', '1', '2015-05-10', '1', '5', '1', '1', '5942.86', '297.14', '001/2015', '0'),
2028 ('3', '20', '1', '2015-05-05', '1', '5', '1', '0', '3000', '150', 'rr4', '1'),
2029 ('4', '13', '2', '2015-05-07', '1', '5', '1', '1', '285.71', '14.29', 'auto', NULL),
2030 ('5', '10', '2', '2015-05-07', '1', '5', '1', '1', '285.71', '14.29', '002/2015', '0'),
2031 ('6', '13', '3', '2015-05-07', '0', '0', '1.123', '1', '267.14', '0', 'auto', NULL),
2032 ('7', '10', '3', '2015-05-07', '0', '0', '1.123', '1', '267.14', '0', '003/2015', '0');
2033
2034 ### Structure of table `0_useronline` ###
2035
2036 DROP TABLE IF EXISTS `0_useronline`;
2037
2038 CREATE TABLE `0_useronline` (
2039   `id` int(11) NOT NULL AUTO_INCREMENT,
2040   `timestamp` int(15) NOT NULL DEFAULT '0',
2041   `ip` varchar(40) NOT NULL DEFAULT '',
2042   `file` varchar(100) NOT NULL DEFAULT '',
2043   PRIMARY KEY (`id`),
2044   KEY `timestamp` (`timestamp`),
2045   KEY `ip` (`ip`)
2046 ) ENGINE=InnoDB ;
2047
2048 ### Data of table `0_useronline` ###
2049
2050
2051 ### Structure of table `0_users` ###
2052
2053 DROP TABLE IF EXISTS `0_users`;
2054
2055 CREATE TABLE `0_users` (
2056   `id` smallint(6) NOT NULL AUTO_INCREMENT,
2057   `user_id` varchar(60) NOT NULL DEFAULT '',
2058   `password` varchar(100) NOT NULL DEFAULT '',
2059   `real_name` varchar(100) NOT NULL DEFAULT '',
2060   `role_id` int(11) NOT NULL DEFAULT '1',
2061   `phone` varchar(30) NOT NULL DEFAULT '',
2062   `email` varchar(100) DEFAULT NULL,
2063   `language` varchar(20) DEFAULT NULL,
2064   `date_format` tinyint(1) NOT NULL DEFAULT '0',
2065   `date_sep` tinyint(1) NOT NULL DEFAULT '0',
2066   `tho_sep` tinyint(1) NOT NULL DEFAULT '0',
2067   `dec_sep` tinyint(1) NOT NULL DEFAULT '0',
2068   `theme` varchar(20) NOT NULL DEFAULT 'default',
2069   `page_size` varchar(20) NOT NULL DEFAULT 'A4',
2070   `prices_dec` smallint(6) NOT NULL DEFAULT '2',
2071   `qty_dec` smallint(6) NOT NULL DEFAULT '2',
2072   `rates_dec` smallint(6) NOT NULL DEFAULT '4',
2073   `percent_dec` smallint(6) NOT NULL DEFAULT '1',
2074   `show_gl` tinyint(1) NOT NULL DEFAULT '1',
2075   `show_codes` tinyint(1) NOT NULL DEFAULT '0',
2076   `show_hints` tinyint(1) NOT NULL DEFAULT '0',
2077   `last_visit_date` datetime DEFAULT NULL,
2078   `query_size` tinyint(1) unsigned NOT NULL DEFAULT '10',
2079   `graphic_links` tinyint(1) DEFAULT '1',
2080   `pos` smallint(6) DEFAULT '1',
2081   `print_profile` varchar(30) NOT NULL DEFAULT '',
2082   `rep_popup` tinyint(1) DEFAULT '1',
2083   `sticky_doc_date` tinyint(1) DEFAULT '0',
2084   `startup_tab` varchar(20) NOT NULL DEFAULT '',
2085   `transaction_days` smallint(6) NOT NULL DEFAULT '30',
2086   `save_report_selections` smallint(6) NOT NULL DEFAULT '0',
2087   `use_date_picker` tinyint(1) NOT NULL DEFAULT '1',
2088   `def_print_destination` tinyint(1) NOT NULL DEFAULT '0',
2089   `def_print_orientation` tinyint(1) NOT NULL DEFAULT '0',
2090   `inactive` tinyint(1) NOT NULL DEFAULT '0',
2091   PRIMARY KEY (`id`),
2092   UNIQUE KEY `user_id` (`user_id`)
2093 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2094
2095 ### Data of table `0_users` ###
2096
2097 INSERT INTO `0_users` VALUES
2098 ('1', 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', '2', '', 'adm@example.com', 'C', '0', '0', '0', '0', 'default', 'Letter', '2', '2', '4', '1', '1', '0', '0', '2015-05-07 13:58:33', '10', '1', '1', '1', '1', '0', 'orders', '30', '0', '1', '0', '0', '0');
2099
2100 ### Structure of table `0_voided` ###
2101
2102 DROP TABLE IF EXISTS `0_voided`;
2103
2104 CREATE TABLE `0_voided` (
2105   `type` int(11) NOT NULL DEFAULT '0',
2106   `id` int(11) NOT NULL DEFAULT '0',
2107   `date_` date NOT NULL DEFAULT '0000-00-00',
2108   `memo_` tinytext NOT NULL,
2109   UNIQUE KEY `id` (`type`,`id`)
2110 ) ENGINE=InnoDB ;
2111
2112 ### Data of table `0_voided` ###
2113
2114
2115 ### Structure of table `0_wo_costing` ###
2116
2117 DROP TABLE IF EXISTS `0_wo_costing`;
2118
2119 CREATE TABLE `0_wo_costing` (
2120   `id` int(11) NOT NULL AUTO_INCREMENT,
2121   `workorder_id` int(11) NOT NULL DEFAULT '0',
2122   `cost_type` tinyint(1) NOT NULL DEFAULT '0',
2123   `trans_type` int(11) NOT NULL DEFAULT '0',
2124   `trans_no` int(11) NOT NULL DEFAULT '0',
2125   `factor` double NOT NULL DEFAULT '1',
2126   PRIMARY KEY (`id`)
2127 ) ENGINE=InnoDB ;
2128
2129 ### Data of table `0_wo_costing` ###
2130
2131
2132 ### Structure of table `0_wo_issue_items` ###
2133
2134 DROP TABLE IF EXISTS `0_wo_issue_items`;
2135
2136 CREATE TABLE `0_wo_issue_items` (
2137   `id` int(11) NOT NULL AUTO_INCREMENT,
2138   `stock_id` varchar(40) DEFAULT NULL,
2139   `issue_id` int(11) DEFAULT NULL,
2140   `qty_issued` double DEFAULT NULL,
2141   PRIMARY KEY (`id`)
2142 ) ENGINE=InnoDB ;
2143
2144 ### Data of table `0_wo_issue_items` ###
2145
2146
2147 ### Structure of table `0_wo_issues` ###
2148
2149 DROP TABLE IF EXISTS `0_wo_issues`;
2150
2151 CREATE TABLE `0_wo_issues` (
2152   `issue_no` int(11) NOT NULL AUTO_INCREMENT,
2153   `workorder_id` int(11) NOT NULL DEFAULT '0',
2154   `reference` varchar(100) DEFAULT NULL,
2155   `issue_date` date DEFAULT NULL,
2156   `loc_code` varchar(5) DEFAULT NULL,
2157   `workcentre_id` int(11) DEFAULT NULL,
2158   PRIMARY KEY (`issue_no`),
2159   KEY `workorder_id` (`workorder_id`)
2160 ) ENGINE=InnoDB ;
2161
2162 ### Data of table `0_wo_issues` ###
2163
2164
2165 ### Structure of table `0_wo_manufacture` ###
2166
2167 DROP TABLE IF EXISTS `0_wo_manufacture`;
2168
2169 CREATE TABLE `0_wo_manufacture` (
2170   `id` int(11) NOT NULL AUTO_INCREMENT,
2171   `reference` varchar(100) DEFAULT NULL,
2172   `workorder_id` int(11) NOT NULL DEFAULT '0',
2173   `quantity` double NOT NULL DEFAULT '0',
2174   `date_` date NOT NULL DEFAULT '0000-00-00',
2175   PRIMARY KEY (`id`),
2176   KEY `workorder_id` (`workorder_id`)
2177 ) ENGINE=InnoDB ;
2178
2179 ### Data of table `0_wo_manufacture` ###
2180
2181
2182 ### Structure of table `0_wo_requirements` ###
2183
2184 DROP TABLE IF EXISTS `0_wo_requirements`;
2185
2186 CREATE TABLE `0_wo_requirements` (
2187   `id` int(11) NOT NULL AUTO_INCREMENT,
2188   `workorder_id` int(11) NOT NULL DEFAULT '0',
2189   `stock_id` char(20) NOT NULL DEFAULT '',
2190   `workcentre` int(11) NOT NULL DEFAULT '0',
2191   `units_req` double NOT NULL DEFAULT '1',
2192   `std_cost` double NOT NULL DEFAULT '0',
2193   `loc_code` char(5) NOT NULL DEFAULT '',
2194   `units_issued` double NOT NULL DEFAULT '0',
2195   PRIMARY KEY (`id`),
2196   KEY `workorder_id` (`workorder_id`)
2197 ) ENGINE=InnoDB AUTO_INCREMENT=9 ;
2198
2199 ### Data of table `0_wo_requirements` ###
2200
2201 INSERT INTO `0_wo_requirements` VALUES
2202 ('1', '1', '101', '1', '1', '0', 'DEF', '2'),
2203 ('2', '1', '102', '1', '1', '0', 'DEF', '2'),
2204 ('3', '1', '103', '1', '1', '0', 'DEF', '2'),
2205 ('4', '1', '301', '1', '1', '0', 'DEF', '2'),
2206 ('5', '2', '101', '1', '1', '0', 'DEF', '0'),
2207 ('6', '2', '102', '1', '1', '0', 'DEF', '0'),
2208 ('7', '2', '103', '1', '1', '0', 'DEF', '0'),
2209 ('8', '2', '301', '1', '1', '0', 'DEF', '0');
2210
2211 ### Structure of table `0_workcentres` ###
2212
2213 DROP TABLE IF EXISTS `0_workcentres`;
2214
2215 CREATE TABLE `0_workcentres` (
2216   `id` int(11) NOT NULL AUTO_INCREMENT,
2217   `name` char(40) NOT NULL DEFAULT '',
2218   `description` char(50) NOT NULL DEFAULT '',
2219   `inactive` tinyint(1) NOT NULL DEFAULT '0',
2220   PRIMARY KEY (`id`),
2221   UNIQUE KEY `name` (`name`)
2222 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2223
2224 ### Data of table `0_workcentres` ###
2225
2226 INSERT INTO `0_workcentres` VALUES
2227 ('1', 'Work Centre', '', '0');
2228
2229 ### Structure of table `0_workorders` ###
2230
2231 DROP TABLE IF EXISTS `0_workorders`;
2232
2233 CREATE TABLE `0_workorders` (
2234   `id` int(11) NOT NULL AUTO_INCREMENT,
2235   `wo_ref` varchar(60) NOT NULL DEFAULT '',
2236   `loc_code` varchar(5) NOT NULL DEFAULT '',
2237   `units_reqd` double NOT NULL DEFAULT '1',
2238   `stock_id` varchar(20) NOT NULL DEFAULT '',
2239   `date_` date NOT NULL DEFAULT '0000-00-00',
2240   `type` tinyint(4) NOT NULL DEFAULT '0',
2241   `required_by` date NOT NULL DEFAULT '0000-00-00',
2242   `released_date` date NOT NULL DEFAULT '0000-00-00',
2243   `units_issued` double NOT NULL DEFAULT '0',
2244   `closed` tinyint(1) NOT NULL DEFAULT '0',
2245   `released` tinyint(1) NOT NULL DEFAULT '0',
2246   `additional_costs` double NOT NULL DEFAULT '0',
2247   PRIMARY KEY (`id`),
2248   UNIQUE KEY `wo_ref` (`wo_ref`)
2249 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
2250
2251 ### Data of table `0_workorders` ###
2252
2253 INSERT INTO `0_workorders` VALUES
2254 ('1', '001/2015', 'DEF', '2', '201', '2015-05-05', '0', '2015-05-05', '2015-05-05', '2', '1', '1', '0'),
2255 ('2', '002/2015', 'DEF', '5', '201', '2015-05-07', '2', '2015-05-27', '2015-05-07', '0', '0', '1', '0'),
2256 ('3', '003/2015', 'DEF', '5', '201', '2015-05-07', '2', '2015-05-27', '0000-00-00', '0', '0', '0', '0');