2 -- version 2.11.8.1deb5
3 -- http://www.phpmyadmin.net
6 -- Generation Time: Sep 26, 2014 at 11:32 AM
7 -- Server version: 5.0.51
8 -- PHP Version: 5.2.6-1+lenny2
14 -- --------------------------------------------------------
17 -- Table structure for table `0_areas`
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 ;
30 -- Dumping data for table `0_areas`
33 INSERT INTO `0_areas` VALUES(1, 'Global', 0);
35 -- --------------------------------------------------------
38 -- Table structure for table `0_attachments`
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 '',
53 KEY `type_no` (`type_no`,`trans_no`)
54 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
57 -- Dumping data for table `0_attachments`
61 -- --------------------------------------------------------
64 -- Table structure for table `0_audit_trail`
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,
79 KEY `Seq` (`fiscal_year`,`gl_date`,`gl_seq`),
80 KEY `Type_and_Number` (`type`,`trans_no`)
81 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
84 -- Dumping data for table `0_audit_trail`
88 -- --------------------------------------------------------
91 -- Table structure for table `0_bank_accounts`
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 `bank_charge_act` varchar(15) NOT NULL default '',
106 `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00',
107 `ending_reconcile_balance` double NOT NULL default '0',
108 `inactive` tinyint(1) NOT NULL default '0',
110 KEY `bank_account_name` (`bank_account_name`),
111 KEY `bank_account_number` (`bank_account_number`),
112 KEY `account_code` (`account_code`)
113 ) ENGINE=MyISAM AUTO_INCREMENT=3 ;
116 -- Dumping data for table `0_bank_accounts`
119 INSERT INTO `0_bank_accounts` VALUES('1060', 0, 'Current account', '9999999999', 'Wachovia Bank', '', 'USD', 1, 1, '5690', '0000-00-00 00:00:00', 0, 0);
120 INSERT INTO `0_bank_accounts` VALUES('1065', 3, 'Petty Cash account', 'N/A', 'N/A', '', 'USD', 0, 2, '5690', '0000-00-00 00:00:00', 0, 0);
122 -- --------------------------------------------------------
125 -- Table structure for table `0_bank_trans`
128 DROP TABLE IF EXISTS `0_bank_trans`;
129 CREATE TABLE IF NOT EXISTS `0_bank_trans` (
130 `id` int(11) NOT NULL auto_increment,
131 `type` smallint(6) default NULL,
132 `trans_no` int(11) default NULL,
133 `bank_act` varchar(15) NOT NULL default '',
134 `ref` varchar(40) default NULL,
135 `trans_date` date NOT NULL default '0000-00-00',
136 `amount` double default NULL,
137 `dimension_id` int(11) NOT NULL default '0',
138 `dimension2_id` int(11) NOT NULL default '0',
139 `person_type_id` int(11) NOT NULL default '0',
140 `person_id` tinyblob,
141 `reconciled` date default NULL,
143 KEY `bank_act` (`bank_act`,`ref`),
144 KEY `type` (`type`,`trans_no`),
145 KEY `bank_act_2` (`bank_act`,`reconciled`),
146 KEY `bank_act_3` (`bank_act`,`trans_date`)
147 ) ENGINE=InnoDB AUTO_INCREMENT=12 ;
150 -- Dumping data for table `0_bank_trans`
153 INSERT INTO `0_bank_trans` VALUES(1, 22, 4, '1', '1', '2014-06-21', -3465, 0, 0, 3, '2', NULL);
154 INSERT INTO `0_bank_trans` VALUES(2, 26, 1, '1', '', '2014-06-21', -10, 0, 0, 1, '1', NULL);
155 INSERT INTO `0_bank_trans` VALUES(3, 26, 1, '1', '', '2014-06-21', -20, 0, 0, 1, '0', NULL);
156 INSERT INTO `0_bank_trans` VALUES(4, 0, 18, '1', '1', '2014-02-20', 1000, 0, 0, 0, '', NULL);
157 INSERT INTO `0_bank_trans` VALUES(5, 0, 19, '1', '2', '2014-02-21', 4000, 0, 0, 0, '', NULL);
158 INSERT INTO `0_bank_trans` VALUES(6, 2, 5, '1', '1', '2014-06-21', 100, 0, 0, 4, '3', NULL);
159 INSERT INTO `0_bank_trans` VALUES(7, 1, 8, '1', '1', '2014-06-21', -50, 0, 0, 4, '1', NULL);
160 INSERT INTO `0_bank_trans` VALUES(8, 26, 5, '1', '', '2014-06-21', -10, 0, 0, 1, '1', NULL);
161 INSERT INTO `0_bank_trans` VALUES(9, 26, 5, '1', '', '2014-06-21', -20, 0, 0, 1, '0', NULL);
162 INSERT INTO `0_bank_trans` VALUES(10, 26, 7, '1', '', '2014-06-21', -10, 0, 0, 1, '1', NULL);
163 INSERT INTO `0_bank_trans` VALUES(11, 26, 7, '1', '', '2014-06-21', -20, 0, 0, 1, '0', NULL);
165 -- --------------------------------------------------------
168 -- Table structure for table `0_bom`
171 DROP TABLE IF EXISTS `0_bom`;
172 CREATE TABLE IF NOT EXISTS `0_bom` (
173 `id` int(11) NOT NULL auto_increment,
174 `parent` char(20) NOT NULL default '',
175 `component` char(20) NOT NULL default '',
176 `workcentre_added` int(11) NOT NULL default '0',
177 `loc_code` char(5) NOT NULL default '',
178 `quantity` double NOT NULL default '1',
179 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
180 KEY `component` (`component`),
182 KEY `loc_code` (`loc_code`),
183 KEY `parent` (`parent`,`loc_code`),
184 KEY `workcentre_added` (`workcentre_added`)
185 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
188 -- Dumping data for table `0_bom`
191 INSERT INTO `0_bom` VALUES(1, '3400', '102', 1, 'DEF', 1);
192 INSERT INTO `0_bom` VALUES(2, '3400', '103', 1, 'DEF', 1);
193 INSERT INTO `0_bom` VALUES(3, '3400', '104', 1, 'DEF', 1);
195 -- --------------------------------------------------------
198 -- Table structure for table `0_budget_trans`
201 DROP TABLE IF EXISTS `0_budget_trans`;
202 CREATE TABLE IF NOT EXISTS `0_budget_trans` (
203 `id` int(11) NOT NULL auto_increment,
204 `tran_date` date NOT NULL default '0000-00-00',
205 `account` varchar(15) NOT NULL default '',
206 `memo_` tinytext NOT NULL,
207 `amount` double NOT NULL default '0',
208 `dimension_id` int(11) default '0',
209 `dimension2_id` int(11) default '0',
211 KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`)
212 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
215 -- Dumping data for table `0_budget_trans`
219 -- --------------------------------------------------------
222 -- Table structure for table `0_chart_class`
225 DROP TABLE IF EXISTS `0_chart_class`;
226 CREATE TABLE IF NOT EXISTS `0_chart_class` (
227 `cid` varchar(3) NOT NULL,
228 `class_name` varchar(60) NOT NULL default '',
229 `ctype` tinyint(1) NOT NULL default '0',
230 `inactive` tinyint(1) NOT NULL default '0',
235 -- Dumping data for table `0_chart_class`
238 INSERT INTO `0_chart_class` VALUES('1', 'Assets', 1, 0);
239 INSERT INTO `0_chart_class` VALUES('2', 'Liabilities', 2, 0);
240 INSERT INTO `0_chart_class` VALUES('3', 'Income', 4, 0);
241 INSERT INTO `0_chart_class` VALUES('4', 'Costs', 6, 0);
243 -- --------------------------------------------------------
246 -- Table structure for table `0_chart_master`
249 DROP TABLE IF EXISTS `0_chart_master`;
250 CREATE TABLE IF NOT EXISTS `0_chart_master` (
251 `account_code` varchar(15) NOT NULL default '',
252 `account_code2` varchar(15) NOT NULL default '',
253 `account_name` varchar(60) NOT NULL default '',
254 `account_type` varchar(10) NOT NULL default '0',
255 `inactive` tinyint(1) NOT NULL default '0',
256 PRIMARY KEY (`account_code`),
257 KEY `account_name` (`account_name`),
258 KEY `accounts_by_type` (`account_type`,`account_code`)
262 -- Dumping data for table `0_chart_master`
265 INSERT INTO `0_chart_master` VALUES('1060', '', 'Checking Account', '1', 0);
266 INSERT INTO `0_chart_master` VALUES('1065', '', 'Petty Cash', '1', 0);
267 INSERT INTO `0_chart_master` VALUES('1200', '', 'Accounts Receivables', '1', 0);
268 INSERT INTO `0_chart_master` VALUES('1205', '', 'Allowance for doubtful accounts', '1', 0);
269 INSERT INTO `0_chart_master` VALUES('1510', '', 'Inventory', '2', 0);
270 INSERT INTO `0_chart_master` VALUES('1520', '', 'Stocks of Raw Materials', '2', 0);
271 INSERT INTO `0_chart_master` VALUES('1530', '', 'Stocks of Work In Progress', '2', 0);
272 INSERT INTO `0_chart_master` VALUES('1540', '', 'Stocks of Finsihed Goods', '2', 0);
273 INSERT INTO `0_chart_master` VALUES('1550', '', 'Goods Received Clearing account', '2', 0);
274 INSERT INTO `0_chart_master` VALUES('1820', '', 'Office Furniture & Equipment', '3', 0);
275 INSERT INTO `0_chart_master` VALUES('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', 0);
276 INSERT INTO `0_chart_master` VALUES('1840', '', 'Vehicle', '3', 0);
277 INSERT INTO `0_chart_master` VALUES('1845', '', 'Accum. Amort. -Vehicle', '3', 0);
278 INSERT INTO `0_chart_master` VALUES('2100', '', 'Accounts Payable', '4', 0);
279 INSERT INTO `0_chart_master` VALUES('2110', '', 'Accrued Income Tax - Federal', '4', 0);
280 INSERT INTO `0_chart_master` VALUES('2120', '', 'Accrued Income Tax - State', '4', 0);
281 INSERT INTO `0_chart_master` VALUES('2130', '', 'Accrued Franchise Tax', '4', 0);
282 INSERT INTO `0_chart_master` VALUES('2140', '', 'Accrued Real & Personal Prop Tax', '4', 0);
283 INSERT INTO `0_chart_master` VALUES('2150', '', 'Sales Tax', '4', 0);
284 INSERT INTO `0_chart_master` VALUES('2160', '', 'Accrued Use Tax Payable', '4', 0);
285 INSERT INTO `0_chart_master` VALUES('2210', '', 'Accrued Wages', '4', 0);
286 INSERT INTO `0_chart_master` VALUES('2220', '', 'Accrued Comp Time', '4', 0);
287 INSERT INTO `0_chart_master` VALUES('2230', '', 'Accrued Holiday Pay', '4', 0);
288 INSERT INTO `0_chart_master` VALUES('2240', '', 'Accrued Vacation Pay', '4', 0);
289 INSERT INTO `0_chart_master` VALUES('2310', '', 'Accr. Benefits - 401K', '4', 0);
290 INSERT INTO `0_chart_master` VALUES('2320', '', 'Accr. Benefits - Stock Purchase', '4', 0);
291 INSERT INTO `0_chart_master` VALUES('2330', '', 'Accr. Benefits - Med, Den', '4', 0);
292 INSERT INTO `0_chart_master` VALUES('2340', '', 'Accr. Benefits - Payroll Taxes', '4', 0);
293 INSERT INTO `0_chart_master` VALUES('2350', '', 'Accr. Benefits - Credit Union', '4', 0);
294 INSERT INTO `0_chart_master` VALUES('2360', '', 'Accr. Benefits - Savings Bond', '4', 0);
295 INSERT INTO `0_chart_master` VALUES('2370', '', 'Accr. Benefits - Garnish', '4', 0);
296 INSERT INTO `0_chart_master` VALUES('2380', '', 'Accr. Benefits - Charity Cont.', '4', 0);
297 INSERT INTO `0_chart_master` VALUES('2620', '', 'Bank Loans', '5', 0);
298 INSERT INTO `0_chart_master` VALUES('2680', '', 'Loans from Shareholders', '5', 0);
299 INSERT INTO `0_chart_master` VALUES('3350', '', 'Common Shares', '6', 0);
300 INSERT INTO `0_chart_master` VALUES('3590', '', 'Retained Earnings - prior years', '7', 0);
301 INSERT INTO `0_chart_master` VALUES('4010', '', 'Sales', '8', 0);
302 INSERT INTO `0_chart_master` VALUES('4430', '', 'Shipping & Handling', '9', 0);
303 INSERT INTO `0_chart_master` VALUES('4440', '', 'Interest', '9', 0);
304 INSERT INTO `0_chart_master` VALUES('4450', '', 'Foreign Exchange Gain', '9', 0);
305 INSERT INTO `0_chart_master` VALUES('4500', '', 'Prompt Payment Discounts', '9', 0);
306 INSERT INTO `0_chart_master` VALUES('4510', '', 'Discounts Given', '9', 0);
307 INSERT INTO `0_chart_master` VALUES('5010', '', 'Cost of Goods Sold - Retail', '10', 0);
308 INSERT INTO `0_chart_master` VALUES('5020', '', 'Material Usage Varaiance', '10', 0);
309 INSERT INTO `0_chart_master` VALUES('5030', '', 'Consumable Materials', '10', 0);
310 INSERT INTO `0_chart_master` VALUES('5040', '', 'Purchase price Variance', '10', 0);
311 INSERT INTO `0_chart_master` VALUES('5050', '', 'Purchases of materials', '10', 0);
312 INSERT INTO `0_chart_master` VALUES('5060', '', 'Discounts Received', '10', 0);
313 INSERT INTO `0_chart_master` VALUES('5100', '', 'Freight', '10', 0);
314 INSERT INTO `0_chart_master` VALUES('5410', '', 'Wages & Salaries', '11', 0);
315 INSERT INTO `0_chart_master` VALUES('5420', '', 'Wages - Overtime', '11', 0);
316 INSERT INTO `0_chart_master` VALUES('5430', '', 'Benefits - Comp Time', '11', 0);
317 INSERT INTO `0_chart_master` VALUES('5440', '', 'Benefits - Payroll Taxes', '11', 0);
318 INSERT INTO `0_chart_master` VALUES('5450', '', 'Benefits - Workers Comp', '11', 0);
319 INSERT INTO `0_chart_master` VALUES('5460', '', 'Benefits - Pension', '11', 0);
320 INSERT INTO `0_chart_master` VALUES('5470', '', 'Benefits - General Benefits', '11', 0);
321 INSERT INTO `0_chart_master` VALUES('5510', '', 'Inc Tax Exp - Federal', '11', 0);
322 INSERT INTO `0_chart_master` VALUES('5520', '', 'Inc Tax Exp - State', '11', 0);
323 INSERT INTO `0_chart_master` VALUES('5530', '', 'Taxes - Real Estate', '11', 0);
324 INSERT INTO `0_chart_master` VALUES('5540', '', 'Taxes - Personal Property', '11', 0);
325 INSERT INTO `0_chart_master` VALUES('5550', '', 'Taxes - Franchise', '11', 0);
326 INSERT INTO `0_chart_master` VALUES('5560', '', 'Taxes - Foreign Withholding', '11', 0);
327 INSERT INTO `0_chart_master` VALUES('5610', '', 'Accounting & Legal', '12', 0);
328 INSERT INTO `0_chart_master` VALUES('5615', '', 'Advertising & Promotions', '12', 0);
329 INSERT INTO `0_chart_master` VALUES('5620', '', 'Bad Debts', '12', 0);
330 INSERT INTO `0_chart_master` VALUES('5660', '', 'Amortization Expense', '12', 0);
331 INSERT INTO `0_chart_master` VALUES('5685', '', 'Insurance', '12', 0);
332 INSERT INTO `0_chart_master` VALUES('5690', '', 'Interest & Bank Charges', '12', 0);
333 INSERT INTO `0_chart_master` VALUES('5700', '', 'Office Supplies', '12', 0);
334 INSERT INTO `0_chart_master` VALUES('5760', '', 'Rent', '12', 0);
335 INSERT INTO `0_chart_master` VALUES('5765', '', 'Repair & Maintenance', '12', 0);
336 INSERT INTO `0_chart_master` VALUES('5780', '', 'Telephone', '12', 0);
337 INSERT INTO `0_chart_master` VALUES('5785', '', 'Travel & Entertainment', '12', 0);
338 INSERT INTO `0_chart_master` VALUES('5790', '', 'Utilities', '12', 0);
339 INSERT INTO `0_chart_master` VALUES('5795', '', 'Registrations', '12', 0);
340 INSERT INTO `0_chart_master` VALUES('5800', '', 'Licenses', '12', 0);
341 INSERT INTO `0_chart_master` VALUES('5810', '', 'Foreign Exchange Loss', '12', 0);
342 INSERT INTO `0_chart_master` VALUES('9990', '', 'Year Profit/Loss', '12', 0);
344 -- --------------------------------------------------------
347 -- Table structure for table `0_chart_types`
350 DROP TABLE IF EXISTS `0_chart_types`;
351 CREATE TABLE IF NOT EXISTS `0_chart_types` (
352 `id` varchar(10) NOT NULL,
353 `name` varchar(60) NOT NULL default '',
354 `class_id` varchar(3) NOT NULL default '',
355 `parent` varchar(10) NOT NULL default '-1',
356 `inactive` tinyint(1) NOT NULL default '0',
359 KEY `class_id` (`class_id`)
363 -- Dumping data for table `0_chart_types`
366 INSERT INTO `0_chart_types` VALUES('1', 'Current Assets', '1', '', 0);
367 INSERT INTO `0_chart_types` VALUES('2', 'Inventory Assets', '1', '', 0);
368 INSERT INTO `0_chart_types` VALUES('3', 'Capital Assets', '1', '', 0);
369 INSERT INTO `0_chart_types` VALUES('4', 'Current Liabilities', '2', '', 0);
370 INSERT INTO `0_chart_types` VALUES('5', 'Long Term Liabilities', '2', '', 0);
371 INSERT INTO `0_chart_types` VALUES('6', 'Share Capital', '2', '', 0);
372 INSERT INTO `0_chart_types` VALUES('7', 'Retained Earnings', '2', '', 0);
373 INSERT INTO `0_chart_types` VALUES('8', 'Sales Revenue', '3', '', 0);
374 INSERT INTO `0_chart_types` VALUES('9', 'Other Revenue', '3', '', 0);
375 INSERT INTO `0_chart_types` VALUES('10', 'Cost of Goods Sold', '4', '', 0);
376 INSERT INTO `0_chart_types` VALUES('11', 'Payroll Expenses', '4', '', 0);
377 INSERT INTO `0_chart_types` VALUES('12', 'General & Administrative expenses', '4', '', 0);
379 -- --------------------------------------------------------
382 -- Table structure for table `0_comments`
385 DROP TABLE IF EXISTS `0_comments`;
386 CREATE TABLE IF NOT EXISTS `0_comments` (
387 `type` int(11) NOT NULL default '0',
388 `id` int(11) NOT NULL default '0',
389 `date_` date default '0000-00-00',
391 KEY `type_and_id` (`type`,`id`)
395 -- Dumping data for table `0_comments`
399 -- --------------------------------------------------------
402 -- Table structure for table `0_credit_status`
405 DROP TABLE IF EXISTS `0_credit_status`;
406 CREATE TABLE IF NOT EXISTS `0_credit_status` (
407 `id` int(11) NOT NULL auto_increment,
408 `reason_description` char(100) NOT NULL default '',
409 `dissallow_invoices` tinyint(1) NOT NULL default '0',
410 `inactive` tinyint(1) NOT NULL default '0',
412 UNIQUE KEY `reason_description` (`reason_description`)
413 ) ENGINE=MyISAM AUTO_INCREMENT=5 ;
416 -- Dumping data for table `0_credit_status`
419 INSERT INTO `0_credit_status` VALUES(1, 'Good History', 0, 0);
420 INSERT INTO `0_credit_status` VALUES(3, 'No more work until payment received', 1, 0);
421 INSERT INTO `0_credit_status` VALUES(4, 'In liquidation', 1, 0);
423 -- --------------------------------------------------------
426 -- Table structure for table `0_crm_categories`
429 DROP TABLE IF EXISTS `0_crm_categories`;
430 CREATE TABLE IF NOT EXISTS `0_crm_categories` (
431 `id` int(11) NOT NULL auto_increment COMMENT 'pure technical key',
432 `type` varchar(20) NOT NULL COMMENT 'contact type e.g. customer',
433 `action` varchar(20) NOT NULL COMMENT 'detailed usage e.g. department',
434 `name` varchar(30) NOT NULL COMMENT 'for category selector',
435 `description` tinytext NOT NULL COMMENT 'usage description',
436 `system` tinyint(1) NOT NULL default '0' COMMENT 'nonzero for core system usage',
437 `inactive` tinyint(1) NOT NULL default '0',
439 UNIQUE KEY `type` (`type`,`action`),
440 UNIQUE KEY `type_2` (`type`,`name`)
441 ) ENGINE=InnoDB AUTO_INCREMENT=13 ;
444 -- Dumping data for table `0_crm_categories`
447 INSERT INTO `0_crm_categories` VALUES(1, 'cust_branch', 'general', 'General', 'General contact data for customer branch (overrides company setting)', 1, 0);
448 INSERT INTO `0_crm_categories` VALUES(2, 'cust_branch', 'invoice', 'Invoices', 'Invoice posting (overrides company setting)', 1, 0);
449 INSERT INTO `0_crm_categories` VALUES(3, 'cust_branch', 'order', 'Orders', 'Order confirmation (overrides company setting)', 1, 0);
450 INSERT INTO `0_crm_categories` VALUES(4, 'cust_branch', 'delivery', 'Deliveries', 'Delivery coordination (overrides company setting)', 1, 0);
451 INSERT INTO `0_crm_categories` VALUES(5, 'customer', 'general', 'General', 'General contact data for customer', 1, 0);
452 INSERT INTO `0_crm_categories` VALUES(6, 'customer', 'order', 'Orders', 'Order confirmation', 1, 0);
453 INSERT INTO `0_crm_categories` VALUES(7, 'customer', 'delivery', 'Deliveries', 'Delivery coordination', 1, 0);
454 INSERT INTO `0_crm_categories` VALUES(8, 'customer', 'invoice', 'Invoices', 'Invoice posting', 1, 0);
455 INSERT INTO `0_crm_categories` VALUES(9, 'supplier', 'general', 'General', 'General contact data for supplier', 1, 0);
456 INSERT INTO `0_crm_categories` VALUES(10, 'supplier', 'order', 'Orders', 'Order confirmation', 1, 0);
457 INSERT INTO `0_crm_categories` VALUES(11, 'supplier', 'delivery', 'Deliveries', 'Delivery coordination', 1, 0);
458 INSERT INTO `0_crm_categories` VALUES(12, 'supplier', 'invoice', 'Invoices', 'Invoice posting', 1, 0);
460 -- --------------------------------------------------------
463 -- Table structure for table `0_crm_contacts`
466 DROP TABLE IF EXISTS `0_crm_contacts`;
467 CREATE TABLE IF NOT EXISTS `0_crm_contacts` (
468 `id` int(11) NOT NULL auto_increment,
469 `person_id` int(11) NOT NULL default '0' COMMENT 'foreign key to crm_contacts',
470 `type` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
471 `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
472 `entity_id` varchar(11) default NULL COMMENT 'entity id in related class table',
474 KEY `type` (`type`,`action`)
475 ) ENGINE=InnoDB AUTO_INCREMENT=10 ;
478 -- Dumping data for table `0_crm_contacts`
481 INSERT INTO `0_crm_contacts` VALUES(1, 1, 'customer', 'general', '1');
482 INSERT INTO `0_crm_contacts` VALUES(2, 2, 'customer', 'general', '2');
483 INSERT INTO `0_crm_contacts` VALUES(3, 3, 'customer', 'general', '3');
484 INSERT INTO `0_crm_contacts` VALUES(4, 4, 'cust_branch', 'general', '1');
485 INSERT INTO `0_crm_contacts` VALUES(5, 5, 'cust_branch', 'general', '2');
486 INSERT INTO `0_crm_contacts` VALUES(6, 6, 'cust_branch', 'general', '3');
487 INSERT INTO `0_crm_contacts` VALUES(7, 7, 'supplier', 'general', '1');
488 INSERT INTO `0_crm_contacts` VALUES(8, 8, 'supplier', 'general', '2');
489 INSERT INTO `0_crm_contacts` VALUES(9, 9, 'supplier', 'general', '3');
491 -- --------------------------------------------------------
494 -- Table structure for table `0_crm_persons`
497 DROP TABLE IF EXISTS `0_crm_persons`;
498 CREATE TABLE IF NOT EXISTS `0_crm_persons` (
499 `id` int(11) NOT NULL auto_increment,
500 `ref` varchar(30) NOT NULL,
501 `name` varchar(60) NOT NULL,
502 `name2` varchar(60) default NULL,
504 `phone` varchar(30) default NULL,
505 `phone2` varchar(30) default NULL,
506 `fax` varchar(30) default NULL,
507 `email` varchar(100) default NULL,
508 `lang` char(5) default NULL,
509 `notes` tinytext NOT NULL,
510 `inactive` tinyint(1) NOT NULL default '0',
513 ) ENGINE=InnoDB AUTO_INCREMENT=10 ;
516 -- Dumping data for table `0_crm_persons`
519 INSERT INTO `0_crm_persons` VALUES(1, 'Beefeater', '', NULL, NULL, NULL, NULL, NULL, '', '', '', 0);
520 INSERT INTO `0_crm_persons` VALUES(2, 'Ghostbusters', '', NULL, NULL, NULL, NULL, NULL, '', NULL, '', 0);
521 INSERT INTO `0_crm_persons` VALUES(3, 'Brezan', '', NULL, NULL, NULL, NULL, NULL, '', '', '', 0);
522 INSERT INTO `0_crm_persons` VALUES(4, 'Beefeater', 'Main Branch', NULL, '', '', '', '', '', NULL, '', 0);
523 INSERT INTO `0_crm_persons` VALUES(5, 'Ghostbusters', 'Main Branch', NULL, 'Address 1\nAddress 2\nAddress 3', '', '', '', '', NULL, '', 0);
524 INSERT INTO `0_crm_persons` VALUES(6, 'Brezan', 'Main Branch', NULL, 'Address 1\nAddress 2\nAddress 3', '', '', '', '', NULL, '', 0);
525 INSERT INTO `0_crm_persons` VALUES(7, 'Junk Beer', 'Contact', NULL, 'Address 1\nAddress 2\nAddress 3', '+45 55667788', '', '', '', '', '', 0);
526 INSERT INTO `0_crm_persons` VALUES(8, 'Lucky Luke', 'Luke', NULL, 'Address 1\nAddress 2\nAddress 3', '(111) 222.333.444', '', '', '', NULL, '', 0);
527 INSERT INTO `0_crm_persons` VALUES(9, 'Money Makers', 'Makers', NULL, 'Address 1\nAddress 2\nAddress 3', '+44 444 555 666', '', '', '', '', '', 0);
529 -- --------------------------------------------------------
532 -- Table structure for table `0_currencies`
535 DROP TABLE IF EXISTS `0_currencies`;
536 CREATE TABLE IF NOT EXISTS `0_currencies` (
537 `currency` varchar(60) NOT NULL default '',
538 `curr_abrev` char(3) NOT NULL default '',
539 `curr_symbol` varchar(10) NOT NULL default '',
540 `country` varchar(100) NOT NULL default '',
541 `hundreds_name` varchar(15) NOT NULL default '',
542 `auto_update` tinyint(1) NOT NULL default '1',
543 `inactive` tinyint(1) NOT NULL default '0',
544 PRIMARY KEY (`curr_abrev`)
548 -- Dumping data for table `0_currencies`
551 INSERT INTO `0_currencies` VALUES('US Dollars', 'USD', '$', 'United States', 'Cents', 1, 0);
552 INSERT INTO `0_currencies` VALUES('CA Dollars', 'CAD', '$', 'Canada', 'Cents', 1, 0);
553 INSERT INTO `0_currencies` VALUES('Euro', 'EUR', '?', 'Europe', 'Cents', 1, 0);
554 INSERT INTO `0_currencies` VALUES('Pounds', 'GBP', '?', 'England', 'Pence', 1, 0);
555 INSERT INTO `0_currencies` VALUES('DK Kroner', 'DKK', 'kr', 'Denmark', 'Ore', 1, 0);
557 -- --------------------------------------------------------
560 -- Table structure for table `0_cust_allocations`
563 DROP TABLE IF EXISTS `0_cust_allocations`;
564 CREATE TABLE IF NOT EXISTS `0_cust_allocations` (
565 `id` int(11) NOT NULL auto_increment,
566 `amt` double unsigned default NULL,
567 `date_alloc` date NOT NULL default '0000-00-00',
568 `trans_no_from` int(11) default NULL,
569 `trans_type_from` int(11) default NULL,
570 `trans_no_to` int(11) default NULL,
571 `trans_type_to` int(11) default NULL,
573 UNIQUE KEY (`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
574 KEY `From` (`trans_type_from`,`trans_no_from`),
575 KEY `To` (`trans_type_to`,`trans_no_to`)
576 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
579 -- Dumping data for table `0_cust_allocations`
582 INSERT INTO `0_cust_allocations` VALUES(1, 37.68, '2014-06-21', 3, 11, 18, 10);
584 -- --------------------------------------------------------
587 -- Table structure for table `0_cust_branch`
590 DROP TABLE IF EXISTS `0_cust_branch`;
591 CREATE TABLE IF NOT EXISTS `0_cust_branch` (
592 `branch_code` int(11) NOT NULL auto_increment,
593 `debtor_no` int(11) NOT NULL default '0',
594 `br_name` varchar(60) NOT NULL default '',
595 `branch_ref` varchar(30) NOT NULL default '',
596 `br_address` tinytext NOT NULL,
597 `area` int(11) default NULL,
598 `salesman` int(11) NOT NULL default '0',
599 `contact_name` varchar(60) NOT NULL default '',
600 `default_location` varchar(5) NOT NULL default '',
601 `tax_group_id` int(11) default NULL,
602 `sales_account` varchar(15) NOT NULL default '',
603 `sales_discount_account` varchar(15) NOT NULL default '',
604 `receivables_account` varchar(15) NOT NULL default '',
605 `payment_discount_account` varchar(15) NOT NULL default '',
606 `default_ship_via` int(11) NOT NULL default '1',
607 `disable_trans` tinyint(4) NOT NULL default '0',
608 `br_post_address` tinytext NOT NULL,
609 `group_no` int(11) NOT NULL default '0',
610 `notes` tinytext NOT NULL,
611 `bank_account` varchar(60) DEFAULT NULL,
612 `inactive` tinyint(1) NOT NULL default '0',
613 PRIMARY KEY (`branch_code`,`debtor_no`),
614 KEY `branch_code` (`branch_code`),
615 KEY `branch_ref` (`branch_ref`),
616 KEY `group_no` (`group_no`)
617 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
620 -- Dumping data for table `0_cust_branch`
623 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);
624 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);
625 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);
627 -- --------------------------------------------------------
630 -- Table structure for table `0_debtors_master`
633 DROP TABLE IF EXISTS `0_debtors_master`;
634 CREATE TABLE IF NOT EXISTS `0_debtors_master` (
635 `debtor_no` int(11) NOT NULL auto_increment,
636 `name` varchar(100) NOT NULL default '',
637 `debtor_ref` varchar(30) NOT NULL,
639 `tax_id` varchar(55) NOT NULL default '',
640 `curr_code` char(3) NOT NULL default '',
641 `sales_type` int(11) NOT NULL default '1',
642 `dimension_id` int(11) NOT NULL default '0',
643 `dimension2_id` int(11) NOT NULL default '0',
644 `credit_status` int(11) NOT NULL default '0',
645 `payment_terms` int(11) default NULL,
646 `discount` double NOT NULL default '0',
647 `pymt_discount` double NOT NULL default '0',
648 `credit_limit` float NOT NULL default '1000',
649 `notes` tinytext NOT NULL,
650 `inactive` tinyint(1) NOT NULL default '0',
651 PRIMARY KEY (`debtor_no`),
653 UNIQUE KEY `debtor_ref` (`debtor_ref`)
654 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
657 -- Dumping data for table `0_debtors_master`
660 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);
661 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);
662 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);
664 -- --------------------------------------------------------
667 -- Table structure for table `0_debtor_trans`
670 DROP TABLE IF EXISTS `0_debtor_trans`;
671 CREATE TABLE IF NOT EXISTS `0_debtor_trans` (
672 `trans_no` int(11) unsigned NOT NULL default '0',
673 `type` smallint(6) unsigned NOT NULL default '0',
674 `version` tinyint(1) unsigned NOT NULL default '0',
675 `debtor_no` int(11) unsigned default NULL,
676 `branch_code` int(11) NOT NULL default '-1',
677 `tran_date` date NOT NULL default '0000-00-00',
678 `due_date` date NOT NULL default '0000-00-00',
679 `reference` varchar(60) NOT NULL default '',
680 `tpe` int(11) NOT NULL default '0',
681 `order_` int(11) NOT NULL default '0',
682 `ov_amount` double NOT NULL default '0',
683 `ov_gst` double NOT NULL default '0',
684 `ov_freight` double NOT NULL default '0',
685 `ov_freight_tax` double NOT NULL default '0',
686 `ov_discount` double NOT NULL default '0',
687 `alloc` double NOT NULL default '0',
688 `prep_amount` double NOT NULL DEFAULT '0',
689 `rate` double NOT NULL default '1',
690 `ship_via` int(11) default NULL,
691 `dimension_id` int(11) NOT NULL default '0',
692 `dimension2_id` int(11) NOT NULL default '0',
693 `payment_terms` int(11) default NULL,
694 `tax_included` tinyint(1) unsigned NOT NULL default '0',
695 PRIMARY KEY (`type`,`trans_no`),
696 KEY `debtor_no` (`debtor_no`,`branch_code`),
697 KEY `tran_date` (`tran_date`),
698 KEY `order_` (`order_`)
702 -- Dumping data for table `0_debtor_trans`
705 INSERT INTO `0_debtor_trans` VALUES(17, 10, 0, 2, 2, '2014-06-21', '2014-06-22', '1', 1, 2, 50, 2.5, 0, 0, 0, 0, 0, 1, 1, 0, 0, 4, 0);
706 INSERT INTO `0_debtor_trans` VALUES(18, 10, 1, 3, 3, '2014-06-21', '2014-07-01', '2', 2, 3, 35.89, 1.79, 0, 0, 0, 37.68, 0, 1.3932, 1, 2, 0, 3, 0);
707 INSERT INTO `0_debtor_trans` VALUES(19, 10, 0, 2, 2, '2014-06-21', '2014-06-22', '3', 1, 5, 50, 0, 5, 0, 0, 0, 0, 1, 1, 0, 0, 4, 0);
708 INSERT INTO `0_debtor_trans` VALUES(3, 11, 0, 3, 3, '2014-06-21', '0000-00-00', '1', 2, 3, 35.89, 1.79, 0, 0, 0, 37.68, 0, 1.3932, 1, 2, 0, 3, 0);
709 INSERT INTO `0_debtor_trans` VALUES(2, 13, 0, 1, 1, '2014-06-21', '2014-06-22', '1', 2, 1, 60.8, 0, 10, 0, 0, 0, 0, 1.6445729799917, 1, 0, 0, 3, 0);
710 INSERT INTO `0_debtor_trans` VALUES(3, 13, 1, 2, 2, '2014-06-21', '2014-06-22', 'auto', 1, 2, 50, 2.5, 0, 0, 0, 0, 0, 1, 1, 0, 0, 4, 0);
711 INSERT INTO `0_debtor_trans` VALUES(4, 13, 1, 3, 3, '2014-06-21', '2014-07-01', 'auto', 2, 3, 35.89, 1.79, 0, 0, 0, 0, 0, 1.3932, 1, 2, 0, 3, 0);
712 INSERT INTO `0_debtor_trans` VALUES(5, 13, 1, 2, 2, '2014-06-21', '2014-06-22', 'auto', 1, 5, 50, 0, 5, 0, 0, 0, 0, 1, 1, 0, 0, 4, 0);
714 -- --------------------------------------------------------
717 -- Table structure for table `0_debtor_trans_details`
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,
735 KEY `Transaction` (`debtor_trans_type`,`debtor_trans_no`),
737 ) ENGINE=InnoDB AUTO_INCREMENT=9 ;
740 -- Dumping data for table `0_debtor_trans_details`
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);
752 -- --------------------------------------------------------
755 -- Table structure for table `0_dimensions`
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',
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 ;
775 -- Dumping data for table `0_dimensions`
778 INSERT INTO `0_dimensions` VALUES(1, '1', 'Support', 1, 0, '2014-06-21', '2020-07-11');
779 INSERT INTO `0_dimensions` VALUES(2, '2', 'Development', 1, 0, '2014-06-21', '2020-07-11');
781 -- --------------------------------------------------------
784 -- Table structure for table `0_exchange_rates`
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',
795 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
796 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
799 -- Dumping data for table `0_exchange_rates`
802 INSERT INTO `0_exchange_rates` VALUES(1, 'DKK', 0.18717252868313, 0.18717252868313, '2014-06-21');
803 INSERT INTO `0_exchange_rates` VALUES(2, 'GBP', 1.6445729799917, 1.6445729799917, '2014-06-21');
804 INSERT INTO `0_exchange_rates` VALUES(3, 'EUR', 1.3932, 1.3932, '2014-06-21');
806 -- --------------------------------------------------------
809 -- Table structure for table `0_fiscal_year`
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',
819 UNIQUE KEY `begin` (`begin`),
820 UNIQUE KEY `end` (`end`)
821 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
824 -- Dumping data for table `0_fiscal_year`
827 INSERT INTO `0_fiscal_year` VALUES(1, '2013-01-01', '2013-12-31', 0);
828 INSERT INTO `0_fiscal_year` VALUES(2, '2014-01-01', '2014-12-31', 0);
831 -- Table structure for table `0_gl_trans`
834 DROP TABLE IF EXISTS `0_gl_trans`;
835 CREATE TABLE IF NOT EXISTS `0_gl_trans` (
836 `counter` int(11) NOT NULL auto_increment,
837 `type` smallint(6) NOT NULL default '0',
838 `type_no` bigint(16) NOT NULL default '1',
839 `tran_date` date NOT NULL default '0000-00-00',
840 `account` varchar(15) NOT NULL default '',
841 `memo_` tinytext NOT NULL,
842 `amount` double NOT NULL default '0',
843 `dimension_id` int(11) NOT NULL default '0',
844 `dimension2_id` int(11) NOT NULL default '0',
845 `person_type_id` int(11) default NULL,
846 `person_id` tinyblob,
847 PRIMARY KEY (`counter`),
848 KEY `Type_and_Number` (`type`,`type_no`),
849 KEY `dimension_id` (`dimension_id`),
850 KEY `dimension2_id` (`dimension2_id`),
851 KEY `tran_date` (`tran_date`),
852 KEY `account_and_tran_date` (`account`,`tran_date`)
853 ) ENGINE=InnoDB AUTO_INCREMENT=84 ;
856 -- Dumping data for table `0_gl_trans`
859 INSERT INTO `0_gl_trans` VALUES(1, 20, 7, '2014-06-21', '2100', '', -3465, 0, 0, 3, '2');
860 INSERT INTO `0_gl_trans` VALUES(2, 20, 7, '2014-06-21', '1510', '', 1000, 0, 0, 3, '2');
861 INSERT INTO `0_gl_trans` VALUES(3, 20, 7, '2014-06-21', '1510', '', 1100, 0, 0, 3, '2');
862 INSERT INTO `0_gl_trans` VALUES(4, 20, 7, '2014-06-21', '1510', '', 1200, 0, 0, 3, '2');
863 INSERT INTO `0_gl_trans` VALUES(5, 20, 7, '2014-06-21', '2150', '', 165, 0, 0, 3, '2');
864 INSERT INTO `0_gl_trans` VALUES(6, 22, 4, '2014-06-21', '2100', '', 3465, 0, 0, 3, '2');
865 INSERT INTO `0_gl_trans` VALUES(7, 22, 4, '2014-06-21', '1060', '', -3465, 0, 0, 3, '2');
866 INSERT INTO `0_gl_trans` VALUES(8, 26, 1, '2014-06-21', '1510', '', -100, 0, 0, NULL, '');
867 INSERT INTO `0_gl_trans` VALUES(9, 26, 1, '2014-06-21', '1510', '', -110, 0, 0, NULL, '');
868 INSERT INTO `0_gl_trans` VALUES(10, 26, 1, '2014-06-21', '1510', '', -120, 0, 0, NULL, '');
869 INSERT INTO `0_gl_trans` VALUES(11, 26, 1, '2014-06-21', '1060', 'Overhead Cost', -10, 0, 0, 1, '1');
870 INSERT INTO `0_gl_trans` VALUES(12, 26, 1, '2014-06-21', '1530', 'Overhead Cost', 10, 0, 0, 1, '1');
871 INSERT INTO `0_gl_trans` VALUES(13, 26, 1, '2014-06-21', '1060', 'Labour Cost', -20, 0, 0, 1, '0');
872 INSERT INTO `0_gl_trans` VALUES(14, 26, 1, '2014-06-21', '1530', 'Labour Cost', 20, 0, 0, 1, '0');
873 INSERT INTO `0_gl_trans` VALUES(15, 26, 1, '2014-06-21', '1510', '', 330, 0, 0, NULL, '');
874 INSERT INTO `0_gl_trans` VALUES(16, 13, 2, '2014-06-21', '5010', '', 20, 0, 0, 2, '1');
875 INSERT INTO `0_gl_trans` VALUES(17, 13, 2, '2014-06-21', '1510', '', -20, 0, 0, 2, '1');
876 INSERT INTO `0_gl_trans` VALUES(18, 13, 3, '2014-06-21', '5010', '', 10, 0, 0, 2, '2');
877 INSERT INTO `0_gl_trans` VALUES(19, 13, 3, '2014-06-21', '1510', '', -10, 0, 0, 2, '2');
878 INSERT INTO `0_gl_trans` VALUES(20, 10, 17, '2014-06-21', '4010', '', -50, 0, 0, 2, '2');
879 INSERT INTO `0_gl_trans` VALUES(21, 10, 17, '2014-06-21', '1200', '', 52.5, 0, 0, 2, '2');
880 INSERT INTO `0_gl_trans` VALUES(22, 10, 17, '2014-06-21', '2150', '', -2.5, 0, 0, 2, '2');
881 INSERT INTO `0_gl_trans` VALUES(23, 13, 4, '2014-06-21', '5010', '', 10, 2, 0, 2, '3');
882 INSERT INTO `0_gl_trans` VALUES(24, 13, 4, '2014-06-21', '1510', '', -10, 0, 0, 2, '3');
883 INSERT INTO `0_gl_trans` VALUES(25, 10, 18, '2014-06-21', '4010', '', -50, 2, 0, 2, '3');
884 INSERT INTO `0_gl_trans` VALUES(26, 10, 18, '2014-06-21', '1200', '', 52.5, 0, 0, 2, '3');
885 INSERT INTO `0_gl_trans` VALUES(27, 10, 18, '2014-06-21', '2150', '', -2.5, 0, 0, 2, '3');
886 INSERT INTO `0_gl_trans` VALUES(28, 0, 18, '2014-02-20', '1060', '', 1000, 0, 0, NULL, '');
887 INSERT INTO `0_gl_trans` VALUES(29, 0, 18, '2014-02-20', '3350', '', -1000, 0, 0, NULL, '');
888 INSERT INTO `0_gl_trans` VALUES(30, 0, 19, '2014-02-21', '1060', '', 4000, 0, 0, NULL, '');
889 INSERT INTO `0_gl_trans` VALUES(31, 0, 19, '2014-02-21', '3350', '', -4000, 0, 0, NULL, '');
890 INSERT INTO `0_gl_trans` VALUES(32, 26, 3, '2014-06-21', '1510', '', -20, 0, 0, NULL, '');
891 INSERT INTO `0_gl_trans` VALUES(33, 26, 3, '2014-06-21', '1510', '', -22, 0, 0, NULL, '');
892 INSERT INTO `0_gl_trans` VALUES(34, 26, 3, '2014-06-21', '1510', '', -24, 0, 0, NULL, '');
893 INSERT INTO `0_gl_trans` VALUES(35, 26, 3, '2014-06-21', '1540', '', 66, 0, 0, NULL, '');
894 INSERT INTO `0_gl_trans` VALUES(36, 2, 5, '2014-06-21', '2150', 'Cash Sales', -4.76, 0, 0, 4, '3');
895 INSERT INTO `0_gl_trans` VALUES(37, 2, 5, '2014-06-21', '4010', 'Cash Sales', -95.24, 0, 0, 4, '3');
896 INSERT INTO `0_gl_trans` VALUES(38, 2, 5, '2014-06-21', '1060', '', 100, 0, 0, 4, '3');
897 INSERT INTO `0_gl_trans` VALUES(39, 1, 8, '2014-06-21', '2150', 'Maintenance', 2.38, 0, 0, 4, '1');
898 INSERT INTO `0_gl_trans` VALUES(40, 1, 8, '2014-06-21', '5765', 'Maintenance', 47.62, 0, 0, 4, '1');
899 INSERT INTO `0_gl_trans` VALUES(41, 1, 8, '2014-06-21', '1060', '', -50, 0, 0, 4, '1');
900 INSERT INTO `0_gl_trans` VALUES(42, 20, 8, '2014-06-21', '2100', '', -20, 0, 0, 3, '2');
901 INSERT INTO `0_gl_trans` VALUES(43, 20, 8, '2014-06-21', '2150', '', 0.95, 0, 0, 3, '2');
902 INSERT INTO `0_gl_trans` VALUES(44, 20, 8, '2014-06-21', '5780', '', 19.05, 0, 0, 3, '2');
903 INSERT INTO `0_gl_trans` VALUES(45, 26, 4, '2014-06-21', '1510', '', -40, 0, 0, NULL, '');
904 INSERT INTO `0_gl_trans` VALUES(46, 26, 4, '2014-06-21', '1510', '', -44, 0, 0, NULL, '');
905 INSERT INTO `0_gl_trans` VALUES(47, 26, 4, '2014-06-21', '1510', '', -48, 0, 0, NULL, '');
906 INSERT INTO `0_gl_trans` VALUES(48, 26, 4, '2014-06-21', '1540', '', 132, 0, 0, NULL, '');
907 INSERT INTO `0_gl_trans` VALUES(49, 26, 2, '2014-06-21', '1510', '', -20, 0, 0, NULL, '');
908 INSERT INTO `0_gl_trans` VALUES(50, 26, 2, '2014-06-21', '1510', '', -22, 0, 0, NULL, '');
909 INSERT INTO `0_gl_trans` VALUES(51, 26, 2, '2014-06-21', '1510', '', -24, 0, 0, NULL, '');
910 INSERT INTO `0_gl_trans` VALUES(52, 26, 2, '2014-06-21', '1540', '', 66, 0, 0, NULL, '');
911 INSERT INTO `0_gl_trans` VALUES(53, 26, 5, '2014-06-21', '1510', '', -50, 0, 0, NULL, '');
912 INSERT INTO `0_gl_trans` VALUES(54, 26, 5, '2014-06-21', '1510', '', -55, 0, 0, NULL, '');
913 INSERT INTO `0_gl_trans` VALUES(55, 26, 5, '2014-06-21', '1510', '', -60, 0, 0, NULL, '');
914 INSERT INTO `0_gl_trans` VALUES(56, 26, 5, '2014-06-21', '1060', 'Overhead Cost', -10, 0, 0, 1, '1');
915 INSERT INTO `0_gl_trans` VALUES(57, 26, 5, '2014-06-21', '1530', 'Overhead Cost', 10, 0, 0, 1, '1');
916 INSERT INTO `0_gl_trans` VALUES(58, 26, 5, '2014-06-21', '1060', 'Labour Cost', -20, 0, 0, 1, '0');
917 INSERT INTO `0_gl_trans` VALUES(59, 26, 5, '2014-06-21', '1530', 'Labour Cost', 20, 0, 0, 1, '0');
918 INSERT INTO `0_gl_trans` VALUES(60, 26, 5, '2014-06-21', '1540', '', 165, 0, 0, NULL, '');
919 INSERT INTO `0_gl_trans` VALUES(61, 26, 6, '2014-06-21', '1510', '', 50, 0, 0, NULL, '');
920 INSERT INTO `0_gl_trans` VALUES(62, 26, 6, '2014-06-21', '1510', '', 55, 0, 0, NULL, '');
921 INSERT INTO `0_gl_trans` VALUES(63, 26, 6, '2014-06-21', '1510', '', 60, 0, 0, NULL, '');
922 INSERT INTO `0_gl_trans` VALUES(64, 26, 6, '2014-06-21', '1540', '', -165, 0, 0, NULL, '');
923 INSERT INTO `0_gl_trans` VALUES(65, 26, 7, '2014-06-21', '1510', '', 20, 0, 0, NULL, '');
924 INSERT INTO `0_gl_trans` VALUES(66, 26, 7, '2014-06-21', '1510', '', 22, 0, 0, NULL, '');
925 INSERT INTO `0_gl_trans` VALUES(67, 26, 7, '2014-06-21', '1510', '', 24, 0, 0, NULL, '');
926 INSERT INTO `0_gl_trans` VALUES(68, 26, 7, '2014-06-21', '1060', 'Overhead Cost', -10, 0, 0, 1, '1');
927 INSERT INTO `0_gl_trans` VALUES(69, 26, 7, '2014-06-21', '1530', 'Overhead Cost', 10, 0, 0, 1, '1');
928 INSERT INTO `0_gl_trans` VALUES(70, 26, 7, '2014-06-21', '1060', 'Labour Cost', -20, 0, 0, 1, '0');
929 INSERT INTO `0_gl_trans` VALUES(71, 26, 7, '2014-06-21', '1530', 'Labour Cost', 20, 0, 0, 1, '0');
930 INSERT INTO `0_gl_trans` VALUES(72, 26, 7, '2014-06-21', '1540', '', -66, 0, 0, NULL, '');
931 INSERT INTO `0_gl_trans` VALUES(73, 13, 5, '2014-06-21', '5010', '', 10, 0, 0, 2, '2');
932 INSERT INTO `0_gl_trans` VALUES(74, 13, 5, '2014-06-21', '1510', '', -10, 0, 0, 2, '2');
933 INSERT INTO `0_gl_trans` VALUES(75, 10, 19, '2014-06-21', '4010', '', -47.62, 0, 0, 2, '2');
934 INSERT INTO `0_gl_trans` VALUES(76, 10, 19, '2014-06-21', '1200', '', 55, 0, 0, 2, '2');
935 INSERT INTO `0_gl_trans` VALUES(77, 10, 19, '2014-06-21', '4430', '', -5, 0, 0, 2, '2');
936 INSERT INTO `0_gl_trans` VALUES(78, 10, 19, '2014-06-21', '2150', '', -2.38, 0, 0, 2, '2');
937 INSERT INTO `0_gl_trans` VALUES(79, 11, 3, '2014-06-21', '5010', '', -10, 2, 0, 2, '3');
938 INSERT INTO `0_gl_trans` VALUES(80, 11, 3, '2014-06-21', '1510', '', 10, 0, 0, 2, '3');
939 INSERT INTO `0_gl_trans` VALUES(81, 11, 3, '2014-06-21', '4010', '', 50, 2, 0, 2, '3');
940 INSERT INTO `0_gl_trans` VALUES(82, 11, 3, '2014-06-21', '1200', '', -52.5, 0, 0, 2, '3');
941 INSERT INTO `0_gl_trans` VALUES(83, 11, 3, '2014-06-21', '2150', '', 2.5, 0, 0, 2, '3');
943 -- --------------------------------------------------------
946 -- Table structure for table `0_grn_batch`
949 DROP TABLE IF EXISTS `0_grn_batch`;
950 CREATE TABLE IF NOT EXISTS `0_grn_batch` (
951 `id` int(11) NOT NULL auto_increment,
952 `supplier_id` int(11) NOT NULL default '0',
953 `purch_order_no` int(11) default NULL,
954 `reference` varchar(60) NOT NULL default '',
955 `delivery_date` date NOT NULL default '0000-00-00',
956 `loc_code` varchar(5) default NULL,
958 KEY `delivery_date` (`delivery_date`),
959 KEY `purch_order_no` (`purch_order_no`)
960 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
963 -- Dumping data for table `0_grn_batch`
966 INSERT INTO `0_grn_batch` VALUES(1, 2, 1, '1', '2014-06-21', 'DEF');
968 -- --------------------------------------------------------
971 -- Table structure for table `0_grn_items`
974 DROP TABLE IF EXISTS `0_grn_items`;
975 CREATE TABLE IF NOT EXISTS `0_grn_items` (
976 `id` int(11) NOT NULL auto_increment,
977 `grn_batch_id` int(11) default NULL,
978 `po_detail_item` int(11) NOT NULL default '0',
979 `item_code` varchar(20) NOT NULL default '',
980 `description` tinytext,
981 `qty_recd` double NOT NULL default '0',
982 `quantity_inv` double NOT NULL default '0',
984 KEY `grn_batch_id` (`grn_batch_id`)
985 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
988 -- Dumping data for table `0_grn_items`
991 INSERT INTO `0_grn_items` VALUES(1, 1, 1, '102', '17inch VGA Monitor', 100, 100);
992 INSERT INTO `0_grn_items` VALUES(2, 1, 2, '103', '32MB VGA Card', 100, 100);
993 INSERT INTO `0_grn_items` VALUES(3, 1, 3, '104', '52x CD Drive', 100, 100);
995 -- --------------------------------------------------------
998 -- Table structure for table `0_groups`
1001 DROP TABLE IF EXISTS `0_groups`;
1002 CREATE TABLE IF NOT EXISTS `0_groups` (
1003 `id` smallint(6) unsigned NOT NULL auto_increment,
1004 `description` varchar(60) NOT NULL default '',
1005 `inactive` tinyint(1) NOT NULL default '0',
1007 UNIQUE KEY `description` (`description`)
1008 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
1011 -- Dumping data for table `0_groups`
1014 INSERT INTO `0_groups` VALUES(1, 'Small', 0);
1015 INSERT INTO `0_groups` VALUES(2, 'Medium', 0);
1016 INSERT INTO `0_groups` VALUES(3, 'Large', 0);
1018 -- --------------------------------------------------------
1021 -- Table structure for table `0_item_codes`
1024 DROP TABLE IF EXISTS `0_item_codes`;
1025 CREATE TABLE IF NOT EXISTS `0_item_codes` (
1026 `id` int(11) unsigned NOT NULL auto_increment,
1027 `item_code` varchar(20) NOT NULL,
1028 `stock_id` varchar(20) NOT NULL,
1029 `description` varchar(200) NOT NULL default '',
1030 `category_id` smallint(6) unsigned NOT NULL,
1031 `quantity` double NOT NULL default '1',
1032 `is_foreign` tinyint(1) NOT NULL default '0',
1033 `inactive` tinyint(1) NOT NULL default '0',
1035 UNIQUE KEY `stock_id` (`stock_id`,`item_code`),
1036 KEY `item_code` (`item_code`)
1037 ) ENGINE=MyISAM AUTO_INCREMENT=6 ;
1040 -- Dumping data for table `0_item_codes`
1043 INSERT INTO `0_item_codes` VALUES(1, '102', '102', '17inch VGA Monitor', 1, 1, 0, 0);
1044 INSERT INTO `0_item_codes` VALUES(2, '103', '103', '32MB VGA Card', 1, 1, 0, 0);
1045 INSERT INTO `0_item_codes` VALUES(3, '104', '104', '52x CD Drive', 1, 1, 0, 0);
1046 INSERT INTO `0_item_codes` VALUES(4, '3400', '3400', 'P4 Business System', 3, 1, 0, 0);
1047 INSERT INTO `0_item_codes` VALUES(5, '201', '201', 'Assembly Labour', 4, 1, 0, 0);
1049 -- --------------------------------------------------------
1052 -- Table structure for table `0_item_tax_types`
1055 DROP TABLE IF EXISTS `0_item_tax_types`;
1056 CREATE TABLE IF NOT EXISTS `0_item_tax_types` (
1057 `id` int(11) NOT NULL auto_increment,
1058 `name` varchar(60) NOT NULL default '',
1059 `exempt` tinyint(1) NOT NULL default '0',
1060 `inactive` tinyint(1) NOT NULL default '0',
1062 UNIQUE KEY `name` (`name`)
1063 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1066 -- Dumping data for table `0_item_tax_types`
1069 INSERT INTO `0_item_tax_types` VALUES(1, 'Regular', 0, 0);
1071 -- --------------------------------------------------------
1074 -- Table structure for table `0_item_tax_type_exemptions`
1077 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
1078 CREATE TABLE IF NOT EXISTS `0_item_tax_type_exemptions` (
1079 `item_tax_type_id` int(11) NOT NULL default '0',
1080 `tax_type_id` int(11) NOT NULL default '0',
1081 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
1085 -- Dumping data for table `0_item_tax_type_exemptions`
1089 -- --------------------------------------------------------
1092 -- Table structure for table `0_item_units`
1095 DROP TABLE IF EXISTS `0_item_units`;
1096 CREATE TABLE IF NOT EXISTS `0_item_units` (
1097 `abbr` varchar(20) NOT NULL,
1098 `name` varchar(40) NOT NULL,
1099 `decimals` tinyint(2) NOT NULL,
1100 `inactive` tinyint(1) NOT NULL default '0',
1101 PRIMARY KEY (`abbr`),
1102 UNIQUE KEY `name` (`name`)
1106 -- Dumping data for table `0_item_units`
1109 INSERT INTO `0_item_units` VALUES('each', 'Each', 0, 0);
1110 INSERT INTO `0_item_units` VALUES('hr', 'Hours', 1, 0);
1112 -- --------------------------------------------------------
1115 -- Table structure for table `0_locations`
1118 DROP TABLE IF EXISTS `0_locations`;
1119 CREATE TABLE IF NOT EXISTS `0_locations` (
1120 `loc_code` varchar(5) NOT NULL default '',
1121 `location_name` varchar(60) NOT NULL default '',
1122 `delivery_address` tinytext NOT NULL,
1123 `phone` varchar(30) NOT NULL default '',
1124 `phone2` varchar(30) NOT NULL default '',
1125 `fax` varchar(30) NOT NULL default '',
1126 `email` varchar(100) NOT NULL default '',
1127 `contact` varchar(30) NOT NULL default '',
1128 `inactive` tinyint(1) NOT NULL default '0',
1129 PRIMARY KEY (`loc_code`)
1133 -- Dumping data for table `0_locations`
1136 INSERT INTO `0_locations` VALUES('DEF', 'Default', 'Delivery 1\nDelivery 2\nDelivery 3', '', '', '', '', '', 0);
1138 -- --------------------------------------------------------
1141 -- Table structure for table `0_loc_stock`
1144 DROP TABLE IF EXISTS `0_loc_stock`;
1145 CREATE TABLE IF NOT EXISTS `0_loc_stock` (
1146 `loc_code` char(5) NOT NULL default '',
1147 `stock_id` char(20) NOT NULL default '',
1148 `reorder_level` bigint(20) NOT NULL default '0',
1149 PRIMARY KEY (`loc_code`,`stock_id`),
1150 KEY `stock_id` (`stock_id`)
1154 -- Dumping data for table `0_loc_stock`
1157 INSERT INTO `0_loc_stock` VALUES('DEF', '102', 0);
1158 INSERT INTO `0_loc_stock` VALUES('DEF', '103', 0);
1159 INSERT INTO `0_loc_stock` VALUES('DEF', '104', 0);
1160 INSERT INTO `0_loc_stock` VALUES('DEF', '201', 0);
1161 INSERT INTO `0_loc_stock` VALUES('DEF', '3400', 0);
1163 -- --------------------------------------------------------
1166 -- Table structure for table `0_movement_types`
1169 DROP TABLE IF EXISTS `0_movement_types`;
1170 CREATE TABLE IF NOT EXISTS `0_movement_types` (
1171 `id` int(11) NOT NULL auto_increment,
1172 `name` varchar(60) NOT NULL default '',
1173 `inactive` tinyint(1) NOT NULL default '0',
1175 UNIQUE KEY `name` (`name`)
1176 ) ENGINE=MyISAM AUTO_INCREMENT=2 ;
1179 -- Dumping data for table `0_movement_types`
1182 INSERT INTO `0_movement_types` VALUES(1, 'Adjustment', 0);
1184 -- --------------------------------------------------------
1187 -- Table structure for table `0_payment_terms`
1190 DROP TABLE IF EXISTS `0_payment_terms`;
1191 CREATE TABLE IF NOT EXISTS `0_payment_terms` (
1192 `terms_indicator` int(11) NOT NULL auto_increment,
1193 `terms` char(80) NOT NULL default '',
1194 `days_before_due` smallint(6) NOT NULL default '0',
1195 `day_in_following_month` smallint(6) NOT NULL default '0',
1196 `inactive` tinyint(1) NOT NULL default '0',
1197 PRIMARY KEY (`terms_indicator`),
1198 UNIQUE KEY `terms` (`terms`)
1199 ) ENGINE=MyISAM AUTO_INCREMENT=5 ;
1202 -- Dumping data for table `0_payment_terms`
1205 INSERT INTO `0_payment_terms` VALUES(1, 'Due 15th Of the Following Month', 0, 17, 0);
1206 INSERT INTO `0_payment_terms` VALUES(2, 'Due By End Of The Following Month', 0, 30, 0);
1207 INSERT INTO `0_payment_terms` VALUES(3, 'Payment due within 10 days', 10, 0, 0);
1208 INSERT INTO `0_payment_terms` VALUES(4, 'Cash Only', 0, 0, 0);
1210 -- --------------------------------------------------------
1213 -- Table structure for table `0_prices`
1216 DROP TABLE IF EXISTS `0_prices`;
1217 CREATE TABLE IF NOT EXISTS `0_prices` (
1218 `id` int(11) NOT NULL auto_increment,
1219 `stock_id` varchar(20) NOT NULL default '',
1220 `sales_type_id` int(11) NOT NULL default '0',
1221 `curr_abrev` char(3) NOT NULL default '',
1222 `price` double NOT NULL default '0',
1224 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
1225 ) ENGINE=MyISAM AUTO_INCREMENT=5 ;
1228 -- Dumping data for table `0_prices`
1231 INSERT INTO `0_prices` VALUES(1, '3400', 1, 'USD', 100);
1232 INSERT INTO `0_prices` VALUES(2, '102', 1, 'USD', 50);
1233 INSERT INTO `0_prices` VALUES(3, '103', 1, 'USD', 55);
1234 INSERT INTO `0_prices` VALUES(4, '104', 1, 'USD', 60);
1236 -- --------------------------------------------------------
1239 -- Table structure for table `0_printers`
1242 DROP TABLE IF EXISTS `0_printers`;
1243 CREATE TABLE IF NOT EXISTS `0_printers` (
1244 `id` tinyint(3) unsigned NOT NULL auto_increment,
1245 `name` varchar(20) NOT NULL,
1246 `description` varchar(60) NOT NULL,
1247 `queue` varchar(20) NOT NULL,
1248 `host` varchar(40) NOT NULL,
1249 `port` smallint(11) unsigned NOT NULL,
1250 `timeout` tinyint(3) unsigned NOT NULL,
1252 UNIQUE KEY `name` (`name`)
1253 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
1256 -- Dumping data for table `0_printers`
1259 INSERT INTO `0_printers` VALUES(1, 'QL500', 'Label printer', 'QL500', 'server', 127, 20);
1260 INSERT INTO `0_printers` VALUES(2, 'Samsung', 'Main network printer', 'scx4521F', 'server', 515, 5);
1261 INSERT INTO `0_printers` VALUES(3, 'Local', 'Local print server at user IP', 'lp', '', 515, 10);
1263 -- --------------------------------------------------------
1266 -- Table structure for table `0_print_profiles`
1269 DROP TABLE IF EXISTS `0_print_profiles`;
1270 CREATE TABLE IF NOT EXISTS `0_print_profiles` (
1271 `id` smallint(6) unsigned NOT NULL auto_increment,
1272 `profile` varchar(30) NOT NULL,
1273 `report` varchar(5) default NULL,
1274 `printer` tinyint(3) unsigned default NULL,
1276 UNIQUE KEY `profile` (`profile`,`report`)
1277 ) ENGINE=MyISAM AUTO_INCREMENT=10 ;
1280 -- Dumping data for table `0_print_profiles`
1283 INSERT INTO `0_print_profiles` VALUES(1, 'Out of office', '', 0);
1284 INSERT INTO `0_print_profiles` VALUES(2, 'Sales Department', '', 0);
1285 INSERT INTO `0_print_profiles` VALUES(3, 'Central', '', 2);
1286 INSERT INTO `0_print_profiles` VALUES(4, 'Sales Department', '104', 2);
1287 INSERT INTO `0_print_profiles` VALUES(5, 'Sales Department', '105', 2);
1288 INSERT INTO `0_print_profiles` VALUES(6, 'Sales Department', '107', 2);
1289 INSERT INTO `0_print_profiles` VALUES(7, 'Sales Department', '109', 2);
1290 INSERT INTO `0_print_profiles` VALUES(8, 'Sales Department', '110', 2);
1291 INSERT INTO `0_print_profiles` VALUES(9, 'Sales Department', '201', 2);
1293 -- --------------------------------------------------------
1296 -- Table structure for table `0_purch_data`
1299 DROP TABLE IF EXISTS `0_purch_data`;
1300 CREATE TABLE IF NOT EXISTS `0_purch_data` (
1301 `supplier_id` int(11) NOT NULL default '0',
1302 `stock_id` char(20) NOT NULL default '',
1303 `price` double NOT NULL default '0',
1304 `suppliers_uom` char(50) NOT NULL default '',
1305 `conversion_factor` double NOT NULL default '1',
1306 `supplier_description` char(50) NOT NULL default '',
1307 PRIMARY KEY (`supplier_id`,`stock_id`)
1311 -- Dumping data for table `0_purch_data`
1314 INSERT INTO `0_purch_data` VALUES(2, '102', 10, '', 1, '17inch VGA Monitor');
1315 INSERT INTO `0_purch_data` VALUES(2, '103', 11, '', 1, '32MB VGA Card');
1316 INSERT INTO `0_purch_data` VALUES(2, '104', 12, '', 1, '52x CD Drive');
1318 -- --------------------------------------------------------
1321 -- Table structure for table `0_purch_orders`
1324 DROP TABLE IF EXISTS `0_purch_orders`;
1325 CREATE TABLE IF NOT EXISTS `0_purch_orders` (
1326 `order_no` int(11) NOT NULL auto_increment,
1327 `supplier_id` int(11) NOT NULL default '0',
1328 `comments` tinytext,
1329 `ord_date` date NOT NULL default '0000-00-00',
1330 `reference` tinytext NOT NULL,
1331 `requisition_no` tinytext,
1332 `into_stock_location` varchar(5) NOT NULL default '',
1333 `delivery_address` tinytext NOT NULL,
1334 `total` double NOT NULL default '0',
1335 `prep_amount` double NOT NULL DEFAULT '0',
1336 `alloc` double NOT NULL DEFAULT '0',
1337 `tax_included` tinyint(1) NOT NULL default '0',
1338 PRIMARY KEY (`order_no`),
1339 KEY `ord_date` (`ord_date`)
1340 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1343 -- Dumping data for table `0_purch_orders`
1346 INSERT INTO `0_purch_orders` VALUES(1, 2, '', '2014-06-01', '1', '', 'DEF', 'Delivery 1\nDelivery 2\nDelivery 3', 0, 0, 0, 0);
1347 INSERT INTO `0_purch_orders` VALUES(2, 3, '', '2014-06-21', '2', '', 'DEF', 'Delivery 1\nDelivery 2\nDelivery 3', 0, 0, 0, 0);
1349 -- --------------------------------------------------------
1352 -- Table structure for table `0_purch_order_details`
1355 DROP TABLE IF EXISTS `0_purch_order_details`;
1356 CREATE TABLE IF NOT EXISTS `0_purch_order_details` (
1357 `po_detail_item` int(11) NOT NULL auto_increment,
1358 `order_no` int(11) NOT NULL default '0',
1359 `item_code` varchar(20) NOT NULL default '',
1360 `description` tinytext,
1361 `delivery_date` date NOT NULL default '0000-00-00',
1362 `qty_invoiced` double NOT NULL default '0',
1363 `unit_price` double NOT NULL default '0',
1364 `act_price` double NOT NULL default '0',
1365 `std_cost_unit` double NOT NULL default '0',
1366 `quantity_ordered` double NOT NULL default '0',
1367 `quantity_received` double NOT NULL default '0',
1368 PRIMARY KEY (`po_detail_item`),
1369 KEY `order` (`order_no`,`po_detail_item`),
1370 KEY `itemcode` (`item_code`)
1371 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
1374 -- Dumping data for table `0_purch_order_details`
1377 INSERT INTO `0_purch_order_details` VALUES(1, 1, '102', '17inch VGA Monitor', '2014-07-01', 100, 10, 10, 10, 100, 100);
1378 INSERT INTO `0_purch_order_details` VALUES(2, 1, '103', '32MB VGA Card', '2014-07-01', 100, 11, 11, 11, 100, 100);
1379 INSERT INTO `0_purch_order_details` VALUES(3, 1, '104', '52x CD Drive', '2014-07-01', 100, 12, 12, 12, 100, 100);
1380 INSERT INTO `0_purch_order_details` VALUES(4, 2, '102', '17inch VGA Monitor', '2014-07-01', 0, 5, 0, 0, 1, 0);
1381 INSERT INTO `0_purch_order_details` VALUES(5, 2, '103', '32MB VGA Card', '2014-07-01', 0, 5, 0, 0, 1, 0);
1383 -- --------------------------------------------------------
1386 -- Table structure for table `0_quick_entries`
1389 DROP TABLE IF EXISTS `0_quick_entries`;
1390 CREATE TABLE IF NOT EXISTS `0_quick_entries` (
1391 `id` smallint(6) unsigned NOT NULL auto_increment,
1392 `type` tinyint(1) NOT NULL default '0',
1393 `description` varchar(60) NOT NULL,
1394 `base_amount` double NOT NULL default '0',
1395 `base_desc` varchar(60) default NULL,
1396 `bal_type` tinyint(1) NOT NULL default '0',
1398 KEY `description` (`description`)
1399 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
1402 -- Dumping data for table `0_quick_entries`
1405 INSERT INTO `0_quick_entries` VALUES(1, 1, 'Maintenance', 0, 'Amount', 0);
1406 INSERT INTO `0_quick_entries` VALUES(2, 4, 'Phone', 0, 'Amount', 0);
1407 INSERT INTO `0_quick_entries` VALUES(3, 2, 'Cash Sales', 0, 'Amount', 0);
1409 -- --------------------------------------------------------
1412 -- Table structure for table `0_quick_entry_lines`
1415 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1416 CREATE TABLE IF NOT EXISTS `0_quick_entry_lines` (
1417 `id` smallint(6) unsigned NOT NULL auto_increment,
1418 `qid` smallint(6) unsigned NOT NULL,
1419 `amount` double default '0',
1420 `action` varchar(2) NOT NULL,
1421 `dest_id` varchar(15) NOT NULL default '',
1422 `dimension_id` smallint(6) unsigned default NULL,
1423 `dimension2_id` smallint(6) unsigned default NULL,
1426 ) ENGINE=MyISAM AUTO_INCREMENT=8 ;
1429 -- Dumping data for table `0_quick_entry_lines`
1432 INSERT INTO `0_quick_entry_lines` VALUES(1, 1, 0, 't-', '1', 0, 0);
1433 INSERT INTO `0_quick_entry_lines` VALUES(2, 2, 0, 't-', '1', 0, 0);
1434 INSERT INTO `0_quick_entry_lines` VALUES(3, 3, 0, 't-', '1', 0, 0);
1435 INSERT INTO `0_quick_entry_lines` VALUES(4, 3, 0, '=', '4010', 0, 0);
1436 INSERT INTO `0_quick_entry_lines` VALUES(5, 1, 0, '=', '5765', 0, 0);
1437 INSERT INTO `0_quick_entry_lines` VALUES(6, 2, 0, '=', '5780', 0, 0);
1439 -- --------------------------------------------------------
1442 -- Table structure for table `0_recurrent_invoices`
1445 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1446 CREATE TABLE IF NOT EXISTS `0_recurrent_invoices` (
1447 `id` smallint(6) unsigned NOT NULL auto_increment,
1448 `description` varchar(60) NOT NULL default '',
1449 `order_no` int(11) unsigned NOT NULL,
1450 `debtor_no` int(11) unsigned default NULL,
1451 `group_no` smallint(6) unsigned default NULL,
1452 `days` int(11) NOT NULL default '0',
1453 `monthly` int(11) NOT NULL default '0',
1454 `begin` date NOT NULL default '0000-00-00',
1455 `end` date NOT NULL default '0000-00-00',
1456 `last_sent` date NOT NULL default '0000-00-00',
1458 UNIQUE KEY `description` (`description`)
1459 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
1462 -- Dumping data for table `0_recurrent_invoices`
1466 -- --------------------------------------------------------
1469 -- Table structure for table `0_refs`
1472 DROP TABLE IF EXISTS `0_refs`;
1473 CREATE TABLE IF NOT EXISTS `0_refs` (
1474 `id` int(11) NOT NULL default '0',
1475 `type` int(11) NOT NULL default '0',
1476 `reference` varchar(100) NOT NULL default '',
1477 PRIMARY KEY (`id`,`type`),
1478 KEY `Type_and_Reference` (`type`,`reference`)
1482 -- Dumping data for table `0_refs`
1485 INSERT INTO `0_refs` VALUES(18, 0, '1');
1486 INSERT INTO `0_refs` VALUES(19, 0, '2');
1488 -- --------------------------------------------------------
1491 -- Table structure for table `0_salesman`
1494 DROP TABLE IF EXISTS `0_salesman`;
1495 CREATE TABLE IF NOT EXISTS `0_salesman` (
1496 `salesman_code` int(11) NOT NULL auto_increment,
1497 `salesman_name` char(60) NOT NULL default '',
1498 `salesman_phone` char(30) NOT NULL default '',
1499 `salesman_fax` char(30) NOT NULL default '',
1500 `salesman_email` varchar(100) NOT NULL default '',
1501 `provision` double NOT NULL default '0',
1502 `break_pt` double NOT NULL default '0',
1503 `provision2` double NOT NULL default '0',
1504 `inactive` tinyint(1) NOT NULL default '0',
1505 PRIMARY KEY (`salesman_code`),
1506 UNIQUE KEY `salesman_name` (`salesman_name`)
1507 ) ENGINE=MyISAM AUTO_INCREMENT=2 ;
1510 -- Dumping data for table `0_salesman`
1513 INSERT INTO `0_salesman` VALUES(1, 'Sales Person', '', '', '', 5, 1000, 4, 0);
1515 -- --------------------------------------------------------
1518 -- Table structure for table `0_sales_orders`
1521 DROP TABLE IF EXISTS `0_sales_orders`;
1522 CREATE TABLE IF NOT EXISTS `0_sales_orders` (
1523 `order_no` int(11) NOT NULL,
1524 `trans_type` smallint(6) NOT NULL default '30',
1525 `version` tinyint(1) unsigned NOT NULL default '0',
1526 `type` tinyint(1) NOT NULL default '0',
1527 `debtor_no` int(11) NOT NULL default '0',
1528 `branch_code` int(11) NOT NULL default '0',
1529 `reference` varchar(100) NOT NULL default '',
1530 `customer_ref` tinytext NOT NULL,
1531 `comments` tinytext,
1532 `ord_date` date NOT NULL default '0000-00-00',
1533 `order_type` int(11) NOT NULL default '0',
1534 `ship_via` int(11) NOT NULL default '0',
1535 `delivery_address` tinytext NOT NULL,
1536 `contact_phone` varchar(30) default NULL,
1537 `contact_email` varchar(100) default NULL,
1538 `deliver_to` tinytext NOT NULL,
1539 `freight_cost` double NOT NULL default '0',
1540 `from_stk_loc` varchar(5) NOT NULL default '',
1541 `delivery_date` date NOT NULL default '0000-00-00',
1542 `payment_terms` int(11) default NULL,
1543 `total` double NOT NULL default '0',
1544 `prep_amount` double NOT NULL DEFAULT '0',
1545 `alloc` double NOT NULL DEFAULT '0',
1546 PRIMARY KEY (`trans_type`,`order_no`)
1550 -- Dumping data for table `0_sales_orders`
1553 INSERT INTO `0_sales_orders` VALUES(1, 30, 1, 0, 1, 1, '1', '', '', '2014-06-21', 2, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Beefeater Ltd.', 10, 'DEF', '2014-06-22', 3, 0, 0, 0);
1554 INSERT INTO `0_sales_orders` VALUES(2, 30, 1, 0, 2, 2, '2', '', '', '2014-06-21', 1, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Ghostbusters Corp.', 0, 'DEF', '2014-06-22', 4, 0, 0, 0);
1555 INSERT INTO `0_sales_orders` VALUES(3, 30, 1, 0, 3, 3, '3', '', '', '2014-06-21', 2, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Brezan', 0, 'DEF', '2014-07-01', 3, 0, 0, 0);
1556 INSERT INTO `0_sales_orders` VALUES(4, 30, 0, 0, 1, 1, '4', '', '', '2014-06-21', 2, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Beefeater Ltd.', 0, 'DEF', '2014-06-22', 3, 0, 0, 0);
1557 INSERT INTO `0_sales_orders` VALUES(5, 30, 1, 0, 2, 2, '5', '', '', '2014-06-21', 1, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Ghostbusters Corp.', 5, 'DEF', '2014-06-22', 4, 0, 0, 0);
1559 -- --------------------------------------------------------
1562 -- Table structure for table `0_sales_order_details`
1565 DROP TABLE IF EXISTS `0_sales_order_details`;
1566 CREATE TABLE IF NOT EXISTS `0_sales_order_details` (
1567 `id` int(11) NOT NULL auto_increment,
1568 `order_no` int(11) NOT NULL default '0',
1569 `trans_type` smallint(6) NOT NULL default '30',
1570 `stk_code` varchar(20) NOT NULL default '',
1571 `description` tinytext,
1572 `qty_sent` double NOT NULL default '0',
1573 `unit_price` double NOT NULL default '0',
1574 `quantity` double NOT NULL default '0',
1575 `invoiced` double NOT NULL DEFAULT '0',
1576 `discount_percent` double NOT NULL default '0',
1578 KEY `sorder` (`trans_type`,`order_no`),
1579 KEY `stkcode` (`stk_code`)
1580 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
1583 -- Dumping data for table `0_sales_order_details`
1586 INSERT INTO `0_sales_order_details` VALUES(1, 1, 30, '102', '17inch VGA Monitor', 2, 30.4, 2, 0, 0);
1587 INSERT INTO `0_sales_order_details` VALUES(2, 2, 30, '102', '17inch VGA Monitor', 1, 50, 1, 0, 0);
1588 INSERT INTO `0_sales_order_details` VALUES(3, 3, 30, '102', '17inch VGA Monitor', 1, 35.89, 1, 0, 0);
1589 INSERT INTO `0_sales_order_details` VALUES(4, 4, 30, '102', '17inch VGA Monitor', 0, 21.28, 2, 0, 0);
1590 INSERT INTO `0_sales_order_details` VALUES(5, 5, 30, '102', '17inch VGA Monitor', 1, 50, 1, 0, 0);
1592 -- --------------------------------------------------------
1595 -- Table structure for table `0_sales_pos`
1598 DROP TABLE IF EXISTS `0_sales_pos`;
1599 CREATE TABLE IF NOT EXISTS `0_sales_pos` (
1600 `id` smallint(6) unsigned NOT NULL auto_increment,
1601 `pos_name` varchar(30) NOT NULL,
1602 `cash_sale` tinyint(1) NOT NULL,
1603 `credit_sale` tinyint(1) NOT NULL,
1604 `pos_location` varchar(5) NOT NULL,
1605 `pos_account` smallint(6) unsigned NOT NULL,
1606 `inactive` tinyint(1) NOT NULL default '0',
1608 UNIQUE KEY `pos_name` (`pos_name`)
1609 ) ENGINE=MyISAM AUTO_INCREMENT=2 ;
1612 -- Dumping data for table `0_sales_pos`
1615 INSERT INTO `0_sales_pos` VALUES(1, 'Default', 1, 1, 'DEF', 2, 0);
1617 -- --------------------------------------------------------
1620 -- Table structure for table `0_sales_types`
1623 DROP TABLE IF EXISTS `0_sales_types`;
1624 CREATE TABLE IF NOT EXISTS `0_sales_types` (
1625 `id` int(11) NOT NULL auto_increment,
1626 `sales_type` char(50) NOT NULL default '',
1627 `tax_included` int(1) NOT NULL default '0',
1628 `factor` double NOT NULL default '1',
1629 `inactive` tinyint(1) NOT NULL default '0',
1631 UNIQUE KEY `sales_type` (`sales_type`)
1632 ) ENGINE=MyISAM AUTO_INCREMENT=3 ;
1635 -- Dumping data for table `0_sales_types`
1638 INSERT INTO `0_sales_types` VALUES(1, 'Retail', 1, 1, 0);
1639 INSERT INTO `0_sales_types` VALUES(2, 'Wholesale', 0, 0.7, 0);
1641 -- --------------------------------------------------------
1644 -- Table structure for table `0_security_roles`
1647 DROP TABLE IF EXISTS `0_security_roles`;
1648 CREATE TABLE IF NOT EXISTS `0_security_roles` (
1649 `id` int(11) NOT NULL auto_increment,
1650 `role` varchar(30) NOT NULL,
1651 `description` varchar(50) default NULL,
1654 `inactive` tinyint(1) NOT NULL default '0',
1656 UNIQUE KEY `role` (`role`)
1657 ) ENGINE=MyISAM AUTO_INCREMENT=11 ;
1660 -- Dumping data for table `0_security_roles`
1663 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;775', 0);
1664 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;775', 0);
1665 INSERT INTO `0_security_roles` VALUES(3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873;775', 0);
1666 INSERT INTO `0_security_roles` VALUES(4, 'Stock Manager', 'Stock Manager', '768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '2818;2822;3073;3076;3077;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5889;5890;5891;8193;8194;8450;8451;10753;11009;11010;11012;13313;13315;15882;16129;16130;16131;16132;775', 0);
1667 INSERT INTO `0_security_roles` VALUES(5, 'Production Manager', 'Production Manager', '512;768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5640;5889;5890;5891;8193;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132;775', 0);
1668 INSERT INTO `0_security_roles` VALUES(6, 'Purchase Officer', 'Purchase Officer', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5377;5633;5635;5640;5640;5889;5890;5891;8193;8194;8196;8197;8449;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132;775', 0);
1669 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;775', 0);
1670 INSERT INTO `0_security_roles` VALUES(8, 'AP Officer', 'AP Officer', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;769;770;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5635;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15876;15877;15880;15882;16129;16130;16131;16132;775', 0);
1671 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;775', 0);
1672 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;775', 0);
1674 -- --------------------------------------------------------
1677 -- Table structure for table `0_shippers`
1680 DROP TABLE IF EXISTS `0_shippers`;
1681 CREATE TABLE IF NOT EXISTS `0_shippers` (
1682 `shipper_id` int(11) NOT NULL auto_increment,
1683 `shipper_name` varchar(60) NOT NULL default '',
1684 `phone` varchar(30) NOT NULL default '',
1685 `phone2` varchar(30) NOT NULL default '',
1686 `contact` tinytext NOT NULL,
1687 `address` tinytext NOT NULL,
1688 `inactive` tinyint(1) NOT NULL default '0',
1689 PRIMARY KEY (`shipper_id`),
1690 UNIQUE KEY `name` (`shipper_name`)
1691 ) ENGINE=MyISAM AUTO_INCREMENT=2 ;
1694 -- Dumping data for table `0_shippers`
1697 INSERT INTO `0_shippers` VALUES(1, 'Default', '', '', '', '', 0);
1699 -- --------------------------------------------------------
1702 -- Table structure for table `0_sql_trail`
1705 DROP TABLE IF EXISTS `0_sql_trail`;
1706 CREATE TABLE IF NOT EXISTS `0_sql_trail` (
1707 `id` int(11) unsigned NOT NULL auto_increment,
1708 `sql` text NOT NULL,
1709 `result` tinyint(1) NOT NULL,
1710 `msg` varchar(255) NOT NULL,
1712 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1715 -- Dumping data for table `0_sql_trail`
1719 -- --------------------------------------------------------
1722 -- Table structure for table `0_stock_category`
1725 DROP TABLE IF EXISTS `0_stock_category`;
1726 CREATE TABLE IF NOT EXISTS `0_stock_category` (
1727 `category_id` int(11) NOT NULL auto_increment,
1728 `description` varchar(60) NOT NULL default '',
1729 `dflt_tax_type` int(11) NOT NULL default '1',
1730 `dflt_units` varchar(20) NOT NULL default 'each',
1731 `dflt_mb_flag` char(1) NOT NULL default 'B',
1732 `dflt_sales_act` varchar(15) NOT NULL default '',
1733 `dflt_cogs_act` varchar(15) NOT NULL default '',
1734 `dflt_inventory_act` varchar(15) NOT NULL default '',
1735 `dflt_adjustment_act` varchar(15) NOT NULL default '',
1736 `dflt_assembly_act` varchar(15) NOT NULL default '',
1737 `dflt_dim1` int(11) default NULL,
1738 `dflt_dim2` int(11) default NULL,
1739 `inactive` tinyint(1) NOT NULL default '0',
1740 `dflt_no_sale` tinyint(1) NOT NULL default '0',
1741 `dflt_no_purchase` tinyint(1) NOT NULL default '0',
1742 PRIMARY KEY (`category_id`),
1743 UNIQUE KEY `description` (`description`)
1744 ) ENGINE=MyISAM AUTO_INCREMENT=5 ;
1747 -- Dumping data for table `0_stock_category`
1750 INSERT INTO `0_stock_category` VALUES(1, 'Components', 1, 'each', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 0);
1751 INSERT INTO `0_stock_category` VALUES(2, 'Charges', 1, 'each', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 0);
1752 INSERT INTO `0_stock_category` VALUES(3, 'Systems', 1, 'each', 'M', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 0);
1753 INSERT INTO `0_stock_category` VALUES(4, 'Services', 1, 'hr', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 0);
1755 -- --------------------------------------------------------
1758 -- Table structure for table `0_stock_master`
1761 DROP TABLE IF EXISTS `0_stock_master`;
1762 CREATE TABLE IF NOT EXISTS `0_stock_master` (
1763 `stock_id` varchar(20) NOT NULL default '',
1764 `category_id` int(11) NOT NULL default '0',
1765 `tax_type_id` int(11) NOT NULL default '0',
1766 `description` varchar(200) NOT NULL default '',
1767 `long_description` tinytext NOT NULL,
1768 `units` varchar(20) NOT NULL default 'each',
1769 `mb_flag` char(1) NOT NULL default 'B',
1770 `sales_account` varchar(15) NOT NULL default '',
1771 `cogs_account` varchar(15) NOT NULL default '',
1772 `inventory_account` varchar(15) NOT NULL default '',
1773 `adjustment_account` varchar(15) NOT NULL default '',
1774 `assembly_account` varchar(15) NOT NULL default '',
1775 `dimension_id` int(11) default NULL,
1776 `dimension2_id` int(11) default NULL,
1777 `actual_cost` double NOT NULL default '0',
1778 `last_cost` double NOT NULL default '0',
1779 `material_cost` double NOT NULL default '0',
1780 `labour_cost` double NOT NULL default '0',
1781 `overhead_cost` double NOT NULL default '0',
1782 `inactive` tinyint(1) NOT NULL default '0',
1783 `no_sale` tinyint(1) NOT NULL default '0',
1784 `no_purchase` tinyint(1) NOT NULL default '0',
1785 `editable` tinyint(1) NOT NULL default '0',
1786 PRIMARY KEY (`stock_id`)
1790 -- Dumping data for table `0_stock_master`
1793 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, 0);
1794 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, 0);
1795 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, 0);
1796 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, 0);
1797 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, 0);
1799 -- --------------------------------------------------------
1802 -- Table structure for table `0_stock_moves`
1805 DROP TABLE IF EXISTS `0_stock_moves`;
1806 CREATE TABLE IF NOT EXISTS `0_stock_moves` (
1807 `trans_id` int(11) NOT NULL auto_increment,
1808 `trans_no` int(11) NOT NULL default '0',
1809 `stock_id` char(20) NOT NULL default '',
1810 `type` smallint(6) NOT NULL default '0',
1811 `loc_code` char(5) NOT NULL default '',
1812 `tran_date` date NOT NULL default '0000-00-00',
1813 `person_id` int(11) default NULL,
1814 `price` double NOT NULL default '0',
1815 `reference` char(40) NOT NULL default '',
1816 `qty` double NOT NULL default '1',
1817 `discount_percent` double NOT NULL default '0',
1818 `standard_cost` double NOT NULL default '0',
1819 `visible` tinyint(1) NOT NULL default '1',
1820 PRIMARY KEY (`trans_id`),
1821 KEY `type` (`type`,`trans_no`),
1822 KEY `Move` (`stock_id`,`loc_code`,`tran_date`)
1823 ) ENGINE=InnoDB AUTO_INCREMENT=37 ;
1826 -- Dumping data for table `0_stock_moves`
1829 INSERT INTO `0_stock_moves` VALUES(1, 1, '102', 25, 'DEF', '2014-06-21', 2, 10, '', 100, 0, 10, 1);
1830 INSERT INTO `0_stock_moves` VALUES(2, 1, '103', 25, 'DEF', '2014-06-21', 2, 11, '', 100, 0, 11, 1);
1831 INSERT INTO `0_stock_moves` VALUES(3, 1, '104', 25, 'DEF', '2014-06-21', 2, 12, '', 100, 0, 12, 1);
1832 INSERT INTO `0_stock_moves` VALUES(4, 1, '102', 26, 'DEF', '2014-06-21', 0, 0, '1', -10, 0, 0, 1);
1833 INSERT INTO `0_stock_moves` VALUES(5, 1, '103', 26, 'DEF', '2014-06-21', 0, 0, '1', -10, 0, 0, 1);
1834 INSERT INTO `0_stock_moves` VALUES(6, 1, '104', 26, 'DEF', '2014-06-21', 0, 0, '1', -10, 0, 0, 1);
1835 INSERT INTO `0_stock_moves` VALUES(7, 1, '3400', 26, 'DEF', '2014-06-21', 0, 0, '1', 10, 0, 0, 1);
1836 INSERT INTO `0_stock_moves` VALUES(8, 2, '102', 13, 'DEF', '2014-06-21', 0, 30.4, '1', -2, 0, 10, 1);
1837 INSERT INTO `0_stock_moves` VALUES(9, 3, '102', 13, 'DEF', '2014-06-21', 0, 50, 'auto', -1, 0, 10, 1);
1838 INSERT INTO `0_stock_moves` VALUES(10, 4, '102', 13, 'DEF', '2014-06-21', 0, 35.89, 'auto', -1, 0, 10, 1);
1839 INSERT INTO `0_stock_moves` VALUES(11, 3, '102', 26, 'DEF', '2014-06-21', 0, 0, '3', -2, 0, 0, 1);
1840 INSERT INTO `0_stock_moves` VALUES(12, 3, '103', 26, 'DEF', '2014-06-21', 0, 0, '3', -2, 0, 0, 1);
1841 INSERT INTO `0_stock_moves` VALUES(13, 3, '104', 26, 'DEF', '2014-06-21', 0, 0, '3', -2, 0, 0, 1);
1842 INSERT INTO `0_stock_moves` VALUES(14, 3, '3400', 26, 'DEF', '2014-06-21', 0, 0, '3', 2, 0, 0, 1);
1843 INSERT INTO `0_stock_moves` VALUES(15, 4, '102', 26, 'DEF', '2014-06-21', 0, 0, '4', -4, 0, 0, 1);
1844 INSERT INTO `0_stock_moves` VALUES(16, 4, '103', 26, 'DEF', '2014-06-21', 0, 0, '4', -4, 0, 0, 1);
1845 INSERT INTO `0_stock_moves` VALUES(17, 4, '104', 26, 'DEF', '2014-06-21', 0, 0, '4', -4, 0, 0, 1);
1846 INSERT INTO `0_stock_moves` VALUES(18, 4, '3400', 26, 'DEF', '2014-06-21', 0, 0, '4', 4, 0, 0, 1);
1847 INSERT INTO `0_stock_moves` VALUES(19, 2, '102', 26, 'DEF', '2014-06-21', 0, 0, '', -2, 0, 0, 1);
1848 INSERT INTO `0_stock_moves` VALUES(20, 2, '103', 26, 'DEF', '2014-06-21', 0, 0, '', -2, 0, 0, 1);
1849 INSERT INTO `0_stock_moves` VALUES(21, 2, '104', 26, 'DEF', '2014-06-21', 0, 0, '', -2, 0, 0, 1);
1850 INSERT INTO `0_stock_moves` VALUES(22, 1, '3400', 29, 'DEF', '2014-06-21', 0, 0, '', 2, 0, 0, 1);
1851 INSERT INTO `0_stock_moves` VALUES(23, 5, '102', 26, 'DEF', '2014-06-21', 0, 0, '5', -5, 0, 0, 1);
1852 INSERT INTO `0_stock_moves` VALUES(24, 5, '103', 26, 'DEF', '2014-06-21', 0, 0, '5', -5, 0, 0, 1);
1853 INSERT INTO `0_stock_moves` VALUES(25, 5, '104', 26, 'DEF', '2014-06-21', 0, 0, '5', -5, 0, 0, 1);
1854 INSERT INTO `0_stock_moves` VALUES(26, 5, '3400', 26, 'DEF', '2014-06-21', 0, 0, '5', 5, 0, 0, 1);
1855 INSERT INTO `0_stock_moves` VALUES(27, 6, '102', 26, 'DEF', '2014-06-21', 0, 0, '6', 5, 0, 0, 1);
1856 INSERT INTO `0_stock_moves` VALUES(28, 6, '103', 26, 'DEF', '2014-06-21', 0, 0, '6', 5, 0, 0, 1);
1857 INSERT INTO `0_stock_moves` VALUES(29, 6, '104', 26, 'DEF', '2014-06-21', 0, 0, '6', 5, 0, 0, 1);
1858 INSERT INTO `0_stock_moves` VALUES(30, 6, '3400', 26, 'DEF', '2014-06-21', 0, 0, '6', -5, 0, 0, 1);
1859 INSERT INTO `0_stock_moves` VALUES(31, 7, '102', 26, 'DEF', '2014-06-21', 0, 0, '7', 2, 0, 0, 1);
1860 INSERT INTO `0_stock_moves` VALUES(32, 7, '103', 26, 'DEF', '2014-06-21', 0, 0, '7', 2, 0, 0, 1);
1861 INSERT INTO `0_stock_moves` VALUES(33, 7, '104', 26, 'DEF', '2014-06-21', 0, 0, '7', 2, 0, 0, 1);
1862 INSERT INTO `0_stock_moves` VALUES(34, 7, '3400', 26, 'DEF', '2014-06-21', 0, 0, '7', -2, 0, 0, 1);
1863 INSERT INTO `0_stock_moves` VALUES(35, 5, '102', 13, 'DEF', '2014-06-21', 0, 50, 'auto', -1, 0, 10, 1);
1864 INSERT INTO `0_stock_moves` VALUES(36, 3, '102', 11, 'DEF', '2014-06-21', 0, 37.68, 'Return Ex Inv: 18', 1, 0, 10, 0);
1866 -- --------------------------------------------------------
1869 -- Table structure for table `0_suppliers`
1872 DROP TABLE IF EXISTS `0_suppliers`;
1873 CREATE TABLE IF NOT EXISTS `0_suppliers` (
1874 `supplier_id` int(11) NOT NULL auto_increment,
1875 `supp_name` varchar(60) NOT NULL default '',
1876 `supp_ref` varchar(30) NOT NULL default '',
1877 `address` tinytext NOT NULL,
1878 `supp_address` tinytext NOT NULL,
1879 `gst_no` varchar(25) NOT NULL default '',
1880 `contact` varchar(60) NOT NULL default '',
1881 `supp_account_no` varchar(40) NOT NULL default '',
1882 `website` varchar(100) NOT NULL default '',
1883 `bank_account` varchar(60) NOT NULL default '',
1884 `curr_code` char(3) default NULL,
1885 `payment_terms` int(11) default NULL,
1886 `tax_included` tinyint(1) NOT NULL default '0',
1887 `tax_algorithm` tinyint(1) NOT NULL default '1',
1888 `dimension_id` int(11) default '0',
1889 `dimension2_id` int(11) default '0',
1890 `tax_group_id` int(11) default NULL,
1891 `credit_limit` double NOT NULL default '0',
1892 `purchase_account` varchar(15) NOT NULL default '',
1893 `payable_account` varchar(15) NOT NULL default '',
1894 `payment_discount_account` varchar(15) NOT NULL default '',
1895 `notes` tinytext NOT NULL,
1896 `inactive` tinyint(1) NOT NULL default '0',
1897 PRIMARY KEY (`supplier_id`),
1898 KEY `supp_ref` (`supp_ref`)
1899 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
1902 -- Dumping data for table `0_suppliers`
1905 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, 1, 0, 2, 1000, '', '2100', '5060', 'A supplier with junk beers.', 0);
1906 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, 1, 0, 0, 1, 500, '', '2100', '5060', '', 0);
1907 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, 1, 0, 0, 2, 300, '', '2100', '5060', '', 0);
1909 -- --------------------------------------------------------
1912 -- Table structure for table `0_supp_allocations`
1915 DROP TABLE IF EXISTS `0_supp_allocations`;
1916 CREATE TABLE IF NOT EXISTS `0_supp_allocations` (
1917 `id` int(11) NOT NULL auto_increment,
1918 `amt` double unsigned default NULL,
1919 `date_alloc` date NOT NULL default '0000-00-00',
1920 `trans_no_from` int(11) default NULL,
1921 `trans_type_from` int(11) default NULL,
1922 `trans_no_to` int(11) default NULL,
1923 `trans_type_to` int(11) default NULL,
1925 UNIQUE KEY (`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
1926 KEY `From` (`trans_type_from`,`trans_no_from`),
1927 KEY `To` (`trans_type_to`,`trans_no_to`)
1928 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1931 -- Dumping data for table `0_supp_allocations`
1934 INSERT INTO `0_supp_allocations` VALUES(1, 3465, '2014-06-21', 4, 22, 7, 20);
1936 -- --------------------------------------------------------
1939 -- Table structure for table `0_supp_invoice_items`
1942 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1943 CREATE TABLE IF NOT EXISTS `0_supp_invoice_items` (
1944 `id` int(11) NOT NULL auto_increment,
1945 `supp_trans_no` int(11) default NULL,
1946 `supp_trans_type` int(11) default NULL,
1947 `gl_code` varchar(15) NOT NULL default '',
1948 `grn_item_id` int(11) default NULL,
1949 `po_detail_item_id` int(11) default NULL,
1950 `stock_id` varchar(20) NOT NULL default '',
1951 `description` tinytext,
1952 `quantity` double NOT NULL default '0',
1953 `unit_price` double NOT NULL default '0',
1954 `unit_tax` double NOT NULL default '0',
1957 KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`)
1958 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
1961 -- Dumping data for table `0_supp_invoice_items`
1964 INSERT INTO `0_supp_invoice_items` VALUES(1, 7, 20, '0', 1, 1, '102', '17inch VGA Monitor', 100, 10, 0.5, '');
1965 INSERT INTO `0_supp_invoice_items` VALUES(2, 7, 20, '0', 2, 2, '103', '32MB VGA Card', 100, 11, 0.55, '');
1966 INSERT INTO `0_supp_invoice_items` VALUES(3, 7, 20, '0', 3, 3, '104', '52x CD Drive', 100, 12, 0.6, '');
1967 INSERT INTO `0_supp_invoice_items` VALUES(4, 8, 20, '2150', 0, 0, '', '', 0, 0.95, 0, 'Phone');
1968 INSERT INTO `0_supp_invoice_items` VALUES(5, 8, 20, '5780', 0, 0, '', '', 0, 19.05, 0, 'Phone');
1970 -- --------------------------------------------------------
1973 -- Table structure for table `0_supp_trans`
1976 DROP TABLE IF EXISTS `0_supp_trans`;
1977 CREATE TABLE IF NOT EXISTS `0_supp_trans` (
1978 `trans_no` int(11) unsigned NOT NULL default '0',
1979 `type` smallint(6) unsigned NOT NULL default '0',
1980 `supplier_id` int(11) unsigned default NULL,
1981 `reference` tinytext NOT NULL,
1982 `supp_reference` varchar(60) NOT NULL default '',
1983 `tran_date` date NOT NULL default '0000-00-00',
1984 `due_date` date NOT NULL default '0000-00-00',
1985 `ov_amount` double NOT NULL default '0',
1986 `ov_discount` double NOT NULL default '0',
1987 `ov_gst` double NOT NULL default '0',
1988 `rate` double NOT NULL default '1',
1989 `alloc` double NOT NULL default '0',
1990 `tax_included` tinyint(1) NOT NULL default '0',
1991 `tax_algorithm` tinyint(1) NOT NULL default '1',
1992 PRIMARY KEY (`type`,`trans_no`),
1993 KEY `supplier_id` (`supplier_id`),
1994 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1995 KEY `type` (`type`),
1996 KEY `tran_date` (`tran_date`)
2000 -- Dumping data for table `0_supp_trans`
2003 INSERT INTO `0_supp_trans` VALUES(7, 20, 2, '1', '5t', '2014-06-21', '2014-07-01', 3300, 0, 165, 1, 3465, 0, 1);
2004 INSERT INTO `0_supp_trans` VALUES(8, 20, 2, '2', 'cc', '2014-06-21', '2014-07-01', 20, 0, 0, 1, 0, 0, 1);
2005 INSERT INTO `0_supp_trans` VALUES(4, 22, 2, '1', '', '2014-06-21', '2014-06-21', -3465, 0, 0, 1, 3465, 0, 1);
2007 -- --------------------------------------------------------
2010 -- Table structure for table `0_sys_prefs`
2013 DROP TABLE IF EXISTS `0_sys_prefs`;
2014 CREATE TABLE IF NOT EXISTS `0_sys_prefs` (
2015 `name` varchar(35) NOT NULL default '',
2016 `category` varchar(30) default NULL,
2017 `type` varchar(20) NOT NULL default '',
2018 `length` smallint(6) default NULL,
2019 `value` text NOT NULL,
2020 PRIMARY KEY (`name`),
2021 KEY `category` (`category`)
2025 -- Dumping data for table `0_sys_prefs`
2028 INSERT INTO `0_sys_prefs` VALUES('coy_name', 'setup.company', 'varchar', 60, 'Training Co.');
2029 INSERT INTO `0_sys_prefs` VALUES('gst_no', 'setup.company', 'varchar', 25, '9876543');
2030 INSERT INTO `0_sys_prefs` VALUES('coy_no', 'setup.company', 'varchar', 25, '123456789');
2031 INSERT INTO `0_sys_prefs` VALUES('tax_prd', 'setup.company', 'int', 11, '1');
2032 INSERT INTO `0_sys_prefs` VALUES('tax_last', 'setup.company', 'int', 11, '1');
2033 INSERT INTO `0_sys_prefs` VALUES('postal_address', 'setup.company', 'tinytext', 0, 'Address 1\nAddress 2\nAddress 3');
2034 INSERT INTO `0_sys_prefs` VALUES('phone', 'setup.company', 'varchar', 30, '(222) 111.222.333');
2035 INSERT INTO `0_sys_prefs` VALUES('fax', 'setup.company', 'varchar', 30, '');
2036 INSERT INTO `0_sys_prefs` VALUES('email', 'setup.company', 'varchar', 100, 'delta@delta.com');
2037 INSERT INTO `0_sys_prefs` VALUES('coy_logo', 'setup.company', 'varchar', 100, 'logo_frontaccounting.jpg');
2038 INSERT INTO `0_sys_prefs` VALUES('domicile', 'setup.company', 'varchar', 55, '');
2039 INSERT INTO `0_sys_prefs` VALUES('curr_default', 'setup.company', 'char', 3, 'USD');
2040 INSERT INTO `0_sys_prefs` VALUES('use_dimension', 'setup.company', 'tinyint', 1, '1');
2041 INSERT INTO `0_sys_prefs` VALUES('f_year', 'setup.company', 'int', 11, '2');
2042 INSERT INTO `0_sys_prefs` VALUES('no_item_list', 'setup.company', 'tinyint', 1, '0');
2043 INSERT INTO `0_sys_prefs` VALUES('no_customer_list', 'setup.company', 'tinyint', 1, '0');
2044 INSERT INTO `0_sys_prefs` VALUES('no_supplier_list', 'setup.company', 'tinyint', 1, '0');
2045 INSERT INTO `0_sys_prefs` VALUES('base_sales', 'setup.company', 'int', 11, '1');
2046 INSERT INTO `0_sys_prefs` VALUES('time_zone', 'setup.company', 'tinyint', 1, '0');
2047 INSERT INTO `0_sys_prefs` VALUES('add_pct', 'setup.company', 'int', 5, '-1');
2048 INSERT INTO `0_sys_prefs` VALUES('round_to', 'setup.company', 'int', 5, '1');
2049 INSERT INTO `0_sys_prefs` VALUES('login_tout', 'setup.company', 'smallint', 6, '600');
2050 INSERT INTO `0_sys_prefs` VALUES('past_due_days', 'glsetup.general', 'int', 11, '30');
2051 INSERT INTO `0_sys_prefs` VALUES('profit_loss_year_act', 'glsetup.general', 'varchar', 15, '9990');
2052 INSERT INTO `0_sys_prefs` VALUES('retained_earnings_act', 'glsetup.general', 'varchar', 15, '3590');
2053 INSERT INTO `0_sys_prefs` VALUES('bank_charge_act', 'glsetup.general', 'varchar', 15, '5690');
2054 INSERT INTO `0_sys_prefs` VALUES('exchange_diff_act', 'glsetup.general', 'varchar', 15, '4450');
2055 INSERT INTO `0_sys_prefs` VALUES('tax_algorithm', 'glsetup.customer', 'tinyint', 1, '1');
2056 INSERT INTO `0_sys_prefs` VALUES('default_credit_limit', 'glsetup.customer', 'int', 11, '1000');
2057 INSERT INTO `0_sys_prefs` VALUES('accumulate_shipping', 'glsetup.customer', 'tinyint', 1, '0');
2058 INSERT INTO `0_sys_prefs` VALUES('legal_text', 'glsetup.customer', 'tinytext', 0, '');
2059 INSERT INTO `0_sys_prefs` VALUES('freight_act', 'glsetup.customer', 'varchar', 15, '4430');
2060 INSERT INTO `0_sys_prefs` VALUES('debtors_act', 'glsetup.sales', 'varchar', 15, '1200');
2061 INSERT INTO `0_sys_prefs` VALUES('default_sales_act', 'glsetup.sales', 'varchar', 15, '4010');
2062 INSERT INTO `0_sys_prefs` VALUES('default_sales_discount_act', 'glsetup.sales', 'varchar', 15, '4510');
2063 INSERT INTO `0_sys_prefs` VALUES('default_prompt_payment_act', 'glsetup.sales', 'varchar', 15, '4500');
2064 INSERT INTO `0_sys_prefs` VALUES('default_delivery_required', 'glsetup.sales', 'smallint', 6, '1');
2065 INSERT INTO `0_sys_prefs` VALUES('default_receival_required', 'glsetup.purchase', 'smallint', 6, '10');
2066 INSERT INTO `0_sys_prefs` VALUES('default_quote_valid_days', 'glsetup.sales', 'smallint', 6, '30');
2067 INSERT INTO `0_sys_prefs` VALUES('default_dim_required', 'glsetup.dims', 'int', 11, '20');
2068 INSERT INTO `0_sys_prefs` VALUES('pyt_discount_act', 'glsetup.purchase', 'varchar', 15, '5060');
2069 INSERT INTO `0_sys_prefs` VALUES('creditors_act', 'glsetup.purchase', 'varchar', 15, '2100');
2070 INSERT INTO `0_sys_prefs` VALUES('po_over_receive', 'glsetup.purchase', 'int', 11, '10');
2071 INSERT INTO `0_sys_prefs` VALUES('po_over_charge', 'glsetup.purchase', 'int', 11, '10');
2072 INSERT INTO `0_sys_prefs` VALUES('allow_negative_stock', 'glsetup.inventory', 'tinyint', 1, '0');
2073 INSERT INTO `0_sys_prefs` VALUES('default_inventory_act', 'glsetup.items', 'varchar', 15, '1510');
2074 INSERT INTO `0_sys_prefs` VALUES('default_cogs_act', 'glsetup.items', 'varchar', 15, '5010');
2075 INSERT INTO `0_sys_prefs` VALUES('default_adj_act', 'glsetup.items', 'varchar', 15, '5040');
2076 INSERT INTO `0_sys_prefs` VALUES('default_inv_sales_act', 'glsetup.items', 'varchar', 15, '4010');
2077 INSERT INTO `0_sys_prefs` VALUES('default_assembly_act', 'glsetup.items', 'varchar', 15, '1530');
2078 INSERT INTO `0_sys_prefs` VALUES('default_workorder_required', 'glsetup.manuf', 'int', 11, '20');
2079 INSERT INTO `0_sys_prefs` VALUES('version_id', 'system', 'varchar', 11, '2.3rc');
2080 INSERT INTO `0_sys_prefs` VALUES('auto_curr_reval', 'setup.company', 'smallint', 6, '1');
2081 INSERT INTO `0_sys_prefs` VALUES('grn_clearing_act', 'glsetup.purchase', 'varchar', 15, '1550');
2082 INSERT INTO `0_sys_prefs` VALUES('bcc_email', 'setup.company', 'varchar', 100, '');
2083 INSERT INTO `0_sys_prefs` VALUES('deferred_income_act', 'glsetup.sales', 'varchar', '15', '');
2084 INSERT INTO `0_sys_prefs` VALUES('gl_closing_date','setup.closing_date', 'date', 8, '');
2085 INSERT INTO `0_sys_prefs` VALUES('alternative_tax_include_on_docs','setup.company', 'tinyint', 1, '0');
2086 INSERT INTO `0_sys_prefs` VALUES('suppress_tax_rates','setup.company', 'tinyint', 1, '0');
2087 INSERT INTO `0_sys_prefs` VALUES('no_zero_lines_amount','glsetup.sales', 'tinyint', 1, '1');
2088 INSERT INTO `0_sys_prefs` VALUES('show_po_item_codes','glsetup.purchase', 'tinyint', 1, '0');
2089 INSERT INTO `0_sys_prefs` VALUES('accounts_alpha','glsetup.general', 'tinyint', 1, '0');
2090 INSERT INTO `0_sys_prefs` VALUES('loc_notification','glsetup.inventory', 'tinyint', 1, '0');
2091 INSERT INTO `0_sys_prefs` VALUES('print_invoice_no','glsetup.sales', 'tinyint', 1, '0');
2092 INSERT INTO `0_sys_prefs` VALUES('allow_negative_prices','glsetup.inventory', 'tinyint', 1, '1');
2093 INSERT INTO `0_sys_prefs` VALUES('print_item_images_on_quote','glsetup.inventory', 'tinyint', 1, '0');
2094 INSERT INTO `0_sys_prefs` VALUES('alternative_tax_include_on_docs','setup.company', 'tinyint', 1, '0');
2095 INSERT INTO `0_sys_prefs` VALUES('suppress_tax_rates','setup.company', 'tinyint', 1, '0');
2098 -- --------------------------------------------------------
2101 -- Table structure for table `0_sys_types`
2104 DROP TABLE IF EXISTS `0_sys_types`;
2105 CREATE TABLE IF NOT EXISTS `0_sys_types` (
2106 `type_id` smallint(6) NOT NULL default '0',
2107 `type_no` int(11) NOT NULL default '1',
2108 `next_reference` varchar(100) NOT NULL default '',
2109 PRIMARY KEY (`type_id`)
2113 -- Dumping data for table `0_sys_types`
2116 INSERT INTO `0_sys_types` VALUES(0, 19, '3');
2117 INSERT INTO `0_sys_types` VALUES(1, 8, '2');
2118 INSERT INTO `0_sys_types` VALUES(2, 5, '2');
2119 INSERT INTO `0_sys_types` VALUES(4, 3, '1');
2120 INSERT INTO `0_sys_types` VALUES(10, 19, '4');
2121 INSERT INTO `0_sys_types` VALUES(11, 3, '2');
2122 INSERT INTO `0_sys_types` VALUES(12, 6, '1');
2123 INSERT INTO `0_sys_types` VALUES(13, 5, '2');
2124 INSERT INTO `0_sys_types` VALUES(16, 2, '1');
2125 INSERT INTO `0_sys_types` VALUES(17, 2, '1');
2126 INSERT INTO `0_sys_types` VALUES(18, 1, '3');
2127 INSERT INTO `0_sys_types` VALUES(20, 8, '3');
2128 INSERT INTO `0_sys_types` VALUES(21, 1, '1');
2129 INSERT INTO `0_sys_types` VALUES(22, 4, '2');
2130 INSERT INTO `0_sys_types` VALUES(25, 1, '2');
2131 INSERT INTO `0_sys_types` VALUES(26, 1, '8');
2132 INSERT INTO `0_sys_types` VALUES(28, 1, '1');
2133 INSERT INTO `0_sys_types` VALUES(29, 1, '2');
2134 INSERT INTO `0_sys_types` VALUES(30, 5, '6');
2135 INSERT INTO `0_sys_types` VALUES(32, 0, '1');
2136 INSERT INTO `0_sys_types` VALUES(35, 1, '1');
2137 INSERT INTO `0_sys_types` VALUES(40, 1, '3');
2139 -- --------------------------------------------------------
2142 -- Table structure for table `0_tags`
2145 DROP TABLE IF EXISTS `0_tags`;
2146 CREATE TABLE IF NOT EXISTS `0_tags` (
2147 `id` int(11) NOT NULL auto_increment,
2148 `type` smallint(6) NOT NULL,
2149 `name` varchar(30) NOT NULL,
2150 `description` varchar(60) default NULL,
2151 `inactive` tinyint(1) NOT NULL default '0',
2153 UNIQUE KEY `type` (`type`,`name`)
2154 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2157 -- Dumping data for table `0_tags`
2161 -- --------------------------------------------------------
2164 -- Table structure for table `0_tag_associations`
2167 DROP TABLE IF EXISTS `0_tag_associations`;
2168 CREATE TABLE IF NOT EXISTS `0_tag_associations` (
2169 `record_id` varchar(15) NOT NULL,
2170 `tag_id` int(11) NOT NULL,
2171 UNIQUE KEY `record_id` (`record_id`,`tag_id`)
2175 -- Dumping data for table `0_tag_associations`
2179 -- --------------------------------------------------------
2182 -- Table structure for table `0_tax_groups`
2185 DROP TABLE IF EXISTS `0_tax_groups`;
2186 CREATE TABLE IF NOT EXISTS `0_tax_groups` (
2187 `id` int(11) NOT NULL auto_increment,
2188 `name` varchar(60) NOT NULL default '',
2189 `inactive` tinyint(1) NOT NULL default '0',
2191 UNIQUE KEY `name` (`name`)
2192 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
2195 -- Dumping data for table `0_tax_groups`
2198 INSERT INTO `0_tax_groups` VALUES(1, 'Tax', 0);
2199 INSERT INTO `0_tax_groups` VALUES(2, 'Tax Exempt', 0);
2201 -- --------------------------------------------------------
2204 -- Table structure for table `0_tax_group_items`
2207 DROP TABLE IF EXISTS `0_tax_group_items`;
2208 CREATE TABLE IF NOT EXISTS `0_tax_group_items` (
2209 `tax_group_id` int(11) NOT NULL default '0',
2210 `tax_type_id` int(11) NOT NULL default '0',
2211 `tax_shipping` tinyint(1) NOT NULL default '0',
2212 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
2216 -- Dumping data for table `0_tax_group_items`
2219 INSERT INTO `0_tax_group_items` VALUES(1, 1, 1);
2221 -- --------------------------------------------------------
2224 -- Table structure for table `0_tax_types`
2227 DROP TABLE IF EXISTS `0_tax_types`;
2228 CREATE TABLE IF NOT EXISTS `0_tax_types` (
2229 `id` int(11) NOT NULL auto_increment,
2230 `rate` double NOT NULL default '0',
2231 `sales_gl_code` varchar(15) NOT NULL default '',
2232 `purchasing_gl_code` varchar(15) NOT NULL default '',
2233 `name` varchar(60) NOT NULL default '',
2234 `inactive` tinyint(1) NOT NULL default '0',
2236 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2239 -- Dumping data for table `0_tax_types`
2242 INSERT INTO `0_tax_types` VALUES(1, 5, '2150', '2150', 'Tax', 0);
2244 -- --------------------------------------------------------
2247 -- Table structure for table `0_trans_tax_details`
2250 DROP TABLE IF EXISTS `0_trans_tax_details`;
2251 CREATE TABLE IF NOT EXISTS `0_trans_tax_details` (
2252 `id` int(11) NOT NULL auto_increment,
2253 `trans_type` smallint(6) default NULL,
2254 `trans_no` int(11) default NULL,
2255 `tran_date` date NOT NULL,
2256 `tax_type_id` int(11) NOT NULL default '0',
2257 `rate` double NOT NULL default '0',
2258 `ex_rate` double NOT NULL default '1',
2259 `included_in_price` tinyint(1) NOT NULL default '0',
2260 `net_amount` double NOT NULL default '0',
2261 `amount` double NOT NULL default '0',
2264 KEY `Type_and_Number` (`trans_type`,`trans_no`),
2265 KEY `tran_date` (`tran_date`)
2266 ) ENGINE=InnoDB AUTO_INCREMENT=12 ;
2269 -- Dumping data for table `0_trans_tax_details`
2272 INSERT INTO `0_trans_tax_details` VALUES(1, 20, 7, '2014-06-21', 1, 5, 1, 0, 3300, 165, '5t');
2273 INSERT INTO `0_trans_tax_details` VALUES(2, 13, 3, '2014-06-21', 1, 5, 1, 0, 50, 2.5, 'auto');
2274 INSERT INTO `0_trans_tax_details` VALUES(3, 10, 17, '2014-06-21', 1, 5, 1, 0, 50, 2.5, '1');
2275 INSERT INTO `0_trans_tax_details` VALUES(4, 13, 4, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, 'auto');
2276 INSERT INTO `0_trans_tax_details` VALUES(5, 10, 18, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, '2');
2277 INSERT INTO `0_trans_tax_details` VALUES(6, 2, 5, '2014-06-21', 1, 5, 1, 0, 95.2, 4.76, '');
2278 INSERT INTO `0_trans_tax_details` VALUES(7, 1, 8, '2014-06-21', 1, 5, 1, 0, -47.6, -2.38, '');
2279 INSERT INTO `0_trans_tax_details` VALUES(8, 20, 8, '2014-06-21', 1, 5, 1, 0, -19, -0.95, 'cc');
2280 INSERT INTO `0_trans_tax_details` VALUES(9, 13, 5, '2014-06-21', 1, 5, 1, 1, 47.619047619048, 2.3809523809524, 'auto');
2281 INSERT INTO `0_trans_tax_details` VALUES(10, 10, 19, '2014-06-21', 1, 5, 1, 1, 47.619047619048, 2.3809523809524, '3');
2282 INSERT INTO `0_trans_tax_details` VALUES(11, 11, 3, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, '1');
2284 -- --------------------------------------------------------
2287 -- Table structure for table `0_useronline`
2290 DROP TABLE IF EXISTS `0_useronline`;
2291 CREATE TABLE IF NOT EXISTS `0_useronline` (
2292 `id` int(11) NOT NULL auto_increment,
2293 `timestamp` int(15) NOT NULL default '0',
2294 `ip` varchar(40) NOT NULL default '',
2295 `file` varchar(100) NOT NULL default '',
2297 KEY `timestamp` (`timestamp`),
2299 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2302 -- Dumping data for table `0_useronline`
2306 -- --------------------------------------------------------
2309 -- Table structure for table `0_users`
2312 DROP TABLE IF EXISTS `0_users`;
2313 CREATE TABLE IF NOT EXISTS `0_users` (
2314 `id` smallint(6) NOT NULL auto_increment,
2315 `user_id` varchar(60) NOT NULL default '',
2316 `password` varchar(100) NOT NULL default '',
2317 `real_name` varchar(100) NOT NULL default '',
2318 `role_id` int(11) NOT NULL default '1',
2319 `phone` varchar(30) NOT NULL default '',
2320 `email` varchar(100) default NULL,
2321 `language` varchar(20) default NULL,
2322 `date_format` tinyint(1) NOT NULL default '0',
2323 `date_sep` tinyint(1) NOT NULL default '0',
2324 `tho_sep` tinyint(1) NOT NULL default '0',
2325 `dec_sep` tinyint(1) NOT NULL default '0',
2326 `theme` varchar(20) NOT NULL default 'default',
2327 `page_size` varchar(20) NOT NULL default 'A4',
2328 `prices_dec` smallint(6) NOT NULL default '2',
2329 `qty_dec` smallint(6) NOT NULL default '2',
2330 `rates_dec` smallint(6) NOT NULL default '4',
2331 `percent_dec` smallint(6) NOT NULL default '1',
2332 `show_gl` tinyint(1) NOT NULL default '1',
2333 `show_codes` tinyint(1) NOT NULL default '0',
2334 `show_hints` tinyint(1) NOT NULL default '0',
2335 `last_visit_date` datetime default NULL,
2336 `query_size` tinyint(1) unsigned NOT NULL default '10',
2337 `graphic_links` tinyint(1) default '1',
2338 `pos` smallint(6) default '1',
2339 `print_profile` varchar(30) NOT NULL default '',
2340 `rep_popup` tinyint(1) default '1',
2341 `sticky_doc_date` tinyint(1) default '0',
2342 `startup_tab` varchar(20) NOT NULL default '',
2343 `transaction_days` smallint(6) NOT NULL default '30',
2344 'save_report_selections' smallint(6) NOT NULL default '0',
2345 'use_date_picker' tinyint(1) NOT NULL default '1',
2346 'def_print_destination' tinyint(1) NOT NULL default '0',
2347 'def_print_orientation' tinyint(1) NOT NULL default '0',
2348 `inactive` tinyint(1) NOT NULL default '0',
2350 UNIQUE KEY `user_id` (`user_id`)
2351 ) ENGINE=MyISAM AUTO_INCREMENT=3 ;
2354 -- Dumping data for table `0_users`
2357 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, '2014-05-11 23:27:46', 10, 1, 1, '1', 1, 0, 'orders', 30, 0, 1, 0, 0, 0);
2358 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, '2014-02-06 19:02:35', 10, 1, 1, '1', 1, 0, 'orders', 30, 0, 1, 0, 0, 0);
2360 -- --------------------------------------------------------
2363 -- Table structure for table `0_voided`
2366 DROP TABLE IF EXISTS `0_voided`;
2367 CREATE TABLE IF NOT EXISTS `0_voided` (
2368 `type` int(11) NOT NULL default '0',
2369 `id` int(11) NOT NULL default '0',
2370 `date_` date NOT NULL default '0000-00-00',
2371 `memo_` tinytext NOT NULL,
2372 UNIQUE KEY `id` (`type`,`id`)
2376 -- Dumping data for table `0_voided`
2380 -- --------------------------------------------------------
2383 -- Table structure for table `0_workcentres`
2386 DROP TABLE IF EXISTS `0_workcentres`;
2387 CREATE TABLE IF NOT EXISTS `0_workcentres` (
2388 `id` int(11) NOT NULL auto_increment,
2389 `name` char(40) NOT NULL default '',
2390 `description` char(50) NOT NULL default '',
2391 `inactive` tinyint(1) NOT NULL default '0',
2393 UNIQUE KEY `name` (`name`)
2394 ) ENGINE=MyISAM AUTO_INCREMENT=2 ;
2397 -- Dumping data for table `0_workcentres`
2400 INSERT INTO `0_workcentres` VALUES(1, 'Workshop', 'Workshop in Alabama', 0);
2402 -- --------------------------------------------------------
2405 -- Table structure for table `0_workorders`
2408 DROP TABLE IF EXISTS `0_workorders`;
2409 CREATE TABLE IF NOT EXISTS `0_workorders` (
2410 `id` int(11) NOT NULL auto_increment,
2411 `wo_ref` varchar(60) NOT NULL default '',
2412 `loc_code` varchar(5) NOT NULL default '',
2413 `units_reqd` double NOT NULL default '1',
2414 `stock_id` varchar(20) NOT NULL default '',
2415 `date_` date NOT NULL default '0000-00-00',
2416 `type` tinyint(4) NOT NULL default '0',
2417 `required_by` date NOT NULL default '0000-00-00',
2418 `released_date` date NOT NULL default '0000-00-00',
2419 `units_issued` double NOT NULL default '0',
2420 `closed` tinyint(1) NOT NULL default '0',
2421 `released` tinyint(1) NOT NULL default '0',
2422 `additional_costs` double NOT NULL default '0',
2424 UNIQUE KEY `wo_ref` (`wo_ref`)
2425 ) ENGINE=InnoDB AUTO_INCREMENT=8 ;
2428 -- Dumping data for table `0_workorders`
2431 INSERT INTO `0_workorders` VALUES(1, '1', 'DEF', 10, '3400', '2014-06-21', 0, '2014-06-21', '2014-06-21', 10, 1, 1, 10);
2432 INSERT INTO `0_workorders` VALUES(2, '2', 'DEF', 3, '3400', '2014-06-21', 2, '2014-07-11', '2014-06-21', 2, 0, 1, 0);
2433 INSERT INTO `0_workorders` VALUES(3, '3', 'DEF', 2, '3400', '2014-06-21', 0, '2014-06-21', '2014-06-21', 2, 1, 1, 0);
2434 INSERT INTO `0_workorders` VALUES(4, '4', 'DEF', 4, '3400', '2014-06-21', 0, '2014-06-21', '2014-06-21', 4, 1, 1, 0);
2435 INSERT INTO `0_workorders` VALUES(5, '5', 'DEF', 5, '3400', '2014-06-21', 0, '2014-06-21', '2014-06-21', 5, 1, 1, 10);
2436 INSERT INTO `0_workorders` VALUES(6, '6', 'DEF', -5, '3400', '2014-06-21', 1, '2014-06-21', '2014-06-21', -5, 1, 1, 0);
2437 INSERT INTO `0_workorders` VALUES(7, '7', 'DEF', -2, '3400', '2014-06-21', 1, '2014-06-21', '2014-06-21', -2, 1, 1, 10);
2439 -- --------------------------------------------------------
2442 -- Table structure for table `0_wo_costing`
2445 DROP TABLE IF EXISTS `0_wo_costing`;
2446 CREATE TABLE `0_wo_costing` (
2447 `id` int(11) NOT NULL auto_increment,
2448 `workorder_id` int(11) NOT NULL default '0',
2449 `cost_type` tinyint(1) NOT NULL default '0',
2450 `trans_type` int(11) NOT NULL default '0',
2451 `trans_no` int(11) NOT NULL default '0',
2452 `factor` double NOT NULL default '1',
2457 -- Dumping data for table `0_wo_costing`
2461 -- --------------------------------------------------------
2464 -- Table structure for table `0_wo_issues`
2467 DROP TABLE IF EXISTS `0_wo_issues`;
2468 CREATE TABLE IF NOT EXISTS `0_wo_issues` (
2469 `issue_no` int(11) NOT NULL auto_increment,
2470 `workorder_id` int(11) NOT NULL default '0',
2471 `reference` varchar(100) default NULL,
2472 `issue_date` date default NULL,
2473 `loc_code` varchar(5) default NULL,
2474 `workcentre_id` int(11) default NULL,
2475 PRIMARY KEY (`issue_no`),
2476 KEY `workorder_id` (`workorder_id`)
2477 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
2480 -- Dumping data for table `0_wo_issues`
2484 -- --------------------------------------------------------
2487 -- Table structure for table `0_wo_issue_items`
2490 DROP TABLE IF EXISTS `0_wo_issue_items`;
2491 CREATE TABLE IF NOT EXISTS `0_wo_issue_items` (
2492 `id` int(11) NOT NULL auto_increment,
2493 `stock_id` varchar(40) default NULL,
2494 `issue_id` int(11) default NULL,
2495 `qty_issued` double default NULL,
2497 ) ENGINE=InnoDB AUTO_INCREMENT=1 ;
2500 -- Dumping data for table `0_wo_issue_items`
2504 -- --------------------------------------------------------
2507 -- Table structure for table `0_wo_manufacture`
2510 DROP TABLE IF EXISTS `0_wo_manufacture`;
2511 CREATE TABLE IF NOT EXISTS `0_wo_manufacture` (
2512 `id` int(11) NOT NULL auto_increment,
2513 `reference` varchar(100) default NULL,
2514 `workorder_id` int(11) NOT NULL default '0',
2515 `quantity` double NOT NULL default '0',
2516 `date_` date NOT NULL default '0000-00-00',
2518 KEY `workorder_id` (`workorder_id`)
2519 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2522 -- Dumping data for table `0_wo_manufacture`
2525 INSERT INTO `0_wo_manufacture` VALUES(1, '1', 2, 2, '2014-06-21');
2527 -- --------------------------------------------------------
2530 -- Table structure for table `0_wo_requirements`
2533 DROP TABLE IF EXISTS `0_wo_requirements`;
2534 CREATE TABLE IF NOT EXISTS `0_wo_requirements` (
2535 `id` int(11) NOT NULL auto_increment,
2536 `workorder_id` int(11) NOT NULL default '0',
2537 `stock_id` char(20) NOT NULL default '',
2538 `workcentre` int(11) NOT NULL default '0',
2539 `units_req` double NOT NULL default '1',
2540 `std_cost` double NOT NULL default '0',
2541 `loc_code` char(5) NOT NULL default '',
2542 `units_issued` double NOT NULL default '0',
2544 KEY `workorder_id` (`workorder_id`)
2545 ) ENGINE=InnoDB AUTO_INCREMENT=22 ;
2548 -- Dumping data for table `0_wo_requirements`
2551 INSERT INTO `0_wo_requirements` VALUES(1, 1, '102', 1, 1, 0, 'DEF', 10);
2552 INSERT INTO `0_wo_requirements` VALUES(2, 1, '103', 1, 1, 0, 'DEF', 10);
2553 INSERT INTO `0_wo_requirements` VALUES(3, 1, '104', 1, 1, 0, 'DEF', 10);
2554 INSERT INTO `0_wo_requirements` VALUES(4, 2, '102', 1, 1, 0, 'DEF', 0);
2555 INSERT INTO `0_wo_requirements` VALUES(5, 2, '103', 1, 1, 0, 'DEF', 0);
2556 INSERT INTO `0_wo_requirements` VALUES(6, 2, '104', 1, 1, 0, 'DEF', 0);
2557 INSERT INTO `0_wo_requirements` VALUES(7, 3, '102', 1, 1, 0, 'DEF', 2);
2558 INSERT INTO `0_wo_requirements` VALUES(8, 3, '103', 1, 1, 0, 'DEF', 2);
2559 INSERT INTO `0_wo_requirements` VALUES(9, 3, '104', 1, 1, 0, 'DEF', 2);
2560 INSERT INTO `0_wo_requirements` VALUES(10, 4, '102', 1, 1, 0, 'DEF', 4);
2561 INSERT INTO `0_wo_requirements` VALUES(11, 4, '103', 1, 1, 0, 'DEF', 4);
2562 INSERT INTO `0_wo_requirements` VALUES(12, 4, '104', 1, 1, 0, 'DEF', 4);
2563 INSERT INTO `0_wo_requirements` VALUES(13, 5, '102', 1, 1, 0, 'DEF', 5);
2564 INSERT INTO `0_wo_requirements` VALUES(14, 5, '103', 1, 1, 0, 'DEF', 5);
2565 INSERT INTO `0_wo_requirements` VALUES(15, 5, '104', 1, 1, 0, 'DEF', 5);
2566 INSERT INTO `0_wo_requirements` VALUES(16, 6, '102', 1, 1, 0, 'DEF', -5);
2567 INSERT INTO `0_wo_requirements` VALUES(17, 6, '103', 1, 1, 0, 'DEF', -5);
2568 INSERT INTO `0_wo_requirements` VALUES(18, 6, '104', 1, 1, 0, 'DEF', -5);
2569 INSERT INTO `0_wo_requirements` VALUES(19, 7, '102', 1, 1, 0, 'DEF', -2);
2570 INSERT INTO `0_wo_requirements` VALUES(20, 7, '103', 1, 1, 0, 'DEF', -2);
2571 INSERT INTO `0_wo_requirements` VALUES(21, 7, '104', 1, 1, 0, 'DEF', -2);