1 # MySQL dump of database 'en_US-demo' on host 'localhost'
2 # Backup Date and Time: 2019-01-21 11:16
3 # Built by FrontAccounting 2.4.6
4 # http://frontaccounting.com
5 # Company: Training Co.
14 ### Structure of table `0_areas` ###
16 DROP TABLE IF EXISTS `0_areas`;
18 CREATE TABLE `0_areas` (
19 `area_code` int(11) NOT NULL AUTO_INCREMENT,
20 `description` varchar(60) NOT NULL DEFAULT '',
21 `inactive` tinyint(1) NOT NULL DEFAULT '0',
22 PRIMARY KEY (`area_code`),
23 UNIQUE KEY `description` (`description`)
24 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
26 ### Data of table `0_areas` ###
28 INSERT INTO `0_areas` VALUES
31 ### Structure of table `0_attachments` ###
33 DROP TABLE IF EXISTS `0_attachments`;
35 CREATE TABLE `0_attachments` (
36 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
37 `description` varchar(60) NOT NULL DEFAULT '',
38 `type_no` int(11) NOT NULL DEFAULT '0',
39 `trans_no` int(11) NOT NULL DEFAULT '0',
40 `unique_name` varchar(60) NOT NULL DEFAULT '',
41 `tran_date` date NOT NULL DEFAULT '0000-00-00',
42 `filename` varchar(60) NOT NULL DEFAULT '',
43 `filesize` int(11) NOT NULL DEFAULT '0',
44 `filetype` varchar(60) NOT NULL DEFAULT '',
46 KEY `type_no` (`type_no`,`trans_no`)
49 ### Data of table `0_attachments` ###
52 ### Structure of table `0_audit_trail` ###
54 DROP TABLE IF EXISTS `0_audit_trail`;
56 CREATE TABLE `0_audit_trail` (
57 `id` int(11) NOT NULL AUTO_INCREMENT,
58 `type` smallint(6) unsigned NOT NULL DEFAULT '0',
59 `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
60 `user` smallint(6) unsigned NOT NULL DEFAULT '0',
61 `stamp` timestamp NOT NULL,
62 `description` varchar(60) DEFAULT NULL,
63 `fiscal_year` int(11) NOT NULL DEFAULT '0',
64 `gl_date` date NOT NULL DEFAULT '0000-00-00',
65 `gl_seq` int(11) unsigned DEFAULT NULL,
67 KEY `Seq` (`fiscal_year`,`gl_date`,`gl_seq`),
68 KEY `Type_and_Number` (`type`,`trans_no`)
69 ) ENGINE=InnoDB AUTO_INCREMENT=37 ;
71 ### Data of table `0_audit_trail` ###
73 INSERT INTO `0_audit_trail` VALUES
74 ('1', '18', '1', '1', '2018-05-05 14:08:02', NULL, '1', '2018-05-05', '0'),
75 ('2', '25', '1', '1', '2018-05-05 14:08:14', NULL, '1', '2018-05-05', '1'),
76 ('3', '30', '1', '1', '2018-05-05 14:09:54', NULL, '1', '2018-05-10', '0'),
77 ('4', '13', '1', '1', '2018-05-05 14:09:55', NULL, '1', '2018-05-10', '13'),
78 ('5', '10', '1', '1', '2018-05-05 14:09:55', NULL, '1', '2018-05-10', '14'),
79 ('6', '12', '1', '1', '2018-05-05 14:09:55', NULL, '1', '2018-05-10', '15'),
80 ('7', '29', '1', '1', '2018-05-05 14:18:49', 'Quick production.', '1', '2018-05-05', '2'),
81 ('8', '18', '2', '1', '2018-05-05 14:22:32', NULL, '1', '2018-05-05', '0'),
82 ('9', '25', '2', '1', '2018-05-05 14:22:32', NULL, '1', '2018-05-05', '3'),
83 ('10', '20', '1', '1', '2018-05-05 14:22:32', NULL, '1', '2018-05-05', '4'),
84 ('11', '30', '2', '1', '2018-05-07 07:55:15', NULL, '1', '2018-05-07', '0'),
85 ('12', '13', '2', '1', '2018-05-07 07:55:16', NULL, '1', '2018-05-07', '7'),
86 ('13', '10', '2', '1', '2018-05-07 07:55:16', NULL, '1', '2018-05-07', '8'),
87 ('14', '12', '2', '1', '2018-05-07 07:55:16', NULL, '1', '2018-05-07', '9'),
88 ('15', '30', '3', '1', '2018-05-07 08:08:24', NULL, '1', '2018-05-07', '0'),
89 ('16', '30', '4', '1', '2018-05-07 09:18:44', NULL, '1', '2018-05-07', '0'),
90 ('17', '30', '5', '1', '2018-05-07 11:42:41', NULL, '1', '2018-05-07', '0'),
91 ('18', '13', '3', '1', '2018-05-07 11:42:41', NULL, '1', '2018-05-07', '10'),
92 ('19', '10', '3', '1', '2018-05-07 11:42:41', NULL, '1', '2018-05-07', '11'),
93 ('20', '30', '6', '1', '2018-05-07 14:02:35', NULL, '1', '2018-05-07', '0'),
94 ('21', '30', '7', '1', '2018-05-07 14:05:38', NULL, '1', '2018-05-07', '0'),
95 ('22', '13', '4', '1', '2018-05-07 14:05:38', NULL, '1', '2018-05-07', '0'),
96 ('23', '10', '4', '1', '2018-05-07 14:05:38', NULL, '1', '2018-05-07', '0'),
97 ('24', '12', '3', '1', '2018-05-07 14:05:38', NULL, '1', '2018-05-07', '0'),
98 ('25', '26', '1', '1', '2018-05-07 15:59:34', NULL, '1', '2018-05-07', NULL),
99 ('26', '29', '1', '1', '2018-05-07 15:59:01', 'Production.', '1', '2018-05-07', '5'),
100 ('27', '26', '1', '1', '2018-05-07 15:59:34', 'Released.', '1', '2018-05-07', '6'),
101 ('28', '1', '1', '1', '2018-05-07 16:01:00', NULL, '1', '2018-05-07', '12'),
102 ('29', '30', '8', '1', '2019-01-21 11:13:06', NULL, '2', '2019-01-21', '0'),
103 ('30', '13', '5', '1', '2019-01-21 11:13:06', NULL, '2', '2019-01-21', '0'),
104 ('31', '10', '5', '1', '2019-01-21 11:13:06', NULL, '2', '2019-01-21', '0'),
105 ('32', '12', '4', '1', '2019-01-21 11:13:06', NULL, '2', '2019-01-21', '0'),
106 ('33', '18', '3', '1', '2019-01-21 11:14:14', NULL, '2', '2019-01-21', '0'),
107 ('34', '25', '3', '1', '2019-01-21 11:14:14', NULL, '2', '2019-01-21', '0'),
108 ('35', '20', '2', '1', '2019-01-21 11:14:14', NULL, '2', '2019-01-21', '0'),
109 ('36', '0', '1', '1', '2019-01-21 11:15:35', NULL, '1', '2018-12-31', '16');
111 ### Structure of table `0_bank_accounts` ###
113 DROP TABLE IF EXISTS `0_bank_accounts`;
115 CREATE TABLE `0_bank_accounts` (
116 `account_code` varchar(15) NOT NULL DEFAULT '',
117 `account_type` smallint(6) NOT NULL DEFAULT '0',
118 `bank_account_name` varchar(60) NOT NULL DEFAULT '',
119 `bank_account_number` varchar(100) NOT NULL DEFAULT '',
120 `bank_name` varchar(60) NOT NULL DEFAULT '',
121 `bank_address` tinytext COLLATE utf8_unicode_ci,
122 `bank_curr_code` char(3) NOT NULL DEFAULT '',
123 `dflt_curr_act` tinyint(1) NOT NULL DEFAULT '0',
124 `id` smallint(6) NOT NULL AUTO_INCREMENT,
125 `bank_charge_act` varchar(15) NOT NULL DEFAULT '',
126 `last_reconciled_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
127 `ending_reconcile_balance` double NOT NULL DEFAULT '0',
128 `inactive` tinyint(1) NOT NULL DEFAULT '0',
130 KEY `bank_account_name` (`bank_account_name`),
131 KEY `bank_account_number` (`bank_account_number`),
132 KEY `account_code` (`account_code`)
133 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
135 ### Data of table `0_bank_accounts` ###
137 INSERT INTO `0_bank_accounts` VALUES
138 ('1060', '0', 'Current account', 'N/A', 'N/A', NULL, 'USD', '1', '1', '5690', '0000-00-00 00:00:00', '0', '0'),
139 ('1065', '3', 'Petty Cash account', 'N/A', 'N/A', NULL, 'USD', '0', '2', '5690', '0000-00-00 00:00:00', '0', '0');
141 ### Structure of table `0_bank_trans` ###
143 DROP TABLE IF EXISTS `0_bank_trans`;
145 CREATE TABLE `0_bank_trans` (
146 `id` int(11) NOT NULL AUTO_INCREMENT,
147 `type` smallint(6) DEFAULT NULL,
148 `trans_no` int(11) DEFAULT NULL,
149 `bank_act` varchar(15) NOT NULL DEFAULT '',
150 `ref` varchar(40) DEFAULT NULL,
151 `trans_date` date NOT NULL DEFAULT '0000-00-00',
152 `amount` double DEFAULT NULL,
153 `dimension_id` int(11) NOT NULL DEFAULT '0',
154 `dimension2_id` int(11) NOT NULL DEFAULT '0',
155 `person_type_id` int(11) NOT NULL DEFAULT '0',
156 `person_id` tinyblob,
157 `reconciled` date DEFAULT NULL,
159 KEY `bank_act` (`bank_act`,`ref`),
160 KEY `type` (`type`,`trans_no`),
161 KEY `bank_act_2` (`bank_act`,`reconciled`),
162 KEY `bank_act_3` (`bank_act`,`trans_date`)
163 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
165 ### Data of table `0_bank_trans` ###
167 INSERT INTO `0_bank_trans` VALUES
168 ('1', '12', '1', '2', '001/2018', '2018-05-10', '6240', '0', '0', '2', '1', NULL),
169 ('2', '12', '2', '2', '002/2018', '2018-05-07', '300', '0', '0', '2', '1', NULL),
170 ('3', '12', '3', '2', '003/2018', '2018-05-07', '0', '0', '0', '2', '1', NULL),
171 ('4', '1', '1', '1', '001/2018', '2018-05-07', '-5', '0', '0', '0', 'Goods received', NULL),
172 ('5', '12', '4', '2', '001/2019', '2019-01-21', '1250', '0', '0', '2', '1', NULL);
174 ### Structure of table `0_bom` ###
176 DROP TABLE IF EXISTS `0_bom`;
178 CREATE TABLE `0_bom` (
179 `id` int(11) NOT NULL AUTO_INCREMENT,
180 `parent` char(20) NOT NULL DEFAULT '',
181 `component` char(20) NOT NULL DEFAULT '',
182 `workcentre_added` int(11) NOT NULL DEFAULT '0',
183 `loc_code` char(5) NOT NULL DEFAULT '',
184 `quantity` double NOT NULL DEFAULT '1',
185 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
186 KEY `component` (`component`),
188 KEY `loc_code` (`loc_code`),
189 KEY `parent` (`parent`,`loc_code`),
190 KEY `workcentre_added` (`workcentre_added`)
191 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
193 ### Data of table `0_bom` ###
195 INSERT INTO `0_bom` VALUES
196 ('1', '201', '101', '1', 'DEF', '1'),
197 ('2', '201', '102', '1', 'DEF', '1'),
198 ('3', '201', '103', '1', 'DEF', '1'),
199 ('4', '201', '301', '1', 'DEF', '1');
201 ### Structure of table `0_budget_trans` ###
203 DROP TABLE IF EXISTS `0_budget_trans`;
205 CREATE TABLE `0_budget_trans` (
206 `id` int(11) NOT NULL AUTO_INCREMENT,
207 `tran_date` date NOT NULL DEFAULT '0000-00-00',
208 `account` varchar(15) NOT NULL DEFAULT '',
209 `memo_` tinytext NOT NULL,
210 `amount` double NOT NULL DEFAULT '0',
211 `dimension_id` int(11) DEFAULT '0',
212 `dimension2_id` int(11) DEFAULT '0',
214 KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`)
217 ### Data of table `0_budget_trans` ###
220 ### Structure of table `0_chart_class` ###
222 DROP TABLE IF EXISTS `0_chart_class`;
224 CREATE TABLE `0_chart_class` (
225 `cid` varchar(3) NOT NULL,
226 `class_name` varchar(60) NOT NULL DEFAULT '',
227 `ctype` tinyint(1) NOT NULL DEFAULT '0',
228 `inactive` tinyint(1) NOT NULL DEFAULT '0',
232 ### Data of table `0_chart_class` ###
234 INSERT INTO `0_chart_class` VALUES
235 ('1', 'Assets', '1', '0'),
236 ('2', 'Liabilities', '2', '0'),
237 ('3', 'Income', '4', '0'),
238 ('4', 'Costs', '6', '0');
240 ### Structure of table `0_chart_master` ###
242 DROP TABLE IF EXISTS `0_chart_master`;
244 CREATE TABLE `0_chart_master` (
245 `account_code` varchar(15) NOT NULL DEFAULT '',
246 `account_code2` varchar(15) NOT NULL DEFAULT '',
247 `account_name` varchar(60) NOT NULL DEFAULT '',
248 `account_type` varchar(10) NOT NULL DEFAULT '0',
249 `inactive` tinyint(1) NOT NULL DEFAULT '0',
250 PRIMARY KEY (`account_code`),
251 KEY `account_name` (`account_name`),
252 KEY `accounts_by_type` (`account_type`,`account_code`)
255 ### Data of table `0_chart_master` ###
257 INSERT INTO `0_chart_master` VALUES
258 ('1060', '', 'Checking Account', '1', '0'),
259 ('1065', '', 'Petty Cash', '1', '0'),
260 ('1200', '', 'Accounts Receivables', '1', '0'),
261 ('1205', '', 'Allowance for doubtful accounts', '1', '0'),
262 ('1510', '', 'Inventory', '2', '0'),
263 ('1520', '', 'Stocks of Raw Materials', '2', '0'),
264 ('1530', '', 'Stocks of Work In Progress', '2', '0'),
265 ('1540', '', 'Stocks of Finished Goods', '2', '0'),
266 ('1550', '', 'Goods Received Clearing account', '2', '0'),
267 ('1820', '', 'Office Furniture & Equipment', '3', '0'),
268 ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0'),
269 ('1840', '', 'Vehicle', '3', '0'),
270 ('1845', '', 'Accum. Amort. -Vehicle', '3', '0'),
271 ('2100', '', 'Accounts Payable', '4', '0'),
272 ('2105', '', 'Deferred Income', '4', '0'),
273 ('2110', '', 'Accrued Income Tax - Federal', '4', '0'),
274 ('2120', '', 'Accrued Income Tax - State', '4', '0'),
275 ('2130', '', 'Accrued Franchise Tax', '4', '0'),
276 ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0'),
277 ('2150', '', 'Sales Tax', '4', '0'),
278 ('2160', '', 'Accrued Use Tax Payable', '4', '0'),
279 ('2210', '', 'Accrued Wages', '4', '0'),
280 ('2220', '', 'Accrued Comp Time', '4', '0'),
281 ('2230', '', 'Accrued Holiday Pay', '4', '0'),
282 ('2240', '', 'Accrued Vacation Pay', '4', '0'),
283 ('2310', '', 'Accr. Benefits - 401K', '4', '0'),
284 ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0'),
285 ('2330', '', 'Accr. Benefits - Med, Den', '4', '0'),
286 ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0'),
287 ('2350', '', 'Accr. Benefits - Credit Union', '4', '0'),
288 ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0'),
289 ('2370', '', 'Accr. Benefits - Garnish', '4', '0'),
290 ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0'),
291 ('2620', '', 'Bank Loans', '5', '0'),
292 ('2680', '', 'Loans from Shareholders', '5', '0'),
293 ('3350', '', 'Common Shares', '6', '0'),
294 ('3590', '', 'Retained Earnings - prior years', '7', '0'),
295 ('4010', '', 'Sales', '8', '0'),
296 ('4430', '', 'Shipping & Handling', '9', '0'),
297 ('4440', '', 'Interest', '9', '0'),
298 ('4450', '', 'Foreign Exchange Gain', '9', '0'),
299 ('4500', '', 'Prompt Payment Discounts', '9', '0'),
300 ('4510', '', 'Discounts Given', '9', '0'),
301 ('5010', '', 'Cost of Goods Sold - Retail', '10', '0'),
302 ('5020', '', 'Material Usage Varaiance', '10', '0'),
303 ('5030', '', 'Consumable Materials', '10', '0'),
304 ('5040', '', 'Purchase price Variance', '10', '0'),
305 ('5050', '', 'Purchases of materials', '10', '0'),
306 ('5060', '', 'Discounts Received', '10', '0'),
307 ('5100', '', 'Freight', '10', '0'),
308 ('5410', '', 'Wages & Salaries', '11', '0'),
309 ('5420', '', 'Wages - Overtime', '11', '0'),
310 ('5430', '', 'Benefits - Comp Time', '11', '0'),
311 ('5440', '', 'Benefits - Payroll Taxes', '11', '0'),
312 ('5450', '', 'Benefits - Workers Comp', '11', '0'),
313 ('5460', '', 'Benefits - Pension', '11', '0'),
314 ('5470', '', 'Benefits - General Benefits', '11', '0'),
315 ('5510', '', 'Inc Tax Exp - Federal', '11', '0'),
316 ('5520', '', 'Inc Tax Exp - State', '11', '0'),
317 ('5530', '', 'Taxes - Real Estate', '11', '0'),
318 ('5540', '', 'Taxes - Personal Property', '11', '0'),
319 ('5550', '', 'Taxes - Franchise', '11', '0'),
320 ('5560', '', 'Taxes - Foreign Withholding', '11', '0'),
321 ('5610', '', 'Accounting & Legal', '12', '0'),
322 ('5615', '', 'Advertising & Promotions', '12', '0'),
323 ('5620', '', 'Bad Debts', '12', '0'),
324 ('5660', '', 'Amortization Expense', '12', '0'),
325 ('5685', '', 'Insurance', '12', '0'),
326 ('5690', '', 'Interest & Bank Charges', '12', '0'),
327 ('5700', '', 'Office Supplies', '12', '0'),
328 ('5760', '', 'Rent', '12', '0'),
329 ('5765', '', 'Repair & Maintenance', '12', '0'),
330 ('5780', '', 'Telephone', '12', '0'),
331 ('5785', '', 'Travel & Entertainment', '12', '0'),
332 ('5790', '', 'Utilities', '12', '0'),
333 ('5795', '', 'Registrations', '12', '0'),
334 ('5800', '', 'Licenses', '12', '0'),
335 ('5810', '', 'Foreign Exchange Loss', '12', '0'),
336 ('9990', '', 'Year Profit/Loss', '12', '0');
338 ### Structure of table `0_chart_types` ###
340 DROP TABLE IF EXISTS `0_chart_types`;
342 CREATE TABLE `0_chart_types` (
343 `id` varchar(10) NOT NULL,
344 `name` varchar(60) NOT NULL DEFAULT '',
345 `class_id` varchar(3) NOT NULL DEFAULT '',
346 `parent` varchar(10) NOT NULL DEFAULT '-1',
347 `inactive` tinyint(1) NOT NULL DEFAULT '0',
350 KEY `class_id` (`class_id`)
353 ### Data of table `0_chart_types` ###
355 INSERT INTO `0_chart_types` VALUES
356 ('1', 'Current Assets', '1', '', '0'),
357 ('10', 'Cost of Goods Sold', '4', '', '0'),
358 ('11', 'Payroll Expenses', '4', '', '0'),
359 ('12', 'General & Administrative expenses', '4', '', '0'),
360 ('2', 'Inventory Assets', '1', '', '0'),
361 ('3', 'Capital Assets', '1', '', '0'),
362 ('4', 'Current Liabilities', '2', '', '0'),
363 ('5', 'Long Term Liabilities', '2', '', '0'),
364 ('6', 'Share Capital', '2', '', '0'),
365 ('7', 'Retained Earnings', '2', '', '0'),
366 ('8', 'Sales Revenue', '3', '', '0'),
367 ('9', 'Other Revenue', '3', '', '0');
369 ### Structure of table `0_comments` ###
371 DROP TABLE IF EXISTS `0_comments`;
373 CREATE TABLE `0_comments` (
374 `type` int(11) NOT NULL DEFAULT '0',
375 `id` int(11) NOT NULL DEFAULT '0',
376 `date_` date DEFAULT '0000-00-00',
377 `memo_` tinytext COLLATE utf8_unicode_ci,
378 KEY `type_and_id` (`type`,`id`)
381 ### Data of table `0_comments` ###
383 INSERT INTO `0_comments` VALUES
384 ('12', '1', '2018-05-10', 'Cash invoice 1'),
385 ('12', '2', '2018-05-07', 'Cash invoice 2'),
386 ('13', '4', '2018-05-07', 'Recurrent Invoice covers period 04/01/2018 - 04/07/2018.'),
387 ('10', '4', '2018-05-07', 'Recurrent Invoice covers period 04/01/2018 - 04/07/2018.'),
388 ('12', '3', '2018-05-07', 'Cash invoice 4'),
389 ('12', '4', '2019-01-21', 'Default #5'),
390 ('0', '1', '2018-12-31', 'Closing Year');
392 ### Structure of table `0_credit_status` ###
394 DROP TABLE IF EXISTS `0_credit_status`;
396 CREATE TABLE `0_credit_status` (
397 `id` int(11) NOT NULL AUTO_INCREMENT,
398 `reason_description` char(100) NOT NULL DEFAULT '',
399 `dissallow_invoices` tinyint(1) NOT NULL DEFAULT '0',
400 `inactive` tinyint(1) NOT NULL DEFAULT '0',
402 UNIQUE KEY `reason_description` (`reason_description`)
403 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
405 ### Data of table `0_credit_status` ###
407 INSERT INTO `0_credit_status` VALUES
408 ('1', 'Good History', '0', '0'),
409 ('3', 'No more work until payment received', '1', '0'),
410 ('4', 'In liquidation', '1', '0');
412 ### Structure of table `0_crm_categories` ###
414 DROP TABLE IF EXISTS `0_crm_categories`;
416 CREATE TABLE `0_crm_categories` (
417 `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pure technical key',
418 `type` varchar(20) NOT NULL COMMENT 'contact type e.g. customer',
419 `action` varchar(20) NOT NULL COMMENT 'detailed usage e.g. department',
420 `name` varchar(30) NOT NULL COMMENT 'for category selector',
421 `description` tinytext NOT NULL COMMENT 'usage description',
422 `system` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'nonzero for core system usage',
423 `inactive` tinyint(1) NOT NULL DEFAULT '0',
425 UNIQUE KEY `type` (`type`,`action`),
426 UNIQUE KEY `type_2` (`type`,`name`)
427 ) ENGINE=InnoDB AUTO_INCREMENT=13 ;
429 ### Data of table `0_crm_categories` ###
431 INSERT INTO `0_crm_categories` VALUES
432 ('1', 'cust_branch', 'general', 'General', 'General contact data for customer branch (overrides company setting)', '1', '0'),
433 ('2', 'cust_branch', 'invoice', 'Invoices', 'Invoice posting (overrides company setting)', '1', '0'),
434 ('3', 'cust_branch', 'order', 'Orders', 'Order confirmation (overrides company setting)', '1', '0'),
435 ('4', 'cust_branch', 'delivery', 'Deliveries', 'Delivery coordination (overrides company setting)', '1', '0'),
436 ('5', 'customer', 'general', 'General', 'General contact data for customer', '1', '0'),
437 ('6', 'customer', 'order', 'Orders', 'Order confirmation', '1', '0'),
438 ('7', 'customer', 'delivery', 'Deliveries', 'Delivery coordination', '1', '0'),
439 ('8', 'customer', 'invoice', 'Invoices', 'Invoice posting', '1', '0'),
440 ('9', 'supplier', 'general', 'General', 'General contact data for supplier', '1', '0'),
441 ('10', 'supplier', 'order', 'Orders', 'Order confirmation', '1', '0'),
442 ('11', 'supplier', 'delivery', 'Deliveries', 'Delivery coordination', '1', '0'),
443 ('12', 'supplier', 'invoice', 'Invoices', 'Invoice posting', '1', '0');
445 ### Structure of table `0_crm_contacts` ###
447 DROP TABLE IF EXISTS `0_crm_contacts`;
449 CREATE TABLE `0_crm_contacts` (
450 `id` int(11) NOT NULL AUTO_INCREMENT,
451 `person_id` int(11) NOT NULL DEFAULT '0' COMMENT 'foreign key to crm_persons',
452 `type` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
453 `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
454 `entity_id` varchar(11) DEFAULT NULL COMMENT 'entity id in related class table',
456 KEY `type` (`type`,`action`)
457 ) ENGINE=InnoDB AUTO_INCREMENT=11 ;
459 ### Data of table `0_crm_contacts` ###
461 INSERT INTO `0_crm_contacts` VALUES
462 ('4', '2', 'supplier', 'general', '2'),
463 ('5', '3', 'cust_branch', 'general', '1'),
464 ('7', '3', 'customer', 'general', '1'),
465 ('8', '1', 'supplier', 'general', '1'),
466 ('9', '4', 'cust_branch', 'general', '2'),
467 ('10', '4', 'customer', 'general', '2');
469 ### Structure of table `0_crm_persons` ###
471 DROP TABLE IF EXISTS `0_crm_persons`;
473 CREATE TABLE `0_crm_persons` (
474 `id` int(11) NOT NULL AUTO_INCREMENT,
475 `ref` varchar(30) NOT NULL,
476 `name` varchar(60) NOT NULL,
477 `name2` varchar(60) DEFAULT NULL,
478 `address` tinytext COLLATE utf8_unicode_ci,
479 `phone` varchar(30) DEFAULT NULL,
480 `phone2` varchar(30) DEFAULT NULL,
481 `fax` varchar(30) DEFAULT NULL,
482 `email` varchar(100) DEFAULT NULL,
483 `lang` char(5) DEFAULT NULL,
484 `notes` tinytext NOT NULL,
485 `inactive` tinyint(1) NOT NULL DEFAULT '0',
488 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
490 ### Data of table `0_crm_persons` ###
492 INSERT INTO `0_crm_persons` VALUES
493 ('1', 'Dino Saurius', 'John Doe', NULL, 'N/A', NULL, NULL, NULL, NULL, NULL, '', '0'),
494 ('2', 'Beefeater', 'Joe Oversea', NULL, 'N/A', NULL, NULL, NULL, NULL, NULL, '', '0'),
495 ('3', 'Donald Easter', 'Donald Easter LLC', NULL, 'N/A', NULL, NULL, NULL, NULL, NULL, '', '0'),
496 ('4', 'MoneyMaker', 'MoneyMaker Ltd.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '0');
498 ### Structure of table `0_currencies` ###
500 DROP TABLE IF EXISTS `0_currencies`;
502 CREATE TABLE `0_currencies` (
503 `currency` varchar(60) NOT NULL DEFAULT '',
504 `curr_abrev` char(3) NOT NULL DEFAULT '',
505 `curr_symbol` varchar(10) NOT NULL DEFAULT '',
506 `country` varchar(100) NOT NULL DEFAULT '',
507 `hundreds_name` varchar(15) NOT NULL DEFAULT '',
508 `auto_update` tinyint(1) NOT NULL DEFAULT '1',
509 `inactive` tinyint(1) NOT NULL DEFAULT '0',
510 PRIMARY KEY (`curr_abrev`)
513 ### Data of table `0_currencies` ###
515 INSERT INTO `0_currencies` VALUES
516 ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0'),
517 ('Euro', 'EUR', '€', 'Europe', 'Cents', '1', '0'),
518 ('Pounds', 'GBP', '£', 'England', 'Pence', '1', '0'),
519 ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0');
521 ### Structure of table `0_cust_allocations` ###
523 DROP TABLE IF EXISTS `0_cust_allocations`;
525 CREATE TABLE `0_cust_allocations` (
526 `id` int(11) NOT NULL AUTO_INCREMENT,
527 `person_id` int(11) DEFAULT NULL,
528 `amt` double unsigned DEFAULT NULL,
529 `date_alloc` date NOT NULL DEFAULT '0000-00-00',
530 `trans_no_from` int(11) DEFAULT NULL,
531 `trans_type_from` int(11) DEFAULT NULL,
532 `trans_no_to` int(11) DEFAULT NULL,
533 `trans_type_to` int(11) DEFAULT NULL,
535 UNIQUE KEY `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
536 KEY `From` (`trans_type_from`,`trans_no_from`),
537 KEY `To` (`trans_type_to`,`trans_no_to`)
538 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
540 ### Data of table `0_cust_allocations` ###
542 INSERT INTO `0_cust_allocations` VALUES
543 ('1', '1', '6240', '2018-05-10', '1', '12', '1', '10'),
544 ('2', '1', '300', '2018-05-07', '2', '12', '2', '10'),
545 ('3', '1', '0', '2018-05-07', '3', '12', '4', '10'),
546 ('4', '1', '1250', '2019-01-21', '4', '12', '5', '10');
548 ### Structure of table `0_cust_branch` ###
550 DROP TABLE IF EXISTS `0_cust_branch`;
552 CREATE TABLE `0_cust_branch` (
553 `branch_code` int(11) NOT NULL AUTO_INCREMENT,
554 `debtor_no` int(11) NOT NULL DEFAULT '0',
555 `br_name` varchar(60) NOT NULL DEFAULT '',
556 `branch_ref` varchar(30) NOT NULL DEFAULT '',
557 `br_address` tinytext NOT NULL,
558 `area` int(11) DEFAULT NULL,
559 `salesman` int(11) NOT NULL DEFAULT '0',
560 `default_location` varchar(5) NOT NULL DEFAULT '',
561 `tax_group_id` int(11) DEFAULT NULL,
562 `sales_account` varchar(15) NOT NULL DEFAULT '',
563 `sales_discount_account` varchar(15) NOT NULL DEFAULT '',
564 `receivables_account` varchar(15) NOT NULL DEFAULT '',
565 `payment_discount_account` varchar(15) NOT NULL DEFAULT '',
566 `default_ship_via` int(11) NOT NULL DEFAULT '1',
567 `br_post_address` tinytext NOT NULL,
568 `group_no` int(11) NOT NULL DEFAULT '0',
569 `notes` tinytext NOT NULL,
570 `bank_account` varchar(60) DEFAULT NULL,
571 `inactive` tinyint(1) NOT NULL DEFAULT '0',
572 PRIMARY KEY (`branch_code`,`debtor_no`),
573 KEY `branch_ref` (`branch_ref`),
574 KEY `group_no` (`group_no`)
575 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
577 ### Data of table `0_cust_branch` ###
579 INSERT INTO `0_cust_branch` VALUES
580 ('1', '1', 'Donald Easter LLC', 'Donald Easter', 'N/A', '1', '1', 'DEF', '1', '', '4510', '1200', '4500', '1', 'N/A', '0', '', NULL, '0'),
581 ('2', '2', 'MoneyMaker Ltd.', 'MoneyMaker', '', '1', '1', 'DEF', '2', '', '4510', '1200', '4500', '1', '', '0', '', NULL, '0');
583 ### Structure of table `0_dashboard_reminders` ###
585 DROP TABLE IF EXISTS `0_dashboard_reminders`;
587 CREATE TABLE `0_dashboard_reminders` (
588 `id` int(11) NOT NULL AUTO_INCREMENT,
589 `role_id` int(11) NOT NULL,
590 `next_date` date NOT NULL,
591 `description` text COLLATE utf8_unicode_ci,
592 `frequency` varchar(20) NOT NULL,
593 `param` text COLLATE utf8_unicode_ci,
597 ### Data of table `0_dashboard_reminders` ###
600 ### Structure of table `0_dashboard_widgets` ###
602 DROP TABLE IF EXISTS `0_dashboard_widgets`;
604 CREATE TABLE `0_dashboard_widgets` (
605 `id` int(11) NOT NULL AUTO_INCREMENT,
606 `user_id` int(11) NOT NULL,
607 `app` varchar(50) NOT NULL,
608 `column_id` int(11) NOT NULL,
609 `sort_no` int(11) NOT NULL,
610 `collapsed` tinyint(1) NOT NULL,
611 `widget` varchar(100) NOT NULL,
612 `description` varchar(100) NOT NULL,
613 `param` text COLLATE utf8_unicode_ci,
615 ) ENGINE=InnoDB AUTO_INCREMENT=40 ;
617 ### Data of table `0_dashboard_widgets` ###
619 INSERT INTO `0_dashboard_widgets` VALUES
620 ('1', '1', 'AP', '1', '1', '0', 'weeklysales', 'Top 10 Sales Weeks', '{"top":"10","orderby":"Gross Sales","orderby_seq":"desc","graph_type":"Table","data_filter":"dm.payment_terms = -1"}'),
621 ('2', '1', 'AP', '1', '0', '0', 'weeklysales', 'Weekly Sales', '{"top":"","orderby":"Week End","orderby_seq":"asc","graph_type":"LineChart","data_filter":""}'),
622 ('3', '1', 'AP', '2', '1', '0', 'weeklysales', 'Lowest weeks sales', '{"top":"10","orderby":"Gross Sales","orderby_seq":"asc","graph_type":"Table","data_filter":""}'),
623 ('6', '1', 'AP', '2', '0', '0', 'dailysales', 'Daily Sales', '{"top":"10","data_filter":"dm.payment_terms = -1","graph_type":"LineChart"}'),
624 ('7', '1', 'orders', '1', '0', '0', 'customers', 'Top 10 Customers', '{"top":"10","data_filter":"","graph_type":"Table"}'),
625 ('9', '1', 'orders', '1', '1', '0', 'salesinvoices', 'Overdue invoices', '{"data_filter":""}'),
626 ('10', '1', 'AP', '1', '0', '0', 'suppliers', 'Top 10 Suppliers', '{"top":"","data_filter":"","graph_type":"Table"}'),
627 ('11', '1', 'AP', '2', '0', '0', 'suppliers', 'Top 10 Suppliers', '{"top":"","data_filter":"","graph_type":"ColumnChart"}'),
628 ('12', '1', 'GL', '2', '1', '0', 'glreturn', 'Return', '{"graph_type":"Table","data_filter":""}'),
629 ('13', '1', 'GL', '2', '0', '0', 'glreturn', 'Return', '{"graph_type":"PieChart","data_filter":""}'),
630 ('14', '1', 'stock', '1', '0', '0', 'items', 'Top 10 Items', '{"top":"","item_type":"stock","graph_type":"Table","data_filter":""}'),
631 ('15', '1', 'stock', '2', '0', '0', 'items', 'Top 10 Items', '{"top":"","item_type":"stock","graph_type":"PieChart","data_filter":""}'),
632 ('16', '1', 'manuf', '1', '0', '0', 'items', 'Top 10 items', '{"top":"","item_type":"manuf","graph_type":"Table","data_filter":""}'),
633 ('17', '1', 'manuf', '2', '0', '0', 'items', 'Top 10 Items', '{"top":"","item_type":"manuf","graph_type":"PieChart","data_filter":""}'),
634 ('18', '1', 'orders', '2', '0', '0', 'customers', 'Top 10 Customers', '{"top":"","data_filter":"","graph_type":"ColumnChart"}'),
635 ('19', '1', 'GL', '2', '2', '0', 'bankbalances', 'Bank Balances', '{"data_filter":""}'),
636 ('20', '1', 'GL', '1', '1', '0', 'dailybankbalances', 'Daily Current Account Balance', '{"days_past":"","days_future":"","bank_act":"0","graph_type":"ColumnChart"}'),
637 ('21', '1', 'GL', '1', '0', '0', 'banktransactions', 'Current Account Transactions', '{"days_past":"15","days_future":"15","bank_act":"0","data_filter":""}'),
638 ('22', '2', 'AP', '1', '1', '0', 'weeklysales', 'Top 10 Sales Weeks', '{"top":"10","orderby":"Gross Sales","orderby_seq":"desc","graph_type":"Table","data_filter":"dm.payment_terms = -1"}'),
639 ('23', '2', 'AP', '1', '0', '0', 'weeklysales', 'Weekly Sales', '{"top":"","orderby":"Week End","orderby_seq":"asc","graph_type":"LineChart","data_filter":""}'),
640 ('24', '2', 'AP', '2', '1', '0', 'weeklysales', 'Lowest weeks sales', '{"top":"10","orderby":"Gross Sales","orderby_seq":"asc","graph_type":"Table","data_filter":""}'),
641 ('25', '2', 'AP', '2', '0', '0', 'dailysales', 'Daily Sales', '{"top":"10","data_filter":"dm.payment_terms = -1","graph_type":"LineChart"}'),
642 ('26', '2', 'orders', '1', '0', '0', 'customers', 'Top 10 Customers', '{"top":"10","data_filter":"","graph_type":"Table"}'),
643 ('27', '2', 'orders', '1', '1', '0', 'salesinvoices', 'Overdue invoices', '{"data_filter":""}'),
644 ('28', '2', 'AP', '1', '0', '0', 'suppliers', 'Top 10 Suppliers', '{"top":"","data_filter":"","graph_type":"Table"}'),
645 ('29', '2', 'AP', '2', '0', '0', 'suppliers', 'Top 10 Suppliers', '{"top":"","data_filter":"","graph_type":"ColumnChart"}'),
646 ('30', '2', 'GL', '2', '1', '0', 'glreturn', 'Return', '{"graph_type":"Table","data_filter":""}'),
647 ('31', '2', 'GL', '2', '0', '0', 'glreturn', 'Return', '{"graph_type":"PieChart","data_filter":""}'),
648 ('32', '2', 'stock', '1', '0', '0', 'items', 'Top 10 Items', '{"top":"","item_type":"stock","graph_type":"Table","data_filter":""}'),
649 ('33', '2', 'stock', '2', '0', '0', 'items', 'Top 10 Items', '{"top":"","item_type":"stock","graph_type":"PieChart","data_filter":""}'),
650 ('34', '2', 'manuf', '1', '0', '0', 'items', 'Top 10 items', '{"top":"","item_type":"manuf","graph_type":"Table","data_filter":""}'),
651 ('35', '2', 'manuf', '2', '0', '0', 'items', 'Top 10 Items', '{"top":"","item_type":"manuf","graph_type":"PieChart","data_filter":""}'),
652 ('36', '2', 'orders', '2', '0', '0', 'customers', 'Top 10 Customers', '{"top":"","data_filter":"","graph_type":"ColumnChart"}'),
653 ('37', '2', 'GL', '2', '2', '0', 'bankbalances', 'Bank Balances', '{"data_filter":""}'),
654 ('38', '2', 'GL', '1', '1', '0', 'dailybankbalances', 'Daily Current Account Balance', '{"days_past":"","days_future":"","bank_act":"0","graph_type":"ColumnChart"}'),
655 ('39', '2', 'GL', '1', '0', '0', 'banktransactions', 'Current Account Transactions', '{"days_past":"15","days_future":"15","bank_act":"0","data_filter":""}');
657 ### Structure of table `0_debtor_trans` ###
659 DROP TABLE IF EXISTS `0_debtor_trans`;
661 CREATE TABLE `0_debtor_trans` (
662 `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
663 `type` smallint(6) unsigned NOT NULL DEFAULT '0',
664 `version` tinyint(1) unsigned NOT NULL DEFAULT '0',
665 `debtor_no` int(11) unsigned NOT NULL,
666 `branch_code` int(11) NOT NULL DEFAULT '-1',
667 `tran_date` date NOT NULL DEFAULT '0000-00-00',
668 `due_date` date NOT NULL DEFAULT '0000-00-00',
669 `reference` varchar(60) NOT NULL DEFAULT '',
670 `tpe` int(11) NOT NULL DEFAULT '0',
671 `order_` int(11) NOT NULL DEFAULT '0',
672 `ov_amount` double NOT NULL DEFAULT '0',
673 `ov_gst` double NOT NULL DEFAULT '0',
674 `ov_freight` double NOT NULL DEFAULT '0',
675 `ov_freight_tax` double NOT NULL DEFAULT '0',
676 `ov_discount` double NOT NULL DEFAULT '0',
677 `alloc` double NOT NULL DEFAULT '0',
678 `prep_amount` double NOT NULL DEFAULT '0',
679 `rate` double NOT NULL DEFAULT '1',
680 `ship_via` int(11) DEFAULT NULL,
681 `dimension_id` int(11) NOT NULL DEFAULT '0',
682 `dimension2_id` int(11) NOT NULL DEFAULT '0',
683 `payment_terms` int(11) DEFAULT NULL,
684 `tax_included` tinyint(1) unsigned NOT NULL DEFAULT '0',
685 PRIMARY KEY (`type`,`trans_no`,`debtor_no`),
686 KEY `debtor_no` (`debtor_no`,`branch_code`),
687 KEY `tran_date` (`tran_date`),
688 KEY `order_` (`order_`)
691 ### Data of table `0_debtor_trans` ###
693 INSERT INTO `0_debtor_trans` VALUES
694 ('1', '10', '0', '1', '1', '2018-05-10', '2018-05-05', '001/2018', '1', '1', '6240', '0', '0', '0', '0', '6240', '0', '1', '1', '0', '0', '4', '1'),
695 ('2', '10', '0', '1', '1', '2018-05-07', '2018-05-07', '002/2018', '1', '2', '300', '0', '0', '0', '0', '300', '0', '1', '1', '0', '0', '4', '1'),
696 ('3', '10', '0', '2', '2', '2018-05-07', '2018-06-17', '003/2018', '1', '5', '267.14', '0', '0', '0', '0', '0', '0', '1.123', '1', '1', '0', '1', '1'),
697 ('4', '10', '0', '1', '1', '2018-05-07', '2018-05-07', '004/2018', '1', '7', '0', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '4', '1'),
698 ('5', '10', '0', '1', '1', '2019-01-21', '2019-01-21', '001/2019', '1', '8', '1250', '0', '0', '0', '0', '1250', '0', '1', '1', '0', '0', '4', '1'),
699 ('1', '12', '0', '1', '1', '2018-05-10', '0000-00-00', '001/2018', '0', '0', '6240', '0', '0', '0', '0', '6240', '0', '1', '0', '0', '0', NULL, '0'),
700 ('2', '12', '0', '1', '1', '2018-05-07', '0000-00-00', '002/2018', '0', '0', '300', '0', '0', '0', '0', '300', '0', '1', '0', '0', '0', NULL, '0'),
701 ('3', '12', '0', '1', '1', '2018-05-07', '0000-00-00', '003/2018', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', NULL, '0'),
702 ('4', '12', '0', '1', '1', '2019-01-21', '0000-00-00', '001/2019', '0', '0', '1250', '0', '0', '0', '0', '1250', '0', '1', '0', '0', '0', NULL, '0'),
703 ('1', '13', '1', '1', '1', '2018-05-10', '2018-05-05', 'auto', '1', '1', '6240', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '4', '1'),
704 ('2', '13', '1', '1', '1', '2018-05-07', '2018-05-07', 'auto', '1', '2', '300', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '4', '1'),
705 ('3', '13', '1', '2', '2', '2018-05-07', '2018-06-17', 'auto', '1', '5', '267.14', '0', '0', '0', '0', '0', '0', '1.123', '1', '1', '0', '1', '1'),
706 ('4', '13', '1', '1', '1', '2018-05-07', '2018-05-07', 'auto', '1', '7', '0', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '4', '1'),
707 ('5', '13', '1', '1', '1', '2019-01-21', '2019-01-21', 'auto', '1', '8', '1250', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '4', '1');
709 ### Structure of table `0_debtor_trans_details` ###
711 DROP TABLE IF EXISTS `0_debtor_trans_details`;
713 CREATE TABLE `0_debtor_trans_details` (
714 `id` int(11) NOT NULL AUTO_INCREMENT,
715 `debtor_trans_no` int(11) DEFAULT NULL,
716 `debtor_trans_type` int(11) DEFAULT NULL,
717 `stock_id` varchar(20) NOT NULL DEFAULT '',
718 `description` tinytext COLLATE utf8_unicode_ci,
719 `unit_price` double NOT NULL DEFAULT '0',
720 `unit_tax` double NOT NULL DEFAULT '0',
721 `quantity` double NOT NULL DEFAULT '0',
722 `discount_percent` double NOT NULL DEFAULT '0',
723 `standard_cost` double NOT NULL DEFAULT '0',
724 `qty_done` double NOT NULL DEFAULT '0',
725 `src_id` int(11) NOT NULL,
727 KEY `Transaction` (`debtor_trans_type`,`debtor_trans_no`),
728 KEY `src_id` (`src_id`)
729 ) ENGINE=InnoDB AUTO_INCREMENT=15 ;
731 ### Data of table `0_debtor_trans_details` ###
733 INSERT INTO `0_debtor_trans_details` VALUES
734 ('1', '1', '13', '101', 'iPad Air 2 16GB', '300', '14.29', '20', '0', '200', '20', '1'),
735 ('2', '1', '13', '301', 'Support', '80', '3.81', '3', '0', '0', '3', '2'),
736 ('3', '1', '10', '101', 'iPad Air 2 16GB', '300', '14.2855', '20', '0', '200', '0', '1'),
737 ('4', '1', '10', '301', 'Support', '80', '3.81', '3', '0', '0', '0', '2'),
738 ('5', '2', '13', '101', 'iPad Air 2 16GB', '300', '14.29', '1', '0', '200', '1', '3'),
739 ('6', '2', '10', '101', 'iPad Air 2 16GB', '300', '14.29', '1', '0', '200', '0', '5'),
740 ('7', '3', '13', '102', 'iPhone 6 64GB', '222.62', '0', '1', '0', '150', '1', '7'),
741 ('8', '3', '13', '103', 'iPhone Cover Case', '44.52', '0', '1', '0', '10', '1', '8'),
742 ('9', '3', '10', '102', 'iPhone 6 64GB', '222.62', '0', '1', '0', '150', '0', '7'),
743 ('10', '3', '10', '103', 'iPhone Cover Case', '44.52', '0', '1', '0', '10', '0', '8'),
744 ('11', '4', '13', '202', 'Maintenance', '0', '0', '5', '0', '0', '5', '10'),
745 ('12', '4', '10', '202', 'Maintenance', '0', '0', '5', '0', '0', '0', '11'),
746 ('13', '5', '13', '102', 'iPhone 6 64GB', '250', '11.904', '5', '0', '150', '5', '11'),
747 ('14', '5', '10', '102', 'iPhone 6 64GB', '250', '11.904', '5', '0', '150', '0', '13');
749 ### Structure of table `0_debtors_master` ###
751 DROP TABLE IF EXISTS `0_debtors_master`;
753 CREATE TABLE `0_debtors_master` (
754 `debtor_no` int(11) NOT NULL AUTO_INCREMENT,
755 `name` varchar(100) NOT NULL DEFAULT '',
756 `debtor_ref` varchar(30) NOT NULL,
757 `address` tinytext COLLATE utf8_unicode_ci,
758 `tax_id` varchar(55) NOT NULL DEFAULT '',
759 `curr_code` char(3) NOT NULL DEFAULT '',
760 `sales_type` int(11) NOT NULL DEFAULT '1',
761 `dimension_id` int(11) NOT NULL DEFAULT '0',
762 `dimension2_id` int(11) NOT NULL DEFAULT '0',
763 `credit_status` int(11) NOT NULL DEFAULT '0',
764 `payment_terms` int(11) DEFAULT NULL,
765 `discount` double NOT NULL DEFAULT '0',
766 `pymt_discount` double NOT NULL DEFAULT '0',
767 `credit_limit` float NOT NULL DEFAULT '1000',
768 `notes` tinytext NOT NULL,
769 `inactive` tinyint(1) NOT NULL DEFAULT '0',
770 PRIMARY KEY (`debtor_no`),
771 UNIQUE KEY `debtor_ref` (`debtor_ref`),
773 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
775 ### Data of table `0_debtors_master` ###
777 INSERT INTO `0_debtors_master` VALUES
778 ('1', 'Donald Easter LLC', 'Donald Easter', 'N/A', '123456789', 'USD', '1', '0', '0', '1', '4', '0', '0', '1000', '', '0'),
779 ('2', 'MoneyMaker Ltd.', 'MoneyMaker', 'N/A', '54354333', 'EUR', '1', '1', '0', '1', '1', '0', '0', '1000', '', '0');
781 ### Structure of table `0_dimensions` ###
783 DROP TABLE IF EXISTS `0_dimensions`;
785 CREATE TABLE `0_dimensions` (
786 `id` int(11) NOT NULL AUTO_INCREMENT,
787 `reference` varchar(60) NOT NULL DEFAULT '',
788 `name` varchar(60) NOT NULL DEFAULT '',
789 `type_` tinyint(1) NOT NULL DEFAULT '1',
790 `closed` tinyint(1) NOT NULL DEFAULT '0',
791 `date_` date NOT NULL DEFAULT '0000-00-00',
792 `due_date` date NOT NULL DEFAULT '0000-00-00',
794 UNIQUE KEY `reference` (`reference`),
795 KEY `date_` (`date_`),
796 KEY `due_date` (`due_date`),
797 KEY `type_` (`type_`)
798 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
800 ### Data of table `0_dimensions` ###
802 INSERT INTO `0_dimensions` VALUES
803 ('1', '001/2018', 'Cost Centre', '1', '0', '2018-05-05', '2018-05-25');
805 ### Structure of table `0_exchange_rates` ###
807 DROP TABLE IF EXISTS `0_exchange_rates`;
809 CREATE TABLE `0_exchange_rates` (
810 `id` int(11) NOT NULL AUTO_INCREMENT,
811 `curr_code` char(3) NOT NULL DEFAULT '',
812 `rate_buy` double NOT NULL DEFAULT '0',
813 `rate_sell` double NOT NULL DEFAULT '0',
814 `date_` date NOT NULL DEFAULT '0000-00-00',
816 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
817 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
819 ### Data of table `0_exchange_rates` ###
821 INSERT INTO `0_exchange_rates` VALUES
822 ('1', 'EUR', '1.123', '1.123', '2018-05-07');
824 ### Structure of table `0_fiscal_year` ###
826 DROP TABLE IF EXISTS `0_fiscal_year`;
828 CREATE TABLE `0_fiscal_year` (
829 `id` int(11) NOT NULL AUTO_INCREMENT,
830 `begin` date DEFAULT '0000-00-00',
831 `end` date DEFAULT '0000-00-00',
832 `closed` tinyint(1) NOT NULL DEFAULT '0',
834 UNIQUE KEY `begin` (`begin`),
835 UNIQUE KEY `end` (`end`)
836 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
838 ### Data of table `0_fiscal_year` ###
840 INSERT INTO `0_fiscal_year` VALUES
841 ('1', '2018-01-01', '2018-12-31', '1'),
842 ('2', '2019-01-01', '2019-12-31', '0');
844 ### Structure of table `0_gl_trans` ###
846 DROP TABLE IF EXISTS `0_gl_trans`;
848 CREATE TABLE `0_gl_trans` (
849 `counter` int(11) NOT NULL AUTO_INCREMENT,
850 `type` smallint(6) NOT NULL DEFAULT '0',
851 `type_no` int(11) NOT NULL DEFAULT '0',
852 `tran_date` date NOT NULL DEFAULT '0000-00-00',
853 `account` varchar(15) NOT NULL DEFAULT '',
854 `memo_` tinytext NOT NULL,
855 `amount` double NOT NULL DEFAULT '0',
856 `dimension_id` int(11) NOT NULL DEFAULT '0',
857 `dimension2_id` int(11) NOT NULL DEFAULT '0',
858 `person_type_id` int(11) DEFAULT NULL,
859 `person_id` tinyblob,
860 PRIMARY KEY (`counter`),
861 KEY `Type_and_Number` (`type`,`type_no`),
862 KEY `dimension_id` (`dimension_id`),
863 KEY `dimension2_id` (`dimension2_id`),
864 KEY `tran_date` (`tran_date`),
865 KEY `account_and_tran_date` (`account`,`tran_date`)
866 ) ENGINE=InnoDB AUTO_INCREMENT=55 ;
868 ### Data of table `0_gl_trans` ###
870 INSERT INTO `0_gl_trans` VALUES
871 ('1', '25', '1', '2018-05-05', '1510', '101', '20000', '0', '0', NULL, NULL),
872 ('2', '25', '1', '2018-05-05', '1510', '102', '15000', '0', '0', NULL, NULL),
873 ('3', '25', '1', '2018-05-05', '1510', '103', '1000', '0', '0', NULL, NULL),
874 ('4', '25', '1', '2018-05-05', '1550', '', '-36000', '0', '0', NULL, NULL),
875 ('5', '13', '1', '2018-05-10', '5010', '', '4000', '0', '0', NULL, NULL),
876 ('6', '13', '1', '2018-05-10', '1510', '', '-4000', '0', '0', NULL, NULL),
877 ('7', '10', '1', '2018-05-10', '4010', '', '-5714.29', '0', '0', NULL, NULL),
878 ('8', '10', '1', '2018-05-10', '4010', '', '-228.57', '0', '0', NULL, NULL),
879 ('9', '10', '1', '2018-05-10', '1200', '', '6240', '0', '0', '2', '1'),
880 ('10', '10', '1', '2018-05-10', '2150', '', '-297.14', '0', '0', NULL, NULL),
881 ('11', '12', '1', '2018-05-10', '1065', '', '6240', '0', '0', NULL, NULL),
882 ('12', '12', '1', '2018-05-10', '1200', '', '-6240', '0', '0', '2', '1'),
883 ('13', '29', '1', '2018-05-05', '1510', '1 * iPad Air 2 16GB', '-400', '0', '0', NULL, NULL),
884 ('14', '29', '1', '2018-05-05', '1510', '1 * iPhone 6 64GB', '-300', '0', '0', NULL, NULL),
885 ('15', '29', '1', '2018-05-05', '1510', '1 * iPhone Cover Case', '-20', '0', '0', NULL, NULL),
886 ('16', '29', '1', '2018-05-05', '1530', '1 * Support', '720', '0', '0', NULL, NULL),
887 ('17', '26', '1', '2018-05-05', '1530', '', '-720', '0', '0', NULL, NULL),
888 ('18', '26', '1', '2018-05-05', '1510', '', '720', '0', '0', NULL, NULL),
889 ('19', '25', '2', '2018-05-05', '1510', '101', '3000', '0', '0', NULL, NULL),
890 ('20', '25', '2', '2018-05-05', '1550', '', '-3000', '0', '0', NULL, NULL),
891 ('21', '20', '1', '2018-05-05', '2150', '', '150', '0', '0', NULL, NULL),
892 ('22', '20', '1', '2018-05-05', '2100', '', '-3150', '0', '0', '3', '1'),
893 ('23', '20', '1', '2018-05-05', '1550', '', '3000', '0', '0', NULL, NULL),
894 ('24', '13', '2', '2018-05-07', '5010', '', '200', '0', '0', NULL, NULL),
895 ('25', '13', '2', '2018-05-07', '1510', '', '-200', '0', '0', NULL, NULL),
896 ('26', '10', '2', '2018-05-07', '4010', '', '-285.71', '0', '0', NULL, NULL),
897 ('27', '10', '2', '2018-05-07', '1200', '', '300', '0', '0', '2', '1'),
898 ('28', '10', '2', '2018-05-07', '2150', '', '-14.29', '0', '0', NULL, NULL),
899 ('29', '12', '2', '2018-05-07', '1065', '', '300', '0', '0', NULL, NULL),
900 ('30', '12', '2', '2018-05-07', '1200', '', '-300', '0', '0', '2', '1'),
901 ('31', '13', '3', '2018-05-07', '5010', '', '150', '1', '0', NULL, NULL),
902 ('32', '13', '3', '2018-05-07', '1510', '', '-150', '0', '0', NULL, NULL),
903 ('33', '13', '3', '2018-05-07', '5010', '', '10', '1', '0', NULL, NULL),
904 ('34', '13', '3', '2018-05-07', '1510', '', '-10', '0', '0', NULL, NULL),
905 ('35', '10', '3', '2018-05-07', '4010', '', '-250', '1', '0', NULL, NULL),
906 ('36', '10', '3', '2018-05-07', '4010', '', '-50', '1', '0', NULL, NULL),
907 ('37', '10', '3', '2018-05-07', '1200', '', '300', '0', '0', '2', '2'),
908 ('38', '12', '3', '2018-05-07', '1065', '', '0', '0', '0', NULL, NULL),
909 ('39', '1', '1', '2018-05-07', '5010', '', '5', '1', '0', NULL, NULL),
910 ('40', '1', '1', '2018-05-07', '1060', '', '-5', '0', '0', NULL, NULL),
911 ('41', '13', '5', '2019-01-21', '5010', '', '750', '0', '0', NULL, NULL),
912 ('42', '13', '5', '2019-01-21', '1510', '', '-750', '0', '0', NULL, NULL),
913 ('43', '10', '5', '2019-01-21', '4010', '', '-1190.48', '0', '0', NULL, NULL),
914 ('44', '10', '5', '2019-01-21', '1200', '', '1250', '0', '0', '2', '1'),
915 ('45', '10', '5', '2019-01-21', '2150', '', '-59.52', '0', '0', NULL, NULL),
916 ('46', '12', '4', '2019-01-21', '1065', '', '1250', '0', '0', NULL, NULL),
917 ('47', '12', '4', '2019-01-21', '1200', '', '-1250', '0', '0', '2', '1'),
918 ('48', '25', '3', '2019-01-21', '1510', '102', '900', '0', '0', NULL, NULL),
919 ('49', '25', '3', '2019-01-21', '1550', '', '-900', '0', '0', NULL, NULL),
920 ('50', '20', '2', '2019-01-21', '2150', '', '45', '0', '0', NULL, NULL),
921 ('51', '20', '2', '2019-01-21', '2100', '', '-945', '0', '0', '3', '1'),
922 ('52', '20', '2', '2019-01-21', '1550', '', '900', '0', '0', NULL, NULL),
923 ('53', '0', '1', '2018-12-31', '3590', 'Closing Year', '-2163.57', '0', '0', NULL, NULL),
924 ('54', '0', '1', '2018-12-31', '9990', 'Closing Year', '2163.57', '0', '0', NULL, NULL);
926 ### Structure of table `0_grn_batch` ###
928 DROP TABLE IF EXISTS `0_grn_batch`;
930 CREATE TABLE `0_grn_batch` (
931 `id` int(11) NOT NULL AUTO_INCREMENT,
932 `supplier_id` int(11) NOT NULL DEFAULT '0',
933 `purch_order_no` int(11) DEFAULT NULL,
934 `reference` varchar(60) NOT NULL DEFAULT '',
935 `delivery_date` date NOT NULL DEFAULT '0000-00-00',
936 `loc_code` varchar(5) DEFAULT NULL,
937 `rate` double DEFAULT '1',
939 KEY `delivery_date` (`delivery_date`),
940 KEY `purch_order_no` (`purch_order_no`)
941 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
943 ### Data of table `0_grn_batch` ###
945 INSERT INTO `0_grn_batch` VALUES
946 ('1', '1', '1', '001/2018', '2018-05-05', 'DEF', '1'),
947 ('2', '1', '2', 'auto', '2018-05-05', 'DEF', '1'),
948 ('3', '1', '3', 'auto', '2019-01-21', 'DEF', '1');
950 ### Structure of table `0_grn_items` ###
952 DROP TABLE IF EXISTS `0_grn_items`;
954 CREATE TABLE `0_grn_items` (
955 `id` int(11) NOT NULL AUTO_INCREMENT,
956 `grn_batch_id` int(11) DEFAULT NULL,
957 `po_detail_item` int(11) NOT NULL DEFAULT '0',
958 `item_code` varchar(20) NOT NULL DEFAULT '',
959 `description` tinytext COLLATE utf8_unicode_ci,
960 `qty_recd` double NOT NULL DEFAULT '0',
961 `quantity_inv` double NOT NULL DEFAULT '0',
963 KEY `grn_batch_id` (`grn_batch_id`)
964 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
966 ### Data of table `0_grn_items` ###
968 INSERT INTO `0_grn_items` VALUES
969 ('1', '1', '1', '101', 'iPad Air 2 16GB', '100', '0'),
970 ('2', '1', '2', '102', 'iPhone 6 64GB', '100', '0'),
971 ('3', '1', '3', '103', 'iPhone Cover Case', '100', '0'),
972 ('4', '2', '4', '101', 'iPad Air 2 16GB', '15', '15'),
973 ('5', '3', '5', '102', 'iPhone 6 64GB', '6', '6');
975 ### Structure of table `0_groups` ###
977 DROP TABLE IF EXISTS `0_groups`;
979 CREATE TABLE `0_groups` (
980 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
981 `description` varchar(60) NOT NULL DEFAULT '',
982 `inactive` tinyint(1) NOT NULL DEFAULT '0',
984 UNIQUE KEY `description` (`description`)
985 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
987 ### Data of table `0_groups` ###
989 INSERT INTO `0_groups` VALUES
991 ('2', 'Medium', '0'),
994 ### Structure of table `0_item_codes` ###
996 DROP TABLE IF EXISTS `0_item_codes`;
998 CREATE TABLE `0_item_codes` (
999 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
1000 `item_code` varchar(20) NOT NULL,
1001 `stock_id` varchar(20) NOT NULL,
1002 `description` varchar(200) NOT NULL DEFAULT '',
1003 `category_id` smallint(6) unsigned NOT NULL,
1004 `quantity` double NOT NULL DEFAULT '1',
1005 `is_foreign` tinyint(1) NOT NULL DEFAULT '0',
1006 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1008 UNIQUE KEY `stock_id` (`stock_id`,`item_code`),
1009 KEY `item_code` (`item_code`)
1010 ) ENGINE=InnoDB AUTO_INCREMENT=9 ;
1012 ### Data of table `0_item_codes` ###
1014 INSERT INTO `0_item_codes` VALUES
1015 ('1', '101', '101', 'iPad Air 2 16GB', '1', '1', '0', '0'),
1016 ('2', '102', '102', 'iPhone 6 64GB', '1', '1', '0', '0'),
1017 ('3', '103', '103', 'iPhone Cover Case', '1', '1', '0', '0'),
1018 ('4', '201', '201', 'AP Surf Set', '3', '1', '0', '0'),
1019 ('5', '301', '301', 'Support', '4', '1', '0', '0'),
1020 ('6', '501', '102', 'iPhone Pack', '1', '1', '0', '0'),
1021 ('7', '501', '103', 'iPhone Pack', '1', '1', '0', '0'),
1022 ('8', '202', '202', 'Maintenance', '4', '1', '0', '0');
1024 ### Structure of table `0_item_tax_type_exemptions` ###
1026 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
1028 CREATE TABLE `0_item_tax_type_exemptions` (
1029 `item_tax_type_id` int(11) NOT NULL DEFAULT '0',
1030 `tax_type_id` int(11) NOT NULL DEFAULT '0',
1031 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
1034 ### Data of table `0_item_tax_type_exemptions` ###
1037 ### Structure of table `0_item_tax_types` ###
1039 DROP TABLE IF EXISTS `0_item_tax_types`;
1041 CREATE TABLE `0_item_tax_types` (
1042 `id` int(11) NOT NULL AUTO_INCREMENT,
1043 `name` varchar(60) NOT NULL DEFAULT '',
1044 `exempt` tinyint(1) NOT NULL DEFAULT '0',
1045 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1047 UNIQUE KEY `name` (`name`)
1048 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1050 ### Data of table `0_item_tax_types` ###
1052 INSERT INTO `0_item_tax_types` VALUES
1053 ('1', 'Regular', '0', '0');
1055 ### Structure of table `0_item_units` ###
1057 DROP TABLE IF EXISTS `0_item_units`;
1059 CREATE TABLE `0_item_units` (
1060 `abbr` varchar(20) NOT NULL,
1061 `name` varchar(40) NOT NULL,
1062 `decimals` tinyint(2) NOT NULL,
1063 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1064 PRIMARY KEY (`abbr`),
1065 UNIQUE KEY `name` (`name`)
1068 ### Data of table `0_item_units` ###
1070 INSERT INTO `0_item_units` VALUES
1071 ('each', 'Each', '0', '0'),
1072 ('hr', 'Hours', '0', '0');
1074 ### Structure of table `0_journal` ###
1076 DROP TABLE IF EXISTS `0_journal`;
1078 CREATE TABLE `0_journal` (
1079 `type` smallint(6) NOT NULL DEFAULT '0',
1080 `trans_no` int(11) NOT NULL DEFAULT '0',
1081 `tran_date` date DEFAULT '0000-00-00',
1082 `reference` varchar(60) NOT NULL DEFAULT '',
1083 `source_ref` varchar(60) NOT NULL DEFAULT '',
1084 `event_date` date DEFAULT '0000-00-00',
1085 `doc_date` date NOT NULL DEFAULT '0000-00-00',
1086 `currency` char(3) NOT NULL DEFAULT '',
1087 `amount` double NOT NULL DEFAULT '0',
1088 `rate` double NOT NULL DEFAULT '1',
1089 PRIMARY KEY (`type`,`trans_no`),
1090 KEY `tran_date` (`tran_date`)
1093 ### Data of table `0_journal` ###
1095 INSERT INTO `0_journal` VALUES
1096 ('0', '1', '2018-12-31', '001/2012', '', '2018-12-31', '2018-12-31', 'USD', '2163.57', '1');
1098 ### Structure of table `0_loc_stock` ###
1100 DROP TABLE IF EXISTS `0_loc_stock`;
1102 CREATE TABLE `0_loc_stock` (
1103 `loc_code` char(5) NOT NULL DEFAULT '',
1104 `stock_id` char(20) NOT NULL DEFAULT '',
1105 `reorder_level` double NOT NULL DEFAULT '0',
1106 PRIMARY KEY (`loc_code`,`stock_id`),
1107 KEY `stock_id` (`stock_id`)
1110 ### Data of table `0_loc_stock` ###
1112 INSERT INTO `0_loc_stock` VALUES
1113 ('DEF', '101', '0'),
1114 ('DEF', '102', '0'),
1115 ('DEF', '103', '0'),
1116 ('DEF', '201', '0'),
1117 ('DEF', '202', '0'),
1118 ('DEF', '301', '0');
1120 ### Structure of table `0_locations` ###
1122 DROP TABLE IF EXISTS `0_locations`;
1124 CREATE TABLE `0_locations` (
1125 `loc_code` varchar(5) NOT NULL DEFAULT '',
1126 `location_name` varchar(60) NOT NULL DEFAULT '',
1127 `delivery_address` tinytext NOT NULL,
1128 `phone` varchar(30) NOT NULL DEFAULT '',
1129 `phone2` varchar(30) NOT NULL DEFAULT '',
1130 `fax` varchar(30) NOT NULL DEFAULT '',
1131 `email` varchar(100) NOT NULL DEFAULT '',
1132 `contact` varchar(30) NOT NULL DEFAULT '',
1133 `fixed_asset` tinyint(1) NOT NULL DEFAULT '0',
1134 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1135 PRIMARY KEY (`loc_code`)
1138 ### Data of table `0_locations` ###
1140 INSERT INTO `0_locations` VALUES
1141 ('DEF', 'Default', 'N/A', '', '', '', '', '', '0', '0');
1143 ### Structure of table `0_payment_terms` ###
1145 DROP TABLE IF EXISTS `0_payment_terms`;
1147 CREATE TABLE `0_payment_terms` (
1148 `terms_indicator` int(11) NOT NULL AUTO_INCREMENT,
1149 `terms` char(80) NOT NULL DEFAULT '',
1150 `days_before_due` smallint(6) NOT NULL DEFAULT '0',
1151 `day_in_following_month` smallint(6) NOT NULL DEFAULT '0',
1152 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1153 PRIMARY KEY (`terms_indicator`),
1154 UNIQUE KEY `terms` (`terms`)
1155 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
1157 ### Data of table `0_payment_terms` ###
1159 INSERT INTO `0_payment_terms` VALUES
1160 ('1', 'Due 15th Of the Following Month', '0', '17', '0'),
1161 ('2', 'Due By End Of The Following Month', '0', '30', '0'),
1162 ('3', 'Payment due within 10 days', '10', '0', '0'),
1163 ('4', 'Cash Only', '0', '0', '0'),
1164 ('5', 'Prepaid', '-1', '0', '0');
1166 ### Structure of table `0_prices` ###
1168 DROP TABLE IF EXISTS `0_prices`;
1170 CREATE TABLE `0_prices` (
1171 `id` int(11) NOT NULL AUTO_INCREMENT,
1172 `stock_id` varchar(20) NOT NULL DEFAULT '',
1173 `sales_type_id` int(11) NOT NULL DEFAULT '0',
1174 `curr_abrev` char(3) NOT NULL DEFAULT '',
1175 `price` double NOT NULL DEFAULT '0',
1177 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
1178 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1180 ### Data of table `0_prices` ###
1182 INSERT INTO `0_prices` VALUES
1183 ('1', '101', '1', 'USD', '300'),
1184 ('2', '102', '1', 'USD', '250'),
1185 ('3', '103', '1', 'USD', '50');
1187 ### Structure of table `0_print_profiles` ###
1189 DROP TABLE IF EXISTS `0_print_profiles`;
1191 CREATE TABLE `0_print_profiles` (
1192 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1193 `profile` varchar(30) NOT NULL,
1194 `report` varchar(5) DEFAULT NULL,
1195 `printer` tinyint(3) unsigned DEFAULT NULL,
1197 UNIQUE KEY `profile` (`profile`,`report`)
1198 ) ENGINE=InnoDB AUTO_INCREMENT=10 ;
1200 ### Data of table `0_print_profiles` ###
1202 INSERT INTO `0_print_profiles` VALUES
1203 ('1', 'Out of office', NULL, '0'),
1204 ('2', 'Sales Department', NULL, '0'),
1205 ('3', 'Central', NULL, '2'),
1206 ('4', 'Sales Department', '104', '2'),
1207 ('5', 'Sales Department', '105', '2'),
1208 ('6', 'Sales Department', '107', '2'),
1209 ('7', 'Sales Department', '109', '2'),
1210 ('8', 'Sales Department', '110', '2'),
1211 ('9', 'Sales Department', '201', '2');
1213 ### Structure of table `0_printers` ###
1215 DROP TABLE IF EXISTS `0_printers`;
1217 CREATE TABLE `0_printers` (
1218 `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
1219 `name` varchar(20) NOT NULL,
1220 `description` varchar(60) NOT NULL,
1221 `queue` varchar(20) NOT NULL,
1222 `host` varchar(40) NOT NULL,
1223 `port` smallint(11) unsigned NOT NULL,
1224 `timeout` tinyint(3) unsigned NOT NULL,
1226 UNIQUE KEY `name` (`name`)
1227 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1229 ### Data of table `0_printers` ###
1231 INSERT INTO `0_printers` VALUES
1232 ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20'),
1233 ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5'),
1234 ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
1236 ### Structure of table `0_purch_data` ###
1238 DROP TABLE IF EXISTS `0_purch_data`;
1240 CREATE TABLE `0_purch_data` (
1241 `supplier_id` int(11) NOT NULL DEFAULT '0',
1242 `stock_id` char(20) NOT NULL DEFAULT '',
1243 `price` double NOT NULL DEFAULT '0',
1244 `suppliers_uom` char(50) NOT NULL DEFAULT '',
1245 `conversion_factor` double NOT NULL DEFAULT '1',
1246 `supplier_description` char(50) NOT NULL DEFAULT '',
1247 PRIMARY KEY (`supplier_id`,`stock_id`)
1250 ### Data of table `0_purch_data` ###
1252 INSERT INTO `0_purch_data` VALUES
1253 ('1', '101', '200', '', '1', 'iPad Air 2 16GB'),
1254 ('1', '102', '150', '', '1', 'iPhone 6 64GB'),
1255 ('1', '103', '10', '', '1', 'iPhone Cover Case');
1257 ### Structure of table `0_purch_order_details` ###
1259 DROP TABLE IF EXISTS `0_purch_order_details`;
1261 CREATE TABLE `0_purch_order_details` (
1262 `po_detail_item` int(11) NOT NULL AUTO_INCREMENT,
1263 `order_no` int(11) NOT NULL DEFAULT '0',
1264 `item_code` varchar(20) NOT NULL DEFAULT '',
1265 `description` tinytext COLLATE utf8_unicode_ci,
1266 `delivery_date` date NOT NULL DEFAULT '0000-00-00',
1267 `qty_invoiced` double NOT NULL DEFAULT '0',
1268 `unit_price` double NOT NULL DEFAULT '0',
1269 `act_price` double NOT NULL DEFAULT '0',
1270 `std_cost_unit` double NOT NULL DEFAULT '0',
1271 `quantity_ordered` double NOT NULL DEFAULT '0',
1272 `quantity_received` double NOT NULL DEFAULT '0',
1273 PRIMARY KEY (`po_detail_item`),
1274 KEY `order` (`order_no`,`po_detail_item`),
1275 KEY `itemcode` (`item_code`)
1276 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
1278 ### Data of table `0_purch_order_details` ###
1280 INSERT INTO `0_purch_order_details` VALUES
1281 ('1', '1', '101', 'iPad Air 2 16GB', '2018-05-15', '0', '200', '200', '200', '100', '100'),
1282 ('2', '1', '102', 'iPhone 6 64GB', '2018-05-15', '0', '150', '150', '150', '100', '100'),
1283 ('3', '1', '103', 'iPhone Cover Case', '2018-05-15', '0', '10', '10', '10', '100', '100'),
1284 ('4', '2', '101', 'iPad Air 2 16GB', '2018-05-05', '15', '200', '200', '200', '15', '15'),
1285 ('5', '3', '102', 'iPhone 6 64GB', '2019-01-21', '6', '150', '150', '150', '6', '6');
1287 ### Structure of table `0_purch_orders` ###
1289 DROP TABLE IF EXISTS `0_purch_orders`;
1291 CREATE TABLE `0_purch_orders` (
1292 `order_no` int(11) NOT NULL AUTO_INCREMENT,
1293 `supplier_id` int(11) NOT NULL DEFAULT '0',
1294 `comments` tinytext COLLATE utf8_unicode_ci,
1295 `ord_date` date NOT NULL DEFAULT '0000-00-00',
1296 `reference` tinytext NOT NULL,
1297 `requisition_no` tinytext COLLATE utf8_unicode_ci,
1298 `into_stock_location` varchar(5) NOT NULL DEFAULT '',
1299 `delivery_address` tinytext NOT NULL,
1300 `total` double NOT NULL DEFAULT '0',
1301 `prep_amount` double NOT NULL DEFAULT '0',
1302 `alloc` double NOT NULL DEFAULT '0',
1303 `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1304 PRIMARY KEY (`order_no`),
1305 KEY `ord_date` (`ord_date`)
1306 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1308 ### Data of table `0_purch_orders` ###
1310 INSERT INTO `0_purch_orders` VALUES
1311 ('1', '1', NULL, '2018-05-05', '001/2018', NULL, 'DEF', 'N/A', '37800', '0', '0', '0'),
1312 ('2', '1', NULL, '2018-05-05', 'auto', 'rr4', 'DEF', 'N/A', '3150', '0', '0', '0'),
1313 ('3', '1', NULL, '2019-01-21', 'auto', 'asd5', 'DEF', 'N/A', '945', '0', '0', '0');
1315 ### Structure of table `0_quick_entries` ###
1317 DROP TABLE IF EXISTS `0_quick_entries`;
1319 CREATE TABLE `0_quick_entries` (
1320 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1321 `type` tinyint(1) NOT NULL DEFAULT '0',
1322 `description` varchar(60) NOT NULL,
1323 `usage` varchar(120) DEFAULT NULL,
1324 `base_amount` double NOT NULL DEFAULT '0',
1325 `base_desc` varchar(60) DEFAULT NULL,
1326 `bal_type` tinyint(1) NOT NULL DEFAULT '0',
1328 KEY `description` (`description`)
1329 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1331 ### Data of table `0_quick_entries` ###
1333 INSERT INTO `0_quick_entries` VALUES
1334 ('1', '1', 'Maintenance', NULL, '0', 'Amount', '0'),
1335 ('2', '4', 'Phone', NULL, '0', 'Amount', '0'),
1336 ('3', '2', 'Cash Sales', 'Retail sales without invoice', '0', 'Amount', '0');
1338 ### Structure of table `0_quick_entry_lines` ###
1340 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1342 CREATE TABLE `0_quick_entry_lines` (
1343 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1344 `qid` smallint(6) unsigned NOT NULL,
1345 `amount` double DEFAULT '0',
1346 `memo` tinytext NOT NULL,
1347 `action` varchar(2) NOT NULL,
1348 `dest_id` varchar(15) NOT NULL DEFAULT '',
1349 `dimension_id` smallint(6) unsigned DEFAULT NULL,
1350 `dimension2_id` smallint(6) unsigned DEFAULT NULL,
1353 ) ENGINE=InnoDB AUTO_INCREMENT=7 ;
1355 ### Data of table `0_quick_entry_lines` ###
1357 INSERT INTO `0_quick_entry_lines` VALUES
1358 ('1', '1', '0', '', 't-', '1', '0', '0'),
1359 ('2', '2', '0', '', 't-', '1', '0', '0'),
1360 ('3', '3', '0', '', 't-', '1', '0', '0'),
1361 ('4', '3', '0', '', '=', '4010', '0', '0'),
1362 ('5', '1', '0', '', '=', '5765', '0', '0'),
1363 ('6', '2', '0', '', '=', '5780', '0', '0');
1365 ### Structure of table `0_recurrent_invoices` ###
1367 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1369 CREATE TABLE `0_recurrent_invoices` (
1370 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1371 `description` varchar(60) NOT NULL DEFAULT '',
1372 `order_no` int(11) unsigned NOT NULL,
1373 `debtor_no` int(11) unsigned DEFAULT NULL,
1374 `group_no` smallint(6) unsigned DEFAULT NULL,
1375 `days` int(11) NOT NULL DEFAULT '0',
1376 `monthly` int(11) NOT NULL DEFAULT '0',
1377 `begin` date NOT NULL DEFAULT '0000-00-00',
1378 `end` date NOT NULL DEFAULT '0000-00-00',
1379 `last_sent` date NOT NULL DEFAULT '0000-00-00',
1381 UNIQUE KEY `description` (`description`)
1382 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1384 ### Data of table `0_recurrent_invoices` ###
1386 INSERT INTO `0_recurrent_invoices` VALUES
1387 ('1', 'Weekly Maintenance', '6', '1', '1', '7', '0', '2018-04-01', '2020-05-07', '2018-04-08');
1389 ### Structure of table `0_reflines` ###
1391 DROP TABLE IF EXISTS `0_reflines`;
1393 CREATE TABLE `0_reflines` (
1394 `id` int(11) NOT NULL AUTO_INCREMENT,
1395 `trans_type` int(11) NOT NULL,
1396 `prefix` char(5) NOT NULL DEFAULT '',
1397 `pattern` varchar(35) NOT NULL DEFAULT '1',
1398 `description` varchar(60) NOT NULL DEFAULT '',
1399 `default` tinyint(1) NOT NULL DEFAULT '0',
1400 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1402 UNIQUE KEY `prefix` (`trans_type`,`prefix`)
1403 ) ENGINE=InnoDB AUTO_INCREMENT=23 ;
1405 ### Data of table `0_reflines` ###
1407 INSERT INTO `0_reflines` VALUES
1408 ('1', '0', '', '{001}/{YYYY}', '', '1', '0'),
1409 ('2', '1', '', '{001}/{YYYY}', '', '1', '0'),
1410 ('3', '2', '', '{001}/{YYYY}', '', '1', '0'),
1411 ('4', '4', '', '{001}/{YYYY}', '', '1', '0'),
1412 ('5', '10', '', '{001}/{YYYY}', '', '1', '0'),
1413 ('6', '11', '', '{001}/{YYYY}', '', '1', '0'),
1414 ('7', '12', '', '{001}/{YYYY}', '', '1', '0'),
1415 ('8', '13', '', '{001}/{YYYY}', '', '1', '0'),
1416 ('9', '16', '', '{001}/{YYYY}', '', '1', '0'),
1417 ('10', '17', '', '{001}/{YYYY}', '', '1', '0'),
1418 ('11', '18', '', '{001}/{YYYY}', '', '1', '0'),
1419 ('12', '20', '', '{001}/{YYYY}', '', '1', '0'),
1420 ('13', '21', '', '{001}/{YYYY}', '', '1', '0'),
1421 ('14', '22', '', '{001}/{YYYY}', '', '1', '0'),
1422 ('15', '25', '', '{001}/{YYYY}', '', '1', '0'),
1423 ('16', '26', '', '{001}/{YYYY}', '', '1', '0'),
1424 ('17', '28', '', '{001}/{YYYY}', '', '1', '0'),
1425 ('18', '29', '', '{001}/{YYYY}', '', '1', '0'),
1426 ('19', '30', '', '{001}/{YYYY}', '', '1', '0'),
1427 ('20', '32', '', '{001}/{YYYY}', '', '1', '0'),
1428 ('21', '35', '', '{001}/{YYYY}', '', '1', '0'),
1429 ('22', '40', '', '{001}/{YYYY}', '', '1', '0');
1431 ### Structure of table `0_refs` ###
1433 DROP TABLE IF EXISTS `0_refs`;
1435 CREATE TABLE `0_refs` (
1436 `id` int(11) NOT NULL DEFAULT '0',
1437 `type` int(11) NOT NULL DEFAULT '0',
1438 `reference` varchar(100) NOT NULL DEFAULT '',
1439 PRIMARY KEY (`id`,`type`),
1440 KEY `Type_and_Reference` (`type`,`reference`)
1443 ### Data of table `0_refs` ###
1445 INSERT INTO `0_refs` VALUES
1446 ('1', '0', '001/2012'),
1447 ('1', '1', '001/2018'),
1448 ('1', '10', '001/2018'),
1449 ('5', '10', '001/2019'),
1450 ('2', '10', '002/2018'),
1451 ('3', '10', '003/2018'),
1452 ('4', '10', '004/2018'),
1453 ('1', '12', '001/2018'),
1454 ('4', '12', '001/2019'),
1455 ('2', '12', '002/2018'),
1456 ('3', '12', '003/2018'),
1457 ('1', '18', '001/2018'),
1458 ('1', '20', '001/2018'),
1459 ('2', '20', '001/2019'),
1460 ('1', '25', '001/2018'),
1461 ('1', '26', '001/2018'),
1462 ('2', '26', '002/2018'),
1463 ('3', '26', '003/2018'),
1464 ('3', '30', '001/2018'),
1465 ('4', '30', '002/2018'),
1466 ('6', '30', '003/2018'),
1467 ('1', '40', '001/2018');
1469 ### Structure of table `0_sales_order_details` ###
1471 DROP TABLE IF EXISTS `0_sales_order_details`;
1473 CREATE TABLE `0_sales_order_details` (
1474 `id` int(11) NOT NULL AUTO_INCREMENT,
1475 `order_no` int(11) NOT NULL DEFAULT '0',
1476 `trans_type` smallint(6) NOT NULL DEFAULT '30',
1477 `stk_code` varchar(20) NOT NULL DEFAULT '',
1478 `description` tinytext COLLATE utf8_unicode_ci,
1479 `qty_sent` double NOT NULL DEFAULT '0',
1480 `unit_price` double NOT NULL DEFAULT '0',
1481 `quantity` double NOT NULL DEFAULT '0',
1482 `invoiced` double NOT NULL DEFAULT '0',
1483 `discount_percent` double NOT NULL DEFAULT '0',
1485 KEY `sorder` (`trans_type`,`order_no`),
1486 KEY `stkcode` (`stk_code`)
1487 ) ENGINE=InnoDB AUTO_INCREMENT=12 ;
1489 ### Data of table `0_sales_order_details` ###
1491 INSERT INTO `0_sales_order_details` VALUES
1492 ('1', '1', '30', '101', 'iPad Air 2 16GB', '20', '300', '20', '0', '0'),
1493 ('2', '1', '30', '301', 'Support', '3', '80', '3', '0', '0'),
1494 ('3', '2', '30', '101', 'iPad Air 2 16GB', '1', '300', '1', '0', '0'),
1495 ('4', '3', '30', '102', 'iPhone 6 64GB', '0', '250', '1', '0', '0'),
1496 ('5', '3', '30', '103', 'iPhone Cover Case', '0', '50', '1', '0', '0'),
1497 ('6', '4', '30', '101', 'iPad Air 2 16GB', '0', '267.14', '1', '0', '0'),
1498 ('7', '5', '30', '102', 'iPhone 6 64GB', '1', '222.62', '1', '0', '0'),
1499 ('8', '5', '30', '103', 'iPhone Cover Case', '1', '44.52', '1', '0', '0'),
1500 ('9', '6', '30', '202', 'Maintenance', '0', '90', '5', '0', '0'),
1501 ('10', '7', '30', '202', 'Maintenance', '5', '0', '5', '0', '0'),
1502 ('11', '8', '30', '102', 'iPhone 6 64GB', '5', '250', '5', '0', '0');
1504 ### Structure of table `0_sales_orders` ###
1506 DROP TABLE IF EXISTS `0_sales_orders`;
1508 CREATE TABLE `0_sales_orders` (
1509 `order_no` int(11) NOT NULL,
1510 `trans_type` smallint(6) NOT NULL DEFAULT '30',
1511 `version` tinyint(1) unsigned NOT NULL DEFAULT '0',
1512 `type` tinyint(1) NOT NULL DEFAULT '0',
1513 `debtor_no` int(11) NOT NULL DEFAULT '0',
1514 `branch_code` int(11) NOT NULL DEFAULT '0',
1515 `reference` varchar(100) NOT NULL DEFAULT '',
1516 `customer_ref` tinytext NOT NULL,
1517 `comments` tinytext COLLATE utf8_unicode_ci,
1518 `ord_date` date NOT NULL DEFAULT '0000-00-00',
1519 `order_type` int(11) NOT NULL DEFAULT '0',
1520 `ship_via` int(11) NOT NULL DEFAULT '0',
1521 `delivery_address` tinytext NOT NULL,
1522 `contact_phone` varchar(30) DEFAULT NULL,
1523 `contact_email` varchar(100) DEFAULT NULL,
1524 `deliver_to` tinytext NOT NULL,
1525 `freight_cost` double NOT NULL DEFAULT '0',
1526 `from_stk_loc` varchar(5) NOT NULL DEFAULT '',
1527 `delivery_date` date NOT NULL DEFAULT '0000-00-00',
1528 `payment_terms` int(11) DEFAULT NULL,
1529 `total` double NOT NULL DEFAULT '0',
1530 `prep_amount` double NOT NULL DEFAULT '0',
1531 `alloc` double NOT NULL DEFAULT '0',
1532 PRIMARY KEY (`trans_type`,`order_no`)
1535 ### Data of table `0_sales_orders` ###
1537 INSERT INTO `0_sales_orders` VALUES
1538 ('1', '30', '1', '0', '1', '1', 'auto', '', NULL, '2018-05-10', '1', '1', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-05', '4', '6240', '0', '0'),
1539 ('2', '30', '1', '0', '1', '1', 'auto', '', NULL, '2018-05-07', '1', '1', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-07', '4', '300', '0', '0'),
1540 ('3', '30', '0', '0', '1', '1', '001/2018', '', NULL, '2018-05-07', '1', '1', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-08', '4', '300', '0', '0'),
1541 ('4', '30', '0', '0', '2', '2', '002/2018', '', NULL, '2018-05-07', '1', '1', 'N/A', NULL, NULL, 'MoneyMaker Ltd.', '0', 'DEF', '2018-05-08', '1', '267.14', '0', '0'),
1542 ('5', '30', '1', '0', '2', '2', 'auto', '', NULL, '2018-05-07', '1', '1', 'N/A', NULL, NULL, 'MoneyMaker Ltd.', '0', 'DEF', '2018-06-17', '1', '267.14', '0', '0'),
1543 ('6', '30', '0', '1', '1', '1', '003/2018', '', NULL, '2018-05-07', '1', '1', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-08', '4', '450', '0', '0'),
1544 ('7', '30', '1', '0', '1', '1', 'auto', '', 'Recurrent Invoice covers period 04/01/2018 - 04/07/2018.', '2018-05-07', '1', '1', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-07', '4', '0', '0', '0'),
1545 ('8', '30', '1', '0', '1', '1', 'auto', '', NULL, '2019-01-21', '1', '1', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2019-01-21', '4', '1250', '0', '0');
1547 ### Structure of table `0_sales_pos` ###
1549 DROP TABLE IF EXISTS `0_sales_pos`;
1551 CREATE TABLE `0_sales_pos` (
1552 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1553 `pos_name` varchar(30) NOT NULL,
1554 `cash_sale` tinyint(1) NOT NULL,
1555 `credit_sale` tinyint(1) NOT NULL,
1556 `pos_location` varchar(5) NOT NULL,
1557 `pos_account` smallint(6) unsigned NOT NULL,
1558 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1560 UNIQUE KEY `pos_name` (`pos_name`)
1561 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1563 ### Data of table `0_sales_pos` ###
1565 INSERT INTO `0_sales_pos` VALUES
1566 ('1', 'Default', '1', '1', 'DEF', '2', '0');
1568 ### Structure of table `0_sales_types` ###
1570 DROP TABLE IF EXISTS `0_sales_types`;
1572 CREATE TABLE `0_sales_types` (
1573 `id` int(11) NOT NULL AUTO_INCREMENT,
1574 `sales_type` char(50) NOT NULL DEFAULT '',
1575 `tax_included` int(1) NOT NULL DEFAULT '0',
1576 `factor` double NOT NULL DEFAULT '1',
1577 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1579 UNIQUE KEY `sales_type` (`sales_type`)
1580 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1582 ### Data of table `0_sales_types` ###
1584 INSERT INTO `0_sales_types` VALUES
1585 ('1', 'Retail', '1', '1', '0'),
1586 ('2', 'Wholesale', '0', '0.7', '0');
1588 ### Structure of table `0_salesman` ###
1590 DROP TABLE IF EXISTS `0_salesman`;
1592 CREATE TABLE `0_salesman` (
1593 `salesman_code` int(11) NOT NULL AUTO_INCREMENT,
1594 `salesman_name` char(60) NOT NULL DEFAULT '',
1595 `salesman_phone` char(30) NOT NULL DEFAULT '',
1596 `salesman_fax` char(30) NOT NULL DEFAULT '',
1597 `salesman_email` varchar(100) NOT NULL DEFAULT '',
1598 `provision` double NOT NULL DEFAULT '0',
1599 `break_pt` double NOT NULL DEFAULT '0',
1600 `provision2` double NOT NULL DEFAULT '0',
1601 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1602 PRIMARY KEY (`salesman_code`),
1603 UNIQUE KEY `salesman_name` (`salesman_name`)
1604 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1606 ### Data of table `0_salesman` ###
1608 INSERT INTO `0_salesman` VALUES
1609 ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1611 ### Structure of table `0_security_roles` ###
1613 DROP TABLE IF EXISTS `0_security_roles`;
1615 CREATE TABLE `0_security_roles` (
1616 `id` int(11) NOT NULL AUTO_INCREMENT,
1617 `role` varchar(30) NOT NULL,
1618 `description` varchar(50) DEFAULT NULL,
1619 `sections` text COLLATE utf8_unicode_ci,
1620 `areas` text COLLATE utf8_unicode_ci,
1621 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1623 UNIQUE KEY `role` (`role`)
1624 ) ENGINE=InnoDB AUTO_INCREMENT=11 ;
1626 ### Data of table `0_security_roles` ###
1628 INSERT INTO `0_security_roles` VALUES
1629 ('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'),
1630 ('2', 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;9472;9728;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;9217;9218;9220;9473;9474;9475;9476;9729;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'),
1631 ('3', 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873;775', '0'),
1632 ('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'),
1633 ('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'),
1634 ('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'),
1635 ('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'),
1636 ('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'),
1637 ('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'),
1638 ('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');
1640 ### Structure of table `0_shippers` ###
1642 DROP TABLE IF EXISTS `0_shippers`;
1644 CREATE TABLE `0_shippers` (
1645 `shipper_id` int(11) NOT NULL AUTO_INCREMENT,
1646 `shipper_name` varchar(60) NOT NULL DEFAULT '',
1647 `phone` varchar(30) NOT NULL DEFAULT '',
1648 `phone2` varchar(30) NOT NULL DEFAULT '',
1649 `contact` tinytext NOT NULL,
1650 `address` tinytext NOT NULL,
1651 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1652 PRIMARY KEY (`shipper_id`),
1653 UNIQUE KEY `name` (`shipper_name`)
1654 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1656 ### Data of table `0_shippers` ###
1658 INSERT INTO `0_shippers` VALUES
1659 ('1', 'Default', '', '', '', '', '0');
1661 ### Structure of table `0_sql_trail` ###
1663 DROP TABLE IF EXISTS `0_sql_trail`;
1665 CREATE TABLE `0_sql_trail` (
1666 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
1667 `sql` text NOT NULL,
1668 `result` tinyint(1) NOT NULL,
1669 `msg` varchar(255) NOT NULL,
1673 ### Data of table `0_sql_trail` ###
1676 ### Structure of table `0_stock_category` ###
1678 DROP TABLE IF EXISTS `0_stock_category`;
1680 CREATE TABLE `0_stock_category` (
1681 `category_id` int(11) NOT NULL AUTO_INCREMENT,
1682 `description` varchar(60) NOT NULL DEFAULT '',
1683 `dflt_tax_type` int(11) NOT NULL DEFAULT '1',
1684 `dflt_units` varchar(20) NOT NULL DEFAULT 'each',
1685 `dflt_mb_flag` char(1) NOT NULL DEFAULT 'B',
1686 `dflt_sales_act` varchar(15) NOT NULL DEFAULT '',
1687 `dflt_cogs_act` varchar(15) NOT NULL DEFAULT '',
1688 `dflt_inventory_act` varchar(15) NOT NULL DEFAULT '',
1689 `dflt_adjustment_act` varchar(15) NOT NULL DEFAULT '',
1690 `dflt_wip_act` varchar(15) NOT NULL DEFAULT '',
1691 `dflt_dim1` int(11) DEFAULT NULL,
1692 `dflt_dim2` int(11) DEFAULT NULL,
1693 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1694 `dflt_no_sale` tinyint(1) NOT NULL DEFAULT '0',
1695 `dflt_no_purchase` tinyint(1) NOT NULL DEFAULT '0',
1696 PRIMARY KEY (`category_id`),
1697 UNIQUE KEY `description` (`description`)
1698 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
1700 ### Data of table `0_stock_category` ###
1702 INSERT INTO `0_stock_category` VALUES
1703 ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0'),
1704 ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0'),
1705 ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0'),
1706 ('4', 'Services', '1', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0');
1708 ### Structure of table `0_stock_fa_class` ###
1710 DROP TABLE IF EXISTS `0_stock_fa_class`;
1712 CREATE TABLE `0_stock_fa_class` (
1713 `fa_class_id` varchar(20) NOT NULL DEFAULT '',
1714 `parent_id` varchar(20) NOT NULL DEFAULT '',
1715 `description` varchar(200) NOT NULL DEFAULT '',
1716 `long_description` tinytext NOT NULL,
1717 `depreciation_rate` double NOT NULL DEFAULT '0',
1718 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1719 PRIMARY KEY (`fa_class_id`)
1722 ### Data of table `0_stock_fa_class` ###
1725 ### Structure of table `0_stock_master` ###
1727 DROP TABLE IF EXISTS `0_stock_master`;
1729 CREATE TABLE `0_stock_master` (
1730 `stock_id` varchar(20) NOT NULL DEFAULT '',
1731 `category_id` int(11) NOT NULL DEFAULT '0',
1732 `tax_type_id` int(11) NOT NULL DEFAULT '0',
1733 `description` varchar(200) NOT NULL DEFAULT '',
1734 `long_description` tinytext NOT NULL,
1735 `units` varchar(20) NOT NULL DEFAULT 'each',
1736 `mb_flag` char(1) NOT NULL DEFAULT 'B',
1737 `sales_account` varchar(15) NOT NULL DEFAULT '',
1738 `cogs_account` varchar(15) NOT NULL DEFAULT '',
1739 `inventory_account` varchar(15) NOT NULL DEFAULT '',
1740 `adjustment_account` varchar(15) NOT NULL DEFAULT '',
1741 `wip_account` varchar(15) NOT NULL DEFAULT '',
1742 `dimension_id` int(11) DEFAULT NULL,
1743 `dimension2_id` int(11) DEFAULT NULL,
1744 `purchase_cost` double NOT NULL DEFAULT '0',
1745 `material_cost` double NOT NULL DEFAULT '0',
1746 `labour_cost` double NOT NULL DEFAULT '0',
1747 `overhead_cost` double NOT NULL DEFAULT '0',
1748 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1749 `no_sale` tinyint(1) NOT NULL DEFAULT '0',
1750 `no_purchase` tinyint(1) NOT NULL DEFAULT '0',
1751 `editable` tinyint(1) NOT NULL DEFAULT '0',
1752 `depreciation_method` char(1) NOT NULL DEFAULT 'S',
1753 `depreciation_rate` double NOT NULL DEFAULT '0',
1754 `depreciation_factor` double NOT NULL DEFAULT '1',
1755 `depreciation_start` date NOT NULL DEFAULT '0000-00-00',
1756 `depreciation_date` date NOT NULL DEFAULT '0000-00-00',
1757 `fa_class_id` varchar(20) NOT NULL DEFAULT '',
1758 PRIMARY KEY (`stock_id`)
1761 ### Data of table `0_stock_master` ###
1763 INSERT INTO `0_stock_master` VALUES
1764 ('101', '1', '1', 'iPad Air 2 16GB', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '200', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''),
1765 ('102', '1', '1', 'iPhone 6 64GB', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '150', '150', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''),
1766 ('103', '1', '1', 'iPhone Cover Case', '', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '10', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''),
1767 ('201', '3', '1', 'AP Surf Set', '', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '360', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', ''),
1768 ('202', '4', '1', 'Maintenance', '', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', 'S', '0', '1', '0000-00-00', '0000-00-00', ''),
1769 ('301', '4', '1', 'Support', '', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', '');
1771 ### Structure of table `0_stock_moves` ###
1773 DROP TABLE IF EXISTS `0_stock_moves`;
1775 CREATE TABLE `0_stock_moves` (
1776 `trans_id` int(11) NOT NULL AUTO_INCREMENT,
1777 `trans_no` int(11) NOT NULL DEFAULT '0',
1778 `stock_id` char(20) NOT NULL DEFAULT '',
1779 `type` smallint(6) NOT NULL DEFAULT '0',
1780 `loc_code` char(5) NOT NULL DEFAULT '',
1781 `tran_date` date NOT NULL DEFAULT '0000-00-00',
1782 `price` double NOT NULL DEFAULT '0',
1783 `reference` char(40) NOT NULL DEFAULT '',
1784 `qty` double NOT NULL DEFAULT '1',
1785 `standard_cost` double NOT NULL DEFAULT '0',
1786 PRIMARY KEY (`trans_id`),
1787 KEY `type` (`type`,`trans_no`),
1788 KEY `Move` (`stock_id`,`loc_code`,`tran_date`)
1789 ) ENGINE=InnoDB AUTO_INCREMENT=18 ;
1791 ### Data of table `0_stock_moves` ###
1793 INSERT INTO `0_stock_moves` VALUES
1794 ('1', '1', '101', '25', 'DEF', '2018-05-05', '200', '', '100', '200'),
1795 ('2', '1', '102', '25', 'DEF', '2018-05-05', '150', '', '100', '150'),
1796 ('3', '1', '103', '25', 'DEF', '2018-05-05', '10', '', '100', '10'),
1797 ('4', '1', '101', '13', 'DEF', '2018-05-10', '300', 'auto', '-20', '200'),
1798 ('5', '1', '301', '13', 'DEF', '2018-05-10', '80', 'auto', '-3', '0'),
1799 ('6', '1', '101', '29', 'DEF', '2018-05-05', '200', '001/2018', '-2', '200'),
1800 ('7', '1', '102', '29', 'DEF', '2018-05-05', '150', '001/2018', '-2', '150'),
1801 ('8', '1', '103', '29', 'DEF', '2018-05-05', '10', '001/2018', '-2', '10'),
1802 ('9', '1', '301', '29', 'DEF', '2018-05-05', '0', '001/2018', '-2', '0'),
1803 ('10', '1', '201', '26', 'DEF', '2018-05-05', '0', '001/2018', '2', '360'),
1804 ('11', '2', '101', '25', 'DEF', '2018-05-05', '200', '', '15', '200'),
1805 ('12', '2', '101', '13', 'DEF', '2018-05-07', '300', 'auto', '-1', '200'),
1806 ('13', '3', '102', '13', 'DEF', '2018-05-07', '222.62', 'auto', '-1', '150'),
1807 ('14', '3', '103', '13', 'DEF', '2018-05-07', '44.52', 'auto', '-1', '10'),
1808 ('15', '4', '202', '13', 'DEF', '2018-05-07', '0', 'auto', '-5', '0'),
1809 ('16', '5', '102', '13', 'DEF', '2019-01-21', '250', 'auto', '-5', '150'),
1810 ('17', '3', '102', '25', 'DEF', '2019-01-21', '150', '', '6', '150');
1812 ### Structure of table `0_supp_allocations` ###
1814 DROP TABLE IF EXISTS `0_supp_allocations`;
1816 CREATE TABLE `0_supp_allocations` (
1817 `id` int(11) NOT NULL AUTO_INCREMENT,
1818 `person_id` int(11) DEFAULT NULL,
1819 `amt` double unsigned DEFAULT NULL,
1820 `date_alloc` date NOT NULL DEFAULT '0000-00-00',
1821 `trans_no_from` int(11) DEFAULT NULL,
1822 `trans_type_from` int(11) DEFAULT NULL,
1823 `trans_no_to` int(11) DEFAULT NULL,
1824 `trans_type_to` int(11) DEFAULT NULL,
1826 UNIQUE KEY `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
1827 KEY `From` (`trans_type_from`,`trans_no_from`),
1828 KEY `To` (`trans_type_to`,`trans_no_to`)
1831 ### Data of table `0_supp_allocations` ###
1834 ### Structure of table `0_supp_invoice_items` ###
1836 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1838 CREATE TABLE `0_supp_invoice_items` (
1839 `id` int(11) NOT NULL AUTO_INCREMENT,
1840 `supp_trans_no` int(11) DEFAULT NULL,
1841 `supp_trans_type` int(11) DEFAULT NULL,
1842 `gl_code` varchar(15) NOT NULL DEFAULT '',
1843 `grn_item_id` int(11) DEFAULT NULL,
1844 `po_detail_item_id` int(11) DEFAULT NULL,
1845 `stock_id` varchar(20) NOT NULL DEFAULT '',
1846 `description` tinytext COLLATE utf8_unicode_ci,
1847 `quantity` double NOT NULL DEFAULT '0',
1848 `unit_price` double NOT NULL DEFAULT '0',
1849 `unit_tax` double NOT NULL DEFAULT '0',
1850 `memo_` tinytext COLLATE utf8_unicode_ci,
1851 `dimension_id` int(11) NOT NULL DEFAULT '0',
1852 `dimension2_id` int(11) NOT NULL DEFAULT '0',
1854 KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`)
1855 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1857 ### Data of table `0_supp_invoice_items` ###
1859 INSERT INTO `0_supp_invoice_items` VALUES
1860 ('1', '1', '20', '0', '4', '4', '101', 'iPad Air 2 16GB', '15', '200', '10', NULL, '0', '0'),
1861 ('2', '2', '20', '0', '5', '5', '102', 'iPhone 6 64GB', '6', '150', '7.5', NULL, '0', '0');
1863 ### Structure of table `0_supp_trans` ###
1865 DROP TABLE IF EXISTS `0_supp_trans`;
1867 CREATE TABLE `0_supp_trans` (
1868 `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
1869 `type` smallint(6) unsigned NOT NULL DEFAULT '0',
1870 `supplier_id` int(11) unsigned NOT NULL,
1871 `reference` tinytext NOT NULL,
1872 `supp_reference` varchar(60) NOT NULL DEFAULT '',
1873 `tran_date` date NOT NULL DEFAULT '0000-00-00',
1874 `due_date` date NOT NULL DEFAULT '0000-00-00',
1875 `ov_amount` double NOT NULL DEFAULT '0',
1876 `ov_discount` double NOT NULL DEFAULT '0',
1877 `ov_gst` double NOT NULL DEFAULT '0',
1878 `rate` double NOT NULL DEFAULT '1',
1879 `alloc` double NOT NULL DEFAULT '0',
1880 `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1881 PRIMARY KEY (`type`,`trans_no`,`supplier_id`),
1882 KEY `supplier_id` (`supplier_id`),
1883 KEY `tran_date` (`tran_date`)
1886 ### Data of table `0_supp_trans` ###
1888 INSERT INTO `0_supp_trans` VALUES
1889 ('1', '20', '1', '001/2018', 'rr4', '2018-05-05', '2018-05-15', '3000', '0', '150', '1', '0', '0'),
1890 ('2', '20', '1', '001/2019', 'asd5', '2019-01-21', '2019-01-31', '900', '0', '45', '1', '0', '0');
1892 ### Structure of table `0_suppliers` ###
1894 DROP TABLE IF EXISTS `0_suppliers`;
1896 CREATE TABLE `0_suppliers` (
1897 `supplier_id` int(11) NOT NULL AUTO_INCREMENT,
1898 `supp_name` varchar(60) NOT NULL DEFAULT '',
1899 `supp_ref` varchar(30) NOT NULL DEFAULT '',
1900 `address` tinytext NOT NULL,
1901 `supp_address` tinytext NOT NULL,
1902 `gst_no` varchar(25) NOT NULL DEFAULT '',
1903 `contact` varchar(60) NOT NULL DEFAULT '',
1904 `supp_account_no` varchar(40) NOT NULL DEFAULT '',
1905 `website` varchar(100) NOT NULL DEFAULT '',
1906 `bank_account` varchar(60) NOT NULL DEFAULT '',
1907 `curr_code` char(3) DEFAULT NULL,
1908 `payment_terms` int(11) DEFAULT NULL,
1909 `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1910 `dimension_id` int(11) DEFAULT '0',
1911 `dimension2_id` int(11) DEFAULT '0',
1912 `tax_group_id` int(11) DEFAULT NULL,
1913 `credit_limit` double NOT NULL DEFAULT '0',
1914 `purchase_account` varchar(15) NOT NULL DEFAULT '',
1915 `payable_account` varchar(15) NOT NULL DEFAULT '',
1916 `payment_discount_account` varchar(15) NOT NULL DEFAULT '',
1917 `notes` tinytext NOT NULL,
1918 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1919 PRIMARY KEY (`supplier_id`),
1920 KEY `supp_ref` (`supp_ref`)
1921 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1923 ### Data of table `0_suppliers` ###
1925 INSERT INTO `0_suppliers` VALUES
1926 ('1', 'Dino Saurius Inc.', 'Dino Saurius', 'N/A', '', '987654321', '', '', '', '', 'USD', '3', '0', '0', '0', '1', '0', '', '2100', '5060', '', '0'),
1927 ('2', 'Beefeater Ltd.', 'Beefeater', 'N/A', '', '67565590', '', '', '', '', 'GBP', '4', '0', '0', '0', '1', '0', '', '2100', '5060', '', '0');
1929 ### Structure of table `0_sys_prefs` ###
1931 DROP TABLE IF EXISTS `0_sys_prefs`;
1933 CREATE TABLE `0_sys_prefs` (
1934 `name` varchar(35) NOT NULL DEFAULT '',
1935 `category` varchar(30) DEFAULT NULL,
1936 `type` varchar(20) NOT NULL DEFAULT '',
1937 `length` smallint(6) DEFAULT NULL,
1938 `value` text NOT NULL,
1939 PRIMARY KEY (`name`),
1940 KEY `category` (`category`)
1943 ### Data of table `0_sys_prefs` ###
1945 INSERT INTO `0_sys_prefs` VALUES
1946 ('accounts_alpha', 'glsetup.general', 'tinyint', '1', '0'),
1947 ('accumulate_shipping', 'glsetup.customer', 'tinyint', '1', '0'),
1948 ('add_pct', 'setup.company', 'int', '5', '-1'),
1949 ('allow_negative_prices', 'glsetup.inventory', 'tinyint', '1', '1'),
1950 ('allow_negative_stock', 'glsetup.inventory', 'tinyint', '1', '0'),
1951 ('alternative_tax_include_on_docs', 'setup.company', 'tinyint', '1', ''),
1952 ('auto_curr_reval', 'setup.company', 'smallint', '6', '1'),
1953 ('bank_charge_act', 'glsetup.general', 'varchar', '15', '5690'),
1954 ('barcodes_on_stock', 'setup.company', 'tinyint', '1', '0'),
1955 ('base_sales', 'setup.company', 'int', '11', '1'),
1956 ('bcc_email', 'setup.company', 'varchar', '100', ''),
1957 ('company_logo_report', 'setup.company', 'tinyint', '1', '0'),
1958 ('coy_logo', 'setup.company', 'varchar', '100', 'logo_frontaccounting.jpg'),
1959 ('coy_name', 'setup.company', 'varchar', '60', 'Training Co'),
1960 ('coy_no', 'setup.company', 'varchar', '25', ''),
1961 ('creditors_act', 'glsetup.purchase', 'varchar', '15', '2100'),
1962 ('curr_default', 'setup.company', 'char', '3', 'USD'),
1963 ('debtors_act', 'glsetup.sales', 'varchar', '15', '1200'),
1964 ('default_adj_act', 'glsetup.items', 'varchar', '15', '5040'),
1965 ('default_cogs_act', 'glsetup.items', 'varchar', '15', '5010'),
1966 ('default_credit_limit', 'glsetup.customer', 'int', '11', '1000'),
1967 ('default_delivery_required', 'glsetup.sales', 'smallint', '6', '1'),
1968 ('default_dim_required', 'glsetup.dims', 'int', '11', '20'),
1969 ('default_inv_sales_act', 'glsetup.items', 'varchar', '15', '4010'),
1970 ('default_inventory_act', 'glsetup.items', 'varchar', '15', '1510'),
1971 ('default_loss_on_asset_disposal_act', 'glsetup.items', 'varchar', '15', '5660'),
1972 ('default_prompt_payment_act', 'glsetup.sales', 'varchar', '15', '4500'),
1973 ('default_quote_valid_days', 'glsetup.sales', 'smallint', '6', '30'),
1974 ('default_receival_required', 'glsetup.purchase', 'smallint', '6', '10'),
1975 ('default_sales_act', 'glsetup.sales', 'varchar', '15', '4010'),
1976 ('default_sales_discount_act', 'glsetup.sales', 'varchar', '15', '4510'),
1977 ('default_wip_act', 'glsetup.items', 'varchar', '15', '1530'),
1978 ('default_workorder_required', 'glsetup.manuf', 'int', '11', '20'),
1979 ('deferred_income_act', 'glsetup.sales', 'varchar', '15', '2105'),
1980 ('depreciation_period', 'glsetup.company', 'tinyint', '1', '1'),
1981 ('domicile', 'setup.company', 'varchar', '55', ''),
1982 ('email', 'setup.company', 'varchar', '100', 'delta@delta.com'),
1983 ('exchange_diff_act', 'glsetup.general', 'varchar', '15', '4450'),
1984 ('f_year', 'setup.company', 'int', '11', '2'),
1985 ('fax', 'setup.company', 'varchar', '30', ''),
1986 ('freight_act', 'glsetup.customer', 'varchar', '15', '4430'),
1987 ('gl_closing_date', 'setup.closing_date', 'date', '8', '2018-12-31'),
1988 ('grn_clearing_act', 'glsetup.purchase', 'varchar', '15', '1550'),
1989 ('gst_no', 'setup.company', 'varchar', '25', '33445566'),
1990 ('legal_text', 'glsetup.customer', 'tinytext', '0', ''),
1991 ('loc_notification', 'glsetup.inventory', 'tinyint', '1', '0'),
1992 ('login_tout', 'setup.company', 'smallint', '6', '600'),
1993 ('no_customer_list', 'setup.company', 'tinyint', '1', '0'),
1994 ('no_item_list', 'setup.company', 'tinyint', '1', '0'),
1995 ('no_supplier_list', 'setup.company', 'tinyint', '1', '0'),
1996 ('no_zero_lines_amount', 'glsetup.sales', 'tinyint', '1', '1'),
1997 ('past_due_days', 'glsetup.general', 'int', '11', '30'),
1998 ('phone', 'setup.company', 'varchar', '30', ''),
1999 ('po_over_charge', 'glsetup.purchase', 'int', '11', '10'),
2000 ('po_over_receive', 'glsetup.purchase', 'int', '11', '10'),
2001 ('postal_address', 'setup.company', 'tinytext', '0', 'N/A'),
2002 ('print_dialog_direct', 'setup.company', 'tinyint', '1', '0'),
2003 ('print_invoice_no', 'glsetup.sales', 'tinyint', '1', '0'),
2004 ('print_item_images_on_quote', 'glsetup.inventory', 'tinyint', '1', '0'),
2005 ('profit_loss_year_act', 'glsetup.general', 'varchar', '15', '9990'),
2006 ('pyt_discount_act', 'glsetup.purchase', 'varchar', '15', '5060'),
2007 ('ref_no_auto_increase', 'setup.company', 'tinyint', '1', '0'),
2008 ('retained_earnings_act', 'glsetup.general', 'varchar', '15', '3590'),
2009 ('round_to', 'setup.company', 'int', '5', '1'),
2010 ('shortname_name_in_list', 'setup.company', 'tinyint', '1', ''),
2011 ('show_po_item_codes', 'glsetup.purchase', 'tinyint', '1', '0'),
2012 ('suppress_tax_rates', 'setup.company', 'tinyint', '1', ''),
2013 ('tax_algorithm', 'glsetup.customer', 'tinyint', '1', '1'),
2014 ('tax_last', 'setup.company', 'int', '11', '1'),
2015 ('tax_prd', 'setup.company', 'int', '11', '1'),
2016 ('time_zone', 'setup.company', 'tinyint', '1', '0'),
2017 ('use_dimension', 'setup.company', 'tinyint', '1', '1'),
2018 ('use_fixed_assets', 'setup.company', 'tinyint', '1', '1'),
2019 ('use_manufacturing', 'setup.company', 'tinyint', '1', '1'),
2020 ('version_id', 'system', 'varchar', '11', '2.4.1');
2022 ### Structure of table `0_sys_types` ###
2024 DROP TABLE IF EXISTS `0_sys_types`;
2026 CREATE TABLE `0_sys_types` (
2027 `type_id` smallint(6) NOT NULL DEFAULT '0',
2028 `type_no` int(11) NOT NULL DEFAULT '1',
2029 `next_reference` varchar(100) NOT NULL DEFAULT '',
2030 PRIMARY KEY (`type_id`)
2033 ### Data of table `0_sys_types` ###
2035 INSERT INTO `0_sys_types` VALUES
2059 ### Structure of table `0_tag_associations` ###
2061 DROP TABLE IF EXISTS `0_tag_associations`;
2063 CREATE TABLE `0_tag_associations` (
2064 `record_id` varchar(15) NOT NULL,
2065 `tag_id` int(11) NOT NULL,
2066 UNIQUE KEY `record_id` (`record_id`,`tag_id`)
2069 ### Data of table `0_tag_associations` ###
2072 ### Structure of table `0_tags` ###
2074 DROP TABLE IF EXISTS `0_tags`;
2076 CREATE TABLE `0_tags` (
2077 `id` int(11) NOT NULL AUTO_INCREMENT,
2078 `type` smallint(6) NOT NULL,
2079 `name` varchar(30) NOT NULL,
2080 `description` varchar(60) DEFAULT NULL,
2081 `inactive` tinyint(1) NOT NULL DEFAULT '0',
2083 UNIQUE KEY `type` (`type`,`name`)
2086 ### Data of table `0_tags` ###
2089 ### Structure of table `0_tax_group_items` ###
2091 DROP TABLE IF EXISTS `0_tax_group_items`;
2093 CREATE TABLE `0_tax_group_items` (
2094 `tax_group_id` int(11) NOT NULL DEFAULT '0',
2095 `tax_type_id` int(11) NOT NULL DEFAULT '0',
2096 `tax_shipping` tinyint(1) NOT NULL DEFAULT '0',
2097 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
2100 ### Data of table `0_tax_group_items` ###
2102 INSERT INTO `0_tax_group_items` VALUES
2105 ### Structure of table `0_tax_groups` ###
2107 DROP TABLE IF EXISTS `0_tax_groups`;
2109 CREATE TABLE `0_tax_groups` (
2110 `id` int(11) NOT NULL AUTO_INCREMENT,
2111 `name` varchar(60) NOT NULL DEFAULT '',
2112 `inactive` tinyint(1) NOT NULL DEFAULT '0',
2114 UNIQUE KEY `name` (`name`)
2115 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
2117 ### Data of table `0_tax_groups` ###
2119 INSERT INTO `0_tax_groups` VALUES
2121 ('2', 'Tax Exempt', '0');
2123 ### Structure of table `0_tax_types` ###
2125 DROP TABLE IF EXISTS `0_tax_types`;
2127 CREATE TABLE `0_tax_types` (
2128 `id` int(11) NOT NULL AUTO_INCREMENT,
2129 `rate` double NOT NULL DEFAULT '0',
2130 `sales_gl_code` varchar(15) NOT NULL DEFAULT '',
2131 `purchasing_gl_code` varchar(15) NOT NULL DEFAULT '',
2132 `name` varchar(60) NOT NULL DEFAULT '',
2133 `inactive` tinyint(1) NOT NULL DEFAULT '0',
2135 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2137 ### Data of table `0_tax_types` ###
2139 INSERT INTO `0_tax_types` VALUES
2140 ('1', '5', '2150', '2150', 'Tax', '0');
2142 ### Structure of table `0_trans_tax_details` ###
2144 DROP TABLE IF EXISTS `0_trans_tax_details`;
2146 CREATE TABLE `0_trans_tax_details` (
2147 `id` int(11) NOT NULL AUTO_INCREMENT,
2148 `trans_type` smallint(6) DEFAULT NULL,
2149 `trans_no` int(11) DEFAULT NULL,
2150 `tran_date` date NOT NULL,
2151 `tax_type_id` int(11) NOT NULL DEFAULT '0',
2152 `rate` double NOT NULL DEFAULT '0',
2153 `ex_rate` double NOT NULL DEFAULT '1',
2154 `included_in_price` tinyint(1) NOT NULL DEFAULT '0',
2155 `net_amount` double NOT NULL DEFAULT '0',
2156 `amount` double NOT NULL DEFAULT '0',
2157 `memo` tinytext COLLATE utf8_unicode_ci,
2158 `reg_type` tinyint(1) DEFAULT NULL,
2160 KEY `Type_and_Number` (`trans_type`,`trans_no`),
2161 KEY `tran_date` (`tran_date`)
2162 ) ENGINE=InnoDB AUTO_INCREMENT=11 ;
2164 ### Data of table `0_trans_tax_details` ###
2166 INSERT INTO `0_trans_tax_details` VALUES
2167 ('1', '13', '1', '2018-05-10', '1', '5', '1', '1', '5942.86', '297.14', 'auto', NULL),
2168 ('2', '10', '1', '2018-05-10', '1', '5', '1', '1', '5942.86', '297.14', '001/2018', '0'),
2169 ('3', '20', '1', '2018-05-05', '1', '5', '1', '0', '3000', '150', 'rr4', '1'),
2170 ('4', '13', '2', '2018-05-07', '1', '5', '1', '1', '285.71', '14.29', 'auto', NULL),
2171 ('5', '10', '2', '2018-05-07', '1', '5', '1', '1', '285.71', '14.29', '002/2018', '0'),
2172 ('6', '13', '3', '2018-05-07', '0', '0', '1.123', '1', '267.14', '0', 'auto', NULL),
2173 ('7', '10', '3', '2018-05-07', '0', '0', '1.123', '1', '267.14', '0', '003/2018', '0'),
2174 ('8', '13', '5', '2019-01-21', '1', '5', '1', '1', '1190.48', '59.52', 'auto', NULL),
2175 ('9', '10', '5', '2019-01-21', '1', '5', '1', '1', '1190.48', '59.52', '001/2019', '0'),
2176 ('10', '20', '2', '2019-01-21', '1', '5', '1', '0', '900', '45', 'asd5', '1');
2178 ### Structure of table `0_useronline` ###
2180 DROP TABLE IF EXISTS `0_useronline`;
2182 CREATE TABLE `0_useronline` (
2183 `id` int(11) NOT NULL AUTO_INCREMENT,
2184 `timestamp` int(15) NOT NULL DEFAULT '0',
2185 `ip` varchar(40) NOT NULL DEFAULT '',
2186 `file` varchar(100) NOT NULL DEFAULT '',
2188 KEY `timestamp` (`timestamp`),
2192 ### Data of table `0_useronline` ###
2195 ### Structure of table `0_users` ###
2197 DROP TABLE IF EXISTS `0_users`;
2199 CREATE TABLE `0_users` (
2200 `id` smallint(6) NOT NULL AUTO_INCREMENT,
2201 `user_id` varchar(60) NOT NULL DEFAULT '',
2202 `password` varchar(100) NOT NULL DEFAULT '',
2203 `real_name` varchar(100) NOT NULL DEFAULT '',
2204 `role_id` int(11) NOT NULL DEFAULT '1',
2205 `phone` varchar(30) NOT NULL DEFAULT '',
2206 `email` varchar(100) DEFAULT NULL,
2207 `language` varchar(20) DEFAULT NULL,
2208 `date_format` tinyint(1) NOT NULL DEFAULT '0',
2209 `date_sep` tinyint(1) NOT NULL DEFAULT '0',
2210 `tho_sep` tinyint(1) NOT NULL DEFAULT '0',
2211 `dec_sep` tinyint(1) NOT NULL DEFAULT '0',
2212 `theme` varchar(20) NOT NULL DEFAULT 'default',
2213 `page_size` varchar(20) NOT NULL DEFAULT 'A4',
2214 `prices_dec` smallint(6) NOT NULL DEFAULT '2',
2215 `qty_dec` smallint(6) NOT NULL DEFAULT '2',
2216 `rates_dec` smallint(6) NOT NULL DEFAULT '4',
2217 `percent_dec` smallint(6) NOT NULL DEFAULT '1',
2218 `show_gl` tinyint(1) NOT NULL DEFAULT '1',
2219 `show_codes` tinyint(1) NOT NULL DEFAULT '0',
2220 `show_hints` tinyint(1) NOT NULL DEFAULT '0',
2221 `last_visit_date` datetime DEFAULT NULL,
2222 `query_size` tinyint(1) unsigned NOT NULL DEFAULT '10',
2223 `graphic_links` tinyint(1) DEFAULT '1',
2224 `pos` smallint(6) DEFAULT '1',
2225 `print_profile` varchar(30) NOT NULL DEFAULT '',
2226 `rep_popup` tinyint(1) DEFAULT '1',
2227 `sticky_doc_date` tinyint(1) DEFAULT '0',
2228 `startup_tab` varchar(20) NOT NULL DEFAULT '',
2229 `transaction_days` smallint(6) NOT NULL DEFAULT '30',
2230 `save_report_selections` smallint(6) NOT NULL DEFAULT '0',
2231 `use_date_picker` tinyint(1) NOT NULL DEFAULT '1',
2232 `def_print_destination` tinyint(1) NOT NULL DEFAULT '0',
2233 `def_print_orientation` tinyint(1) NOT NULL DEFAULT '0',
2234 `inactive` tinyint(1) NOT NULL DEFAULT '0',
2236 UNIQUE KEY `user_id` (`user_id`)
2237 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2239 ### Data of table `0_users` ###
2241 INSERT INTO `0_users` VALUES
2242 ('1', 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', '2', '', 'adm@example.com', 'C', '0', '0', '0', '0', 'default', 'Letter', '2', '2', '4', '1', '1', '0', '0', '2018-05-07 13:58:33', '10', '1', '1', '1', '1', '0', 'orders', '30', '0', '1', '0', '0', '0');
2244 ### Structure of table `0_voided` ###
2246 DROP TABLE IF EXISTS `0_voided`;
2248 CREATE TABLE `0_voided` (
2249 `type` int(11) NOT NULL DEFAULT '0',
2250 `id` int(11) NOT NULL DEFAULT '0',
2251 `date_` date NOT NULL DEFAULT '0000-00-00',
2252 `memo_` tinytext NOT NULL,
2253 UNIQUE KEY `id` (`type`,`id`)
2256 ### Data of table `0_voided` ###
2259 ### Structure of table `0_wo_costing` ###
2261 DROP TABLE IF EXISTS `0_wo_costing`;
2263 CREATE TABLE `0_wo_costing` (
2264 `id` int(11) NOT NULL AUTO_INCREMENT,
2265 `workorder_id` int(11) NOT NULL DEFAULT '0',
2266 `cost_type` tinyint(1) NOT NULL DEFAULT '0',
2267 `trans_type` int(11) NOT NULL DEFAULT '0',
2268 `trans_no` int(11) NOT NULL DEFAULT '0',
2269 `factor` double NOT NULL DEFAULT '1',
2273 ### Data of table `0_wo_costing` ###
2276 ### Structure of table `0_wo_issue_items` ###
2278 DROP TABLE IF EXISTS `0_wo_issue_items`;
2280 CREATE TABLE `0_wo_issue_items` (
2281 `id` int(11) NOT NULL AUTO_INCREMENT,
2282 `stock_id` varchar(40) DEFAULT NULL,
2283 `issue_id` int(11) DEFAULT NULL,
2284 `qty_issued` double DEFAULT NULL,
2285 `unit_cost` double NOT NULL DEFAULT '0',
2289 ### Data of table `0_wo_issue_items` ###
2292 ### Structure of table `0_wo_issues` ###
2294 DROP TABLE IF EXISTS `0_wo_issues`;
2296 CREATE TABLE `0_wo_issues` (
2297 `issue_no` int(11) NOT NULL AUTO_INCREMENT,
2298 `workorder_id` int(11) NOT NULL DEFAULT '0',
2299 `reference` varchar(100) DEFAULT NULL,
2300 `issue_date` date DEFAULT NULL,
2301 `loc_code` varchar(5) DEFAULT NULL,
2302 `workcentre_id` int(11) DEFAULT NULL,
2303 PRIMARY KEY (`issue_no`),
2304 KEY `workorder_id` (`workorder_id`)
2307 ### Data of table `0_wo_issues` ###
2310 ### Structure of table `0_wo_manufacture` ###
2312 DROP TABLE IF EXISTS `0_wo_manufacture`;
2314 CREATE TABLE `0_wo_manufacture` (
2315 `id` int(11) NOT NULL AUTO_INCREMENT,
2316 `reference` varchar(100) DEFAULT NULL,
2317 `workorder_id` int(11) NOT NULL DEFAULT '0',
2318 `quantity` double NOT NULL DEFAULT '0',
2319 `date_` date NOT NULL DEFAULT '0000-00-00',
2321 KEY `workorder_id` (`workorder_id`)
2322 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2324 ### Data of table `0_wo_manufacture` ###
2326 INSERT INTO `0_wo_manufacture` VALUES
2327 ('1', '001/2018', '1', '2', '2018-05-05');
2329 ### Structure of table `0_wo_requirements` ###
2331 DROP TABLE IF EXISTS `0_wo_requirements`;
2333 CREATE TABLE `0_wo_requirements` (
2334 `id` int(11) NOT NULL AUTO_INCREMENT,
2335 `workorder_id` int(11) NOT NULL DEFAULT '0',
2336 `stock_id` char(20) NOT NULL DEFAULT '',
2337 `workcentre` int(11) NOT NULL DEFAULT '0',
2338 `units_req` double NOT NULL DEFAULT '1',
2339 `unit_cost` double NOT NULL DEFAULT '0',
2340 `loc_code` char(5) NOT NULL DEFAULT '',
2341 `units_issued` double NOT NULL DEFAULT '0',
2343 KEY `workorder_id` (`workorder_id`)
2344 ) ENGINE=InnoDB AUTO_INCREMENT=9 ;
2346 ### Data of table `0_wo_requirements` ###
2348 INSERT INTO `0_wo_requirements` VALUES
2349 ('1', '1', '101', '1', '1', '200', 'DEF', '2'),
2350 ('2', '1', '102', '1', '1', '150', 'DEF', '2'),
2351 ('3', '1', '103', '1', '1', '10', 'DEF', '2'),
2352 ('4', '1', '301', '1', '1', '0', 'DEF', '2'),
2353 ('5', '2', '101', '1', '1', '200', 'DEF', '0'),
2354 ('6', '2', '102', '1', '1', '150', 'DEF', '0'),
2355 ('7', '2', '103', '1', '1', '10', 'DEF', '0'),
2356 ('8', '2', '301', '1', '1', '0', 'DEF', '0');
2358 ### Structure of table `0_workcentres` ###
2360 DROP TABLE IF EXISTS `0_workcentres`;
2362 CREATE TABLE `0_workcentres` (
2363 `id` int(11) NOT NULL AUTO_INCREMENT,
2364 `name` char(40) NOT NULL DEFAULT '',
2365 `description` char(50) NOT NULL DEFAULT '',
2366 `inactive` tinyint(1) NOT NULL DEFAULT '0',
2368 UNIQUE KEY `name` (`name`)
2369 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2371 ### Data of table `0_workcentres` ###
2373 INSERT INTO `0_workcentres` VALUES
2374 ('1', 'Work Centre', '', '0');
2376 ### Structure of table `0_workorders` ###
2378 DROP TABLE IF EXISTS `0_workorders`;
2380 CREATE TABLE `0_workorders` (
2381 `id` int(11) NOT NULL AUTO_INCREMENT,
2382 `wo_ref` varchar(60) NOT NULL DEFAULT '',
2383 `loc_code` varchar(5) NOT NULL DEFAULT '',
2384 `units_reqd` double NOT NULL DEFAULT '1',
2385 `stock_id` varchar(20) NOT NULL DEFAULT '',
2386 `date_` date NOT NULL DEFAULT '0000-00-00',
2387 `type` tinyint(4) NOT NULL DEFAULT '0',
2388 `required_by` date NOT NULL DEFAULT '0000-00-00',
2389 `released_date` date NOT NULL DEFAULT '0000-00-00',
2390 `units_issued` double NOT NULL DEFAULT '0',
2391 `closed` tinyint(1) NOT NULL DEFAULT '0',
2392 `released` tinyint(1) NOT NULL DEFAULT '0',
2393 `additional_costs` double NOT NULL DEFAULT '0',
2395 UNIQUE KEY `wo_ref` (`wo_ref`)
2396 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
2398 ### Data of table `0_workorders` ###
2400 INSERT INTO `0_workorders` VALUES
2401 ('1', '001/2018', 'DEF', '2', '201', '2018-05-05', '0', '2018-05-05', '2018-05-05', '2', '1', '1', '0'),
2402 ('2', '002/2018', 'DEF', '5', '201', '2018-05-07', '2', '2018-05-27', '2018-05-07', '0', '0', '1', '0'),
2403 ('3', '003/2018', 'DEF', '5', '201', '2018-05-07', '2', '2018-05-27', '0000-00-00', '0', '0', '0', '0');