3 -- http://www.phpmyadmin.net
6 -- Generation Time: Apr 04, 2008 at 12:35 PM
7 -- Server version: 5.0.45
11 -- Database: `en_US-new.sql, release 2.0`
14 -- --------------------------------------------------------
17 -- Table structure for table `0_areas`
20 DROP TABLE IF EXISTS `0_areas`;
21 CREATE TABLE IF NOT EXISTS `0_areas` (
22 `area_code` int(11) NOT NULL auto_increment,
23 `description` varchar(60) NOT NULL default '',
24 PRIMARY KEY (`area_code`),
25 UNIQUE KEY `description` (`description`)
26 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
28 -- --------------------------------------------------------
31 -- Table structure for table `0_bank_accounts`
34 DROP TABLE IF EXISTS `0_bank_accounts`;
35 CREATE TABLE IF NOT EXISTS `0_bank_accounts` (
36 `account_code` varchar(11) NOT NULL default '',
37 `account_type` smallint(6) NOT NULL default '0',
38 `bank_account_name` varchar(60) NOT NULL default '',
39 `bank_account_number` varchar(100) NOT NULL default '',
40 `bank_name` varchar(60) NOT NULL default '',
41 `bank_address` tinytext,
42 `bank_curr_code` char(3) NOT NULL default '',
43 PRIMARY KEY (`account_code`),
44 KEY `bank_account_name` (`bank_account_name`),
45 KEY `bank_account_number` (`bank_account_number`)
48 -- --------------------------------------------------------
51 -- Table structure for table `0_bank_trans`
54 DROP TABLE IF EXISTS `0_bank_trans`;
55 CREATE TABLE IF NOT EXISTS `0_bank_trans` (
56 `id` int(11) NOT NULL auto_increment,
57 `type` smallint(6) default NULL,
58 `trans_no` int(11) default NULL,
59 `bank_act` varchar(11) default NULL,
60 `ref` varchar(40) default NULL,
61 `trans_date` date NOT NULL default '0000-00-00',
62 `bank_trans_type_id` int(10) unsigned default NULL,
63 `amount` double default NULL,
64 `dimension_id` int(11) NOT NULL default '0',
65 `dimension2_id` int(11) NOT NULL default '0',
66 `person_type_id` int(11) NOT NULL default '0',
69 KEY `bank_act` (`bank_act`,`ref`),
70 KEY `type` (`type`,`trans_no`)
71 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
73 -- --------------------------------------------------------
76 -- Table structure for table `0_bank_trans_types`
79 DROP TABLE IF EXISTS `0_bank_trans_types`;
80 CREATE TABLE IF NOT EXISTS `0_bank_trans_types` (
81 `id` int(11) NOT NULL auto_increment,
82 `name` varchar(60) NOT NULL default '',
84 UNIQUE KEY `name` (`name`)
85 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
87 -- --------------------------------------------------------
90 -- Table structure for table `0_bom`
93 DROP TABLE IF EXISTS `0_bom`;
94 CREATE TABLE IF NOT EXISTS `0_bom` (
95 `id` int(11) NOT NULL auto_increment,
96 `parent` char(20) NOT NULL default '',
97 `component` char(20) NOT NULL default '',
98 `workcentre_added` int(11) NOT NULL default '0',
99 `loc_code` char(5) NOT NULL default '',
100 `quantity` double NOT NULL default '1',
101 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
102 KEY `component` (`component`),
104 KEY `loc_code` (`loc_code`),
105 KEY `parent` (`parent`,`loc_code`),
106 KEY `Parent_2` (`parent`),
107 KEY `workcentre_added` (`workcentre_added`)
108 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
110 -- --------------------------------------------------------
113 -- Table structure for table `0_budget_trans`
116 DROP TABLE IF EXISTS `0_budget_trans`;
117 CREATE TABLE IF NOT EXISTS `0_budget_trans` (
118 `counter` int(11) NOT NULL auto_increment,
119 `type` smallint(6) NOT NULL default '0',
120 `type_no` bigint(16) NOT NULL default '1',
121 `tran_date` date NOT NULL default '0000-00-00',
122 `account` varchar(11) NOT NULL default '',
123 `memo_` tinytext NOT NULL,
124 `amount` double NOT NULL default '0',
125 `dimension_id` int(11) default '0',
126 `dimension2_id` int(11) default '0',
127 `person_type_id` int(11) default NULL,
128 `person_id` tinyblob,
129 PRIMARY KEY (`counter`),
130 KEY `Type_and_Number` (`type`,`type_no`)
131 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
133 -- --------------------------------------------------------
136 -- Table structure for table `0_chart_class`
139 DROP TABLE IF EXISTS `0_chart_class`;
140 CREATE TABLE IF NOT EXISTS `0_chart_class` (
141 `cid` int(11) NOT NULL default '0',
142 `class_name` varchar(60) NOT NULL default '',
143 `balance_sheet` tinyint(1) NOT NULL default '0',
147 -- --------------------------------------------------------
150 -- Table structure for table `0_chart_master`
153 DROP TABLE IF EXISTS `0_chart_master`;
154 CREATE TABLE IF NOT EXISTS `0_chart_master` (
155 `account_code` varchar(11) NOT NULL default '',
156 `account_code2` varchar(11) default '',
157 `account_name` varchar(60) NOT NULL default '',
158 `account_type` int(11) NOT NULL default '0',
159 `tax_code` int(11) NOT NULL default '0',
160 PRIMARY KEY (`account_code`),
161 KEY `account_code` (`account_code`),
162 KEY `account_name` (`account_name`)
165 -- --------------------------------------------------------
168 -- Table structure for table `0_chart_types`
171 DROP TABLE IF EXISTS `0_chart_types`;
172 CREATE TABLE IF NOT EXISTS `0_chart_types` (
173 `id` int(11) NOT NULL auto_increment,
174 `name` varchar(60) NOT NULL default '',
175 `class_id` tinyint(1) NOT NULL default '0',
176 `parent` int(11) NOT NULL default '-1',
178 UNIQUE KEY `name` (`name`)
179 ) TYPE=MyISAM AUTO_INCREMENT=53 ;
181 -- --------------------------------------------------------
184 -- Table structure for table `0_comments`
187 DROP TABLE IF EXISTS `0_comments`;
188 CREATE TABLE IF NOT EXISTS `0_comments` (
189 `type` int(11) NOT NULL default '0',
190 `id` int(11) NOT NULL default '0',
191 `date_` date default '0000-00-00',
195 -- --------------------------------------------------------
198 -- Table structure for table `0_company`
201 DROP TABLE IF EXISTS `0_company`;
202 CREATE TABLE IF NOT EXISTS `0_company` (
203 `coy_code` int(11) NOT NULL default '1',
204 `coy_name` varchar(60) NOT NULL default '',
205 `gst_no` varchar(25) NOT NULL default '',
206 `coy_no` varchar(25) NOT NULL default '0',
207 `tax_prd` int(11) NOT NULL default '1',
208 `tax_last` int(11) NOT NULL default '1',
209 `postal_address` tinytext NOT NULL,
210 `phone` varchar(30) NOT NULL default '',
211 `fax` varchar(30) NOT NULL default '',
212 `email` varchar(100) NOT NULL default '',
213 `coy_logo` varchar(100) NOT NULL default '',
214 `domicile` varchar(55) NOT NULL default '',
215 `curr_default` char(3) NOT NULL default '',
216 `debtors_act` varchar(11) NOT NULL default '',
217 `pyt_discount_act` varchar(11) NOT NULL default '',
218 `creditors_act` varchar(11) NOT NULL default '',
219 `grn_act` varchar(11) NOT NULL default '',
220 `exchange_diff_act` varchar(11) NOT NULL default '',
221 `purch_exchange_diff_act` varchar(11) NOT NULL default '',
222 `retained_earnings_act` varchar(11) NOT NULL default '',
223 `freight_act` varchar(11) NOT NULL default '',
224 `default_sales_act` varchar(11) NOT NULL default '',
225 `default_sales_discount_act` varchar(11) NOT NULL default '',
226 `default_prompt_payment_act` varchar(11) NOT NULL default '',
227 `default_inventory_act` varchar(11) NOT NULL default '',
228 `default_cogs_act` varchar(11) NOT NULL default '',
229 `default_adj_act` varchar(11) NOT NULL default '',
230 `default_inv_sales_act` varchar(11) NOT NULL default '',
231 `default_assembly_act` varchar(11) NOT NULL default '',
232 `payroll_act` varchar(11) NOT NULL default '',
233 `custom1_name` varchar(60) NOT NULL default '',
234 `custom2_name` varchar(60) NOT NULL default '',
235 `custom3_name` varchar(60) NOT NULL default '',
236 `custom1_value` varchar(100) NOT NULL default '',
237 `custom2_value` varchar(100) NOT NULL default '',
238 `custom3_value` varchar(100) NOT NULL default '',
239 `allow_negative_stock` tinyint(1) NOT NULL default '0',
240 `po_over_receive` int(11) NOT NULL default '10',
241 `po_over_charge` int(11) NOT NULL default '10',
242 `default_credit_limit` int(11) NOT NULL default '1000',
243 `default_workorder_required` int(11) NOT NULL default '20',
244 `default_dim_required` int(11) NOT NULL default '20',
245 `past_due_days` int(11) NOT NULL default '30',
246 `use_dimension` tinyint(1) default '0',
247 `f_year` int(11) NOT NULL default '1',
248 `no_item_list` tinyint(1) NOT NULL default '0',
249 `no_customer_list` tinyint(1) NOT NULL default '0',
250 `no_supplier_list` tinyint(1) NOT NULL default '0',
251 `base_sales` int(11) NOT NULL default '-1',
252 PRIMARY KEY (`coy_code`)
255 -- --------------------------------------------------------
258 -- Table structure for table `0_credit_status`
261 DROP TABLE IF EXISTS `0_credit_status`;
262 CREATE TABLE IF NOT EXISTS `0_credit_status` (
263 `id` int(11) NOT NULL auto_increment,
264 `reason_description` char(100) NOT NULL default '',
265 `dissallow_invoices` tinyint(1) NOT NULL default '0',
267 UNIQUE KEY `reason_description` (`reason_description`)
268 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
270 -- --------------------------------------------------------
273 -- Table structure for table `0_currencies`
276 DROP TABLE IF EXISTS `0_currencies`;
277 CREATE TABLE IF NOT EXISTS `0_currencies` (
278 `currency` varchar(60) NOT NULL default '',
279 `curr_abrev` char(3) NOT NULL default '',
280 `curr_symbol` varchar(10) NOT NULL default '',
281 `country` varchar(100) NOT NULL default '',
282 `hundreds_name` varchar(15) NOT NULL default '',
283 PRIMARY KEY (`curr_abrev`)
286 -- --------------------------------------------------------
289 -- Table structure for table `0_cust_allocations`
292 DROP TABLE IF EXISTS `0_cust_allocations`;
293 CREATE TABLE IF NOT EXISTS `0_cust_allocations` (
294 `id` int(11) NOT NULL auto_increment,
295 `amt` double unsigned default NULL,
296 `date_alloc` date NOT NULL default '0000-00-00',
297 `trans_no_from` int(11) default NULL,
298 `trans_type_from` int(11) default NULL,
299 `trans_no_to` int(11) default NULL,
300 `trans_type_to` int(11) default NULL,
302 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
304 -- --------------------------------------------------------
307 -- Table structure for table `0_cust_branch`
310 DROP TABLE IF EXISTS `0_cust_branch`;
311 CREATE TABLE IF NOT EXISTS `0_cust_branch` (
312 `branch_code` int(11) NOT NULL auto_increment,
313 `debtor_no` int(11) NOT NULL default '0',
314 `br_name` varchar(60) NOT NULL default '',
315 `br_address` tinytext NOT NULL,
316 `area` int(11) default NULL,
317 `salesman` int(11) NOT NULL default '0',
318 `phone` varchar(30) NOT NULL default '',
319 `fax` varchar(30) NOT NULL default '',
320 `contact_name` varchar(60) NOT NULL default '',
321 `email` varchar(100) NOT NULL default '',
322 `default_location` varchar(5) NOT NULL default '',
323 `tax_group_id` int(11) default NULL,
324 `sales_account` varchar(11) default NULL,
325 `sales_discount_account` varchar(11) default NULL,
326 `receivables_account` varchar(11) default NULL,
327 `payment_discount_account` varchar(11) default NULL,
328 `default_ship_via` int(11) NOT NULL default '1',
329 `disable_trans` tinyint(4) NOT NULL default '0',
330 `br_post_address` tinytext NOT NULL,
331 PRIMARY KEY (`branch_code`,`debtor_no`),
332 KEY `branch_code` (`branch_code`),
333 KEY `br_name` (`br_name`)
334 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
336 -- --------------------------------------------------------
339 -- Table structure for table `0_debtors_master`
342 DROP TABLE IF EXISTS `0_debtors_master`;
343 CREATE TABLE IF NOT EXISTS `0_debtors_master` (
344 `debtor_no` int(11) NOT NULL auto_increment,
345 `name` varchar(60) NOT NULL default '',
347 `email` varchar(100) NOT NULL default '',
348 `tax_id` varchar(55) NOT NULL default '',
349 `curr_code` char(3) NOT NULL default '',
350 `sales_type` int(11) NOT NULL default '1',
351 `dimension_id` int(11) NOT NULL default '0',
352 `dimension2_id` int(11) NOT NULL default '0',
353 `credit_status` int(11) NOT NULL default '0',
354 `payment_terms` int(11) default NULL,
355 `discount` double NOT NULL default '0',
356 `pymt_discount` double NOT NULL default '0',
357 `credit_limit` float NOT NULL default '1000',
358 PRIMARY KEY (`debtor_no`),
359 UNIQUE KEY `name` (`name`)
360 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
362 -- --------------------------------------------------------
365 -- Table structure for table `0_debtor_trans`
368 DROP TABLE IF EXISTS `0_debtor_trans`;
369 CREATE TABLE IF NOT EXISTS `0_debtor_trans` (
370 `trans_no` int(11) unsigned NOT NULL default '0',
371 `type` smallint(6) unsigned NOT NULL default '0',
372 `version` tinyint(1) unsigned NOT NULL default '0',
373 `debtor_no` int(11) unsigned default NULL,
374 `branch_code` int(11) NOT NULL default '-1',
375 `tran_date` date NOT NULL default '0000-00-00',
376 `due_date` date NOT NULL default '0000-00-00',
377 `reference` varchar(60) NOT NULL default '',
378 `tpe` int(11) NOT NULL default '0',
379 `order_` int(11) NOT NULL default '0',
380 `ov_amount` double NOT NULL default '0',
381 `ov_gst` double NOT NULL default '0',
382 `ov_freight` double NOT NULL default '0',
383 `ov_freight_tax` double NOT NULL default '0',
384 `ov_discount` double NOT NULL default '0',
385 `alloc` double NOT NULL default '0',
386 `rate` double NOT NULL default '1',
387 `ship_via` int(11) default NULL,
388 `trans_link` int(11) NOT NULL default '0',
389 PRIMARY KEY (`trans_no`,`type`),
390 KEY `debtor_no` (`debtor_no`,`branch_code`)
393 -- --------------------------------------------------------
396 -- Table structure for table `0_debtor_trans_details`
399 DROP TABLE IF EXISTS `0_debtor_trans_details`;
400 CREATE TABLE IF NOT EXISTS `0_debtor_trans_details` (
401 `id` int(11) NOT NULL auto_increment,
402 `debtor_trans_no` int(11) default NULL,
403 `debtor_trans_type` int(11) default NULL,
404 `stock_id` varchar(20) NOT NULL default '',
405 `description` tinytext,
406 `unit_price` double NOT NULL default '0',
407 `unit_tax` double NOT NULL default '0',
408 `quantity` double NOT NULL default '0',
409 `discount_percent` double NOT NULL default '0',
410 `standard_cost` double NOT NULL default '0',
411 `qty_done` double NOT NULL default '0',
413 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
415 -- --------------------------------------------------------
418 -- Table structure for table `0_debtor_trans_tax_details`
421 DROP TABLE IF EXISTS `0_debtor_trans_tax_details`;
422 CREATE TABLE IF NOT EXISTS `0_debtor_trans_tax_details` (
423 `id` int(11) NOT NULL auto_increment,
424 `debtor_trans_no` int(11) default NULL,
425 `debtor_trans_type` int(11) default NULL,
426 `tax_type_id` int(11) NOT NULL default '0',
427 `tax_type_name` varchar(60) default NULL,
428 `rate` double NOT NULL default '0',
429 `included_in_price` tinyint(1) NOT NULL default '0',
430 `amount` double NOT NULL default '0',
432 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
434 -- --------------------------------------------------------
437 -- Table structure for table `0_dimensions`
440 DROP TABLE IF EXISTS `0_dimensions`;
441 CREATE TABLE IF NOT EXISTS `0_dimensions` (
442 `id` int(11) NOT NULL auto_increment,
443 `reference` varchar(60) NOT NULL default '',
444 `name` varchar(60) NOT NULL default '',
445 `type_` tinyint(1) NOT NULL default '1',
446 `closed` tinyint(1) NOT NULL default '0',
447 `date_` date NOT NULL default '0000-00-00',
448 `due_date` date NOT NULL default '0000-00-00',
450 UNIQUE KEY `reference` (`reference`)
451 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
453 -- --------------------------------------------------------
456 -- Table structure for table `0_exchange_rates`
459 DROP TABLE IF EXISTS `0_exchange_rates`;
460 CREATE TABLE IF NOT EXISTS `0_exchange_rates` (
461 `id` int(11) NOT NULL auto_increment,
462 `curr_code` char(3) NOT NULL default '',
463 `rate_buy` double NOT NULL default '0',
464 `rate_sell` double NOT NULL default '0',
465 `date_` date NOT NULL default '0000-00-00',
467 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
468 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
470 -- --------------------------------------------------------
473 -- Table structure for table `0_fiscal_year`
476 DROP TABLE IF EXISTS `0_fiscal_year`;
477 CREATE TABLE IF NOT EXISTS `0_fiscal_year` (
478 `id` int(11) NOT NULL auto_increment,
479 `begin` date default '0000-00-00',
480 `end` date default '0000-00-00',
481 `closed` tinyint(1) NOT NULL default '0',
483 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
485 -- --------------------------------------------------------
488 -- Table structure for table `0_gl_trans`
491 DROP TABLE IF EXISTS `0_gl_trans`;
492 CREATE TABLE IF NOT EXISTS `0_gl_trans` (
493 `counter` int(11) NOT NULL auto_increment,
494 `type` smallint(6) NOT NULL default '0',
495 `type_no` bigint(16) NOT NULL default '1',
496 `tran_date` date NOT NULL default '0000-00-00',
497 `account` varchar(11) NOT NULL default '',
498 `memo_` tinytext NOT NULL,
499 `amount` double NOT NULL default '0',
500 `dimension_id` int(11) NOT NULL default '0',
501 `dimension2_id` int(11) NOT NULL default '0',
502 `person_type_id` int(11) default NULL,
503 `person_id` tinyblob,
504 PRIMARY KEY (`counter`),
505 KEY `Type_and_Number` (`type`,`type_no`)
506 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
508 -- --------------------------------------------------------
511 -- Table structure for table `0_grn_batch`
514 DROP TABLE IF EXISTS `0_grn_batch`;
515 CREATE TABLE IF NOT EXISTS `0_grn_batch` (
516 `id` int(11) NOT NULL auto_increment,
517 `supplier_id` int(11) NOT NULL default '0',
518 `purch_order_no` int(11) default NULL,
519 `reference` varchar(60) NOT NULL default '',
520 `delivery_date` date NOT NULL default '0000-00-00',
521 `loc_code` varchar(5) default NULL,
523 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
525 -- --------------------------------------------------------
528 -- Table structure for table `0_grn_items`
531 DROP TABLE IF EXISTS `0_grn_items`;
532 CREATE TABLE IF NOT EXISTS `0_grn_items` (
533 `id` int(11) NOT NULL auto_increment,
534 `grn_batch_id` int(11) default NULL,
535 `po_detail_item` int(11) NOT NULL default '0',
536 `item_code` varchar(20) NOT NULL default '',
537 `description` tinytext,
538 `qty_recd` double NOT NULL default '0',
539 `quantity_inv` double NOT NULL default '0',
541 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
543 -- --------------------------------------------------------
546 -- Table structure for table `0_item_tax_types`
549 DROP TABLE IF EXISTS `0_item_tax_types`;
550 CREATE TABLE IF NOT EXISTS `0_item_tax_types` (
551 `id` int(11) NOT NULL auto_increment,
552 `name` varchar(60) NOT NULL default '',
553 `exempt` tinyint(1) NOT NULL default '0',
555 UNIQUE KEY `name` (`name`)
556 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
558 -- --------------------------------------------------------
561 -- Table structure for table `0_item_tax_type_exemptions`
564 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
565 CREATE TABLE IF NOT EXISTS `0_item_tax_type_exemptions` (
566 `item_tax_type_id` int(11) NOT NULL default '0',
567 `tax_type_id` int(11) NOT NULL default '0',
568 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
571 -- --------------------------------------------------------
574 -- Table structure for table `0_item_units`
577 DROP TABLE IF EXISTS `0_item_units`;
578 CREATE TABLE IF NOT EXISTS `0_item_units` (
579 `abbr` varchar(20) NOT NULL,
580 `name` varchar(40) NOT NULL,
581 `decimals` tinyint(2) NOT NULL,
582 PRIMARY KEY (`abbr`),
583 UNIQUE KEY `name` (`name`)
586 -- --------------------------------------------------------
589 -- Table structure for table `0_locations`
592 DROP TABLE IF EXISTS `0_locations`;
593 CREATE TABLE IF NOT EXISTS `0_locations` (
594 `loc_code` varchar(5) NOT NULL default '',
595 `location_name` varchar(60) NOT NULL default '',
596 `delivery_address` tinytext NOT NULL,
597 `phone` varchar(30) NOT NULL default '',
598 `fax` varchar(30) NOT NULL default '',
599 `email` varchar(100) NOT NULL default '',
600 `contact` varchar(30) NOT NULL default '',
601 PRIMARY KEY (`loc_code`)
604 -- --------------------------------------------------------
607 -- Table structure for table `0_loc_stock`
610 DROP TABLE IF EXISTS `0_loc_stock`;
611 CREATE TABLE IF NOT EXISTS `0_loc_stock` (
612 `loc_code` char(5) NOT NULL default '',
613 `stock_id` char(20) NOT NULL default '',
614 `reorder_level` bigint(20) NOT NULL default '0',
615 PRIMARY KEY (`loc_code`,`stock_id`),
616 KEY `stock_id` (`stock_id`)
619 -- --------------------------------------------------------
622 -- Table structure for table `0_movement_types`
625 DROP TABLE IF EXISTS `0_movement_types`;
626 CREATE TABLE IF NOT EXISTS `0_movement_types` (
627 `id` int(11) NOT NULL auto_increment,
628 `name` varchar(60) NOT NULL default '',
630 UNIQUE KEY `name` (`name`)
631 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
633 -- --------------------------------------------------------
636 -- Table structure for table `0_payment_terms`
639 DROP TABLE IF EXISTS `0_payment_terms`;
640 CREATE TABLE IF NOT EXISTS `0_payment_terms` (
641 `terms_indicator` int(11) NOT NULL auto_increment,
642 `terms` char(80) NOT NULL default '',
643 `days_before_due` smallint(6) NOT NULL default '0',
644 `day_in_following_month` smallint(6) NOT NULL default '0',
645 PRIMARY KEY (`terms_indicator`),
646 UNIQUE KEY `terms` (`terms`)
647 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
649 -- --------------------------------------------------------
652 -- Table structure for table `0_prices`
655 DROP TABLE IF EXISTS `0_prices`;
656 CREATE TABLE IF NOT EXISTS `0_prices` (
657 `id` int(11) NOT NULL auto_increment,
658 `stock_id` varchar(20) NOT NULL default '',
659 `sales_type_id` int(11) NOT NULL default '0',
660 `curr_abrev` char(3) NOT NULL default '',
661 `price` double NOT NULL default '0',
663 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
664 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
666 -- --------------------------------------------------------
669 -- Table structure for table `0_purch_data`
672 DROP TABLE IF EXISTS `0_purch_data`;
673 CREATE TABLE IF NOT EXISTS `0_purch_data` (
674 `supplier_id` int(11) NOT NULL default '0',
675 `stock_id` char(20) NOT NULL default '',
676 `price` double NOT NULL default '0',
677 `suppliers_uom` char(50) NOT NULL default '',
678 `conversion_factor` double NOT NULL default '1',
679 `supplier_description` char(50) NOT NULL default '',
680 PRIMARY KEY (`supplier_id`,`stock_id`)
683 -- --------------------------------------------------------
686 -- Table structure for table `0_purch_orders`
689 DROP TABLE IF EXISTS `0_purch_orders`;
690 CREATE TABLE IF NOT EXISTS `0_purch_orders` (
691 `order_no` int(11) NOT NULL auto_increment,
692 `supplier_id` int(11) NOT NULL default '0',
694 `ord_date` date NOT NULL default '0000-00-00',
695 `reference` tinytext NOT NULL,
696 `requisition_no` tinytext,
697 `into_stock_location` varchar(5) NOT NULL default '',
698 `delivery_address` tinytext NOT NULL,
699 PRIMARY KEY (`order_no`)
700 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
702 -- --------------------------------------------------------
705 -- Table structure for table `0_purch_order_details`
708 DROP TABLE IF EXISTS `0_purch_order_details`;
709 CREATE TABLE IF NOT EXISTS `0_purch_order_details` (
710 `po_detail_item` int(11) NOT NULL auto_increment,
711 `order_no` int(11) NOT NULL default '0',
712 `item_code` varchar(20) NOT NULL default '',
713 `description` tinytext,
714 `delivery_date` date NOT NULL default '0000-00-00',
715 `qty_invoiced` double NOT NULL default '0',
716 `unit_price` double NOT NULL default '0',
717 `act_price` double NOT NULL default '0',
718 `std_cost_unit` double NOT NULL default '0',
719 `quantity_ordered` double NOT NULL default '0',
720 `quantity_received` double NOT NULL default '0',
721 PRIMARY KEY (`po_detail_item`)
722 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
724 -- --------------------------------------------------------
727 -- Table structure for table `0_refs`
730 DROP TABLE IF EXISTS `0_refs`;
731 CREATE TABLE IF NOT EXISTS `0_refs` (
732 `id` int(11) NOT NULL default '0',
733 `type` int(11) NOT NULL default '0',
734 `reference` varchar(100) NOT NULL default '',
735 PRIMARY KEY (`id`,`type`)
738 -- --------------------------------------------------------
741 -- Table structure for table `0_salesman`
744 DROP TABLE IF EXISTS `0_salesman`;
745 CREATE TABLE IF NOT EXISTS `0_salesman` (
746 `salesman_code` int(11) NOT NULL auto_increment,
747 `salesman_name` char(60) NOT NULL default '',
748 `salesman_phone` char(30) NOT NULL default '',
749 `salesman_fax` char(30) NOT NULL default '',
750 `salesman_email` varchar(100) NOT NULL default '',
751 `provision` double NOT NULL default '0',
752 `break_pt` double NOT NULL default '0',
753 `provision2` double NOT NULL default '0',
754 PRIMARY KEY (`salesman_code`),
755 UNIQUE KEY `salesman_name` (`salesman_name`)
756 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
758 -- --------------------------------------------------------
761 -- Table structure for table `0_sales_orders`
764 DROP TABLE IF EXISTS `0_sales_orders`;
765 CREATE TABLE IF NOT EXISTS `0_sales_orders` (
766 `order_no` int(11) NOT NULL auto_increment,
767 `version` tinyint(1) unsigned NOT NULL default '0',
768 `type` tinyint(1) NOT NULL default '0',
769 `debtor_no` int(11) NOT NULL default '0',
770 `branch_code` int(11) NOT NULL default '0',
771 `customer_ref` tinytext NOT NULL,
773 `ord_date` date NOT NULL default '0000-00-00',
774 `order_type` int(11) NOT NULL default '0',
775 `ship_via` int(11) NOT NULL default '0',
776 `delivery_address` tinytext NOT NULL,
777 `contact_phone` varchar(30) default NULL,
778 `contact_email` varchar(100) default NULL,
779 `deliver_to` tinytext NOT NULL,
780 `freight_cost` double NOT NULL default '0',
781 `from_stk_loc` varchar(5) NOT NULL default '',
782 `delivery_date` date NOT NULL default '0000-00-00',
783 PRIMARY KEY (`order_no`)
784 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
786 -- --------------------------------------------------------
789 -- Table structure for table `0_sales_order_details`
792 DROP TABLE IF EXISTS `0_sales_order_details`;
793 CREATE TABLE IF NOT EXISTS `0_sales_order_details` (
794 `id` int(11) NOT NULL auto_increment,
795 `order_no` int(11) NOT NULL default '0',
796 `stk_code` varchar(20) NOT NULL default '',
797 `description` tinytext,
798 `qty_sent` double NOT NULL default '0',
799 `unit_price` double NOT NULL default '0',
800 `quantity` double NOT NULL default '0',
801 `discount_percent` double NOT NULL default '0',
803 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
805 -- --------------------------------------------------------
808 -- Table structure for table `0_sales_types`
811 DROP TABLE IF EXISTS `0_sales_types`;
812 CREATE TABLE IF NOT EXISTS `0_sales_types` (
813 `id` int(11) NOT NULL auto_increment,
814 `sales_type` char(50) NOT NULL default '',
815 `tax_included` int(1) NOT NULL default '0',
816 `factor` double NOT NULL default '1',
818 UNIQUE KEY `sales_type` (`sales_type`)
819 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
821 -- --------------------------------------------------------
824 -- Table structure for table `0_shippers`
827 DROP TABLE IF EXISTS `0_shippers`;
828 CREATE TABLE IF NOT EXISTS `0_shippers` (
829 `shipper_id` int(11) NOT NULL auto_increment,
830 `shipper_name` varchar(60) NOT NULL default '',
831 `phone` varchar(30) NOT NULL default '',
832 `contact` tinytext NOT NULL,
833 `address` tinytext NOT NULL,
834 PRIMARY KEY (`shipper_id`),
835 UNIQUE KEY `name` (`shipper_name`)
836 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
838 -- --------------------------------------------------------
841 -- Table structure for table `0_stock_category`
844 DROP TABLE IF EXISTS `0_stock_category`;
845 CREATE TABLE IF NOT EXISTS `0_stock_category` (
846 `category_id` int(11) NOT NULL auto_increment,
847 `description` varchar(60) NOT NULL default '',
848 `stock_act` varchar(11) default NULL,
849 `cogs_act` varchar(11) default NULL,
850 `adj_gl_act` varchar(11) default NULL,
851 `purch_price_var_act` varchar(11) default NULL,
852 PRIMARY KEY (`category_id`),
853 UNIQUE KEY `description` (`description`)
854 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
856 -- --------------------------------------------------------
859 -- Table structure for table `0_stock_master`
862 DROP TABLE IF EXISTS `0_stock_master`;
863 CREATE TABLE IF NOT EXISTS `0_stock_master` (
864 `stock_id` varchar(20) NOT NULL default '',
865 `category_id` int(11) NOT NULL default '0',
866 `tax_type_id` int(11) NOT NULL default '0',
867 `description` varchar(200) NOT NULL default '',
868 `long_description` tinytext NOT NULL,
869 `units` varchar(20) NOT NULL default 'each',
870 `mb_flag` char(1) NOT NULL default 'B',
871 `sales_account` varchar(11) NOT NULL default '',
872 `cogs_account` varchar(11) NOT NULL default '',
873 `inventory_account` varchar(11) NOT NULL default '',
874 `adjustment_account` varchar(11) NOT NULL default '',
875 `assembly_account` varchar(11) NOT NULL default '',
876 `dimension_id` int(11) default NULL,
877 `dimension2_id` int(11) default NULL,
878 `actual_cost` double NOT NULL default '0',
879 `last_cost` double NOT NULL default '0',
880 `material_cost` double NOT NULL default '0',
881 `labour_cost` double NOT NULL default '0',
882 `overhead_cost` double NOT NULL default '0',
883 PRIMARY KEY (`stock_id`)
886 -- --------------------------------------------------------
889 -- Table structure for table `0_stock_moves`
892 DROP TABLE IF EXISTS `0_stock_moves`;
893 CREATE TABLE IF NOT EXISTS `0_stock_moves` (
894 `trans_id` int(11) NOT NULL auto_increment,
895 `trans_no` int(11) NOT NULL default '0',
896 `stock_id` char(20) NOT NULL default '',
897 `type` smallint(6) NOT NULL default '0',
898 `loc_code` char(5) NOT NULL default '',
899 `tran_date` date NOT NULL default '0000-00-00',
900 `person_id` int(11) default NULL,
901 `price` double NOT NULL default '0',
902 `reference` char(40) NOT NULL default '',
903 `qty` double NOT NULL default '1',
904 `discount_percent` double NOT NULL default '0',
905 `standard_cost` double NOT NULL default '0',
906 `visible` tinyint(1) NOT NULL default '1',
907 PRIMARY KEY (`trans_id`),
908 KEY `type` (`type`,`trans_no`)
909 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
911 -- --------------------------------------------------------
914 -- Table structure for table `0_suppliers`
917 DROP TABLE IF EXISTS `0_suppliers`;
918 CREATE TABLE IF NOT EXISTS `0_suppliers` (
919 `supplier_id` int(11) NOT NULL auto_increment,
920 `supp_name` varchar(60) NOT NULL default '',
921 `address` tinytext NOT NULL,
922 `email` varchar(100) NOT NULL default '',
923 `bank_account` varchar(60) NOT NULL default '',
924 `curr_code` char(3) default NULL,
925 `payment_terms` int(11) default NULL,
926 `dimension_id` int(11) default '0',
927 `dimension2_id` int(11) default '0',
928 `tax_group_id` int(11) default NULL,
929 `purchase_account` varchar(11) default NULL,
930 `payable_account` varchar(11) default NULL,
931 `payment_discount_account` varchar(11) default NULL,
932 PRIMARY KEY (`supplier_id`)
933 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
935 -- --------------------------------------------------------
938 -- Table structure for table `0_supp_allocations`
941 DROP TABLE IF EXISTS `0_supp_allocations`;
942 CREATE TABLE IF NOT EXISTS `0_supp_allocations` (
943 `id` int(11) NOT NULL auto_increment,
944 `amt` double unsigned default NULL,
945 `date_alloc` date NOT NULL default '0000-00-00',
946 `trans_no_from` int(11) default NULL,
947 `trans_type_from` int(11) default NULL,
948 `trans_no_to` int(11) default NULL,
949 `trans_type_to` int(11) default NULL,
951 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
953 -- --------------------------------------------------------
956 -- Table structure for table `0_supp_invoice_items`
959 DROP TABLE IF EXISTS `0_supp_invoice_items`;
960 CREATE TABLE IF NOT EXISTS `0_supp_invoice_items` (
961 `id` int(11) NOT NULL auto_increment,
962 `supp_trans_no` int(11) default NULL,
963 `supp_trans_type` int(11) default NULL,
964 `gl_code` varchar(11) NOT NULL default '0',
965 `grn_item_id` int(11) default NULL,
966 `po_detail_item_id` int(11) default NULL,
967 `stock_id` varchar(20) NOT NULL default '',
968 `description` tinytext,
969 `quantity` double NOT NULL default '0',
970 `unit_price` double NOT NULL default '0',
971 `unit_tax` double NOT NULL default '0',
974 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
976 -- --------------------------------------------------------
979 -- Table structure for table `0_supp_invoice_tax_items`
982 DROP TABLE IF EXISTS `0_supp_invoice_tax_items`;
983 CREATE TABLE IF NOT EXISTS `0_supp_invoice_tax_items` (
984 `id` int(11) NOT NULL auto_increment,
985 `supp_trans_no` int(11) default NULL,
986 `supp_trans_type` int(11) default NULL,
987 `tax_type_id` int(11) NOT NULL default '0',
988 `tax_type_name` varchar(60) default NULL,
989 `rate` double NOT NULL default '0',
990 `included_in_price` tinyint(1) NOT NULL default '0',
991 `amount` double NOT NULL default '0',
993 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
995 -- --------------------------------------------------------
998 -- Table structure for table `0_supp_trans`
1001 DROP TABLE IF EXISTS `0_supp_trans`;
1002 CREATE TABLE IF NOT EXISTS `0_supp_trans` (
1003 `trans_no` int(11) unsigned NOT NULL default '0',
1004 `type` smallint(6) unsigned NOT NULL default '0',
1005 `supplier_id` int(11) unsigned default NULL,
1006 `reference` tinytext NOT NULL,
1007 `supp_reference` varchar(60) NOT NULL default '',
1008 `tran_date` date NOT NULL default '0000-00-00',
1009 `due_date` date NOT NULL default '0000-00-00',
1010 `ov_amount` double NOT NULL default '0',
1011 `ov_discount` double NOT NULL default '0',
1012 `ov_gst` double NOT NULL default '0',
1013 `rate` double NOT NULL default '1',
1014 `alloc` double NOT NULL default '0',
1015 PRIMARY KEY (`trans_no`,`type`),
1016 KEY `supplier_id` (`supplier_id`),
1017 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1021 -- --------------------------------------------------------
1024 -- Table structure for table `0_sys_types`
1027 DROP TABLE IF EXISTS `0_sys_types`;
1028 CREATE TABLE IF NOT EXISTS `0_sys_types` (
1029 `type_id` smallint(6) NOT NULL default '0',
1030 `type_name` varchar(60) NOT NULL default '',
1031 `type_no` int(11) NOT NULL default '1',
1032 `next_reference` varchar(100) NOT NULL default '',
1033 PRIMARY KEY (`type_id`)
1036 -- --------------------------------------------------------
1039 -- Table structure for table `0_tax_groups`
1042 DROP TABLE IF EXISTS `0_tax_groups`;
1043 CREATE TABLE IF NOT EXISTS `0_tax_groups` (
1044 `id` int(11) NOT NULL auto_increment,
1045 `name` varchar(60) NOT NULL default '',
1046 `tax_shipping` tinyint(1) NOT NULL default '0',
1048 UNIQUE KEY `name` (`name`)
1049 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1051 -- --------------------------------------------------------
1054 -- Table structure for table `0_tax_group_items`
1057 DROP TABLE IF EXISTS `0_tax_group_items`;
1058 CREATE TABLE IF NOT EXISTS `0_tax_group_items` (
1059 `tax_group_id` int(11) NOT NULL default '0',
1060 `tax_type_id` int(11) NOT NULL default '0',
1061 `rate` double NOT NULL default '0',
1062 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1065 -- --------------------------------------------------------
1068 -- Table structure for table `0_tax_types`
1071 DROP TABLE IF EXISTS `0_tax_types`;
1072 CREATE TABLE IF NOT EXISTS `0_tax_types` (
1073 `id` int(11) NOT NULL auto_increment,
1074 `rate` double NOT NULL default '0',
1075 `sales_gl_code` varchar(11) NOT NULL default '',
1076 `purchasing_gl_code` varchar(11) NOT NULL default '',
1077 `name` varchar(60) NOT NULL default '',
1079 UNIQUE KEY `name` (`name`,`rate`)
1080 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1082 -- --------------------------------------------------------
1085 -- Table structure for table `0_users`
1088 DROP TABLE IF EXISTS `0_users`;
1089 CREATE TABLE IF NOT EXISTS `0_users` (
1090 `user_id` varchar(60) NOT NULL default '',
1091 `password` varchar(100) NOT NULL default '',
1092 `real_name` varchar(100) NOT NULL default '',
1093 `full_access` int(11) NOT NULL default '1',
1094 `phone` varchar(30) NOT NULL default '',
1095 `email` varchar(100) default NULL,
1096 `language` varchar(20) default NULL,
1097 `date_format` tinyint(1) NOT NULL default '0',
1098 `date_sep` tinyint(1) NOT NULL default '0',
1099 `tho_sep` tinyint(1) NOT NULL default '0',
1100 `dec_sep` tinyint(1) NOT NULL default '0',
1101 `theme` varchar(20) NOT NULL default 'default',
1102 `page_size` varchar(20) NOT NULL default 'A4',
1103 `prices_dec` smallint(6) NOT NULL default '2',
1104 `qty_dec` smallint(6) NOT NULL default '2',
1105 `rates_dec` smallint(6) NOT NULL default '4',
1106 `percent_dec` smallint(6) NOT NULL default '1',
1107 `show_gl` tinyint(1) NOT NULL default '1',
1108 `show_codes` tinyint(1) NOT NULL default '0',
1109 `show_hints` tinyint(1) NOT NULL default '0',
1110 `last_visit_date` datetime default NULL,
1111 PRIMARY KEY (`user_id`)
1114 -- --------------------------------------------------------
1117 -- Table structure for table `0_voided`
1120 DROP TABLE IF EXISTS `0_voided`;
1121 CREATE TABLE IF NOT EXISTS `0_voided` (
1122 `type` int(11) NOT NULL default '0',
1123 `id` int(11) NOT NULL default '0',
1124 `date_` date NOT NULL default '0000-00-00',
1125 `memo_` tinytext NOT NULL,
1126 UNIQUE KEY `id` (`type`,`id`)
1129 -- --------------------------------------------------------
1132 -- Table structure for table `0_workcentres`
1135 DROP TABLE IF EXISTS `0_workcentres`;
1136 CREATE TABLE IF NOT EXISTS `0_workcentres` (
1137 `id` int(11) NOT NULL auto_increment,
1138 `name` char(40) NOT NULL default '',
1139 `description` char(50) NOT NULL default '',
1141 UNIQUE KEY `name` (`name`)
1142 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1144 -- --------------------------------------------------------
1147 -- Table structure for table `0_workorders`
1150 DROP TABLE IF EXISTS `0_workorders`;
1151 CREATE TABLE IF NOT EXISTS `0_workorders` (
1152 `id` int(11) NOT NULL auto_increment,
1153 `wo_ref` varchar(60) NOT NULL default '',
1154 `loc_code` varchar(5) NOT NULL default '',
1155 `units_reqd` double NOT NULL default '1',
1156 `stock_id` varchar(20) NOT NULL default '',
1157 `date_` date NOT NULL default '0000-00-00',
1158 `type` tinyint(4) NOT NULL default '0',
1159 `required_by` date NOT NULL default '0000-00-00',
1160 `released_date` date NOT NULL default '0000-00-00',
1161 `units_issued` double NOT NULL default '0',
1162 `closed` tinyint(1) NOT NULL default '0',
1163 `released` tinyint(1) NOT NULL default '0',
1164 `additional_costs` double NOT NULL default '0',
1166 UNIQUE KEY `wo_ref` (`wo_ref`)
1167 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1169 -- --------------------------------------------------------
1172 -- Table structure for table `0_wo_issues`
1175 DROP TABLE IF EXISTS `0_wo_issues`;
1176 CREATE TABLE IF NOT EXISTS `0_wo_issues` (
1177 `issue_no` int(11) NOT NULL auto_increment,
1178 `workorder_id` int(11) NOT NULL default '0',
1179 `reference` varchar(100) default NULL,
1180 `issue_date` date default NULL,
1181 `loc_code` varchar(5) default NULL,
1182 `workcentre_id` int(11) default NULL,
1183 PRIMARY KEY (`issue_no`)
1184 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1186 -- --------------------------------------------------------
1189 -- Table structure for table `0_wo_issue_items`
1192 DROP TABLE IF EXISTS `0_wo_issue_items`;
1193 CREATE TABLE IF NOT EXISTS `0_wo_issue_items` (
1194 `id` int(11) NOT NULL auto_increment,
1195 `stock_id` varchar(40) default NULL,
1196 `issue_id` int(11) default NULL,
1197 `qty_issued` double default NULL,
1199 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1201 -- --------------------------------------------------------
1204 -- Table structure for table `0_wo_manufacture`
1207 DROP TABLE IF EXISTS `0_wo_manufacture`;
1208 CREATE TABLE IF NOT EXISTS `0_wo_manufacture` (
1209 `id` int(11) NOT NULL auto_increment,
1210 `reference` varchar(100) default NULL,
1211 `workorder_id` int(11) NOT NULL default '0',
1212 `quantity` double NOT NULL default '0',
1213 `date_` date NOT NULL default '0000-00-00',
1215 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1217 -- --------------------------------------------------------
1220 -- Table structure for table `0_wo_requirements`
1223 DROP TABLE IF EXISTS `0_wo_requirements`;
1224 CREATE TABLE IF NOT EXISTS `0_wo_requirements` (
1225 `id` int(11) NOT NULL auto_increment,
1226 `workorder_id` int(11) NOT NULL default '0',
1227 `stock_id` char(20) NOT NULL default '',
1228 `workcentre` int(11) NOT NULL default '0',
1229 `units_req` double NOT NULL default '1',
1230 `std_cost` double NOT NULL default '0',
1231 `loc_code` char(5) NOT NULL default '',
1232 `units_issued` double NOT NULL default '0',
1234 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1237 -- Dumping data for table `0_areas`
1240 INSERT INTO `0_areas` VALUES(1, 'USA');
1243 -- Dumping data for table `0_bank_accounts`
1246 INSERT INTO `0_bank_accounts` VALUES('1700', 0, 'Current account', 'N/A', 'N/A', NULL, 'USD');
1247 INSERT INTO `0_bank_accounts` VALUES('1705', 0, 'Petty Cash account', 'N/A', 'N/A', NULL, 'USD');
1250 -- Dumping data for table `0_bank_trans_types`
1253 INSERT INTO `0_bank_trans_types` VALUES(1, 'Cash');
1254 INSERT INTO `0_bank_trans_types` VALUES(2, 'Transfer');
1257 -- Dumping data for table `0_chart_class`
1260 INSERT INTO `0_chart_class` VALUES(1, 'Assets', 1);
1261 INSERT INTO `0_chart_class` VALUES(2, 'Liabilities', 1);
1262 INSERT INTO `0_chart_class` VALUES(3, 'Income', 0);
1263 INSERT INTO `0_chart_class` VALUES(4, 'Costs', 0);
1266 -- Dumping data for table `0_chart_master`
1269 INSERT INTO `0_chart_master` VALUES('3000', NULL, 'Sales', 1, 1);
1270 INSERT INTO `0_chart_master` VALUES('3010', NULL, 'Sales - Wholesale', 1, 1);
1271 INSERT INTO `0_chart_master` VALUES('3020', NULL, 'Sales of Other items', 1, 1);
1272 INSERT INTO `0_chart_master` VALUES('3400', NULL, 'Difference On Exchange', 1, 0);
1273 INSERT INTO `0_chart_master` VALUES('5000', NULL, 'Direct Labour', 2, 0);
1274 INSERT INTO `0_chart_master` VALUES('5050', NULL, 'Direct Labour Recovery', 2, 0);
1275 INSERT INTO `0_chart_master` VALUES('4200', NULL, 'Material Usage Varaiance', 2, 4);
1276 INSERT INTO `0_chart_master` VALUES('4210', NULL, 'Consumable Materials', 2, 4);
1277 INSERT INTO `0_chart_master` VALUES('4220', NULL, 'Purchase price Variance', 2, 0);
1278 INSERT INTO `0_chart_master` VALUES('4000', NULL, 'Purchases of materials', 2, 4);
1279 INSERT INTO `0_chart_master` VALUES('4250', NULL, 'Discounts Received', 2, 0);
1280 INSERT INTO `0_chart_master` VALUES('4260', NULL, 'Exchange Variation', 2, 0);
1281 INSERT INTO `0_chart_master` VALUES('4300', NULL, 'Freight Inwards', 2, 4);
1282 INSERT INTO `0_chart_master` VALUES('4010', NULL, 'Cost of Goods Sold - Retail', 2, 4);
1283 INSERT INTO `0_chart_master` VALUES('6790', NULL, 'Bank Charges', 5, 4);
1284 INSERT INTO `0_chart_master` VALUES('6800', NULL, 'Entertainments', 5, 4);
1285 INSERT INTO `0_chart_master` VALUES('6810', NULL, 'Legal Expenses', 5, 4);
1286 INSERT INTO `0_chart_master` VALUES('6600', NULL, 'Repairs and Maintenance Office', 5, 4);
1287 INSERT INTO `0_chart_master` VALUES('6730', NULL, 'phone', 5, 4);
1288 INSERT INTO `0_chart_master` VALUES('8200', NULL, 'Bank Interest', 52, 0);
1289 INSERT INTO `0_chart_master` VALUES('6840', NULL, 'Credit Control', 5, 0);
1290 INSERT INTO `0_chart_master` VALUES('7040', NULL, 'Depreciation Office Equipment', 51, 0);
1291 INSERT INTO `0_chart_master` VALUES('3800', NULL, 'Freight Outwards', 5, 4);
1292 INSERT INTO `0_chart_master` VALUES('4500', NULL, 'Packaging', 5, 4);
1293 INSERT INTO `0_chart_master` VALUES('6400', NULL, 'Commissions', 5, 0);
1294 INSERT INTO `0_chart_master` VALUES('3200', NULL, 'Prompt Payment Discounts', 1, 0);
1295 INSERT INTO `0_chart_master` VALUES('6700', NULL, 'General Expenses', 5, 4);
1296 INSERT INTO `0_chart_master` VALUES('5200', NULL, 'Indirect Labour', 2, 0);
1297 INSERT INTO `0_chart_master` VALUES('5210', NULL, 'Overhead Recovery', 5, 0);
1298 INSERT INTO `0_chart_master` VALUES('1700', NULL, 'Bank account', 10, 0);
1299 INSERT INTO `0_chart_master` VALUES('1705', NULL, 'Petty Cash', 10, 0);
1300 INSERT INTO `0_chart_master` VALUES('1710', NULL, 'Foreign currency account', 10, 0);
1301 INSERT INTO `0_chart_master` VALUES('1500', NULL, 'Accounts Receivable', 20, 0);
1302 INSERT INTO `0_chart_master` VALUES('1400', NULL, 'Stocks of Raw Materials', 45, 0);
1303 INSERT INTO `0_chart_master` VALUES('1410', NULL, 'Stocks of Work In Progress', 45, 0);
1304 INSERT INTO `0_chart_master` VALUES('1420', NULL, 'Stocks of Finsihed Goods', 45, 0);
1305 INSERT INTO `0_chart_master` VALUES('1430', NULL, 'Goods Received Clearing account', 30, 0);
1306 INSERT INTO `0_chart_master` VALUES('2630', NULL, 'Accounts Payable', 30, 0);
1307 INSERT INTO `0_chart_master` VALUES('2660', NULL, 'VAT out 5', 30, 0);
1308 INSERT INTO `0_chart_master` VALUES('2662', NULL, 'VAT out 1', 30, 0);
1309 INSERT INTO `0_chart_master` VALUES('2664', NULL, 'VAT out 25', 30, 0);
1310 INSERT INTO `0_chart_master` VALUES('2680', NULL, 'VAT In 5', 30, 0);
1311 INSERT INTO `0_chart_master` VALUES('2682', NULL, 'VAT In 25', 30, 0);
1312 INSERT INTO `0_chart_master` VALUES('2050', NULL, 'Retained Earnings', 50, 0);
1313 INSERT INTO `0_chart_master` VALUES('2000', NULL, 'Share Capital', 50, 0);
1316 -- Dumping data for table `0_chart_types`
1319 INSERT INTO `0_chart_types` VALUES(1, 'Sales', 3, -1);
1320 INSERT INTO `0_chart_types` VALUES(2, 'Cost of Sales', 4, -1);
1321 INSERT INTO `0_chart_types` VALUES(5, 'Expenses', 4, -1);
1322 INSERT INTO `0_chart_types` VALUES(10, 'Cash/Bank', 1, -1);
1323 INSERT INTO `0_chart_types` VALUES(20, 'Accounts Receivable', 1, -1);
1324 INSERT INTO `0_chart_types` VALUES(30, 'Accounts Payable', 2, -1);
1325 INSERT INTO `0_chart_types` VALUES(40, 'Fixed Assets', 1, -1);
1326 INSERT INTO `0_chart_types` VALUES(45, 'Inventory', 1, -1);
1327 INSERT INTO `0_chart_types` VALUES(50, 'Equity', 2, -1);
1328 INSERT INTO `0_chart_types` VALUES(51, 'Depreciations', 4, -1);
1329 INSERT INTO `0_chart_types` VALUES(52, 'Financials', 4, -1);
1332 -- Dumping data for table `0_company`
1335 INSERT INTO `0_company` VALUES(1, 'Company name', '', '', 1, 1, 'N/A', '', '', '', '', '', 'USD', '1500', '4250', '2630', '1430', '4260', '4220', '2050', '3800', '3000', '3000', '3200', '1420', '4010', '4210', '3000', '1410', '5000', '', '', '', '', '', '', 0, 10, 10, 1000, 20, 20, 30, 1, 1, 0, 0, 0, -1);
1338 -- Dumping data for table `0_credit_status`
1341 INSERT INTO `0_credit_status` VALUES(1, 'Good History', 0);
1342 INSERT INTO `0_credit_status` VALUES(3, 'No more work until payment received', 1);
1343 INSERT INTO `0_credit_status` VALUES(4, 'In liquidation', 1);
1346 -- Dumping data for table `0_currencies`
1349 INSERT INTO `0_currencies` VALUES('Euro', 'EUR', '?', 'Europe', 'Cents');
1350 INSERT INTO `0_currencies` VALUES('Pounds', 'GBP', '?', 'England', 'Pence');
1351 INSERT INTO `0_currencies` VALUES('US Dollars', 'USD', '$', 'United States', 'Cents');
1354 -- Dumping data for table `0_fiscal_year`
1357 INSERT INTO `0_fiscal_year` VALUES(1, '2008-01-01', '2008-12-31', 0);
1360 -- Dumping data for table `0_item_units`
1363 INSERT INTO `0_item_units` VALUES('ea.', 'Each', 0);
1366 -- Dumping data for table `0_locations`
1369 INSERT INTO `0_locations` VALUES('DEF', 'Default', 'N/A', '', '', '', '');
1372 -- Dumping data for table `0_movement_types`
1375 INSERT INTO `0_movement_types` VALUES(1, 'Adjustment');
1378 -- Dumping data for table `0_payment_terms`
1381 INSERT INTO `0_payment_terms` VALUES(1, 'Due 15th Of the Following Month', 0, 17);
1382 INSERT INTO `0_payment_terms` VALUES(2, 'Due By End Of The Following Month', 0, 30);
1383 INSERT INTO `0_payment_terms` VALUES(3, 'Payment due within 10 days', 10, 0);
1384 INSERT INTO `0_payment_terms` VALUES(4, 'Cash Only', 1, 0);
1387 -- Dumping data for table `0_salesman`
1390 INSERT INTO `0_salesman` VALUES(1, 'Sales Person', '', '', '', 5, 1000, 4);
1393 -- Dumping data for table `0_sales_types`
1396 INSERT INTO `0_sales_types` VALUES(1, 'Retail', 0, 1);
1397 INSERT INTO `0_sales_types` VALUES(2, 'Wholesale', 0, 1);
1400 -- Dumping data for table `0_shippers`
1403 INSERT INTO `0_shippers` VALUES(1, 'Default', '', '', '');
1406 -- Dumping data for table `0_stock_category`
1409 INSERT INTO `0_stock_category` VALUES(1, 'Components', NULL, NULL, NULL, NULL);
1410 INSERT INTO `0_stock_category` VALUES(2, 'Charges', NULL, NULL, NULL, NULL);
1411 INSERT INTO `0_stock_category` VALUES(3, 'Systems', NULL, NULL, NULL, NULL);
1412 INSERT INTO `0_stock_category` VALUES(4, 'Services', NULL, NULL, NULL, NULL);
1415 -- Dumping data for table `0_sys_types`
1418 INSERT INTO `0_sys_types` VALUES(0, 'Journal - GL', 17, '1');
1419 INSERT INTO `0_sys_types` VALUES(1, 'Payment - GL', 7, '1');
1420 INSERT INTO `0_sys_types` VALUES(2, 'Receipt - GL', 4, '1');
1421 INSERT INTO `0_sys_types` VALUES(4, 'Funds Transfer', 3, '1');
1422 INSERT INTO `0_sys_types` VALUES(10, 'Sales Invoice', 16, '1');
1423 INSERT INTO `0_sys_types` VALUES(11, 'Credit Note', 2, '1');
1424 INSERT INTO `0_sys_types` VALUES(12, 'Receipt', 6, '1');
1425 INSERT INTO `0_sys_types` VALUES(13, 'Delivery', 1, '1');
1426 INSERT INTO `0_sys_types` VALUES(16, 'Location Transfer', 2, '1');
1427 INSERT INTO `0_sys_types` VALUES(17, 'Inventory Adjustment', 2, '1');
1428 INSERT INTO `0_sys_types` VALUES(18, 'Purchase Order', 1, '1');
1429 INSERT INTO `0_sys_types` VALUES(20, 'Supplier Invoice', 6, '1');
1430 INSERT INTO `0_sys_types` VALUES(21, 'Supplier Credit Note', 1, '1');
1431 INSERT INTO `0_sys_types` VALUES(22, 'Supplier Payment', 3, '1');
1432 INSERT INTO `0_sys_types` VALUES(25, 'Purchase Order Delivery', 1, '1');
1433 INSERT INTO `0_sys_types` VALUES(26, 'Work Order', 1, '1');
1434 INSERT INTO `0_sys_types` VALUES(28, 'Work Order Issue', 1, '1');
1435 INSERT INTO `0_sys_types` VALUES(29, 'Work Order Production', 1, '1');
1436 INSERT INTO `0_sys_types` VALUES(30, 'Sales Order', 1, '1');
1437 INSERT INTO `0_sys_types` VALUES(35, 'Cost Update', 1, '1');
1438 INSERT INTO `0_sys_types` VALUES(40, 'Dimension', 1, '1');
1441 -- Dumping data for table `0_users`
1444 INSERT INTO `0_users` VALUES('admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', 2, '', 'adm@adm.com', 'en_US', 0, 0, 0, 0, 'default', 'Letter', 2, 2, 4, 1, 1, 0, 0, '2008-04-04 12:34:29');