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