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.5.0
4 -- http://frontaccounting.com
5 -- Company: Training Co.
8 -- Compatibility: 2.5.0
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` --
51 -- Structure of table `0_audit_trail` --
53 DROP TABLE IF EXISTS `0_audit_trail`;
55 CREATE TABLE `0_audit_trail` (
56 `id` int(11) NOT NULL AUTO_INCREMENT,
57 `type` smallint(6) unsigned NOT NULL DEFAULT '0',
58 `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
59 `user` smallint(6) unsigned NOT NULL DEFAULT '0',
60 `stamp` timestamp NOT NULL,
61 `description` varchar(60) DEFAULT NULL,
62 `fiscal_year` int(11) NOT NULL DEFAULT '0',
63 `gl_date` date NOT NULL DEFAULT '0000-00-00',
64 `gl_seq` int(11) unsigned DEFAULT NULL,
66 KEY `Seq` (`fiscal_year`,`gl_date`,`gl_seq`),
67 KEY `Type_and_Number` (`type`,`trans_no`)
68 ) ENGINE=InnoDB AUTO_INCREMENT=37 ;
70 -- Data of table `0_audit_trail` --
72 INSERT INTO `0_audit_trail` VALUES
73 ('1', '18', '1', '1', '2018-05-05 14:08:02', NULL, '1', '2018-05-05', '0'),
74 ('2', '25', '1', '1', '2018-05-05 14:08:14', NULL, '1', '2018-05-05', '1'),
75 ('3', '30', '1', '1', '2018-05-05 14:09:54', NULL, '1', '2018-05-10', '0'),
76 ('4', '13', '1', '1', '2018-05-05 14:09:55', NULL, '1', '2018-05-10', '13'),
77 ('5', '10', '1', '1', '2018-05-05 14:09:55', NULL, '1', '2018-05-10', '14'),
78 ('6', '12', '1', '1', '2018-05-05 14:09:55', NULL, '1', '2018-05-10', '15'),
79 ('7', '29', '1', '1', '2018-05-05 14:18:49', 'Quick production.', '1', '2018-05-05', '2'),
80 ('8', '18', '2', '1', '2018-05-05 14:22:32', NULL, '1', '2018-05-05', '0'),
81 ('9', '25', '2', '1', '2018-05-05 14:22:32', NULL, '1', '2018-05-05', '3'),
82 ('10', '20', '1', '1', '2018-05-05 14:22:32', NULL, '1', '2018-05-05', '4'),
83 ('11', '30', '2', '1', '2018-05-07 07:55:15', NULL, '1', '2018-05-07', '0'),
84 ('12', '13', '2', '1', '2018-05-07 07:55:16', NULL, '1', '2018-05-07', '7'),
85 ('13', '10', '2', '1', '2018-05-07 07:55:16', NULL, '1', '2018-05-07', '8'),
86 ('14', '12', '2', '1', '2018-05-07 07:55:16', NULL, '1', '2018-05-07', '9'),
87 ('15', '30', '3', '1', '2018-05-07 08:08:24', NULL, '1', '2018-05-07', '0'),
88 ('16', '30', '4', '1', '2018-05-07 09:18:44', NULL, '1', '2018-05-07', '0'),
89 ('17', '30', '5', '1', '2018-05-07 11:42:41', NULL, '1', '2018-05-07', '0'),
90 ('18', '13', '3', '1', '2018-05-07 11:42:41', NULL, '1', '2018-05-07', '10'),
91 ('19', '10', '3', '1', '2018-05-07 11:42:41', NULL, '1', '2018-05-07', '11'),
92 ('20', '30', '6', '1', '2018-05-07 14:02:35', NULL, '1', '2018-05-07', '0'),
93 ('21', '30', '7', '1', '2018-05-07 14:05:38', NULL, '1', '2018-05-07', '0'),
94 ('22', '13', '4', '1', '2018-05-07 14:05:38', NULL, '1', '2018-05-07', '0'),
95 ('23', '10', '4', '1', '2018-05-07 14:05:38', NULL, '1', '2018-05-07', '0'),
96 ('24', '12', '3', '1', '2018-05-07 14:05:38', NULL, '1', '2018-05-07', '0'),
97 ('25', '26', '1', '1', '2018-05-07 15:59:34', NULL, '1', '2018-05-07', NULL),
98 ('26', '29', '1', '1', '2018-05-07 15:59:01', 'Production.', '1', '2018-05-07', '5'),
99 ('27', '26', '1', '1', '2018-05-07 15:59:34', 'Released.', '1', '2018-05-07', '6'),
100 ('28', '1', '1', '1', '2018-05-07 16:01:00', NULL, '1', '2018-05-07', '12'),
101 ('29', '30', '8', '1', '2019-01-21 11:13:06', NULL, '2', '2019-01-21', '0'),
102 ('30', '13', '5', '1', '2019-01-21 11:13:06', NULL, '2', '2019-01-21', '0'),
103 ('31', '10', '5', '1', '2019-01-21 11:13:06', NULL, '2', '2019-01-21', '0'),
104 ('32', '12', '4', '1', '2019-01-21 11:13:06', NULL, '2', '2019-01-21', '0'),
105 ('33', '18', '3', '1', '2019-01-21 11:14:14', NULL, '2', '2019-01-21', '0'),
106 ('34', '25', '3', '1', '2019-01-21 11:14:14', NULL, '2', '2019-01-21', '0'),
107 ('35', '20', '2', '1', '2019-01-21 11:14:14', NULL, '2', '2019-01-21', '0'),
108 ('36', '0', '1', '1', '2019-01-21 11:15:35', NULL, '1', '2018-12-31', '16');
110 -- Structure of table `0_bank_accounts` --
112 DROP TABLE IF EXISTS `0_bank_accounts`;
114 CREATE TABLE `0_bank_accounts` (
115 `account_code` varchar(15) NOT NULL DEFAULT '',
116 `account_type` smallint(6) NOT NULL DEFAULT '0',
117 `bank_account_name` varchar(60) NOT NULL DEFAULT '',
118 `bank_account_number` varchar(100) NOT NULL DEFAULT '',
119 `bank_name` varchar(60) NOT NULL DEFAULT '',
120 `bank_address` tinytext,
121 `bank_curr_code` char(3) NOT NULL DEFAULT '',
122 `dflt_curr_act` tinyint(1) NOT NULL DEFAULT '0',
123 `id` smallint(6) NOT NULL AUTO_INCREMENT,
124 `bank_charge_act` varchar(15) NOT NULL DEFAULT '',
125 `last_reconciled_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
126 `ending_reconcile_balance` double NOT NULL DEFAULT '0',
127 `inactive` tinyint(1) NOT NULL DEFAULT '0',
129 KEY `bank_account_name` (`bank_account_name`),
130 KEY `bank_account_number` (`bank_account_number`),
131 KEY `account_code` (`account_code`)
132 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
134 -- Data of table `0_bank_accounts` --
136 INSERT INTO `0_bank_accounts` VALUES
137 ('1060', '0', 'Current account', 'N/A', 'N/A', NULL, 'USD', '1', '1', '5690', '0000-00-00 00:00:00', '0', '0'),
138 ('1065', '3', 'Petty Cash account', 'N/A', 'N/A', NULL, 'USD', '0', '2', '5690', '0000-00-00 00:00:00', '0', '0');
140 -- Structure of table `0_bank_trans` --
142 DROP TABLE IF EXISTS `0_bank_trans`;
144 CREATE TABLE `0_bank_trans` (
145 `id` int(11) NOT NULL AUTO_INCREMENT,
146 `type` smallint(6) DEFAULT NULL,
147 `trans_no` int(11) DEFAULT NULL,
148 `bank_act` varchar(15) NOT NULL DEFAULT '',
149 `ref` varchar(40) DEFAULT NULL,
150 `trans_date` date NOT NULL DEFAULT '0000-00-00',
151 `amount` double DEFAULT NULL,
152 `dimension_id` int(11) NOT NULL DEFAULT '0',
153 `dimension2_id` int(11) NOT NULL DEFAULT '0',
154 `person_type_id` int(11) NOT NULL DEFAULT '0',
155 `person_id` tinyblob,
156 `reconciled` date DEFAULT NULL,
158 KEY `bank_act` (`bank_act`,`ref`),
159 KEY `type` (`type`,`trans_no`),
160 KEY `bank_act_2` (`bank_act`,`reconciled`),
161 KEY `bank_act_3` (`bank_act`,`trans_date`)
162 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
164 -- Data of table `0_bank_trans` --
166 INSERT INTO `0_bank_trans` VALUES
167 ('1', '12', '1', '2', '001/2018', '2018-05-10', '6240', '0', '0', '2', '1', NULL),
168 ('2', '12', '2', '2', '002/2018', '2018-05-07', '300', '0', '0', '2', '1', NULL),
169 ('3', '12', '3', '2', '003/2018', '2018-05-07', '0', '0', '0', '2', '1', NULL),
170 ('4', '1', '1', '1', '001/2018', '2018-05-07', '-5', '0', '0', '0', 'Goods received', NULL),
171 ('5', '12', '4', '2', '001/2019', '2019-01-21', '1250', '0', '0', '2', '1', NULL);
173 -- Structure of table `0_bom` --
175 DROP TABLE IF EXISTS `0_bom`;
177 CREATE TABLE `0_bom` (
178 `id` int(11) NOT NULL AUTO_INCREMENT,
179 `parent` char(20) NOT NULL DEFAULT '',
180 `component` char(20) NOT NULL DEFAULT '',
181 `workcentre_added` int(11) NOT NULL DEFAULT '0',
182 `loc_code` char(5) NOT NULL DEFAULT '',
183 `quantity` double NOT NULL DEFAULT '1',
184 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
185 KEY `component` (`component`),
187 KEY `loc_code` (`loc_code`),
188 KEY `parent` (`parent`,`loc_code`),
189 KEY `workcentre_added` (`workcentre_added`)
190 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
192 -- Data of table `0_bom` --
194 INSERT INTO `0_bom` VALUES
195 ('1', '201', '101', '1', 'DEF', '1'),
196 ('2', '201', '102', '1', 'DEF', '1'),
197 ('3', '201', '103', '1', 'DEF', '1'),
198 ('4', '201', '301', '1', 'DEF', '1');
200 -- Structure of table `0_budget_trans` --
202 DROP TABLE IF EXISTS `0_budget_trans`;
204 CREATE TABLE `0_budget_trans` (
205 `id` int(11) NOT NULL AUTO_INCREMENT,
206 `tran_date` date NOT NULL DEFAULT '0000-00-00',
207 `account` varchar(15) NOT NULL DEFAULT '',
208 `memo_` tinytext NOT NULL,
209 `amount` double NOT NULL DEFAULT '0',
210 `dimension_id` int(11) DEFAULT '0',
211 `dimension2_id` int(11) DEFAULT '0',
213 KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`)
216 -- Data of table `0_budget_trans` --
218 -- Structure of table `0_chart_class` --
220 DROP TABLE IF EXISTS `0_chart_class`;
222 CREATE TABLE `0_chart_class` (
223 `cid` varchar(3) NOT NULL,
224 `class_name` varchar(60) NOT NULL DEFAULT '',
225 `ctype` tinyint(1) NOT NULL DEFAULT '0',
226 `inactive` tinyint(1) NOT NULL DEFAULT '0',
230 -- Data of table `0_chart_class` --
232 INSERT INTO `0_chart_class` VALUES
233 ('1', 'Assets', '1', '0'),
234 ('2', 'Liabilities', '2', '0'),
235 ('3', 'Income', '4', '0'),
236 ('4', 'Costs', '6', '0');
238 -- Structure of table `0_chart_master` --
240 DROP TABLE IF EXISTS `0_chart_master`;
242 CREATE TABLE `0_chart_master` (
243 `account_code` varchar(15) NOT NULL DEFAULT '',
244 `account_code2` varchar(15) NOT NULL DEFAULT '',
245 `account_name` varchar(60) NOT NULL DEFAULT '',
246 `account_type` varchar(10) NOT NULL DEFAULT '0',
247 `inactive` tinyint(1) NOT NULL DEFAULT '0',
248 PRIMARY KEY (`account_code`),
249 KEY `account_name` (`account_name`),
250 KEY `accounts_by_type` (`account_type`,`account_code`)
253 -- Data of table `0_chart_master` --
255 INSERT INTO `0_chart_master` VALUES
256 ('1060', '', 'Checking Account', '1', '0'),
257 ('1065', '', 'Petty Cash', '1', '0'),
258 ('1200', '', 'Accounts Receivables', '1', '0'),
259 ('1205', '', 'Allowance for doubtful accounts', '1', '0'),
260 ('1510', '', 'Inventory', '2', '0'),
261 ('1520', '', 'Stocks of Raw Materials', '2', '0'),
262 ('1530', '', 'Stocks of Work In Progress', '2', '0'),
263 ('1540', '', 'Stocks of Finished Goods', '2', '0'),
264 ('1550', '', 'Goods Received Clearing account', '2', '0'),
265 ('1820', '', 'Office Furniture & Equipment', '3', '0'),
266 ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0'),
267 ('1840', '', 'Vehicle', '3', '0'),
268 ('1845', '', 'Accum. Amort. -Vehicle', '3', '0'),
269 ('2100', '', 'Accounts Payable', '4', '0'),
270 ('2105', '', 'Deferred Income', '4', '0'),
271 ('2110', '', 'Accrued Income Tax - Federal', '4', '0'),
272 ('2120', '', 'Accrued Income Tax - State', '4', '0'),
273 ('2130', '', 'Accrued Franchise Tax', '4', '0'),
274 ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0'),
275 ('2150', '', 'Sales Tax', '4', '0'),
276 ('2160', '', 'Accrued Use Tax Payable', '4', '0'),
277 ('2210', '', 'Accrued Wages', '4', '0'),
278 ('2220', '', 'Accrued Comp Time', '4', '0'),
279 ('2230', '', 'Accrued Holiday Pay', '4', '0'),
280 ('2240', '', 'Accrued Vacation Pay', '4', '0'),
281 ('2310', '', 'Accr. Benefits - 401K', '4', '0'),
282 ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0'),
283 ('2330', '', 'Accr. Benefits - Med, Den', '4', '0'),
284 ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0'),
285 ('2350', '', 'Accr. Benefits - Credit Union', '4', '0'),
286 ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0'),
287 ('2370', '', 'Accr. Benefits - Garnish', '4', '0'),
288 ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0'),
289 ('2620', '', 'Bank Loans', '5', '0'),
290 ('2680', '', 'Loans from Shareholders', '5', '0'),
291 ('3350', '', 'Common Shares', '6', '0'),
292 ('3590', '', 'Retained Earnings - prior years', '7', '0'),
293 ('4010', '', 'Sales', '8', '0'),
294 ('4430', '', 'Shipping & Handling', '9', '0'),
295 ('4440', '', 'Interest', '9', '0'),
296 ('4450', '', 'Foreign Exchange Gain', '9', '0'),
297 ('4500', '', 'Prompt Payment Discounts', '9', '0'),
298 ('4510', '', 'Discounts Given', '9', '0'),
299 ('5010', '', 'Cost of Goods Sold - Retail', '10', '0'),
300 ('5020', '', 'Material Usage Varaiance', '10', '0'),
301 ('5030', '', 'Consumable Materials', '10', '0'),
302 ('5040', '', 'Purchase price Variance', '10', '0'),
303 ('5050', '', 'Purchases of materials', '10', '0'),
304 ('5060', '', 'Discounts Received', '10', '0'),
305 ('5100', '', 'Freight', '10', '0'),
306 ('5410', '', 'Wages & Salaries', '11', '0'),
307 ('5420', '', 'Wages - Overtime', '11', '0'),
308 ('5430', '', 'Benefits - Comp Time', '11', '0'),
309 ('5440', '', 'Benefits - Payroll Taxes', '11', '0'),
310 ('5450', '', 'Benefits - Workers Comp', '11', '0'),
311 ('5460', '', 'Benefits - Pension', '11', '0'),
312 ('5470', '', 'Benefits - General Benefits', '11', '0'),
313 ('5510', '', 'Inc Tax Exp - Federal', '11', '0'),
314 ('5520', '', 'Inc Tax Exp - State', '11', '0'),
315 ('5530', '', 'Taxes - Real Estate', '11', '0'),
316 ('5540', '', 'Taxes - Personal Property', '11', '0'),
317 ('5550', '', 'Taxes - Franchise', '11', '0'),
318 ('5560', '', 'Taxes - Foreign Withholding', '11', '0'),
319 ('5610', '', 'Accounting & Legal', '12', '0'),
320 ('5615', '', 'Advertising & Promotions', '12', '0'),
321 ('5620', '', 'Bad Debts', '12', '0'),
322 ('5660', '', 'Amortization Expense', '12', '0'),
323 ('5685', '', 'Insurance', '12', '0'),
324 ('5690', '', 'Interest & Bank Charges', '12', '0'),
325 ('5700', '', 'Office Supplies', '12', '0'),
326 ('5760', '', 'Rent', '12', '0'),
327 ('5765', '', 'Repair & Maintenance', '12', '0'),
328 ('5780', '', 'Telephone', '12', '0'),
329 ('5785', '', 'Travel & Entertainment', '12', '0'),
330 ('5790', '', 'Utilities', '12', '0'),
331 ('5795', '', 'Registrations', '12', '0'),
332 ('5800', '', 'Licenses', '12', '0'),
333 ('5810', '', 'Foreign Exchange Loss', '12', '0'),
334 ('9990', '', 'Year Profit/Loss', '12', '0');
336 -- Structure of table `0_chart_types` --
338 DROP TABLE IF EXISTS `0_chart_types`;
340 CREATE TABLE `0_chart_types` (
341 `id` varchar(10) NOT NULL,
342 `name` varchar(60) NOT NULL DEFAULT '',
343 `class_id` varchar(3) NOT NULL DEFAULT '',
344 `parent` varchar(10) NOT NULL DEFAULT '-1',
345 `inactive` tinyint(1) NOT NULL DEFAULT '0',
348 KEY `class_id` (`class_id`)
351 -- Data of table `0_chart_types` --
353 INSERT INTO `0_chart_types` VALUES
354 ('1', 'Current Assets', '1', '', '0'),
355 ('2', 'Inventory Assets', '1', '', '0'),
356 ('3', 'Capital Assets', '1', '', '0'),
357 ('4', 'Current Liabilities', '2', '', '0'),
358 ('5', 'Long Term Liabilities', '2', '', '0'),
359 ('6', 'Share Capital', '2', '', '0'),
360 ('7', 'Retained Earnings', '2', '', '0'),
361 ('8', 'Sales Revenue', '3', '', '0'),
362 ('9', 'Other Revenue', '3', '', '0'),
363 ('10', 'Cost of Goods Sold', '4', '', '0'),
364 ('11', 'Payroll Expenses', '4', '', '0'),
365 ('12', 'General & Administrative expenses', '4', '', '0');
367 -- Structure of table `0_comments` --
369 DROP TABLE IF EXISTS `0_comments`;
371 CREATE TABLE `0_comments` (
372 `type` int(11) NOT NULL DEFAULT '0',
373 `id` int(11) NOT NULL DEFAULT '0',
374 `date_` date DEFAULT '0000-00-00',
376 KEY `type_and_id` (`type`,`id`)
379 -- Data of table `0_comments` --
381 INSERT INTO `0_comments` VALUES
382 ('12', '1', '2018-05-10', 'Cash invoice 1'),
383 ('12', '2', '2018-05-07', 'Cash invoice 2'),
384 ('13', '4', '2018-05-07', 'Recurrent Invoice covers period 04/01/2018 - 04/07/2018.'),
385 ('10', '4', '2018-05-07', 'Recurrent Invoice covers period 04/01/2018 - 04/07/2018.'),
386 ('12', '3', '2018-05-07', 'Cash invoice 4'),
387 ('12', '4', '2019-01-21', 'Default #5'),
388 ('0', '1', '2018-12-31', 'Closing Year');
390 -- Structure of table `0_credit_status` --
392 DROP TABLE IF EXISTS `0_credit_status`;
394 CREATE TABLE `0_credit_status` (
395 `id` int(11) NOT NULL AUTO_INCREMENT,
396 `reason_description` char(100) NOT NULL DEFAULT '',
397 `dissallow_invoices` tinyint(1) NOT NULL DEFAULT '0',
398 `inactive` tinyint(1) NOT NULL DEFAULT '0',
400 UNIQUE KEY `reason_description` (`reason_description`)
401 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
403 -- Data of table `0_credit_status` --
405 INSERT INTO `0_credit_status` VALUES
406 ('1', 'Good History', '0', '0'),
407 ('3', 'No more work until payment received', '1', '0'),
408 ('4', 'In liquidation', '1', '0');
410 -- Structure of table `0_crm_categories` --
412 DROP TABLE IF EXISTS `0_crm_categories`;
414 CREATE TABLE `0_crm_categories` (
415 `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pure technical key',
416 `type` varchar(20) NOT NULL COMMENT 'contact type e.g. customer',
417 `action` varchar(20) NOT NULL COMMENT 'detailed usage e.g. department',
418 `name` varchar(30) NOT NULL COMMENT 'for category selector',
419 `description` tinytext NOT NULL COMMENT 'usage description',
420 `system` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'nonzero for core system usage',
421 `inactive` tinyint(1) NOT NULL DEFAULT '0',
423 UNIQUE KEY `type` (`type`,`action`),
424 UNIQUE KEY `type_2` (`type`,`name`)
425 ) ENGINE=InnoDB AUTO_INCREMENT=13 ;
427 -- Data of table `0_crm_categories` --
429 INSERT INTO `0_crm_categories` VALUES
430 ('1', 'cust_branch', 'general', 'General', 'General contact data for customer branch (overrides company setting)', '1', '0'),
431 ('2', 'cust_branch', 'invoice', 'Invoices', 'Invoice posting (overrides company setting)', '1', '0'),
432 ('3', 'cust_branch', 'order', 'Orders', 'Order confirmation (overrides company setting)', '1', '0'),
433 ('4', 'cust_branch', 'delivery', 'Deliveries', 'Delivery coordination (overrides company setting)', '1', '0'),
434 ('5', 'customer', 'general', 'General', 'General contact data for customer', '1', '0'),
435 ('6', 'customer', 'order', 'Orders', 'Order confirmation', '1', '0'),
436 ('7', 'customer', 'delivery', 'Deliveries', 'Delivery coordination', '1', '0'),
437 ('8', 'customer', 'invoice', 'Invoices', 'Invoice posting', '1', '0'),
438 ('9', 'supplier', 'general', 'General', 'General contact data for supplier', '1', '0'),
439 ('10', 'supplier', 'order', 'Orders', 'Order confirmation', '1', '0'),
440 ('11', 'supplier', 'delivery', 'Deliveries', 'Delivery coordination', '1', '0'),
441 ('12', 'supplier', 'invoice', 'Invoices', 'Invoice posting', '1', '0');
443 -- Structure of table `0_crm_contacts` --
445 DROP TABLE IF EXISTS `0_crm_contacts`;
447 CREATE TABLE `0_crm_contacts` (
448 `id` int(11) NOT NULL AUTO_INCREMENT,
449 `person_id` int(11) NOT NULL DEFAULT '0' COMMENT 'foreign key to crm_persons',
450 `type` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
451 `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories',
452 `entity_id` varchar(11) DEFAULT NULL COMMENT 'entity id in related class table',
454 KEY `type` (`type`,`action`)
455 ) ENGINE=InnoDB AUTO_INCREMENT=11 ;
457 -- Data of table `0_crm_contacts` --
459 INSERT INTO `0_crm_contacts` VALUES
460 ('4', '2', 'supplier', 'general', '2'),
461 ('5', '3', 'cust_branch', 'general', '1'),
462 ('7', '3', 'customer', 'general', '1'),
463 ('8', '1', 'supplier', 'general', '1'),
464 ('9', '4', 'cust_branch', 'general', '2'),
465 ('10', '4', 'customer', 'general', '2');
467 -- Structure of table `0_crm_persons` --
469 DROP TABLE IF EXISTS `0_crm_persons`;
471 CREATE TABLE `0_crm_persons` (
472 `id` int(11) NOT NULL AUTO_INCREMENT,
473 `ref` varchar(30) NOT NULL,
474 `name` varchar(60) NOT NULL,
475 `name2` varchar(60) DEFAULT NULL,
477 `phone` varchar(30) DEFAULT NULL,
478 `phone2` varchar(30) DEFAULT NULL,
479 `fax` varchar(30) DEFAULT NULL,
480 `email` varchar(100) DEFAULT NULL,
481 `lang` char(5) DEFAULT NULL,
482 `notes` tinytext NOT NULL,
483 `inactive` tinyint(1) NOT NULL DEFAULT '0',
486 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
488 -- Data of table `0_crm_persons` --
490 INSERT INTO `0_crm_persons` VALUES
491 ('1', 'Dino Saurius', 'John Doe', NULL, 'N/A', NULL, NULL, NULL, NULL, NULL, '', '0'),
492 ('2', 'Beefeater', 'Joe Oversea', NULL, 'N/A', NULL, NULL, NULL, NULL, NULL, '', '0'),
493 ('3', 'Donald Easter', 'Donald Easter LLC', NULL, 'N/A', NULL, NULL, NULL, NULL, NULL, '', '0'),
494 ('4', 'MoneyMaker', 'MoneyMaker Ltd.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '0');
496 -- Structure of table `0_currencies` --
498 DROP TABLE IF EXISTS `0_currencies`;
500 CREATE TABLE `0_currencies` (
501 `currency` varchar(60) NOT NULL DEFAULT '',
502 `curr_abrev` char(3) NOT NULL DEFAULT '',
503 `curr_symbol` varchar(10) NOT NULL DEFAULT '',
504 `country` varchar(100) NOT NULL DEFAULT '',
505 `hundreds_name` varchar(15) NOT NULL DEFAULT '',
506 `auto_update` tinyint(1) NOT NULL DEFAULT '1',
507 `inactive` tinyint(1) NOT NULL DEFAULT '0',
508 PRIMARY KEY (`curr_abrev`)
511 -- Data of table `0_currencies` --
513 INSERT INTO `0_currencies` VALUES
514 ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0'),
515 ('Euro', 'EUR', '€', 'Europe', 'Cents', '1', '0'),
516 ('Pounds', 'GBP', '£', 'England', 'Pence', '1', '0'),
517 ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0');
519 -- Structure of table `0_cust_allocations` --
521 DROP TABLE IF EXISTS `0_cust_allocations`;
523 CREATE TABLE `0_cust_allocations` (
524 `id` int(11) NOT NULL AUTO_INCREMENT,
525 `person_id` int(11) DEFAULT NULL,
526 `amt` double unsigned DEFAULT NULL,
527 `date_alloc` date NOT NULL DEFAULT '0000-00-00',
528 `trans_no_from` int(11) DEFAULT NULL,
529 `trans_type_from` int(11) DEFAULT NULL,
530 `trans_no_to` int(11) DEFAULT NULL,
531 `trans_type_to` int(11) DEFAULT NULL,
533 UNIQUE KEY `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
534 KEY `From` (`trans_type_from`,`trans_no_from`),
535 KEY `To` (`trans_type_to`,`trans_no_to`)
536 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
538 -- Data of table `0_cust_allocations` --
540 INSERT INTO `0_cust_allocations` VALUES
541 ('1', '1', '6240', '2018-05-10', '1', '12', '1', '10'),
542 ('2', '1', '300', '2018-05-07', '2', '12', '2', '10'),
543 ('3', '1', '0', '2018-05-07', '3', '12', '4', '10'),
544 ('4', '1', '1250', '2019-01-21', '4', '12', '5', '10');
546 -- Structure of table `0_cust_branch` --
548 DROP TABLE IF EXISTS `0_cust_branch`;
550 CREATE TABLE `0_cust_branch` (
551 `branch_code` int(11) NOT NULL AUTO_INCREMENT,
552 `debtor_no` int(11) NOT NULL DEFAULT '0',
553 `br_name` varchar(60) NOT NULL DEFAULT '',
554 `branch_ref` varchar(30) NOT NULL DEFAULT '',
555 `br_address` tinytext NOT NULL,
556 `area` int(11) DEFAULT NULL,
557 `salesman` int(11) NOT NULL DEFAULT '0',
558 `default_location` varchar(5) NOT NULL DEFAULT '',
559 `tax_group_id` int(11) DEFAULT NULL,
560 `sales_account` varchar(15) NOT NULL DEFAULT '',
561 `sales_discount_account` varchar(15) NOT NULL DEFAULT '',
562 `receivables_account` varchar(15) NOT NULL DEFAULT '',
563 `payment_discount_account` varchar(15) NOT NULL DEFAULT '',
564 `default_ship_via` varchar(20) NOT NULL DEFAULT '',
565 `br_post_address` tinytext NOT NULL,
566 `group_no` int(11) NOT NULL DEFAULT '0',
567 `notes` tinytext NOT NULL,
568 `bank_account` varchar(60) DEFAULT NULL,
569 `inactive` tinyint(1) NOT NULL DEFAULT '0',
570 PRIMARY KEY (`branch_code`,`debtor_no`),
571 KEY `branch_ref` (`branch_ref`),
572 KEY `group_no` (`group_no`)
573 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
575 -- Data of table `0_cust_branch` --
577 INSERT INTO `0_cust_branch` VALUES
578 ('1', '1', 'Donald Easter LLC', 'Donald Easter', 'N/A', '1', '1', 'DEF', '1', '', '4510', '1200', '4500', 'post-std', 'N/A', '0', '', NULL, '0'),
579 ('2', '2', 'MoneyMaker Ltd.', 'MoneyMaker', '', '1', '1', 'DEF', '2', '', '4510', '1200', '4500', 'post-std', '', '0', '', NULL, '0');
581 DROP TABLE IF EXISTS `0_sql_trail`;
582 CREATE TABLE `0_db_trail` (
583 `id` int(11) NOT NULL AUTO_INCREMENT,
584 `stamp` timestamp DEFAULT CURRENT_TIMESTAMP,
585 `user` tinyint(3) unsigned NOT NULL DEFAULT '0',
586 `msg` varchar(255) DEFAULT '',
587 `entry` varchar(255) DEFAULT '',
588 `data` text DEFAULT NULL,
592 -- Structure of table `0_debtor_trans` --
594 DROP TABLE IF EXISTS `0_debtor_trans`;
596 CREATE TABLE `0_debtor_trans` (
597 `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
598 `type` smallint(6) unsigned NOT NULL DEFAULT '0',
599 `version` tinyint(1) unsigned NOT NULL DEFAULT '0',
600 `debtor_no` int(11) unsigned NOT NULL,
601 `branch_code` int(11) NOT NULL DEFAULT '-1',
602 `tran_date` date NOT NULL DEFAULT '0000-00-00',
603 `due_date` date NOT NULL DEFAULT '0000-00-00',
604 `reference` varchar(60) NOT NULL DEFAULT '',
605 `tpe` int(11) NOT NULL DEFAULT '0',
606 `order_` int(11) NOT NULL DEFAULT '0',
607 `ov_amount` double NOT NULL DEFAULT '0',
608 `ov_gst` double NOT NULL DEFAULT '0',
609 `ov_freight` double NOT NULL DEFAULT '0',
610 `ov_freight_tax` double NOT NULL DEFAULT '0',
611 `ov_discount` double NOT NULL DEFAULT '0',
612 `alloc` double NOT NULL DEFAULT '0',
613 `prep_amount` double NOT NULL DEFAULT '0',
614 `rate` double NOT NULL DEFAULT '1',
615 `ship_via` varchar(20) NOT NULL DEFAULT '',
616 `dimension_id` int(11) NOT NULL DEFAULT '0',
617 `dimension2_id` int(11) NOT NULL DEFAULT '0',
618 `payment_terms` int(11) DEFAULT NULL,
619 `tax_included` tinyint(1) unsigned NOT NULL DEFAULT '0',
620 PRIMARY KEY (`type`,`trans_no`,`debtor_no`),
621 KEY `debtor_no` (`debtor_no`,`branch_code`),
622 KEY `tran_date` (`tran_date`),
623 KEY `order_` (`order_`)
626 -- Data of table `0_debtor_trans` --
628 INSERT INTO `0_debtor_trans` VALUES
629 ('1', '10', '0', '1', '1', '2018-05-10', '2018-05-05', '001/2018', '1', '1', '6240', '0', '0', '0', '0', '6240', '0', '1', 'std-post', '0', '0', '4', '1'),
630 ('2', '10', '0', '1', '1', '2018-05-07', '2018-05-07', '002/2018', '1', '2', '300', '0', '0', '0', '0', '300', '0', '1', 'std-post', '0', '0', '4', '1'),
631 ('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', 'std-post', '1', '0', '1', '1'),
632 ('4', '10', '0', '1', '1', '2018-05-07', '2018-05-07', '004/2018', '1', '7', '0', '0', '0', '0', '0', '0', '0', '1', 'std-post', '0', '0', '4', '1'),
633 ('5', '10', '0', '1', '1', '2019-01-21', '2019-01-21', '001/2019', '1', '8', '1250', '0', '0', '0', '0', '1250', '0', '1', 'std-post', '0', '0', '4', '1'),
634 ('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', NULL, '0'),
635 ('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', NULL, '0'),
636 ('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', NULL, '0'),
637 ('4', '12', '0', '1', '1', '2019-01-21', '0000-00-00', '001/2019', '0', '0', '1250', '0', '0', '0', '0', '1250', '0', '', '0', '0', '0', NULL, '0'),
638 ('1', '13', '1', '1', '1', '2018-05-10', '2018-05-05', 'auto', '1', '1', '6240', '0', '0', '0', '0', '0', '0', '1', 'std-post', '0', '0', '4', '1'),
639 ('2', '13', '1', '1', '1', '2018-05-07', '2018-05-07', 'auto', '1', '2', '300', '0', '0', '0', '0', '0', '0', '1', 'std-post', '0', '0', '4', '1'),
640 ('3', '13', '1', '2', '2', '2018-05-07', '2018-06-17', 'auto', '1', '5', '267.14', '0', '0', '0', '0', '0', '0', '1.123', 'std-post', '1', '0', '1', '1'),
641 ('4', '13', '1', '1', '1', '2018-05-07', '2018-05-07', 'auto', '1', '7', '0', '0', '0', '0', '0', '0', '0', '1', 'std-post', '0', '0', '4', '1'),
642 ('5', '13', '1', '1', '1', '2019-01-21', '2019-01-21', 'auto', '1', '8', '1250', '0', '0', '0', '0', '0', '0', '1', 'std-post', '0', '0', '4', '1');
644 -- Structure of table `0_debtor_trans_details` --
646 DROP TABLE IF EXISTS `0_debtor_trans_details`;
648 CREATE TABLE `0_debtor_trans_details` (
649 `id` int(11) NOT NULL AUTO_INCREMENT,
650 `debtor_trans_no` int(11) DEFAULT NULL,
651 `debtor_trans_type` int(11) DEFAULT NULL,
652 `stock_id` varchar(20) NOT NULL DEFAULT '',
653 `description` tinytext,
654 `unit_price` double NOT NULL DEFAULT '0',
655 `unit_tax` double NOT NULL DEFAULT '0',
656 `quantity` double NOT NULL DEFAULT '0',
657 `discount_percent` double NOT NULL DEFAULT '0',
658 `unit_cost` double NOT NULL DEFAULT '0',
659 `qty_done` double NOT NULL DEFAULT '0',
660 `src_id` int(11) NOT NULL,
662 KEY `Transaction` (`debtor_trans_type`,`debtor_trans_no`),
663 KEY `src_id` (`src_id`)
664 ) ENGINE=InnoDB AUTO_INCREMENT=15 ;
666 -- Data of table `0_debtor_trans_details` --
668 INSERT INTO `0_debtor_trans_details` VALUES
669 ('1', '1', '13', '101', 'iPad Air 2 16GB', '300', '14.29', '20', '0', '200', '20', '1'),
670 ('2', '1', '13', '301', 'Support', '80', '3.81', '3', '0', '0', '3', '2'),
671 ('3', '1', '10', '101', 'iPad Air 2 16GB', '300', '14.2855', '20', '0', '200', '0', '1'),
672 ('4', '1', '10', '301', 'Support', '80', '3.81', '3', '0', '0', '0', '2'),
673 ('5', '2', '13', '101', 'iPad Air 2 16GB', '300', '14.29', '1', '0', '200', '1', '3'),
674 ('6', '2', '10', '101', 'iPad Air 2 16GB', '300', '14.29', '1', '0', '200', '0', '5'),
675 ('7', '3', '13', '102', 'iPhone 6 64GB', '222.62', '0', '1', '0', '150', '1', '7'),
676 ('8', '3', '13', '103', 'iPhone Cover Case', '44.52', '0', '1', '0', '10', '1', '8'),
677 ('9', '3', '10', '102', 'iPhone 6 64GB', '222.62', '0', '1', '0', '150', '0', '7'),
678 ('10', '3', '10', '103', 'iPhone Cover Case', '44.52', '0', '1', '0', '10', '0', '8'),
679 ('11', '4', '13', '202', 'Maintenance', '0', '0', '5', '0', '0', '5', '10'),
680 ('12', '4', '10', '202', 'Maintenance', '0', '0', '5', '0', '0', '0', '11'),
681 ('13', '5', '13', '102', 'iPhone 6 64GB', '250', '11.904', '5', '0', '150', '5', '11'),
682 ('14', '5', '10', '102', 'iPhone 6 64GB', '250', '11.904', '5', '0', '150', '0', '13');
684 -- Structure of table `0_debtors_master` --
686 DROP TABLE IF EXISTS `0_debtors_master`;
688 CREATE TABLE `0_debtors_master` (
689 `debtor_no` int(11) NOT NULL AUTO_INCREMENT,
690 `name` varchar(100) NOT NULL DEFAULT '',
691 `debtor_ref` varchar(30) NOT NULL,
693 `tax_id` varchar(55) NOT NULL DEFAULT '',
694 `curr_code` char(3) NOT NULL DEFAULT '',
695 `sales_type` int(11) NOT NULL DEFAULT '1',
696 `dimension_id` int(11) NOT NULL DEFAULT '0',
697 `dimension2_id` int(11) NOT NULL DEFAULT '0',
698 `credit_status` int(11) NOT NULL DEFAULT '0',
699 `payment_terms` int(11) DEFAULT NULL,
700 `discount` double NOT NULL DEFAULT '0',
701 `pymt_discount` double NOT NULL DEFAULT '0',
702 `credit_limit` float NOT NULL DEFAULT '1000',
703 `notes` tinytext NOT NULL,
704 `inactive` tinyint(1) NOT NULL DEFAULT '0',
705 PRIMARY KEY (`debtor_no`),
706 UNIQUE KEY `debtor_ref` (`debtor_ref`),
708 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
710 -- Data of table `0_debtors_master` --
712 INSERT INTO `0_debtors_master` VALUES
713 ('1', 'Donald Easter LLC', 'Donald Easter', 'N/A', '123456789', 'USD', '1', '0', '0', '1', '4', '0', '0', '1000', '', '0'),
714 ('2', 'MoneyMaker Ltd.', 'MoneyMaker', 'N/A', '54354333', 'EUR', '1', '1', '0', '1', '1', '0', '0', '1000', '', '0');
716 -- Structure of table `0_dimensions` --
718 DROP TABLE IF EXISTS `0_dimensions`;
720 CREATE TABLE `0_dimensions` (
721 `id` int(11) NOT NULL AUTO_INCREMENT,
722 `reference` varchar(60) NOT NULL DEFAULT '',
723 `name` varchar(60) NOT NULL DEFAULT '',
724 `type_` tinyint(1) NOT NULL DEFAULT '1',
725 `closed` tinyint(1) NOT NULL DEFAULT '0',
726 `date_` date NOT NULL DEFAULT '0000-00-00',
727 `due_date` date NOT NULL DEFAULT '0000-00-00',
729 UNIQUE KEY `reference` (`reference`),
730 KEY `date_` (`date_`),
731 KEY `due_date` (`due_date`),
732 KEY `type_` (`type_`)
733 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
735 -- Data of table `0_dimensions` --
737 INSERT INTO `0_dimensions` VALUES
738 ('1', '001/2018', 'Cost Centre', '1', '0', '2018-05-05', '2018-05-25');
740 -- Structure of table `0_exchange_rates` --
742 DROP TABLE IF EXISTS `0_exchange_rates`;
744 CREATE TABLE `0_exchange_rates` (
745 `id` int(11) NOT NULL AUTO_INCREMENT,
746 `curr_code` char(3) NOT NULL DEFAULT '',
747 `rate_buy` double NOT NULL DEFAULT '0',
748 `rate_sell` double NOT NULL DEFAULT '0',
749 `date_` date NOT NULL DEFAULT '0000-00-00',
751 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
752 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
754 -- Data of table `0_exchange_rates` --
756 INSERT INTO `0_exchange_rates` VALUES
757 ('1', 'EUR', '1.123', '1.123', '2018-05-07');
759 -- Structure of table `0_fiscal_year` --
761 DROP TABLE IF EXISTS `0_fiscal_year`;
763 CREATE TABLE `0_fiscal_year` (
764 `id` int(11) NOT NULL AUTO_INCREMENT,
765 `begin` date DEFAULT '0000-00-00',
766 `end` date DEFAULT '0000-00-00',
767 `closed` tinyint(1) NOT NULL DEFAULT '0',
769 UNIQUE KEY `begin` (`begin`),
770 UNIQUE KEY `end` (`end`)
771 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
773 -- Data of table `0_fiscal_year` --
775 INSERT INTO `0_fiscal_year` VALUES
776 ('1', '2018-01-01', '2018-12-31', '1'),
777 ('2', '2019-01-01', '2019-12-31', '0');
779 -- Structure of table `0_gl_trans` --
781 DROP TABLE IF EXISTS `0_gl_trans`;
783 CREATE TABLE `0_gl_trans` (
784 `counter` int(11) NOT NULL AUTO_INCREMENT,
785 `type` smallint(6) NOT NULL DEFAULT '0',
786 `type_no` int(11) NOT NULL DEFAULT '0',
787 `tran_date` date NOT NULL DEFAULT '0000-00-00',
788 `account` varchar(15) NOT NULL DEFAULT '',
789 `memo_` tinytext NOT NULL,
790 `amount` double NOT NULL DEFAULT '0',
791 `dimension_id` int(11) NOT NULL DEFAULT '0',
792 `dimension2_id` int(11) NOT NULL DEFAULT '0',
793 `person_type_id` int(11) DEFAULT NULL,
794 `person_id` tinyblob,
795 PRIMARY KEY (`counter`),
796 KEY `Type_and_Number` (`type`,`type_no`),
797 KEY `dimension_id` (`dimension_id`),
798 KEY `dimension2_id` (`dimension2_id`),
799 KEY `tran_date` (`tran_date`),
800 KEY `account_and_tran_date` (`account`,`tran_date`)
801 ) ENGINE=InnoDB AUTO_INCREMENT=55 ;
803 -- Data of table `0_gl_trans` --
805 INSERT INTO `0_gl_trans` VALUES
806 ('1', '25', '1', '2018-05-05', '1510', '101', '20000', '0', '0', NULL, NULL),
807 ('2', '25', '1', '2018-05-05', '1510', '102', '15000', '0', '0', NULL, NULL),
808 ('3', '25', '1', '2018-05-05', '1510', '103', '1000', '0', '0', NULL, NULL),
809 ('4', '25', '1', '2018-05-05', '1550', '', '-36000', '0', '0', NULL, NULL),
810 ('5', '13', '1', '2018-05-10', '5010', '', '4000', '0', '0', NULL, NULL),
811 ('6', '13', '1', '2018-05-10', '1510', '', '-4000', '0', '0', NULL, NULL),
812 ('7', '10', '1', '2018-05-10', '4010', '', '-5714.29', '0', '0', NULL, NULL),
813 ('8', '10', '1', '2018-05-10', '4010', '', '-228.57', '0', '0', NULL, NULL),
814 ('9', '10', '1', '2018-05-10', '1200', '', '6240', '0', '0', '2', '1'),
815 ('10', '10', '1', '2018-05-10', '2150', '', '-297.14', '0', '0', NULL, NULL),
816 ('11', '12', '1', '2018-05-10', '1065', '', '6240', '0', '0', NULL, NULL),
817 ('12', '12', '1', '2018-05-10', '1200', '', '-6240', '0', '0', '2', '1'),
818 ('13', '29', '1', '2018-05-05', '1510', '1 * iPad Air 2 16GB', '-400', '0', '0', NULL, NULL),
819 ('14', '29', '1', '2018-05-05', '1510', '1 * iPhone 6 64GB', '-300', '0', '0', NULL, NULL),
820 ('15', '29', '1', '2018-05-05', '1510', '1 * iPhone Cover Case', '-20', '0', '0', NULL, NULL),
821 ('16', '29', '1', '2018-05-05', '1530', '1 * Support', '720', '0', '0', NULL, NULL),
822 ('17', '26', '1', '2018-05-05', '1530', '', '-720', '0', '0', NULL, NULL),
823 ('18', '26', '1', '2018-05-05', '1510', '', '720', '0', '0', NULL, NULL),
824 ('19', '25', '2', '2018-05-05', '1510', '101', '3000', '0', '0', NULL, NULL),
825 ('20', '25', '2', '2018-05-05', '1550', '', '-3000', '0', '0', NULL, NULL),
826 ('21', '20', '1', '2018-05-05', '2150', '', '150', '0', '0', NULL, NULL),
827 ('22', '20', '1', '2018-05-05', '2100', '', '-3150', '0', '0', '3', '1'),
828 ('23', '20', '1', '2018-05-05', '1550', '', '3000', '0', '0', NULL, NULL),
829 ('24', '13', '2', '2018-05-07', '5010', '', '200', '0', '0', NULL, NULL),
830 ('25', '13', '2', '2018-05-07', '1510', '', '-200', '0', '0', NULL, NULL),
831 ('26', '10', '2', '2018-05-07', '4010', '', '-285.71', '0', '0', NULL, NULL),
832 ('27', '10', '2', '2018-05-07', '1200', '', '300', '0', '0', '2', '1'),
833 ('28', '10', '2', '2018-05-07', '2150', '', '-14.29', '0', '0', NULL, NULL),
834 ('29', '12', '2', '2018-05-07', '1065', '', '300', '0', '0', NULL, NULL),
835 ('30', '12', '2', '2018-05-07', '1200', '', '-300', '0', '0', '2', '1'),
836 ('31', '13', '3', '2018-05-07', '5010', '', '150', '1', '0', NULL, NULL),
837 ('32', '13', '3', '2018-05-07', '1510', '', '-150', '0', '0', NULL, NULL),
838 ('33', '13', '3', '2018-05-07', '5010', '', '10', '1', '0', NULL, NULL),
839 ('34', '13', '3', '2018-05-07', '1510', '', '-10', '0', '0', NULL, NULL),
840 ('35', '10', '3', '2018-05-07', '4010', '', '-250', '1', '0', NULL, NULL),
841 ('36', '10', '3', '2018-05-07', '4010', '', '-50', '1', '0', NULL, NULL),
842 ('37', '10', '3', '2018-05-07', '1200', '', '300', '0', '0', '2', '2'),
843 ('38', '12', '3', '2018-05-07', '1065', '', '0', '0', '0', NULL, NULL),
844 ('39', '1', '1', '2018-05-07', '5010', '', '5', '1', '0', NULL, NULL),
845 ('40', '1', '1', '2018-05-07', '1060', '', '-5', '0', '0', NULL, NULL),
846 ('41', '13', '5', '2019-01-21', '5010', '', '750', '0', '0', NULL, NULL),
847 ('42', '13', '5', '2019-01-21', '1510', '', '-750', '0', '0', NULL, NULL),
848 ('43', '10', '5', '2019-01-21', '4010', '', '-1190.48', '0', '0', NULL, NULL),
849 ('44', '10', '5', '2019-01-21', '1200', '', '1250', '0', '0', '2', '1'),
850 ('45', '10', '5', '2019-01-21', '2150', '', '-59.52', '0', '0', NULL, NULL),
851 ('46', '12', '4', '2019-01-21', '1065', '', '1250', '0', '0', NULL, NULL),
852 ('47', '12', '4', '2019-01-21', '1200', '', '-1250', '0', '0', '2', '1'),
853 ('48', '25', '3', '2019-01-21', '1510', '102', '900', '0', '0', NULL, NULL),
854 ('49', '25', '3', '2019-01-21', '1550', '', '-900', '0', '0', NULL, NULL),
855 ('50', '20', '2', '2019-01-21', '2150', '', '45', '0', '0', NULL, NULL),
856 ('51', '20', '2', '2019-01-21', '2100', '', '-945', '0', '0', '3', '1'),
857 ('52', '20', '2', '2019-01-21', '1550', '', '900', '0', '0', NULL, NULL),
858 ('53', '0', '1', '2018-12-31', '3590', 'Closing Year', '-2163.57', '0', '0', NULL, NULL),
859 ('54', '0', '1', '2018-12-31', '9990', 'Closing Year', '2163.57', '0', '0', NULL, NULL);
861 -- Structure of table `0_grn_batch` --
863 DROP TABLE IF EXISTS `0_grn_batch`;
865 CREATE TABLE `0_grn_batch` (
866 `id` int(11) NOT NULL AUTO_INCREMENT,
867 `supplier_id` int(11) NOT NULL DEFAULT '0',
868 `purch_order_no` int(11) DEFAULT NULL,
869 `reference` varchar(60) NOT NULL DEFAULT '',
870 `delivery_date` date NOT NULL DEFAULT '0000-00-00',
871 `loc_code` varchar(5) DEFAULT NULL,
872 `rate` double DEFAULT '1',
874 KEY `delivery_date` (`delivery_date`),
875 KEY `purch_order_no` (`purch_order_no`)
876 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
878 -- Data of table `0_grn_batch` --
880 INSERT INTO `0_grn_batch` VALUES
881 ('1', '1', '1', '001/2018', '2018-05-05', 'DEF', '1'),
882 ('2', '1', '2', 'auto', '2018-05-05', 'DEF', '1'),
883 ('3', '1', '3', 'auto', '2019-01-21', 'DEF', '1');
885 -- Structure of table `0_grn_items` --
887 DROP TABLE IF EXISTS `0_grn_items`;
889 CREATE TABLE `0_grn_items` (
890 `id` int(11) NOT NULL AUTO_INCREMENT,
891 `grn_batch_id` int(11) DEFAULT NULL,
892 `po_detail_item` int(11) NOT NULL DEFAULT '0',
893 `item_code` varchar(20) NOT NULL DEFAULT '',
894 `description` tinytext,
895 `qty_recd` double NOT NULL DEFAULT '0',
896 `quantity_inv` double NOT NULL DEFAULT '0',
898 KEY `grn_batch_id` (`grn_batch_id`)
899 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
901 -- Data of table `0_grn_items` --
903 INSERT INTO `0_grn_items` VALUES
904 ('1', '1', '1', '101', 'iPad Air 2 16GB', '100', '0'),
905 ('2', '1', '2', '102', 'iPhone 6 64GB', '100', '0'),
906 ('3', '1', '3', '103', 'iPhone Cover Case', '100', '0'),
907 ('4', '2', '4', '101', 'iPad Air 2 16GB', '15', '15'),
908 ('5', '3', '5', '102', 'iPhone 6 64GB', '6', '6');
910 -- Structure of table `0_groups` --
912 DROP TABLE IF EXISTS `0_groups`;
914 CREATE TABLE `0_groups` (
915 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
916 `description` varchar(60) NOT NULL DEFAULT '',
917 `inactive` tinyint(1) NOT NULL DEFAULT '0',
919 UNIQUE KEY `description` (`description`)
920 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
922 -- Data of table `0_groups` --
924 INSERT INTO `0_groups` VALUES
926 ('2', 'Medium', '0'),
929 -- Structure of table `0_item_codes` --
931 DROP TABLE IF EXISTS `0_item_codes`;
933 CREATE TABLE `0_item_codes` (
934 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
935 `item_code` varchar(20) NOT NULL,
936 `stock_id` varchar(20) NOT NULL,
937 `description` varchar(200) NOT NULL DEFAULT '',
938 `category_id` smallint(6) unsigned NOT NULL,
939 `quantity` double NOT NULL DEFAULT '1',
940 `is_foreign` tinyint(1) NOT NULL DEFAULT '0',
941 `inactive` tinyint(1) NOT NULL DEFAULT '0',
943 UNIQUE KEY `stock_id` (`stock_id`,`item_code`),
944 KEY `item_code` (`item_code`)
945 ) ENGINE=InnoDB AUTO_INCREMENT=9 ;
947 -- Data of table `0_item_codes` --
949 INSERT INTO `0_item_codes` VALUES
950 ('1', '101', '101', 'iPad Air 2 16GB', '1', '1', '0', '0'),
951 ('2', '102', '102', 'iPhone 6 64GB', '1', '1', '0', '0'),
952 ('3', '103', '103', 'iPhone Cover Case', '1', '1', '0', '0'),
953 ('4', '201', '201', 'AP Surf Set', '3', '1', '0', '0'),
954 ('5', '301', '301', 'Support', '4', '1', '0', '0'),
955 ('6', '501', '102', 'iPhone Pack', '1', '1', '0', '0'),
956 ('7', '501', '103', 'iPhone Pack', '1', '1', '0', '0'),
957 ('8', '202', '202', 'Maintenance', '4', '1', '0', '0');
959 -- Structure of table `0_item_tax_type_exemptions` --
961 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
963 CREATE TABLE `0_item_tax_type_exemptions` (
964 `item_tax_type_id` int(11) NOT NULL DEFAULT '0',
965 `tax_type_id` int(11) NOT NULL DEFAULT '0',
966 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
969 -- Data of table `0_item_tax_type_exemptions` --
971 -- Structure of table `0_item_tax_types` --
973 DROP TABLE IF EXISTS `0_item_tax_types`;
975 CREATE TABLE `0_item_tax_types` (
976 `id` int(11) NOT NULL AUTO_INCREMENT,
977 `name` varchar(60) NOT NULL DEFAULT '',
978 `exempt` tinyint(1) NOT NULL DEFAULT '0',
979 `inactive` tinyint(1) NOT NULL DEFAULT '0',
981 UNIQUE KEY `name` (`name`)
982 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
984 -- Data of table `0_item_tax_types` --
986 INSERT INTO `0_item_tax_types` VALUES
987 ('1', 'Regular', '0', '0');
989 -- Structure of table `0_item_units` --
991 DROP TABLE IF EXISTS `0_item_units`;
993 CREATE TABLE `0_item_units` (
994 `abbr` varchar(20) NOT NULL,
995 `name` varchar(40) NOT NULL,
996 `decimals` tinyint(2) NOT NULL,
997 `inactive` tinyint(1) NOT NULL DEFAULT '0',
998 PRIMARY KEY (`abbr`),
999 UNIQUE KEY `name` (`name`)
1002 -- Data of table `0_item_units` --
1004 INSERT INTO `0_item_units` VALUES
1005 ('each', 'Each', '0', '0'),
1006 ('hr', 'Hours', '0', '0');
1008 -- Structure of table `0_journal` --
1010 DROP TABLE IF EXISTS `0_journal`;
1012 CREATE TABLE `0_journal` (
1013 `type` smallint(6) NOT NULL DEFAULT '0',
1014 `trans_no` int(11) NOT NULL DEFAULT '0',
1015 `tran_date` date DEFAULT '0000-00-00',
1016 `reference` varchar(60) NOT NULL DEFAULT '',
1017 `source_ref` varchar(60) NOT NULL DEFAULT '',
1018 `event_date` date DEFAULT '0000-00-00',
1019 `doc_date` date NOT NULL DEFAULT '0000-00-00',
1020 `currency` char(3) NOT NULL DEFAULT '',
1021 `amount` double NOT NULL DEFAULT '0',
1022 `rate` double NOT NULL DEFAULT '1',
1023 PRIMARY KEY (`type`,`trans_no`),
1024 KEY `tran_date` (`tran_date`)
1027 -- Data of table `0_journal` --
1029 INSERT INTO `0_journal` VALUES
1030 ('0', '1', '2018-12-31', '001/2012', '', '2018-12-31', '2018-12-31', 'USD', '2163.57', '1');
1032 -- Structure of table `0_loc_stock` --
1034 DROP TABLE IF EXISTS `0_loc_stock`;
1036 CREATE TABLE `0_loc_stock` (
1037 `loc_code` char(5) NOT NULL DEFAULT '',
1038 `stock_id` char(20) NOT NULL DEFAULT '',
1039 `reorder_level` double NOT NULL DEFAULT '0',
1040 PRIMARY KEY (`loc_code`,`stock_id`),
1041 KEY `stock_id` (`stock_id`)
1044 -- Data of table `0_loc_stock` --
1046 INSERT INTO `0_loc_stock` VALUES
1047 ('DEF', '101', '0'),
1048 ('DEF', '102', '0'),
1049 ('DEF', '103', '0'),
1050 ('DEF', '201', '0'),
1051 ('DEF', '202', '0'),
1052 ('DEF', '301', '0');
1054 -- Structure of table `0_locations` --
1056 DROP TABLE IF EXISTS `0_locations`;
1058 CREATE TABLE `0_locations` (
1059 `loc_code` varchar(5) NOT NULL DEFAULT '',
1060 `location_name` varchar(60) NOT NULL DEFAULT '',
1061 `delivery_address` tinytext NOT NULL,
1062 `phone` varchar(30) NOT NULL DEFAULT '',
1063 `phone2` varchar(30) NOT NULL DEFAULT '',
1064 `fax` varchar(30) NOT NULL DEFAULT '',
1065 `email` varchar(100) NOT NULL DEFAULT '',
1066 `contact` varchar(30) NOT NULL DEFAULT '',
1067 `fixed_asset` tinyint(1) NOT NULL DEFAULT '0',
1068 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1069 PRIMARY KEY (`loc_code`)
1072 -- Data of table `0_locations` --
1074 INSERT INTO `0_locations` VALUES
1075 ('DEF', 'Default', 'N/A', '', '', '', '', '', '0', '0');
1077 -- Structure of table `0_payment_terms` --
1079 DROP TABLE IF EXISTS `0_payment_terms`;
1081 CREATE TABLE `0_payment_terms` (
1082 `id` int(11) NOT NULL AUTO_INCREMENT,
1083 `terms` char(80) NOT NULL DEFAULT '',
1084 `type` tinyint(1) NOT NULL DEFAULT '1'
1085 `days` int(11) NOT NULL DEFAULT '0'
1086 `early_discount` double NOT NULL DEFAULT '0'
1087 `early_days` double NOT NULL DEFAULT '0',
1088 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1090 UNIQUE KEY `terms` (`terms`)
1091 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
1093 -- Data of table `0_payment_terms` --
1095 INSERT INTO `0_payment_terms` VALUES
1096 ('1', 'Due 15th Of the Following Month', '4', '17', '0', '0', '0'),
1097 ('2', 'Due By End Of The Following Month', '4', '30', '0', '0', '0'),
1098 ('3', 'Payment due within 10 days', '10', '3', '0', '0', '0', '0'),
1099 ('4', 'Cash Only', '2', '0', '0', '0', '0'),
1100 ('5', 'Prepaid', '1', '0', '0', '0', '0');
1102 -- Structure of table `0_prices` --
1104 DROP TABLE IF EXISTS `0_prices`;
1106 CREATE TABLE `0_prices` (
1107 `id` int(11) NOT NULL AUTO_INCREMENT,
1108 `stock_id` varchar(20) NOT NULL DEFAULT '',
1109 `sales_type_id` int(11) NOT NULL DEFAULT '0',
1110 `curr_abrev` char(3) NOT NULL DEFAULT '',
1111 `price` double NOT NULL DEFAULT '0',
1113 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
1114 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1116 -- Data of table `0_prices` --
1118 INSERT INTO `0_prices` VALUES
1119 ('1', '101', '1', 'USD', '300'),
1120 ('2', '102', '1', 'USD', '250'),
1121 ('3', '103', '1', 'USD', '50');
1123 -- Structure of table `0_print_profiles` --
1125 DROP TABLE IF EXISTS `0_print_profiles`;
1127 CREATE TABLE `0_print_profiles` (
1128 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1129 `profile` varchar(30) NOT NULL,
1130 `report` varchar(5) DEFAULT NULL,
1131 `printer` tinyint(3) unsigned DEFAULT NULL,
1133 UNIQUE KEY `profile` (`profile`,`report`)
1134 ) ENGINE=InnoDB AUTO_INCREMENT=10 ;
1136 -- Data of table `0_print_profiles` --
1138 INSERT INTO `0_print_profiles` VALUES
1139 ('1', 'Out of office', NULL, '0'),
1140 ('2', 'Sales Department', NULL, '0'),
1141 ('3', 'Central', NULL, '2'),
1142 ('4', 'Sales Department', '104', '2'),
1143 ('5', 'Sales Department', '105', '2'),
1144 ('6', 'Sales Department', '107', '2'),
1145 ('7', 'Sales Department', '109', '2'),
1146 ('8', 'Sales Department', '110', '2'),
1147 ('9', 'Sales Department', '201', '2');
1149 -- Structure of table `0_printers` --
1151 DROP TABLE IF EXISTS `0_printers`;
1153 CREATE TABLE `0_printers` (
1154 `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
1155 `name` varchar(20) NOT NULL,
1156 `description` varchar(60) NOT NULL,
1157 `queue` varchar(20) NOT NULL,
1158 `host` varchar(40) NOT NULL,
1159 `port` smallint(11) unsigned NOT NULL,
1160 `timeout` tinyint(3) unsigned NOT NULL,
1162 UNIQUE KEY `name` (`name`)
1163 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1165 -- Data of table `0_printers` --
1167 INSERT INTO `0_printers` VALUES
1168 ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20'),
1169 ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5'),
1170 ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
1172 -- Structure of table `0_purch_data` --
1174 DROP TABLE IF EXISTS `0_purch_data`;
1176 CREATE TABLE `0_purch_data` (
1177 `supplier_id` int(11) NOT NULL DEFAULT '0',
1178 `stock_id` char(20) NOT NULL DEFAULT '',
1179 `price` double NOT NULL DEFAULT '0',
1180 `suppliers_uom` char(50) NOT NULL DEFAULT '',
1181 `conversion_factor` double NOT NULL DEFAULT '1',
1182 `supplier_description` char(50) NOT NULL DEFAULT '',
1183 PRIMARY KEY (`supplier_id`,`stock_id`)
1186 -- Data of table `0_purch_data` --
1188 INSERT INTO `0_purch_data` VALUES
1189 ('1', '101', '200', '', '1', 'iPad Air 2 16GB'),
1190 ('1', '102', '150', '', '1', 'iPhone 6 64GB'),
1191 ('1', '103', '10', '', '1', 'iPhone Cover Case');
1193 -- Structure of table `0_purch_order_details` --
1195 DROP TABLE IF EXISTS `0_purch_order_details`;
1197 CREATE TABLE `0_purch_order_details` (
1198 `po_detail_item` int(11) NOT NULL AUTO_INCREMENT,
1199 `order_no` int(11) NOT NULL DEFAULT '0',
1200 `item_code` varchar(20) NOT NULL DEFAULT '',
1201 `description` tinytext,
1202 `delivery_date` date NOT NULL DEFAULT '0000-00-00',
1203 `qty_invoiced` double NOT NULL DEFAULT '0',
1204 `unit_price` double NOT NULL DEFAULT '0',
1205 `act_price` double NOT NULL DEFAULT '0',
1206 `std_cost_unit` double NOT NULL DEFAULT '0',
1207 `quantity_ordered` double NOT NULL DEFAULT '0',
1208 `quantity_received` double NOT NULL DEFAULT '0',
1209 PRIMARY KEY (`po_detail_item`),
1210 KEY `order` (`order_no`,`po_detail_item`),
1211 KEY `itemcode` (`item_code`)
1212 ) ENGINE=InnoDB AUTO_INCREMENT=6 ;
1214 -- Data of table `0_purch_order_details` --
1216 INSERT INTO `0_purch_order_details` VALUES
1217 ('1', '1', '101', 'iPad Air 2 16GB', '2018-05-15', '0', '200', '200', '200', '100', '100'),
1218 ('2', '1', '102', 'iPhone 6 64GB', '2018-05-15', '0', '150', '150', '150', '100', '100'),
1219 ('3', '1', '103', 'iPhone Cover Case', '2018-05-15', '0', '10', '10', '10', '100', '100'),
1220 ('4', '2', '101', 'iPad Air 2 16GB', '2018-05-05', '15', '200', '200', '200', '15', '15'),
1221 ('5', '3', '102', 'iPhone 6 64GB', '2019-01-21', '6', '150', '150', '150', '6', '6');
1223 -- Structure of table `0_purch_orders` --
1225 DROP TABLE IF EXISTS `0_purch_orders`;
1227 CREATE TABLE `0_purch_orders` (
1228 `order_no` int(11) NOT NULL AUTO_INCREMENT,
1229 `supplier_id` int(11) NOT NULL DEFAULT '0',
1230 `comments` tinytext,
1231 `ord_date` date NOT NULL DEFAULT '0000-00-00',
1232 `reference` tinytext NOT NULL,
1233 `supp_reference` tinytext,
1234 `into_stock_location` varchar(5) NOT NULL DEFAULT '',
1235 `delivery_address` tinytext NOT NULL,
1236 `total` double NOT NULL DEFAULT '0',
1237 `prep_amount` double NOT NULL DEFAULT '0',
1238 `alloc` double NOT NULL DEFAULT '0',
1239 `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1240 PRIMARY KEY (`order_no`),
1241 KEY `ord_date` (`ord_date`)
1242 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1244 -- Data of table `0_purch_orders` --
1246 INSERT INTO `0_purch_orders` VALUES
1247 ('1', '1', NULL, '2018-05-05', '001/2018', NULL, 'DEF', 'N/A', '37800', '0', '0', '0'),
1248 ('2', '1', NULL, '2018-05-05', 'auto', 'rr4', 'DEF', 'N/A', '3150', '0', '0', '0'),
1249 ('3', '1', NULL, '2019-01-21', 'auto', 'asd5', 'DEF', 'N/A', '945', '0', '0', '0');
1251 -- Structure of table `0_quick_entries` --
1253 DROP TABLE IF EXISTS `0_quick_entries`;
1255 CREATE TABLE `0_quick_entries` (
1256 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1257 `type` tinyint(1) NOT NULL DEFAULT '0',
1258 `description` varchar(60) NOT NULL,
1259 `usage` varchar(120) DEFAULT NULL,
1260 `base_amount` double NOT NULL DEFAULT '0',
1261 `base_desc` varchar(60) DEFAULT NULL,
1262 `bal_type` tinyint(1) NOT NULL DEFAULT '0',
1264 KEY `description` (`description`)
1265 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
1267 -- Data of table `0_quick_entries` --
1269 INSERT INTO `0_quick_entries` VALUES
1270 ('1', '1', 'Maintenance', NULL, '0', 'Amount', '0'),
1271 ('2', '4', 'Phone', NULL, '0', 'Amount', '0'),
1272 ('3', '2', 'Cash Sales', 'Retail sales without invoice', '0', 'Amount', '0');
1274 -- Structure of table `0_quick_entry_lines` --
1276 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1278 CREATE TABLE `0_quick_entry_lines` (
1279 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1280 `qid` smallint(6) unsigned NOT NULL,
1281 `amount` double DEFAULT '0',
1282 `memo` tinytext NOT NULL,
1283 `action` varchar(2) NOT NULL,
1284 `dest_id` varchar(15) NOT NULL DEFAULT '',
1285 `dimension_id` smallint(6) unsigned DEFAULT NULL,
1286 `dimension2_id` smallint(6) unsigned DEFAULT NULL,
1289 ) ENGINE=InnoDB AUTO_INCREMENT=7 ;
1291 -- Data of table `0_quick_entry_lines` --
1293 INSERT INTO `0_quick_entry_lines` VALUES
1294 ('1', '1', '0', '', 't-', '1', '0', '0'),
1295 ('2', '2', '0', '', 't-', '1', '0', '0'),
1296 ('3', '3', '0', '', 't-', '1', '0', '0'),
1297 ('4', '3', '0', '', '=', '4010', '0', '0'),
1298 ('5', '1', '0', '', '=', '5765', '0', '0'),
1299 ('6', '2', '0', '', '=', '5780', '0', '0');
1301 -- Structure of table `0_recurrent_invoices` --
1303 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1305 CREATE TABLE `0_recurrent_invoices` (
1306 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1307 `description` varchar(60) NOT NULL DEFAULT '',
1308 `order_no` int(11) unsigned NOT NULL,
1309 `debtor_no` int(11) unsigned DEFAULT NULL,
1310 `group_no` smallint(6) unsigned DEFAULT NULL,
1311 `days` int(11) NOT NULL DEFAULT '0',
1312 `monthly` int(11) NOT NULL DEFAULT '0',
1313 `begin` date NOT NULL DEFAULT '0000-00-00',
1314 `end` date NOT NULL DEFAULT '0000-00-00',
1315 `last_sent` date NOT NULL DEFAULT '0000-00-00',
1317 UNIQUE KEY `description` (`description`)
1318 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1320 -- Data of table `0_recurrent_invoices` --
1322 INSERT INTO `0_recurrent_invoices` VALUES
1323 ('1', 'Weekly Maintenance', '6', '1', '1', '7', '0', '2018-04-01', '2020-05-07', '2018-04-08');
1325 -- Structure of table `0_reflines` --
1327 DROP TABLE IF EXISTS `0_reflines`;
1329 CREATE TABLE `0_reflines` (
1330 `id` int(11) NOT NULL AUTO_INCREMENT,
1331 `trans_type` int(11) NOT NULL,
1332 `prefix` char(5) NOT NULL DEFAULT '',
1333 `pattern` varchar(35) NOT NULL DEFAULT '1',
1334 `description` varchar(60) NOT NULL DEFAULT '',
1335 `default` tinyint(1) NOT NULL DEFAULT '0',
1336 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1338 UNIQUE KEY `prefix` (`trans_type`,`prefix`)
1339 ) ENGINE=InnoDB AUTO_INCREMENT=23 ;
1341 -- Data of table `0_reflines` --
1343 INSERT INTO `0_reflines` VALUES
1344 ('1', '0', '', '{001}/{YYYY}', '', '1', '0'),
1345 ('2', '1', '', '{001}/{YYYY}', '', '1', '0'),
1346 ('3', '2', '', '{001}/{YYYY}', '', '1', '0'),
1347 ('4', '4', '', '{001}/{YYYY}', '', '1', '0'),
1348 ('5', '10', '', '{001}/{YYYY}', '', '1', '0'),
1349 ('6', '11', '', '{001}/{YYYY}', '', '1', '0'),
1350 ('7', '12', '', '{001}/{YYYY}', '', '1', '0'),
1351 ('8', '13', '', '{001}/{YYYY}', '', '1', '0'),
1352 ('9', '16', '', '{001}/{YYYY}', '', '1', '0'),
1353 ('10', '17', '', '{001}/{YYYY}', '', '1', '0'),
1354 ('11', '18', '', '{001}/{YYYY}', '', '1', '0'),
1355 ('12', '20', '', '{001}/{YYYY}', '', '1', '0'),
1356 ('13', '21', '', '{001}/{YYYY}', '', '1', '0'),
1357 ('14', '22', '', '{001}/{YYYY}', '', '1', '0'),
1358 ('15', '25', '', '{001}/{YYYY}', '', '1', '0'),
1359 ('16', '26', '', '{001}/{YYYY}', '', '1', '0'),
1360 ('17', '28', '', '{001}/{YYYY}', '', '1', '0'),
1361 ('18', '29', '', '{001}/{YYYY}', '', '1', '0'),
1362 ('19', '30', '', '{001}/{YYYY}', '', '1', '0'),
1363 ('20', '32', '', '{001}/{YYYY}', '', '1', '0'),
1364 ('21', '35', '', '{001}/{YYYY}', '', '1', '0'),
1365 ('22', '40', '', '{001}/{YYYY}', '', '1', '0');
1367 -- Structure of table `0_refs` --
1369 DROP TABLE IF EXISTS `0_refs`;
1371 CREATE TABLE `0_refs` (
1372 `id` int(11) NOT NULL DEFAULT '0',
1373 `type` int(11) NOT NULL DEFAULT '0',
1374 `reference` varchar(100) NOT NULL DEFAULT '',
1375 PRIMARY KEY (`id`,`type`),
1376 KEY `Type_and_Reference` (`type`,`reference`)
1379 -- Data of table `0_refs` --
1381 INSERT INTO `0_refs` VALUES
1382 ('1', '1', '001/2018'),
1383 ('1', '10', '001/2018'),
1384 ('5', '10', '001/2019'),
1385 ('2', '10', '002/2018'),
1386 ('3', '10', '003/2018'),
1387 ('4', '10', '004/2018'),
1388 ('1', '12', '001/2018'),
1389 ('4', '12', '001/2019'),
1390 ('2', '12', '002/2018'),
1391 ('3', '12', '003/2018'),
1392 ('1', '18', '001/2018'),
1393 ('1', '20', '001/2018'),
1394 ('2', '20', '001/2019'),
1395 ('1', '25', '001/2018'),
1396 ('1', '26', '001/2018'),
1397 ('2', '26', '002/2018'),
1398 ('3', '26', '003/2018'),
1399 ('3', '30', '001/2018'),
1400 ('4', '30', '002/2018'),
1401 ('6', '30', '003/2018'),
1402 ('1', '40', '001/2018');
1404 -- Structure of table `0_sales_order_details` --
1406 DROP TABLE IF EXISTS `0_sales_order_details`;
1408 CREATE TABLE `0_sales_order_details` (
1409 `id` int(11) NOT NULL AUTO_INCREMENT,
1410 `order_no` int(11) NOT NULL DEFAULT '0',
1411 `trans_type` smallint(6) NOT NULL DEFAULT '30',
1412 `stk_code` varchar(20) NOT NULL DEFAULT '',
1413 `description` tinytext,
1414 `qty_sent` double NOT NULL DEFAULT '0',
1415 `unit_price` double NOT NULL DEFAULT '0',
1416 `quantity` double NOT NULL DEFAULT '0',
1417 `invoiced` double NOT NULL DEFAULT '0',
1418 `discount_percent` double NOT NULL DEFAULT '0',
1420 KEY `sorder` (`trans_type`,`order_no`),
1421 KEY `stkcode` (`stk_code`)
1422 ) ENGINE=InnoDB AUTO_INCREMENT=12 ;
1424 -- Data of table `0_sales_order_details` --
1426 INSERT INTO `0_sales_order_details` VALUES
1427 ('1', '1', '30', '101', 'iPad Air 2 16GB', '20', '300', '20', '0', '0'),
1428 ('2', '1', '30', '301', 'Support', '3', '80', '3', '0', '0'),
1429 ('3', '2', '30', '101', 'iPad Air 2 16GB', '1', '300', '1', '0', '0'),
1430 ('4', '3', '30', '102', 'iPhone 6 64GB', '0', '250', '1', '0', '0'),
1431 ('5', '3', '30', '103', 'iPhone Cover Case', '0', '50', '1', '0', '0'),
1432 ('6', '4', '30', '101', 'iPad Air 2 16GB', '0', '267.14', '1', '0', '0'),
1433 ('7', '5', '30', '102', 'iPhone 6 64GB', '1', '222.62', '1', '0', '0'),
1434 ('8', '5', '30', '103', 'iPhone Cover Case', '1', '44.52', '1', '0', '0'),
1435 ('9', '6', '30', '202', 'Maintenance', '0', '90', '5', '0', '0'),
1436 ('10', '7', '30', '202', 'Maintenance', '5', '0', '5', '0', '0'),
1437 ('11', '8', '30', '102', 'iPhone 6 64GB', '5', '250', '5', '0', '0');
1439 -- Structure of table `0_sales_orders` --
1441 DROP TABLE IF EXISTS `0_sales_orders`;
1443 CREATE TABLE `0_sales_orders` (
1444 `order_no` int(11) NOT NULL,
1445 `trans_type` smallint(6) NOT NULL DEFAULT '30',
1446 `version` tinyint(1) unsigned NOT NULL DEFAULT '0',
1447 `type` tinyint(1) NOT NULL DEFAULT '0',
1448 `debtor_no` int(11) NOT NULL DEFAULT '0',
1449 `branch_code` int(11) NOT NULL DEFAULT '0',
1450 `reference` varchar(100) NOT NULL DEFAULT '',
1451 `customer_ref` tinytext NOT NULL,
1452 `comments` tinytext,
1453 `ord_date` date NOT NULL DEFAULT '0000-00-00',
1454 `order_type` int(11) NOT NULL DEFAULT '0',
1455 `ship_via` varchar(20) NOT NULL DEFAULT '',
1456 `delivery_address` tinytext NOT NULL,
1457 `contact_phone` varchar(30) DEFAULT NULL,
1458 `contact_email` varchar(100) DEFAULT NULL,
1459 `deliver_to` tinytext NOT NULL,
1460 `freight_cost` double NOT NULL DEFAULT '0',
1461 `from_stk_loc` varchar(5) NOT NULL DEFAULT '',
1462 `delivery_date` date NOT NULL DEFAULT '0000-00-00',
1463 `payment_terms` int(11) DEFAULT NULL,
1464 `total` double NOT NULL DEFAULT '0',
1465 `prep_amount` double NOT NULL DEFAULT '0',
1466 `alloc` double NOT NULL DEFAULT '0',
1467 PRIMARY KEY (`trans_type`,`order_no`)
1470 -- Data of table `0_sales_orders` --
1472 INSERT INTO `0_sales_orders` VALUES
1473 ('1', '30', '1', '0', '1', '1', 'auto', '', NULL, '2018-05-10', '1', 'post-std', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-05', '4', '6240', '0', '0'),
1474 ('2', '30', '1', '0', '1', '1', 'auto', '', NULL, '2018-05-07', '1', 'post-std', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-07', '4', '300', '0', '0'),
1475 ('3', '30', '0', '0', '1', '1', '001/2018', '', NULL, '2018-05-07', '1', 'post-std', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-08', '4', '300', '0', '0'),
1476 ('4', '30', '0', '0', '2', '2', '002/2018', '', NULL, '2018-05-07', '1', 'post-std', 'N/A', NULL, NULL, 'MoneyMaker Ltd.', '0', 'DEF', '2018-05-08', '1', '267.14', '0', '0'),
1477 ('5', '30', '1', '0', '2', '2', 'auto', '', NULL, '2018-05-07', '1', 'post-std', 'N/A', NULL, NULL, 'MoneyMaker Ltd.', '0', 'DEF', '2018-06-17', '1', '267.14', '0', '0'),
1478 ('6', '30', '0', '1', '1', '1', '003/2018', '', NULL, '2018-05-07', '1', 'post-std', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-08', '4', '450', '0', '0'),
1479 ('7', '30', '1', '0', '1', '1', 'auto', '', 'Recurrent Invoice covers period 04/01/2018 - 04/07/2018.', '2018-05-07', '1', 'post-std', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-07', '4', '0', '0', '0'),
1480 ('8', '30', '1', '0', '1', '1', 'auto', '', NULL, '2019-01-21', '1', 'post-std', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2019-01-21', '4', '1250', '0', '0');
1482 -- Structure of table `0_sales_pos` --
1484 DROP TABLE IF EXISTS `0_sales_pos`;
1486 CREATE TABLE `0_sales_pos` (
1487 `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
1488 `pos_name` varchar(30) NOT NULL,
1489 `cash_sale` tinyint(1) NOT NULL,
1490 `credit_sale` tinyint(1) NOT NULL,
1491 `pos_location` varchar(5) NOT NULL,
1492 `pos_account` smallint(6) unsigned NOT NULL,
1493 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1495 UNIQUE KEY `pos_name` (`pos_name`)
1496 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1498 -- Data of table `0_sales_pos` --
1500 INSERT INTO `0_sales_pos` VALUES
1501 ('1', 'Default', '1', '1', 'DEF', '2', '0');
1503 -- Structure of table `0_sales_types` --
1505 DROP TABLE IF EXISTS `0_sales_types`;
1507 CREATE TABLE `0_sales_types` (
1508 `id` int(11) NOT NULL AUTO_INCREMENT,
1509 `sales_type` char(50) NOT NULL DEFAULT '',
1510 `tax_included` int(1) NOT NULL DEFAULT '0',
1511 `factor` double NOT NULL DEFAULT '1',
1512 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1514 UNIQUE KEY `sales_type` (`sales_type`)
1515 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1517 -- Data of table `0_sales_types` --
1519 INSERT INTO `0_sales_types` VALUES
1520 ('1', 'Retail', '1', '1', '0'),
1521 ('2', 'Wholesale', '0', '0.7', '0');
1523 -- Structure of table `0_salesman` --
1525 DROP TABLE IF EXISTS `0_salesman`;
1527 CREATE TABLE `0_salesman` (
1528 `salesman_code` int(11) NOT NULL AUTO_INCREMENT,
1529 `salesman_name` char(60) NOT NULL DEFAULT '',
1530 `salesman_phone` char(30) NOT NULL DEFAULT '',
1531 `salesman_fax` char(30) NOT NULL DEFAULT '',
1532 `salesman_email` varchar(100) NOT NULL DEFAULT '',
1533 `provision` double NOT NULL DEFAULT '0',
1534 `break_pt` double NOT NULL DEFAULT '0',
1535 `provision2` double NOT NULL DEFAULT '0',
1536 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1537 PRIMARY KEY (`salesman_code`),
1538 UNIQUE KEY `salesman_name` (`salesman_name`)
1539 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1541 -- Data of table `0_salesman` --
1543 INSERT INTO `0_salesman` VALUES
1544 ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1546 -- Structure of table `0_security_roles` --
1548 DROP TABLE IF EXISTS `0_security_roles`;
1550 CREATE TABLE `0_security_roles` (
1551 `id` int(11) NOT NULL AUTO_INCREMENT,
1552 `role` varchar(30) NOT NULL,
1553 `description` varchar(50) DEFAULT NULL,
1556 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1558 UNIQUE KEY `role` (`role`)
1559 ) ENGINE=InnoDB AUTO_INCREMENT=11 ;
1561 -- Data of table `0_security_roles` --
1563 INSERT INTO `0_security_roles` VALUES
1564 ('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'),
1565 ('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'),
1566 ('3', 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873;775', '0'),
1567 ('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'),
1568 ('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'),
1569 ('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'),
1570 ('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'),
1571 ('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'),
1572 ('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'),
1573 ('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');
1575 -- Structure of table `0_shippers` --
1577 DROP TABLE IF EXISTS `0_shippers`;
1579 CREATE TABLE `0_shippers` (
1580 `shipper_id` int(11) NOT NULL AUTO_INCREMENT,
1581 `shipper_name` varchar(60) NOT NULL DEFAULT '',
1582 `phone` varchar(30) NOT NULL DEFAULT '',
1583 `phone2` varchar(30) NOT NULL DEFAULT '',
1584 `contact` tinytext NOT NULL,
1585 `address` tinytext NOT NULL,
1586 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1587 PRIMARY KEY (`shipper_id`),
1588 UNIQUE KEY `name` (`shipper_name`)
1589 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
1591 -- Data of table `0_shippers` --
1593 INSERT INTO `0_shippers` VALUES
1594 ('1', 'Default', '', '', '', '', '0');
1596 -- Structure of table `0_stock_category` --
1598 DROP TABLE IF EXISTS `0_stock_category`;
1600 CREATE TABLE `0_stock_category` (
1601 `category_id` int(11) NOT NULL AUTO_INCREMENT,
1602 `description` varchar(60) NOT NULL DEFAULT '',
1603 `dflt_tax_type` int(11) NOT NULL DEFAULT '1',
1604 `dflt_units` varchar(20) NOT NULL DEFAULT 'each',
1605 `dflt_mb_flag` char(1) NOT NULL DEFAULT 'B',
1606 `dflt_sales_act` varchar(15) NOT NULL DEFAULT '',
1607 `dflt_cogs_act` varchar(15) NOT NULL DEFAULT '',
1608 `dflt_inventory_act` varchar(15) NOT NULL DEFAULT '',
1609 `dflt_adjustment_act` varchar(15) NOT NULL DEFAULT '',
1610 `dflt_wip_act` varchar(15) NOT NULL DEFAULT '',
1611 `dflt_dim1` int(11) DEFAULT NULL,
1612 `dflt_dim2` int(11) DEFAULT NULL,
1613 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1614 `dflt_no_sale` tinyint(1) NOT NULL DEFAULT '0',
1615 `dflt_no_purchase` tinyint(1) NOT NULL DEFAULT '0',
1616 `vat_category` tinyint(1) NOT NULL DEFAULT '0',
1617 PRIMARY KEY (`category_id`),
1618 UNIQUE KEY `description` (`description`)
1619 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
1621 -- Data of table `0_stock_category` --
1623 INSERT INTO `0_stock_category` VALUES
1624 ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0'),
1625 ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0'),
1626 ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0'),
1627 ('4', 'Services', '1', 'hr', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '0', '0'),
1628 ('5', 'Shipping', '1', 'each', 'T', '4430', '5010', '', '', '', '0', '0', '0', '1', '0', '0');
1630 -- Structure of table `0_stock_fa_class` --
1632 DROP TABLE IF EXISTS `0_stock_fa_class`;
1634 CREATE TABLE `0_stock_fa_class` (
1635 `fa_class_id` varchar(20) NOT NULL DEFAULT '',
1636 `parent_id` varchar(20) NOT NULL DEFAULT '',
1637 `description` varchar(200) NOT NULL DEFAULT '',
1638 `long_description` tinytext NOT NULL,
1639 `depreciation_rate` double NOT NULL DEFAULT '0',
1640 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1641 PRIMARY KEY (`fa_class_id`)
1644 -- Data of table `0_stock_fa_class` --
1646 -- Structure of table `0_stock_master` --
1648 DROP TABLE IF EXISTS `0_stock_master`;
1650 CREATE TABLE `0_stock_master` (
1651 `stock_id` varchar(20) NOT NULL DEFAULT '',
1652 `category_id` int(11) NOT NULL DEFAULT '0',
1653 `tax_type_id` int(11) NOT NULL DEFAULT '0',
1654 `description` varchar(200) NOT NULL DEFAULT '',
1655 `long_description` tinytext NOT NULL,
1656 `units` varchar(20) NOT NULL DEFAULT 'each',
1657 `mb_flag` char(1) NOT NULL DEFAULT 'B',
1658 `sales_account` varchar(15) NOT NULL DEFAULT '',
1659 `cogs_account` varchar(15) NOT NULL DEFAULT '',
1660 `inventory_account` varchar(15) NOT NULL DEFAULT '',
1661 `adjustment_account` varchar(15) NOT NULL DEFAULT '',
1662 `wip_account` varchar(15) NOT NULL DEFAULT '',
1663 `dimension_id` int(11) DEFAULT NULL,
1664 `dimension2_id` int(11) DEFAULT NULL,
1665 `purchase_cost` double NOT NULL DEFAULT '0',
1666 `material_cost` double NOT NULL DEFAULT '0',
1667 `labour_cost` double NOT NULL DEFAULT '0',
1668 `overhead_cost` double NOT NULL DEFAULT '0',
1669 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1670 `no_sale` tinyint(1) NOT NULL DEFAULT '0',
1671 `no_purchase` tinyint(1) NOT NULL DEFAULT '0',
1672 `editable` tinyint(1) NOT NULL DEFAULT '0',
1673 `depreciation_method` char(1) NOT NULL DEFAULT 'S',
1674 `depreciation_rate` double NOT NULL DEFAULT '0',
1675 `depreciation_factor` double NOT NULL DEFAULT '1',
1676 `depreciation_start` date NOT NULL DEFAULT '0000-00-00',
1677 `depreciation_date` date NOT NULL DEFAULT '0000-00-00',
1678 `fa_class_id` varchar(20) NOT NULL DEFAULT '',
1679 `vat_category` tinyint(1) NOT NULL DEFAULT '0',
1680 `shipper_id` int(11) NOT NULL DEFAULT '0',
1681 PRIMARY KEY (`stock_id`)
1684 -- Data of table `0_stock_master` --
1686 INSERT INTO `0_stock_master` VALUES
1687 ('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', '', '0', '0'),
1688 ('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', '', '0', '0'),
1689 ('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', '', '0', '0'),
1690 ('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', '', '0', '0'),
1691 ('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', '', '0', '0'),
1692 ('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', '', '0', '0'),
1693 ('post-std', '5', '1', 'Standard post package', '', 'each', 'T', '4430', '5010', '', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'S', '0', '1', '0000-00-00', '0000-00-00', '', '0', '0');
1695 -- Structure of table `0_stock_moves` --
1697 DROP TABLE IF EXISTS `0_stock_moves`;
1699 CREATE TABLE `0_stock_moves` (
1700 `trans_id` int(11) NOT NULL AUTO_INCREMENT,
1701 `trans_no` int(11) NOT NULL DEFAULT '0',
1702 `stock_id` char(20) NOT NULL DEFAULT '',
1703 `type` smallint(6) NOT NULL DEFAULT '0',
1704 `loc_code` char(5) NOT NULL DEFAULT '',
1705 `tran_date` date NOT NULL DEFAULT '0000-00-00',
1706 `price` double NOT NULL DEFAULT '0',
1707 `reference` char(40) NOT NULL DEFAULT '',
1708 `qty` double NOT NULL DEFAULT '1',
1709 `unit_cost` double NOT NULL DEFAULT '0',
1710 PRIMARY KEY (`trans_id`),
1711 KEY `type` (`type`,`trans_no`),
1712 KEY `Move` (`stock_id`,`loc_code`,`tran_date`)
1713 ) ENGINE=InnoDB AUTO_INCREMENT=18 ;
1715 -- Data of table `0_stock_moves` --
1717 INSERT INTO `0_stock_moves` VALUES
1718 ('1', '1', '101', '25', 'DEF', '2018-05-05', '200', '', '100', '200'),
1719 ('2', '1', '102', '25', 'DEF', '2018-05-05', '150', '', '100', '150'),
1720 ('3', '1', '103', '25', 'DEF', '2018-05-05', '10', '', '100', '10'),
1721 ('4', '1', '101', '13', 'DEF', '2018-05-10', '300', 'auto', '-20', '200'),
1722 ('5', '1', '301', '13', 'DEF', '2018-05-10', '80', 'auto', '-3', '0'),
1723 ('6', '1', '101', '29', 'DEF', '2018-05-05', '200', '001/2018', '-2', '200'),
1724 ('7', '1', '102', '29', 'DEF', '2018-05-05', '150', '001/2018', '-2', '150'),
1725 ('8', '1', '103', '29', 'DEF', '2018-05-05', '10', '001/2018', '-2', '10'),
1726 ('9', '1', '301', '29', 'DEF', '2018-05-05', '0', '001/2018', '-2', '0'),
1727 ('10', '1', '201', '26', 'DEF', '2018-05-05', '0', '001/2018', '2', '360'),
1728 ('11', '2', '101', '25', 'DEF', '2018-05-05', '200', '', '15', '200'),
1729 ('12', '2', '101', '13', 'DEF', '2018-05-07', '300', 'auto', '-1', '200'),
1730 ('13', '3', '102', '13', 'DEF', '2018-05-07', '222.62', 'auto', '-1', '150'),
1731 ('14', '3', '103', '13', 'DEF', '2018-05-07', '44.52', 'auto', '-1', '10'),
1732 ('15', '4', '202', '13', 'DEF', '2018-05-07', '0', 'auto', '-5', '0'),
1733 ('16', '5', '102', '13', 'DEF', '2019-01-21', '250', 'auto', '-5', '150'),
1734 ('17', '3', '102', '25', 'DEF', '2019-01-21', '150', '', '6', '150');
1736 -- Structure of table `0_supp_allocations` --
1738 DROP TABLE IF EXISTS `0_supp_allocations`;
1740 CREATE TABLE `0_supp_allocations` (
1741 `id` int(11) NOT NULL AUTO_INCREMENT,
1742 `person_id` int(11) DEFAULT NULL,
1743 `amt` double unsigned DEFAULT NULL,
1744 `date_alloc` date NOT NULL DEFAULT '0000-00-00',
1745 `trans_no_from` int(11) DEFAULT NULL,
1746 `trans_type_from` int(11) DEFAULT NULL,
1747 `trans_no_to` int(11) DEFAULT NULL,
1748 `trans_type_to` int(11) DEFAULT NULL,
1750 UNIQUE KEY `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`),
1751 KEY `From` (`trans_type_from`,`trans_no_from`),
1752 KEY `To` (`trans_type_to`,`trans_no_to`)
1755 -- Data of table `0_supp_allocations` --
1757 -- Structure of table `0_supp_invoice_items` --
1759 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1761 CREATE TABLE `0_supp_invoice_items` (
1762 `id` int(11) NOT NULL AUTO_INCREMENT,
1763 `supp_trans_no` int(11) DEFAULT NULL,
1764 `supp_trans_type` int(11) DEFAULT NULL,
1765 `gl_code` varchar(15) NOT NULL DEFAULT '',
1766 `grn_item_id` int(11) DEFAULT NULL,
1767 `po_detail_item_id` int(11) DEFAULT NULL,
1768 `stock_id` varchar(20) NOT NULL DEFAULT '',
1769 `description` tinytext,
1770 `quantity` double NOT NULL DEFAULT '0',
1771 `unit_price` double NOT NULL DEFAULT '0',
1772 `unit_tax` double NOT NULL DEFAULT '0',
1774 `dimension_id` int(11) NOT NULL DEFAULT '0',
1775 `dimension2_id` int(11) NOT NULL DEFAULT '0',
1777 KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`)
1778 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1780 -- Data of table `0_supp_invoice_items` --
1782 INSERT INTO `0_supp_invoice_items` VALUES
1783 ('1', '1', '20', '0', '4', '4', '101', 'iPad Air 2 16GB', '15', '200', '10', NULL, '0', '0'),
1784 ('2', '2', '20', '0', '5', '5', '102', 'iPhone 6 64GB', '6', '150', '7.5', NULL, '0', '0');
1786 -- Structure of table `0_supp_trans` --
1788 DROP TABLE IF EXISTS `0_supp_trans`;
1790 CREATE TABLE `0_supp_trans` (
1791 `trans_no` int(11) unsigned NOT NULL DEFAULT '0',
1792 `type` smallint(6) unsigned NOT NULL DEFAULT '0',
1793 `supplier_id` int(11) unsigned NOT NULL,
1794 `reference` tinytext NOT NULL,
1795 `supp_reference` varchar(60) NOT NULL DEFAULT '',
1796 `tran_date` date NOT NULL DEFAULT '0000-00-00',
1797 `due_date` date NOT NULL DEFAULT '0000-00-00',
1798 `ov_amount` double NOT NULL DEFAULT '0',
1799 `ov_discount` double NOT NULL DEFAULT '0',
1800 `ov_gst` double NOT NULL DEFAULT '0',
1801 `rate` double NOT NULL DEFAULT '1',
1802 `alloc` double NOT NULL DEFAULT '0',
1803 `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1804 PRIMARY KEY (`type`,`trans_no`,`supplier_id`),
1805 KEY `supplier_id` (`supplier_id`),
1806 KEY `tran_date` (`tran_date`)
1809 -- Data of table `0_supp_trans` --
1811 INSERT INTO `0_supp_trans` VALUES
1812 ('1', '20', '1', '001/2018', 'rr4', '2018-05-05', '2018-05-15', '3000', '0', '150', '1', '0', '0'),
1813 ('2', '20', '1', '001/2019', 'asd5', '2019-01-21', '2019-01-31', '900', '0', '45', '1', '0', '0');
1815 -- Structure of table `0_suppliers` --
1817 DROP TABLE IF EXISTS `0_suppliers`;
1819 CREATE TABLE `0_suppliers` (
1820 `supplier_id` int(11) NOT NULL AUTO_INCREMENT,
1821 `supp_name` varchar(60) NOT NULL DEFAULT '',
1822 `supp_ref` varchar(30) NOT NULL DEFAULT '',
1823 `address` tinytext NOT NULL,
1824 `supp_address` tinytext NOT NULL,
1825 `gst_no` varchar(25) NOT NULL DEFAULT '',
1826 `contact` varchar(60) NOT NULL DEFAULT '',
1827 `supp_account_no` varchar(40) NOT NULL DEFAULT '',
1828 `website` varchar(100) NOT NULL DEFAULT '',
1829 `bank_account` varchar(60) NOT NULL DEFAULT '',
1830 `curr_code` char(3) DEFAULT NULL,
1831 `payment_terms` int(11) DEFAULT NULL,
1832 `tax_included` tinyint(1) NOT NULL DEFAULT '0',
1833 `dimension_id` int(11) DEFAULT '0',
1834 `dimension2_id` int(11) DEFAULT '0',
1835 `tax_group_id` int(11) DEFAULT NULL,
1836 `credit_limit` double NOT NULL DEFAULT '0',
1837 `purchase_account` varchar(15) NOT NULL DEFAULT '',
1838 `payable_account` varchar(15) NOT NULL DEFAULT '',
1839 `payment_discount_account` varchar(15) NOT NULL DEFAULT '',
1840 `notes` tinytext NOT NULL,
1841 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1842 PRIMARY KEY (`supplier_id`),
1843 KEY `supp_ref` (`supp_ref`)
1844 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
1846 -- Data of table `0_suppliers` --
1848 INSERT INTO `0_suppliers` VALUES
1849 ('1', 'Dino Saurius Inc.', 'Dino Saurius', 'N/A', '', '987654321', '', '', '', '', 'USD', '3', '0', '0', '0', '1', '0', '', '2100', '5060', '', '0'),
1850 ('2', 'Beefeater Ltd.', 'Beefeater', 'N/A', '', '67565590', '', '', '', '', 'GBP', '4', '0', '0', '0', '1', '0', '', '2100', '5060', '', '0');
1852 -- Structure of table `0_sys_prefs` --
1854 DROP TABLE IF EXISTS `0_sys_prefs`;
1856 CREATE TABLE `0_sys_prefs` (
1857 `name` varchar(35) NOT NULL DEFAULT '',
1858 `category` varchar(30) DEFAULT NULL,
1859 `type` varchar(20) NOT NULL DEFAULT '',
1860 `length` smallint(6) DEFAULT NULL,
1861 `value` text NOT NULL,
1862 PRIMARY KEY (`name`),
1863 KEY `category` (`category`)
1866 -- Data of table `0_sys_prefs` --
1868 INSERT INTO `0_sys_prefs` VALUES
1869 ('coy_name', 'setup.company', 'varchar', 60, 'Company name'),
1870 ('gst_no', 'setup.company', 'varchar', 25, ''),
1871 ('coy_no', 'setup.company', 'varchar', 25, ''),
1872 ('tax_prd', 'setup.company', 'int', 11, '1'),
1873 ('tax_last', 'setup.company', 'int', 11, '1'),
1874 ('postal_address', 'setup.company', 'tinytext', 0, 'N/A'),
1875 ('phone', 'setup.company', 'varchar', 30, ''),
1876 ('fax', 'setup.company', 'varchar', 30, ''),
1877 ('email', 'setup.company', 'varchar', 100, ''),
1878 ('coy_logo', 'setup.company', 'varchar', 100, ''),
1879 ('domicile', 'setup.company', 'varchar', 55, ''),
1880 ('curr_default', 'setup.company', 'char', 3, 'USD'),
1881 ('use_dimension', 'setup.company', 'tinyint', 1, '1'),
1882 ('f_year', 'setup.company', 'int', 11, '2'),
1883 ('shortname_name_in_list','setup.company', 'tinyint', 1, '0'),
1884 ('no_item_list', 'setup.company', 'tinyint', 1, '0'),
1885 ('no_customer_list', 'setup.company', 'tinyint', 1, '0'),
1886 ('no_supplier_list', 'setup.company', 'tinyint', 1, '0'),
1887 ('base_sales', 'setup.company', 'int', 11, '1'),
1888 ('time_zone', 'setup.company', 'tinyint', 1, '0'),
1889 ('add_pct', 'setup.company', 'int', 5, '-1'),
1890 ('round_to', 'setup.company', 'int', 5, '1'),
1891 ('login_tout', 'setup.company', 'smallint', 6, '600'),
1892 ('past_due_days', 'glsetup.general', 'int', 11, '30'),
1893 ('profit_loss_year_act', 'glsetup.general', 'varchar', 15, '9990'),
1894 ('retained_earnings_act', 'glsetup.general', 'varchar', 15, '3590'),
1895 ('bank_charge_act', 'glsetup.general', 'varchar', 15, '5690'),
1896 ('exchange_diff_act', 'glsetup.general', 'varchar', 15, '4450'),
1897 ('tax_algorithm', 'glsetup.customer', 'tinyint', 1, '1'),
1898 ('default_credit_limit', 'glsetup.customer', 'int', 11, '1000'),
1899 ('accumulate_shipping', 'glsetup.customer', 'tinyint', 1, '0'),
1900 ('legal_text', 'glsetup.customer', 'tinytext', 0, ''),
1901 ('freight_act', 'glsetup.customer', 'varchar', 15, '4430'),
1902 ('debtors_act', 'glsetup.sales', 'varchar', 15, '1200'),
1903 ('default_sales_act', 'glsetup.sales', 'varchar', 15, '4010'),
1904 ('default_sales_discount_act', 'glsetup.sales', 'varchar', 15, '4510'),
1905 ('default_prompt_payment_act', 'glsetup.sales', 'varchar', 15, '4500'),
1906 ('default_delivery_required', 'glsetup.sales', 'smallint', 6, '1'),
1907 ('default_receival_required', 'glsetup.purchase', 'smallint', 6, '10'),
1908 ('default_quote_valid_days', 'glsetup.sales', 'smallint', 6, '30'),
1909 ('default_dim_required', 'glsetup.dims', 'int', 11, '20'),
1910 ('pyt_discount_act', 'glsetup.purchase', 'varchar', 15, '5060'),
1911 ('creditors_act', 'glsetup.purchase', 'varchar', 15, '2100'),
1912 ('po_over_receive', 'glsetup.purchase', 'int', 11, '10'),
1913 ('po_over_charge', 'glsetup.purchase', 'int', 11, '10'),
1914 ('allow_negative_stock', 'glsetup.inventory', 'tinyint', 1, '0'),
1915 ('default_inventory_act', 'glsetup.items', 'varchar', 15, '1510'),
1916 ('default_cogs_act', 'glsetup.items', 'varchar', 15, '5010'),
1917 ('default_adj_act', 'glsetup.items', 'varchar', 15, '5040'),
1918 ('default_inv_sales_act', 'glsetup.items', 'varchar', 15, '4010'),
1919 ('default_wip_act', 'glsetup.items', 'varchar', 15, '1530'),
1920 ('default_workorder_required', 'glsetup.manuf', 'int', 11, '20'),
1921 ('version_id', 'system', 'varchar', 11, '2.5.0'),
1922 ('auto_curr_reval', 'setup.company', 'smallint', 6, '1'),
1923 ('grn_clearing_act', 'glsetup.purchase', 'varchar', 15, '1550'),
1924 ('bcc_email', 'setup.company', 'varchar', 100, ''),
1925 ('deferred_income_act', 'glsetup.sales', 'varchar', '15', '2105'),
1926 ('gl_closing_date','setup.closing_date', 'date', 8, ''),
1927 ('alternative_tax_include_on_docs','setup.company', 'tinyint', 1, '0'),
1928 ('no_zero_lines_amount','glsetup.sales', 'tinyint', 1, '1'),
1929 ('show_po_item_codes','glsetup.purchase', 'tinyint', 1, '0'),
1930 ('accounts_alpha','glsetup.general', 'tinyint', 1, '0'),
1931 ('loc_notification','glsetup.inventory', 'tinyint', 1, '0'),
1932 ('print_invoice_no','glsetup.sales', 'tinyint', 1, '0'),
1933 ('allow_negative_prices','glsetup.inventory', 'tinyint', 1, '1'),
1934 ('print_item_images_on_quote','glsetup.inventory', 'tinyint', 1, '0'),
1935 ('suppress_tax_rates','setup.company', 'tinyint', 1, '0'),
1936 ('company_logo_report','setup.company', 'tinyint', 1, '0'),
1937 ('barcodes_on_stock','setup.company', 'tinyint', 1, '0'),
1938 ('print_dialog_direct','setup.company', 'tinyint', 1, '0'),
1939 ('ref_no_auto_increase','setup.company', 'tinyint', 1, '0'),
1940 ('default_loss_on_asset_disposal_act', 'glsetup.items', 'varchar', '15', '5660'),
1941 ('depreciation_period', 'glsetup.company', 'tinyint', '1', '1'),
1942 ('use_manufacturing','setup.company', 'tinyint', 1, '1'),
1943 ('use_fixed_assets','setup.company', 'tinyint', 1, '1');
1945 -- Structure of table `0_tag_associations` --
1947 DROP TABLE IF EXISTS `0_tag_associations`;
1949 CREATE TABLE `0_tag_associations` (
1950 `record_id` varchar(15) NOT NULL,
1951 `tag_id` int(11) NOT NULL,
1952 PRIMARY KEY (`record_id`,`tag_id`)
1955 -- Data of table `0_tag_associations` --
1957 -- Structure of table `0_tags` --
1959 DROP TABLE IF EXISTS `0_tags`;
1961 CREATE TABLE `0_tags` (
1962 `id` int(11) NOT NULL AUTO_INCREMENT,
1963 `type` smallint(6) NOT NULL,
1964 `name` varchar(30) NOT NULL,
1965 `description` varchar(60) DEFAULT NULL,
1966 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1968 UNIQUE KEY `type` (`type`,`name`)
1971 -- Data of table `0_tags` --
1973 -- Structure of table `0_tax_group_items` --
1975 DROP TABLE IF EXISTS `0_tax_group_items`;
1977 CREATE TABLE `0_tax_group_items` (
1978 `tax_group_id` int(11) NOT NULL DEFAULT '0',
1979 `tax_type_id` int(11) NOT NULL DEFAULT '0',
1980 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1983 -- Data of table `0_tax_group_items` --
1985 INSERT INTO `0_tax_group_items` VALUES
1988 -- Structure of table `0_tax_groups` --
1990 DROP TABLE IF EXISTS `0_tax_groups`;
1992 CREATE TABLE `0_tax_groups` (
1993 `id` int(11) NOT NULL AUTO_INCREMENT,
1994 `name` varchar(60) NOT NULL DEFAULT '',
1995 `tax_area` tinyint(1) NOT NULL DEFAULT '0',
1996 `inactive` tinyint(1) NOT NULL DEFAULT '0',
1998 UNIQUE KEY `name` (`name`)
1999 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
2001 -- Data of table `0_tax_groups` --
2003 INSERT INTO `0_tax_groups` VALUES
2004 ('1', 'Tax', '0', '0'),
2005 ('2', 'Export/Import', '1', '0');
2007 -- Structure of table `0_tax_types` --
2009 DROP TABLE IF EXISTS `0_tax_types`;
2011 CREATE TABLE `0_tax_types` (
2012 `id` int(11) NOT NULL AUTO_INCREMENT,
2013 `rate` double NOT NULL DEFAULT '0',
2014 `sales_gl_code` varchar(15) NOT NULL DEFAULT '',
2015 `purchasing_gl_code` varchar(15) NOT NULL DEFAULT '',
2016 `name` varchar(60) NOT NULL DEFAULT '',
2017 `inactive` tinyint(1) NOT NULL DEFAULT '0',
2019 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2021 -- Data of table `0_tax_types` --
2023 INSERT INTO `0_tax_types` VALUES
2024 ('1', '5', '2150', '2150', 'Tax', '0');
2026 -- Structure of table `0_trans_tax_details` --
2028 DROP TABLE IF EXISTS `0_trans_tax_details`;
2030 CREATE TABLE `0_trans_tax_details` (
2031 `id` int(11) NOT NULL AUTO_INCREMENT,
2032 `trans_type` smallint(6) DEFAULT NULL,
2033 `trans_no` int(11) DEFAULT NULL,
2034 `tran_date` date NOT NULL,
2035 `tax_type_id` int(11) NOT NULL DEFAULT '0',
2036 `rate` double NOT NULL DEFAULT '0',
2037 `ex_rate` double NOT NULL DEFAULT '1',
2038 `included_in_price` tinyint(1) NOT NULL DEFAULT '0',
2039 `net_amount` double NOT NULL DEFAULT '0',
2040 `amount` double NOT NULL DEFAULT '0',
2042 `reg_type` tinyint(1) DEFAULT NULL,
2043 `vat_category` int(11) NOT NULL DEFAULT '0',
2044 `tax_group_id` tinyint(2) DEFAULT NULL,
2046 KEY `Type_and_Number` (`trans_type`,`trans_no`),
2047 KEY `tran_date` (`tran_date`)
2048 ) ENGINE=InnoDB AUTO_INCREMENT=11 ;
2050 -- Data of table `0_trans_tax_details` --
2052 INSERT INTO `0_trans_tax_details` VALUES
2053 ('1', '13', '1', '2018-05-10', '1', '5', '1', '1', '5942.86', '297.14', 'auto', NULL, '0', '1'),
2054 ('2', '10', '1', '2018-05-10', '1', '5', '1', '1', '5942.86', '297.14', '001/2018', '0', '0', '1'),
2055 ('3', '20', '1', '2018-05-05', '1', '5', '1', '0', '3000', '150', 'rr4', '1', '0', '1'),
2056 ('4', '13', '2', '2018-05-07', '1', '5', '1', '1', '285.71', '14.29', 'auto', NULL, '0', '1'),
2057 ('5', '10', '2', '2018-05-07', '1', '5', '1', '1', '285.71', '14.29', '002/2018', '0', '0', '1'),
2058 ('6', '13', '3', '2018-05-07', '0', '0', '1.123', '1', '267.14', '0', 'auto', NULL, '0', '1'),
2059 ('7', '10', '3', '2018-05-07', '0', '0', '1.123', '1', '267.14', '0', '003/2018', '0', '0', '1'),
2060 ('8', '13', '5', '2019-01-21', '1', '5', '1', '1', '1190.48', '59.52', 'auto', NULL, '0', '1'),
2061 ('9', '10', '5', '2019-01-21', '1', '5', '1', '1', '1190.48', '59.52', '001/2019', '0', '0', '1'),
2062 ('10', '20', '2', '2019-01-21', '1', '5', '1', '0', '900', '45', 'asd5', '1', '0', '1');
2064 -- Structure of table `0_useronline` --
2066 DROP TABLE IF EXISTS `0_useronline`;
2068 CREATE TABLE `0_useronline` (
2069 `id` int(11) NOT NULL AUTO_INCREMENT,
2070 `timestamp` int(15) NOT NULL DEFAULT '0',
2071 `ip` varchar(40) NOT NULL DEFAULT '',
2072 `file` varchar(100) NOT NULL DEFAULT '',
2074 KEY `timestamp` (`timestamp`),
2078 -- Data of table `0_useronline` --
2081 -- Structure of table `0_users` --
2083 DROP TABLE IF EXISTS `0_users`;
2085 CREATE TABLE `0_users` (
2086 `id` smallint(6) NOT NULL AUTO_INCREMENT,
2087 `user_id` varchar(60) NOT NULL DEFAULT '',
2088 `password` varchar(100) NOT NULL DEFAULT '',
2089 `real_name` varchar(100) NOT NULL DEFAULT '',
2090 `role_id` int(11) NOT NULL DEFAULT '1',
2091 `phone` varchar(30) NOT NULL DEFAULT '',
2092 `email` varchar(100) DEFAULT NULL,
2093 `language` varchar(20) DEFAULT NULL,
2094 `date_format` tinyint(1) NOT NULL DEFAULT '0',
2095 `date_sep` tinyint(1) NOT NULL DEFAULT '0',
2096 `tho_sep` tinyint(1) NOT NULL DEFAULT '0',
2097 `dec_sep` tinyint(1) NOT NULL DEFAULT '0',
2098 `theme` varchar(20) NOT NULL DEFAULT 'default',
2099 `page_size` varchar(20) NOT NULL DEFAULT 'A4',
2100 `prices_dec` smallint(6) NOT NULL DEFAULT '2',
2101 `qty_dec` smallint(6) NOT NULL DEFAULT '2',
2102 `rates_dec` smallint(6) NOT NULL DEFAULT '4',
2103 `percent_dec` smallint(6) NOT NULL DEFAULT '1',
2104 `show_gl` tinyint(1) NOT NULL DEFAULT '1',
2105 `show_codes` tinyint(1) NOT NULL DEFAULT '0',
2106 `show_hints` tinyint(1) NOT NULL DEFAULT '0',
2107 `last_visit_date` datetime DEFAULT NULL,
2108 `query_size` tinyint(1) unsigned NOT NULL DEFAULT '10',
2109 `graphic_links` tinyint(1) DEFAULT '1',
2110 `pos` smallint(6) DEFAULT '1',
2111 `print_profile` varchar(30) NOT NULL DEFAULT '',
2112 `rep_popup` tinyint(1) DEFAULT '1',
2113 `sticky_doc_date` tinyint(1) DEFAULT '0',
2114 `startup_tab` varchar(20) NOT NULL DEFAULT '',
2115 `transaction_days` smallint(6) NOT NULL DEFAULT '30',
2116 `save_report_selections` smallint(6) NOT NULL DEFAULT '0',
2117 `use_date_picker` tinyint(1) NOT NULL DEFAULT '1',
2118 `def_print_destination` tinyint(1) NOT NULL DEFAULT '0',
2119 `def_print_orientation` tinyint(1) NOT NULL DEFAULT '0',
2120 `inactive` tinyint(1) NOT NULL DEFAULT '0',
2122 UNIQUE KEY `user_id` (`user_id`)
2123 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2125 -- Data of table `0_users` --
2127 INSERT INTO `0_users` VALUES
2128 ('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');
2130 -- Structure of table `0_voided` --
2132 DROP TABLE IF EXISTS `0_voided`;
2134 CREATE TABLE `0_voided` (
2135 `type` int(11) NOT NULL DEFAULT '0',
2136 `id` int(11) NOT NULL DEFAULT '0',
2137 `date_` date NOT NULL DEFAULT '0000-00-00',
2138 `memo_` tinytext NOT NULL,
2139 UNIQUE KEY `id` (`type`,`id`)
2142 -- Data of table `0_voided` --
2145 -- Structure of table `0_wo_costing` --
2147 DROP TABLE IF EXISTS `0_wo_costing`;
2149 CREATE TABLE `0_wo_costing` (
2150 `id` int(11) NOT NULL AUTO_INCREMENT,
2151 `workorder_id` int(11) NOT NULL DEFAULT '0',
2152 `cost_type` tinyint(1) NOT NULL DEFAULT '0',
2153 `trans_type` int(11) NOT NULL DEFAULT '0',
2154 `trans_no` int(11) NOT NULL DEFAULT '0',
2155 `factor` double NOT NULL DEFAULT '1',
2159 -- Data of table `0_wo_costing` --
2161 -- Structure of table `0_wo_issue_items` --
2163 DROP TABLE IF EXISTS `0_wo_issue_items`;
2165 CREATE TABLE `0_wo_issue_items` (
2166 `id` int(11) NOT NULL AUTO_INCREMENT,
2167 `stock_id` varchar(40) DEFAULT NULL,
2168 `issue_id` int(11) DEFAULT NULL,
2169 `qty_issued` double DEFAULT NULL,
2170 `unit_cost` double NOT NULL DEFAULT '0',
2174 -- Data of table `0_wo_issue_items` --
2177 -- Structure of table `0_wo_issues` --
2179 DROP TABLE IF EXISTS `0_wo_issues`;
2181 CREATE TABLE `0_wo_issues` (
2182 `issue_no` int(11) NOT NULL AUTO_INCREMENT,
2183 `workorder_id` int(11) NOT NULL DEFAULT '0',
2184 `reference` varchar(100) DEFAULT NULL,
2185 `issue_date` date DEFAULT NULL,
2186 `loc_code` varchar(5) DEFAULT NULL,
2187 `workcentre_id` int(11) DEFAULT NULL,
2188 PRIMARY KEY (`issue_no`),
2189 KEY `workorder_id` (`workorder_id`)
2192 -- Data of table `0_wo_issues` --
2194 -- Structure of table `0_wo_manufacture` --
2196 DROP TABLE IF EXISTS `0_wo_manufacture`;
2198 CREATE TABLE `0_wo_manufacture` (
2199 `id` int(11) NOT NULL AUTO_INCREMENT,
2200 `reference` varchar(100) DEFAULT NULL,
2201 `workorder_id` int(11) NOT NULL DEFAULT '0',
2202 `quantity` double NOT NULL DEFAULT '0',
2203 `date_` date NOT NULL DEFAULT '0000-00-00',
2205 KEY `workorder_id` (`workorder_id`)
2206 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2208 -- Data of table `0_wo_manufacture` --
2210 INSERT INTO `0_wo_manufacture` VALUES
2211 ('1', '001/2018', '1', '2', '2018-05-05');
2213 -- Structure of table `0_wo_requirements` --
2215 DROP TABLE IF EXISTS `0_wo_requirements`;
2217 CREATE TABLE `0_wo_requirements` (
2218 `id` int(11) NOT NULL AUTO_INCREMENT,
2219 `workorder_id` int(11) NOT NULL DEFAULT '0',
2220 `stock_id` char(20) NOT NULL DEFAULT '',
2221 `workcentre` int(11) NOT NULL DEFAULT '0',
2222 `units_req` double NOT NULL DEFAULT '1',
2223 `unit_cost` double NOT NULL DEFAULT '0',
2224 `loc_code` char(5) NOT NULL DEFAULT '',
2225 `units_issued` double NOT NULL DEFAULT '0',
2227 KEY `workorder_id` (`workorder_id`)
2228 ) ENGINE=InnoDB AUTO_INCREMENT=9 ;
2230 -- Data of table `0_wo_requirements` --
2232 INSERT INTO `0_wo_requirements` VALUES
2233 ('1', '1', '101', '1', '1', '200', 'DEF', '2'),
2234 ('2', '1', '102', '1', '1', '150', 'DEF', '2'),
2235 ('3', '1', '103', '1', '1', '10', 'DEF', '2'),
2236 ('4', '1', '301', '1', '1', '0', 'DEF', '2'),
2237 ('5', '2', '101', '1', '1', '200', 'DEF', '0'),
2238 ('6', '2', '102', '1', '1', '150', 'DEF', '0'),
2239 ('7', '2', '103', '1', '1', '10', 'DEF', '0'),
2240 ('8', '2', '301', '1', '1', '0', 'DEF', '0');
2242 -- Structure of table `0_workcentres` --
2244 DROP TABLE IF EXISTS `0_workcentres`;
2246 CREATE TABLE `0_workcentres` (
2247 `id` int(11) NOT NULL AUTO_INCREMENT,
2248 `name` char(40) NOT NULL DEFAULT '',
2249 `description` char(50) NOT NULL DEFAULT '',
2250 `inactive` tinyint(1) NOT NULL DEFAULT '0',
2252 UNIQUE KEY `name` (`name`)
2253 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2255 -- Data of table `0_workcentres` --
2257 INSERT INTO `0_workcentres` VALUES
2258 ('1', 'Work Centre', '', '0');
2260 -- Structure of table `0_workorders` --
2262 DROP TABLE IF EXISTS `0_workorders`;
2264 CREATE TABLE `0_workorders` (
2265 `id` int(11) NOT NULL AUTO_INCREMENT,
2266 `wo_ref` varchar(60) NOT NULL DEFAULT '',
2267 `loc_code` varchar(5) NOT NULL DEFAULT '',
2268 `units_reqd` double NOT NULL DEFAULT '1',
2269 `stock_id` varchar(20) NOT NULL DEFAULT '',
2270 `date_` date NOT NULL DEFAULT '0000-00-00',
2271 `type` tinyint(4) NOT NULL DEFAULT '0',
2272 `required_by` date NOT NULL DEFAULT '0000-00-00',
2273 `released_date` date NOT NULL DEFAULT '0000-00-00',
2274 `units_issued` double NOT NULL DEFAULT '0',
2275 `closed` tinyint(1) NOT NULL DEFAULT '0',
2276 `released` tinyint(1) NOT NULL DEFAULT '0',
2278 KEY `wo_ref` (`wo_ref`)
2279 ) ENGINE=InnoDB AUTO_INCREMENT=4 ;
2281 -- Data of table `0_workorders` --
2283 INSERT INTO `0_workorders` VALUES
2284 ('1', '001/2018', 'DEF', '2', '201', '2018-05-05', '0', '2018-05-05', '2018-05-05', '2', '1', '1'),
2285 ('2', '002/2018', 'DEF', '5', '201', '2018-05-07', '2', '2018-05-27', '2018-05-07', '0', '0', '1'),
2286 ('3', '003/2018', 'DEF', '5', '201', '2018-05-07', '2', '2018-05-27', '0000-00-00', '0', '0', '0');