3 -- http://www.phpmyadmin.net
6 -- Created: 09 februar 2007 at 11:03
7 -- Server Version: 4.1.11
10 -- Database: `en_US-new`
13 -- --------------------------------------------------------
16 -- Structure for table `areas`
19 DROP TABLE IF EXISTS `0_areas`;
20 CREATE TABLE IF NOT EXISTS `0_areas` (
21 `area_code` int(11) NOT NULL auto_increment,
22 `description` varchar(60) NOT NULL default '',
23 PRIMARY KEY (`area_code`),
24 UNIQUE KEY `description` (`description`)
27 -- --------------------------------------------------------
30 -- Structure for table `bank_accounts`
33 DROP TABLE IF EXISTS `0_bank_accounts`;
34 CREATE TABLE IF NOT EXISTS `0_bank_accounts` (
35 `account_code` varchar(11) NOT NULL default '',
36 `account_type` smallint(6) NOT NULL default '0',
37 `bank_account_name` varchar(60) NOT NULL default '',
38 `bank_account_number` varchar(100) NOT NULL default '',
39 `bank_name` varchar(60) NOT NULL default '',
40 `bank_address` tinytext,
41 `bank_curr_code` char(3) NOT NULL default '',
42 PRIMARY KEY (`account_code`),
43 KEY `bank_account_name` (`bank_account_name`),
44 KEY `bank_account_number` (`bank_account_number`)
47 -- --------------------------------------------------------
50 -- Structure for table `bank_trans`
53 DROP TABLE IF EXISTS `0_bank_trans`;
54 CREATE TABLE IF NOT EXISTS `0_bank_trans` (
55 `id` int(11) NOT NULL auto_increment,
56 `type` smallint(6) default NULL,
57 `trans_no` int(11) default NULL,
58 `bank_act` varchar(11) default NULL,
59 `ref` varchar(40) default NULL,
60 `trans_date` date NOT NULL default '0000-00-00',
61 `bank_trans_type_id` int(10) unsigned default NULL,
62 `amount` double default NULL,
63 `dimension_id` int(11) NOT NULL default '0',
64 `dimension2_id` int(11) NOT NULL default '0',
65 `person_type_id` int(11) NOT NULL default '0',
68 KEY `bank_act` (`bank_act`,`ref`),
69 KEY `type` (`type`,`trans_no`)
72 -- --------------------------------------------------------
75 -- Structure for table `bank_trans_types`
78 DROP TABLE IF EXISTS `0_bank_trans_types`;
79 CREATE TABLE IF NOT EXISTS `0_bank_trans_types` (
80 `id` int(11) NOT NULL auto_increment,
81 `name` varchar(60) NOT NULL default '',
83 UNIQUE KEY `name` (`name`)
86 -- --------------------------------------------------------
89 -- Structure for table `bom`
92 DROP TABLE IF EXISTS `0_bom`;
93 CREATE TABLE IF NOT EXISTS `0_bom` (
94 `id` int(11) NOT NULL auto_increment,
95 `parent` char(20) NOT NULL default '',
96 `component` char(20) NOT NULL default '',
97 `workcentre_added` char(5) NOT NULL default '',
98 `loc_code` char(5) NOT NULL default '',
99 `quantity` double NOT NULL default '1',
100 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
101 KEY `component` (`component`),
103 KEY `loc_code` (`loc_code`),
104 KEY `parent` (`parent`,`loc_code`),
105 KEY `Parent_2` (`parent`),
106 KEY `workcentre_added` (`workcentre_added`)
109 -- --------------------------------------------------------
112 -- Structure for table `budget_trans`
115 DROP TABLE IF EXISTS `0_budget_trans`;
116 CREATE TABLE IF NOT EXISTS `0_budget_trans` (
117 `counter` int(11) NOT NULL auto_increment,
118 `type` smallint(6) NOT NULL default '0',
119 `type_no` bigint(16) NOT NULL default '1',
120 `tran_date` date NOT NULL default '0000-00-00',
121 `account` varchar(11) NOT NULL default '',
122 `memo_` tinytext NOT NULL,
123 `amount` double NOT NULL default '0',
124 `dimension_id` int(11) default '0',
125 `dimension2_id` int(11) default '0',
126 `person_type_id` int(11) default NULL,
127 `person_id` tinyblob,
128 PRIMARY KEY (`counter`),
129 KEY `Type_and_Number` (`type`,`type_no`)
132 -- --------------------------------------------------------
135 -- Structure for table `chart_class`
138 DROP TABLE IF EXISTS `0_chart_class`;
139 CREATE TABLE IF NOT EXISTS `0_chart_class` (
140 `cid` int(11) NOT NULL default '0',
141 `class_name` varchar(60) NOT NULL default '',
142 `balance_sheet` tinyint(1) NOT NULL default '0',
146 -- --------------------------------------------------------
149 -- Structure for table `chart_master`
152 DROP TABLE IF EXISTS `0_chart_master`;
153 CREATE TABLE IF NOT EXISTS `0_chart_master` (
154 `account_code` varchar(11) NOT NULL default '',
155 `account_code2` varchar(11) default '',
156 `account_name` varchar(60) NOT NULL default '',
157 `account_type` int(11) NOT NULL default '0',
158 `tax_code` int(11) NOT NULL default '0',
159 PRIMARY KEY (`account_code`),
160 KEY `account_code` (`account_code`),
161 KEY `account_name` (`account_name`)
164 -- --------------------------------------------------------
167 -- Structure for table `chart_types`
170 DROP TABLE IF EXISTS `0_chart_types`;
171 CREATE TABLE IF NOT EXISTS `0_chart_types` (
172 `id` int(11) NOT NULL auto_increment,
173 `name` varchar(60) NOT NULL default '',
174 `class_id` tinyint(1) NOT NULL default '0',
175 `parent` int(11) NOT NULL default '-1',
177 UNIQUE KEY `name` (`name`)
180 -- --------------------------------------------------------
183 -- Structure for table `comments`
186 DROP TABLE IF EXISTS `0_comments`;
187 CREATE TABLE IF NOT EXISTS `0_comments` (
188 `type` int(11) NOT NULL default '0',
189 `id` int(11) NOT NULL default '0',
190 `date_` date default '0000-00-00',
194 -- --------------------------------------------------------
197 -- Structure for table `company`
200 DROP TABLE IF EXISTS `0_company`;
201 CREATE TABLE IF NOT EXISTS `0_company` (
202 `coy_code` int(11) NOT NULL default '1',
203 `coy_name` varchar(60) NOT NULL default '',
204 `gst_no` varchar(25) NOT NULL default '',
205 `coy_no` varchar(25) NOT NULL default '0',
206 `tax_prd` int(11) NOT NULL default '1',
207 `tax_last` int(11) NOT NULL default '1',
208 `postal_address` tinytext NOT NULL,
209 `phone` varchar(30) NOT NULL default '',
210 `fax` varchar(30) NOT NULL default '',
211 `email` varchar(100) NOT NULL default '',
212 `coy_logo` varchar(100) NOT NULL default '',
213 `domicile` varchar(55) NOT NULL default '',
214 `curr_default` char(3) NOT NULL default '',
215 `debtors_act` varchar(11) NOT NULL default '',
216 `pyt_discount_act` varchar(11) NOT NULL default '',
217 `creditors_act` varchar(11) NOT NULL default '',
218 `grn_act` varchar(11) NOT NULL default '',
219 `exchange_diff_act` varchar(11) NOT NULL default '',
220 `purch_exchange_diff_act` varchar(11) NOT NULL default '',
221 `retained_earnings_act` varchar(11) NOT NULL default '',
222 `freight_act` varchar(11) NOT NULL default '',
223 `default_sales_act` varchar(11) NOT NULL default '',
224 `default_sales_discount_act` varchar(11) NOT NULL default '',
225 `default_prompt_payment_act` varchar(11) NOT NULL default '',
226 `default_inventory_act` varchar(11) NOT NULL default '',
227 `default_cogs_act` varchar(11) NOT NULL default '',
228 `default_adj_act` varchar(11) NOT NULL default '',
229 `default_inv_sales_act` varchar(11) NOT NULL default '',
230 `default_assembly_act` varchar(11) NOT NULL default '',
231 `payroll_act` varchar(11) NOT NULL default '',
232 `custom1_name` varchar(60) NOT NULL default '',
233 `custom2_name` varchar(60) NOT NULL default '',
234 `custom3_name` varchar(60) NOT NULL default '',
235 `custom1_value` varchar(100) NOT NULL default '',
236 `custom2_value` varchar(100) NOT NULL default '',
237 `custom3_value` varchar(100) NOT NULL default '',
238 `allow_negative_stock` tinyint(1) NOT NULL default '0',
239 `po_over_receive` int(11) NOT NULL default '10',
240 `po_over_charge` int(11) NOT NULL default '10',
241 `default_credit_limit` int(11) NOT NULL default '1000',
242 `default_workorder_required` int(11) NOT NULL default '20',
243 `default_dim_required` int(11) NOT NULL default '20',
244 `past_due_days` int(11) NOT NULL default '30',
245 `use_dimension` tinyint(1) default '0',
246 `f_year` int(11) NOT NULL default '1',
247 PRIMARY KEY (`coy_code`)
250 -- --------------------------------------------------------
253 -- Structure for table `credit_status`
256 DROP TABLE IF EXISTS `0_credit_status`;
257 CREATE TABLE IF NOT EXISTS `0_credit_status` (
258 `id` int(11) NOT NULL auto_increment,
259 `reason_description` char(100) NOT NULL default '',
260 `dissallow_invoices` tinyint(1) NOT NULL default '0',
262 UNIQUE KEY `reason_description` (`reason_description`)
265 -- --------------------------------------------------------
268 -- Structure for table `currencies`
271 DROP TABLE IF EXISTS `0_currencies`;
272 CREATE TABLE IF NOT EXISTS `0_currencies` (
273 `currency` varchar(60) NOT NULL default '',
274 `curr_abrev` char(3) NOT NULL default '',
275 `curr_symbol` varchar(10) NOT NULL default '',
276 `country` varchar(100) NOT NULL default '',
277 `hundreds_name` varchar(15) NOT NULL default '',
278 PRIMARY KEY (`curr_abrev`)
281 -- --------------------------------------------------------
284 -- Structure for table `cust_allocations`
287 DROP TABLE IF EXISTS `0_cust_allocations`;
288 CREATE TABLE IF NOT EXISTS `0_cust_allocations` (
289 `id` int(11) NOT NULL auto_increment,
290 `amt` double unsigned default NULL,
291 `date_alloc` date NOT NULL default '0000-00-00',
292 `trans_no_from` int(11) default NULL,
293 `trans_type_from` int(11) default NULL,
294 `trans_no_to` int(11) default NULL,
295 `trans_type_to` int(11) default NULL,
299 -- --------------------------------------------------------
302 -- Structure for table `cust_branch`
305 DROP TABLE IF EXISTS `0_cust_branch`;
306 CREATE TABLE IF NOT EXISTS `0_cust_branch` (
307 `branch_code` int(11) NOT NULL auto_increment,
308 `debtor_no` int(11) NOT NULL default '0',
309 `br_name` varchar(60) NOT NULL default '',
310 `br_address` tinytext NOT NULL,
311 `area` int(11) default NULL,
312 `salesman` int(11) NOT NULL default '0',
313 `phone` varchar(30) NOT NULL default '',
314 `fax` varchar(30) NOT NULL default '',
315 `contact_name` varchar(60) NOT NULL default '',
316 `email` varchar(100) NOT NULL default '',
317 `default_location` varchar(5) NOT NULL default '',
318 `tax_group_id` int(11) default NULL,
319 `sales_account` varchar(11) default NULL,
320 `sales_discount_account` varchar(11) default NULL,
321 `receivables_account` varchar(11) default NULL,
322 `payment_discount_account` varchar(11) default NULL,
323 `default_ship_via` int(11) NOT NULL default '1',
324 `disable_trans` tinyint(4) NOT NULL default '0',
325 `br_post_address` tinytext NOT NULL,
326 PRIMARY KEY (`branch_code`,`debtor_no`),
327 KEY `branch_code` (`branch_code`),
328 KEY `br_name` (`br_name`)
331 -- --------------------------------------------------------
334 -- Structure for table `debtor_trans`
337 DROP TABLE IF EXISTS `0_debtor_trans`;
338 CREATE TABLE IF NOT EXISTS `0_debtor_trans` (
339 `trans_no` int(11) unsigned NOT NULL default '0',
340 `type` smallint(6) unsigned NOT NULL default '0',
341 `debtor_no` int(11) unsigned default NULL,
342 `branch_code` int(11) NOT NULL default '-1',
343 `tran_date` date NOT NULL default '0000-00-00',
344 `due_date` date NOT NULL default '0000-00-00',
345 `reference` varchar(60) NOT NULL default '',
346 `tpe` int(11) NOT NULL default '0',
347 `order_` int(11) NOT NULL default '0',
348 `ov_amount` double NOT NULL default '0',
349 `ov_gst` double NOT NULL default '0',
350 `ov_freight` double NOT NULL default '0',
351 `ov_discount` double NOT NULL default '0',
352 `alloc` double NOT NULL default '0',
353 `rate` double NOT NULL default '1',
354 `ship_via` int(11) default NULL,
355 PRIMARY KEY (`trans_no`,`type`),
356 KEY `debtor_no` (`debtor_no`,`branch_code`)
359 -- --------------------------------------------------------
362 -- Structure for table `debtor_trans_details`
365 DROP TABLE IF EXISTS `0_debtor_trans_details`;
366 CREATE TABLE IF NOT EXISTS `0_debtor_trans_details` (
367 `id` int(11) NOT NULL auto_increment,
368 `debtor_trans_no` int(11) default NULL,
369 `debtor_trans_type` int(11) default NULL,
370 `stock_id` varchar(20) NOT NULL default '',
371 `description` tinytext,
372 `unit_price` double NOT NULL default '0',
373 `unit_tax` double NOT NULL default '0',
374 `quantity` double NOT NULL default '0',
375 `discount_percent` double NOT NULL default '0',
376 `standard_cost` double NOT NULL default '0',
380 -- --------------------------------------------------------
383 -- Structure for table `debtor_trans_tax_details`
386 DROP TABLE IF EXISTS `0_debtor_trans_tax_details`;
387 CREATE TABLE IF NOT EXISTS `0_debtor_trans_tax_details` (
388 `id` int(11) NOT NULL auto_increment,
389 `debtor_trans_no` int(11) default NULL,
390 `debtor_trans_type` int(11) default NULL,
391 `tax_type_id` int(11) NOT NULL default '0',
392 `tax_type_name` varchar(60) default NULL,
393 `rate` double NOT NULL default '0',
394 `included_in_price` tinyint(1) NOT NULL default '0',
395 `amount` double NOT NULL default '0',
399 -- --------------------------------------------------------
402 -- Structure for table `debtors_master`
405 DROP TABLE IF EXISTS `0_debtors_master`;
406 CREATE TABLE IF NOT EXISTS `0_debtors_master` (
407 `debtor_no` int(11) NOT NULL auto_increment,
408 `name` varchar(60) NOT NULL default '',
410 `email` varchar(100) NOT NULL default '',
411 `tax_id` varchar(55) NOT NULL default '',
412 `curr_code` char(3) NOT NULL default '',
413 `sales_type` int(11) NOT NULL default '1',
414 `dimension_id` int(11) NOT NULL default '0',
415 `dimension2_id` int(11) NOT NULL default '0',
416 `credit_status` int(11) NOT NULL default '0',
417 `payment_terms` int(11) default NULL,
418 `discount` double NOT NULL default '0',
419 `pymt_discount` double NOT NULL default '0',
420 `credit_limit` float NOT NULL default '1000',
421 PRIMARY KEY (`debtor_no`),
422 UNIQUE KEY `name` (`name`)
425 -- --------------------------------------------------------
428 -- Structure for table `dimensions`
431 DROP TABLE IF EXISTS `0_dimensions`;
432 CREATE TABLE IF NOT EXISTS `0_dimensions` (
433 `id` int(11) NOT NULL auto_increment,
434 `reference` varchar(60) NOT NULL default '',
435 `name` varchar(60) NOT NULL default '',
436 `type_` tinyint(1) NOT NULL default '1',
437 `closed` tinyint(1) NOT NULL default '0',
438 `date_` date NOT NULL default '0000-00-00',
439 `due_date` date NOT NULL default '0000-00-00',
441 UNIQUE KEY `reference` (`reference`)
444 -- --------------------------------------------------------
447 -- Structure for table `exchange_rates`
450 DROP TABLE IF EXISTS `0_exchange_rates`;
451 CREATE TABLE IF NOT EXISTS `0_exchange_rates` (
452 `id` int(11) NOT NULL auto_increment,
453 `curr_code` char(3) NOT NULL default '',
454 `rate_buy` double NOT NULL default '0',
455 `rate_sell` double NOT NULL default '0',
456 `date_` date NOT NULL default '0000-00-00',
458 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
461 -- --------------------------------------------------------
464 -- Structure for table `fiscal_year`
467 DROP TABLE IF EXISTS `0_fiscal_year`;
468 CREATE TABLE IF NOT EXISTS `0_fiscal_year` (
469 `id` int(11) NOT NULL auto_increment,
470 `begin` date default '0000-00-00',
471 `end` date default '0000-00-00',
472 `closed` tinyint(1) NOT NULL default '0',
476 -- --------------------------------------------------------
479 -- Structure for table `form_items`
482 DROP TABLE IF EXISTS `0_form_items`;
483 CREATE TABLE IF NOT EXISTS `0_form_items` (
484 `form_id` int(11) NOT NULL default '0',
485 `form_type` int(11) NOT NULL default '0',
486 `trans_type` int(11) NOT NULL default '0',
487 `trans_id` int(11) NOT NULL default '0',
488 `param1` varchar(100) NOT NULL default '',
489 `param2` varchar(100) default NULL,
490 PRIMARY KEY (`form_id`,`form_type`)
493 -- --------------------------------------------------------
496 -- Structure for table `gl_trans`
499 DROP TABLE IF EXISTS `0_gl_trans`;
500 CREATE TABLE IF NOT EXISTS `0_gl_trans` (
501 `counter` int(11) NOT NULL auto_increment,
502 `type` smallint(6) NOT NULL default '0',
503 `type_no` bigint(16) NOT NULL default '1',
504 `tran_date` date NOT NULL default '0000-00-00',
505 `account` varchar(11) NOT NULL default '',
506 `memo_` tinytext NOT NULL,
507 `amount` double NOT NULL default '0',
508 `dimension_id` int(11) NOT NULL default '0',
509 `dimension2_id` int(11) NOT NULL default '0',
510 `person_type_id` int(11) default NULL,
511 `person_id` tinyblob,
512 PRIMARY KEY (`counter`),
513 KEY `Type_and_Number` (`type`,`type_no`)
516 -- --------------------------------------------------------
519 -- Structure for table `grn_batch`
522 DROP TABLE IF EXISTS `0_grn_batch`;
523 CREATE TABLE IF NOT EXISTS `0_grn_batch` (
524 `id` int(11) NOT NULL auto_increment,
525 `supplier_id` int(11) NOT NULL default '0',
526 `purch_order_no` int(11) default NULL,
527 `reference` varchar(60) NOT NULL default '',
528 `delivery_date` date NOT NULL default '0000-00-00',
529 `loc_code` varchar(5) default NULL,
533 -- --------------------------------------------------------
536 -- Structure for table `grn_items`
539 DROP TABLE IF EXISTS `0_grn_items`;
540 CREATE TABLE IF NOT EXISTS `0_grn_items` (
541 `id` int(11) NOT NULL auto_increment,
542 `grn_batch_id` int(11) default NULL,
543 `po_detail_item` int(11) NOT NULL default '0',
544 `item_code` varchar(20) NOT NULL default '',
545 `description` tinytext,
546 `qty_recd` double NOT NULL default '0',
547 `quantity_inv` double NOT NULL default '0',
551 -- --------------------------------------------------------
554 -- Structure for table `item_tax_type_exemptions`
557 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
558 CREATE TABLE IF NOT EXISTS `0_item_tax_type_exemptions` (
559 `item_tax_type_id` int(11) NOT NULL default '0',
560 `tax_type_id` int(11) NOT NULL default '0',
561 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
564 -- --------------------------------------------------------
567 -- Structure for table `item_tax_types`
570 DROP TABLE IF EXISTS `0_item_tax_types`;
571 CREATE TABLE IF NOT EXISTS `0_item_tax_types` (
572 `id` int(11) NOT NULL auto_increment,
573 `name` varchar(60) NOT NULL default '',
574 `exempt` tinyint(1) NOT NULL default '0',
576 UNIQUE KEY `name` (`name`)
579 -- --------------------------------------------------------
582 -- Structure for table `loc_stock`
585 DROP TABLE IF EXISTS `0_loc_stock`;
586 CREATE TABLE IF NOT EXISTS `0_loc_stock` (
587 `loc_code` char(5) NOT NULL default '',
588 `stock_id` char(20) NOT NULL default '',
589 `reorder_level` bigint(20) NOT NULL default '0',
590 PRIMARY KEY (`loc_code`,`stock_id`),
591 KEY `stock_id` (`stock_id`)
594 -- --------------------------------------------------------
597 -- Structure for table `locations`
600 DROP TABLE IF EXISTS `0_locations`;
601 CREATE TABLE IF NOT EXISTS `0_locations` (
602 `loc_code` varchar(5) NOT NULL default '',
603 `location_name` varchar(60) NOT NULL default '',
604 `delivery_address` tinytext NOT NULL,
605 `phone` varchar(30) NOT NULL default '',
606 `fax` varchar(30) NOT NULL default '',
607 `email` varchar(100) NOT NULL default '',
608 `contact` varchar(30) NOT NULL default '',
609 PRIMARY KEY (`loc_code`)
612 -- --------------------------------------------------------
615 -- Structure for table `movement_types`
618 DROP TABLE IF EXISTS `0_movement_types`;
619 CREATE TABLE IF NOT EXISTS `0_movement_types` (
620 `id` int(11) NOT NULL auto_increment,
621 `name` varchar(60) NOT NULL default '',
623 UNIQUE KEY `name` (`name`)
626 -- --------------------------------------------------------
629 -- Structure for table `payment_terms`
632 DROP TABLE IF EXISTS `0_payment_terms`;
633 CREATE TABLE IF NOT EXISTS `0_payment_terms` (
634 `terms_indicator` int(11) NOT NULL auto_increment,
635 `terms` char(80) NOT NULL default '',
636 `days_before_due` smallint(6) NOT NULL default '0',
637 `day_in_following_month` smallint(6) NOT NULL default '0',
638 PRIMARY KEY (`terms_indicator`),
639 UNIQUE KEY `terms` (`terms`)
642 -- --------------------------------------------------------
645 -- Structure for table `prices`
648 DROP TABLE IF EXISTS `0_prices`;
649 CREATE TABLE IF NOT EXISTS `0_prices` (
650 `id` int(11) NOT NULL auto_increment,
651 `stock_id` varchar(20) NOT NULL default '',
652 `sales_type_id` int(11) NOT NULL default '0',
653 `curr_abrev` char(3) NOT NULL default '',
654 `price` double NOT NULL default '0',
656 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
659 -- --------------------------------------------------------
662 -- Structure for table `purch_data`
665 DROP TABLE IF EXISTS `0_purch_data`;
666 CREATE TABLE IF NOT EXISTS `0_purch_data` (
667 `supplier_id` int(11) NOT NULL default '0',
668 `stock_id` char(20) NOT NULL default '',
669 `price` double NOT NULL default '0',
670 `suppliers_uom` char(50) NOT NULL default '',
671 `conversion_factor` double NOT NULL default '1',
672 `supplier_description` char(50) NOT NULL default '',
673 PRIMARY KEY (`supplier_id`,`stock_id`)
676 -- --------------------------------------------------------
679 -- Structure for table `purch_order_details`
682 DROP TABLE IF EXISTS `0_purch_order_details`;
683 CREATE TABLE IF NOT EXISTS `0_purch_order_details` (
684 `po_detail_item` int(11) NOT NULL auto_increment,
685 `order_no` int(11) NOT NULL default '0',
686 `item_code` varchar(20) NOT NULL default '',
687 `description` tinytext,
688 `delivery_date` date NOT NULL default '0000-00-00',
689 `qty_invoiced` double NOT NULL default '0',
690 `unit_price` double NOT NULL default '0',
691 `act_price` double NOT NULL default '0',
692 `std_cost_unit` double NOT NULL default '0',
693 `quantity_ordered` double NOT NULL default '0',
694 `quantity_received` double NOT NULL default '0',
695 PRIMARY KEY (`po_detail_item`)
698 -- --------------------------------------------------------
701 -- Structure for table `purch_orders`
704 DROP TABLE IF EXISTS `0_purch_orders`;
705 CREATE TABLE IF NOT EXISTS `0_purch_orders` (
706 `order_no` int(11) NOT NULL auto_increment,
707 `supplier_id` int(11) NOT NULL default '0',
709 `ord_date` date NOT NULL default '0000-00-00',
710 `reference` tinytext NOT NULL,
711 `requisition_no` tinytext,
712 `into_stock_location` varchar(5) NOT NULL default '',
713 `delivery_address` tinytext NOT NULL,
714 PRIMARY KEY (`order_no`)
717 -- --------------------------------------------------------
720 -- Structure for table `refs`
723 DROP TABLE IF EXISTS `0_refs`;
724 CREATE TABLE IF NOT EXISTS `0_refs` (
725 `id` int(11) NOT NULL default '0',
726 `type` int(11) NOT NULL default '0',
727 `reference` varchar(100) NOT NULL default '',
728 PRIMARY KEY (`id`,`type`)
731 -- --------------------------------------------------------
734 -- Structure for table `sales_order_details`
737 DROP TABLE IF EXISTS `0_sales_order_details`;
738 CREATE TABLE IF NOT EXISTS `0_sales_order_details` (
739 `order_no` int(11) NOT NULL default '0',
740 `stk_code` varchar(20) NOT NULL default '',
741 `description` tinytext,
742 `qty_invoiced` double NOT NULL default '0',
743 `unit_price` double NOT NULL default '0',
744 `quantity` double NOT NULL default '0',
745 `discount_percent` double NOT NULL default '0',
746 PRIMARY KEY (`order_no`,`stk_code`)
749 -- --------------------------------------------------------
752 -- Structure for table `sales_orders`
755 DROP TABLE IF EXISTS `0_sales_orders`;
756 CREATE TABLE IF NOT EXISTS `0_sales_orders` (
757 `order_no` int(11) NOT NULL auto_increment,
758 `debtor_no` int(11) NOT NULL default '0',
759 `branch_code` int(11) NOT NULL default '0',
760 `customer_ref` tinytext NOT NULL,
762 `ord_date` date NOT NULL default '0000-00-00',
763 `order_type` int(11) NOT NULL default '0',
764 `ship_via` int(11) NOT NULL default '0',
765 `delivery_address` tinytext NOT NULL,
766 `contact_phone` varchar(30) default NULL,
767 `contact_email` varchar(100) default NULL,
768 `deliver_to` tinytext NOT NULL,
769 `freight_cost` double NOT NULL default '0',
770 `from_stk_loc` varchar(5) NOT NULL default '',
771 `delivery_date` date NOT NULL default '0000-00-00',
772 PRIMARY KEY (`order_no`)
775 -- --------------------------------------------------------
778 -- Structure for table `sales_types`
781 DROP TABLE IF EXISTS `0_sales_types`;
782 CREATE TABLE IF NOT EXISTS `0_sales_types` (
783 `id` int(11) NOT NULL auto_increment,
784 `sales_type` char(50) NOT NULL default '',
786 UNIQUE KEY `sales_type` (`sales_type`)
789 -- --------------------------------------------------------
792 -- Structure for table `salesman`
795 DROP TABLE IF EXISTS `0_salesman`;
796 CREATE TABLE IF NOT EXISTS `0_salesman` (
797 `salesman_code` int(11) NOT NULL auto_increment,
798 `salesman_name` char(60) NOT NULL default '',
799 `salesman_phone` char(30) NOT NULL default '',
800 `salesman_fax` char(30) NOT NULL default '',
801 `salesman_email` varchar(100) NOT NULL default '',
802 PRIMARY KEY (`salesman_code`),
803 UNIQUE KEY `salesman_name` (`salesman_name`)
806 -- --------------------------------------------------------
809 -- Structure for table `shippers`
812 DROP TABLE IF EXISTS `0_shippers`;
813 CREATE TABLE IF NOT EXISTS `0_shippers` (
814 `shipper_id` int(11) NOT NULL auto_increment,
815 `shipper_name` varchar(60) NOT NULL default '',
816 `phone` varchar(30) NOT NULL default '',
817 `contact` tinytext NOT NULL,
818 `address` tinytext NOT NULL,
819 PRIMARY KEY (`shipper_id`),
820 UNIQUE KEY `name` (`shipper_name`)
823 -- --------------------------------------------------------
826 -- Structure for table `stock_category`
829 DROP TABLE IF EXISTS `0_stock_category`;
830 CREATE TABLE IF NOT EXISTS `0_stock_category` (
831 `category_id` int(11) NOT NULL auto_increment,
832 `description` varchar(60) NOT NULL default '',
833 `stock_act` varchar(11) default NULL,
834 `cogs_act` varchar(11) default NULL,
835 `adj_gl_act` varchar(11) default NULL,
836 `purch_price_var_act` varchar(11) default NULL,
837 PRIMARY KEY (`category_id`),
838 UNIQUE KEY `description` (`description`)
841 -- --------------------------------------------------------
844 -- Structure for table `stock_master`
847 DROP TABLE IF EXISTS `0_stock_master`;
848 CREATE TABLE IF NOT EXISTS `0_stock_master` (
849 `stock_id` varchar(20) NOT NULL default '',
850 `category_id` int(11) NOT NULL default '0',
851 `tax_type_id` int(11) NOT NULL default '0',
852 `description` varchar(200) NOT NULL default '',
853 `long_description` tinytext NOT NULL,
854 `units` varchar(20) NOT NULL default 'each',
855 `mb_flag` char(1) NOT NULL default 'B',
856 `sales_account` varchar(11) NOT NULL default '',
857 `cogs_account` varchar(11) NOT NULL default '',
858 `inventory_account` varchar(11) NOT NULL default '',
859 `adjustment_account` varchar(11) NOT NULL default '',
860 `assembly_account` varchar(11) NOT NULL default '',
861 `dimension_id` int(11) default NULL,
862 `dimension2_id` int(11) default NULL,
863 `actual_cost` double NOT NULL default '0',
864 `last_cost` double NOT NULL default '0',
865 `material_cost` double NOT NULL default '0',
866 `labour_cost` double NOT NULL default '0',
867 `overhead_cost` double NOT NULL default '0',
868 PRIMARY KEY (`stock_id`)
871 -- --------------------------------------------------------
874 -- Structure for table `stock_moves`
877 DROP TABLE IF EXISTS `0_stock_moves`;
878 CREATE TABLE IF NOT EXISTS `0_stock_moves` (
879 `trans_id` int(11) NOT NULL auto_increment,
880 `trans_no` int(11) NOT NULL default '0',
881 `stock_id` char(20) NOT NULL default '',
882 `type` smallint(6) NOT NULL default '0',
883 `loc_code` char(5) NOT NULL default '',
884 `tran_date` date NOT NULL default '0000-00-00',
885 `person_id` int(11) default NULL,
886 `price` double NOT NULL default '0',
887 `reference` char(40) NOT NULL default '',
888 `qty` double NOT NULL default '1',
889 `discount_percent` double NOT NULL default '0',
890 `standard_cost` double NOT NULL default '0',
891 `visible` tinyint(1) NOT NULL default '1',
892 PRIMARY KEY (`trans_id`),
893 KEY `type` (`type`,`trans_no`)
896 -- --------------------------------------------------------
899 -- Structure for table `supp_allocations`
902 DROP TABLE IF EXISTS `0_supp_allocations`;
903 CREATE TABLE IF NOT EXISTS `0_supp_allocations` (
904 `id` int(11) NOT NULL auto_increment,
905 `amt` double unsigned default NULL,
906 `date_alloc` date NOT NULL default '0000-00-00',
907 `trans_no_from` int(11) default NULL,
908 `trans_type_from` int(11) default NULL,
909 `trans_no_to` int(11) default NULL,
910 `trans_type_to` int(11) default NULL,
914 -- --------------------------------------------------------
917 -- Structure for table `supp_invoice_items`
920 DROP TABLE IF EXISTS `0_supp_invoice_items`;
921 CREATE TABLE IF NOT EXISTS `0_supp_invoice_items` (
922 `id` int(11) NOT NULL auto_increment,
923 `supp_trans_no` int(11) default NULL,
924 `supp_trans_type` int(11) default NULL,
925 `gl_code` int(11) NOT NULL default '0',
926 `grn_item_id` int(11) default NULL,
927 `po_detail_item_id` int(11) default NULL,
928 `stock_id` varchar(20) NOT NULL default '',
929 `description` tinytext,
930 `quantity` double NOT NULL default '0',
931 `unit_price` double NOT NULL default '0',
932 `unit_tax` double NOT NULL default '0',
937 -- --------------------------------------------------------
940 -- Structure for table `supp_invoice_tax_items`
943 DROP TABLE IF EXISTS `0_supp_invoice_tax_items`;
944 CREATE TABLE IF NOT EXISTS `0_supp_invoice_tax_items` (
945 `id` int(11) NOT NULL auto_increment,
946 `supp_trans_no` int(11) default NULL,
947 `supp_trans_type` int(11) default NULL,
948 `tax_type_id` int(11) NOT NULL default '0',
949 `tax_type_name` varchar(60) default NULL,
950 `rate` double NOT NULL default '0',
951 `included_in_price` tinyint(1) NOT NULL default '0',
952 `amount` double NOT NULL default '0',
956 -- --------------------------------------------------------
959 -- Structure for table `supp_trans`
962 DROP TABLE IF EXISTS `0_supp_trans`;
963 CREATE TABLE IF NOT EXISTS `0_supp_trans` (
964 `trans_no` int(11) unsigned NOT NULL default '0',
965 `type` smallint(6) unsigned NOT NULL default '0',
966 `supplier_id` int(11) unsigned default NULL,
967 `reference` tinytext NOT NULL,
968 `supp_reference` varchar(60) NOT NULL default '',
969 `tran_date` date NOT NULL default '0000-00-00',
970 `due_date` date NOT NULL default '0000-00-00',
971 `ov_amount` double NOT NULL default '0',
972 `ov_discount` double NOT NULL default '0',
973 `ov_gst` double NOT NULL default '0',
974 `rate` double NOT NULL default '1',
975 `alloc` double NOT NULL default '0',
976 PRIMARY KEY (`trans_no`,`type`),
977 KEY `supplier_id` (`supplier_id`),
978 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
982 -- --------------------------------------------------------
985 -- Structure for table `suppliers`
988 DROP TABLE IF EXISTS `0_suppliers`;
989 CREATE TABLE IF NOT EXISTS `0_suppliers` (
990 `supplier_id` int(11) NOT NULL auto_increment,
991 `supp_name` varchar(60) NOT NULL default '',
992 `address` tinytext NOT NULL,
993 `email` varchar(100) NOT NULL default '',
994 `bank_account` varchar(60) NOT NULL default '',
995 `curr_code` char(3) default NULL,
996 `payment_terms` int(11) default NULL,
997 `dimension_id` int(11) default '0',
998 `dimension2_id` int(11) default '0',
999 `tax_group_id` int(11) default NULL,
1000 `purchase_account` varchar(11) default NULL,
1001 `payable_account` varchar(11) default NULL,
1002 `payment_discount_account` varchar(11) default NULL,
1003 PRIMARY KEY (`supplier_id`)
1006 -- --------------------------------------------------------
1009 -- Structure for table `sys_types`
1012 DROP TABLE IF EXISTS `0_sys_types`;
1013 CREATE TABLE IF NOT EXISTS `0_sys_types` (
1014 `type_id` smallint(6) NOT NULL default '0',
1015 `type_name` varchar(60) NOT NULL default '',
1016 `type_no` int(11) NOT NULL default '1',
1017 `next_reference` varchar(100) NOT NULL default '',
1018 PRIMARY KEY (`type_id`)
1021 -- --------------------------------------------------------
1024 -- Structure for table `tax_group_items`
1027 DROP TABLE IF EXISTS `0_tax_group_items`;
1028 CREATE TABLE IF NOT EXISTS `0_tax_group_items` (
1029 `tax_group_id` int(11) NOT NULL default '0',
1030 `tax_type_id` int(11) NOT NULL default '0',
1031 `rate` double NOT NULL default '0',
1032 `included_in_price` tinyint(1) NOT NULL default '0',
1033 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1036 -- --------------------------------------------------------
1039 -- Structure for table `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`)
1051 -- --------------------------------------------------------
1054 -- Structure for table `tax_types`
1057 DROP TABLE IF EXISTS `0_tax_types`;
1058 CREATE TABLE IF NOT EXISTS `0_tax_types` (
1059 `id` int(11) NOT NULL auto_increment,
1060 `rate` double NOT NULL default '0',
1061 `sales_gl_code` varchar(11) NOT NULL default '',
1062 `purchasing_gl_code` varchar(11) NOT NULL default '',
1063 `name` varchar(60) NOT NULL default '',
1064 `out` tinyint(1) NOT NULL default '1',
1066 UNIQUE KEY `name` (`name`)
1069 -- --------------------------------------------------------
1072 -- Structure for table `users`
1075 DROP TABLE IF EXISTS `0_users`;
1076 CREATE TABLE IF NOT EXISTS `0_users` (
1077 `user_id` varchar(60) NOT NULL default '',
1078 `password` varchar(100) NOT NULL default '',
1079 `real_name` varchar(100) NOT NULL default '',
1080 `full_access` int(11) NOT NULL default '1',
1081 `phone` varchar(30) NOT NULL default '',
1082 `email` varchar(100) default NULL,
1083 `language` varchar(20) default NULL,
1084 `date_format` tinyint(1) NOT NULL default '0',
1085 `date_sep` tinyint(1) NOT NULL default '0',
1086 `tho_sep` tinyint(1) NOT NULL default '0',
1087 `dec_sep` tinyint(1) NOT NULL default '0',
1088 `theme` varchar(20) NOT NULL default 'default',
1089 `page_size` varchar(20) NOT NULL default 'A4',
1090 `prices_dec` smallint(6) NOT NULL default '2',
1091 `qty_dec` smallint(6) NOT NULL default '2',
1092 `rates_dec` smallint(6) NOT NULL default '4',
1093 `percent_dec` smallint(6) NOT NULL default '1',
1094 `show_gl` tinyint(1) NOT NULL default '1',
1095 `show_codes` tinyint(1) NOT NULL default '0',
1096 `last_visit_date` datetime default NULL,
1097 PRIMARY KEY (`user_id`)
1100 -- --------------------------------------------------------
1103 -- Structure for table `voided`
1106 DROP TABLE IF EXISTS `0_voided`;
1107 CREATE TABLE IF NOT EXISTS `0_voided` (
1108 `type` int(11) NOT NULL default '0',
1109 `id` int(11) NOT NULL default '0',
1110 `date_` date NOT NULL default '0000-00-00',
1111 `memo_` tinytext NOT NULL,
1112 UNIQUE KEY `id` (`type`,`id`)
1115 -- --------------------------------------------------------
1118 -- Structure for table `wo_issue_items`
1121 DROP TABLE IF EXISTS `0_wo_issue_items`;
1122 CREATE TABLE IF NOT EXISTS `0_wo_issue_items` (
1123 `id` int(11) NOT NULL auto_increment,
1124 `stock_id` varchar(40) default NULL,
1125 `issue_id` int(11) default NULL,
1126 `qty_issued` double default NULL,
1130 -- --------------------------------------------------------
1133 -- Structure for table `wo_issues`
1136 DROP TABLE IF EXISTS `0_wo_issues`;
1137 CREATE TABLE IF NOT EXISTS `0_wo_issues` (
1138 `issue_no` int(11) NOT NULL auto_increment,
1139 `workorder_id` int(11) NOT NULL default '0',
1140 `reference` varchar(100) default NULL,
1141 `issue_date` date default NULL,
1142 `loc_code` varchar(5) default NULL,
1143 `workcentre_id` int(11) default NULL,
1144 PRIMARY KEY (`issue_no`)
1147 -- --------------------------------------------------------
1150 -- Structure for table `wo_manufacture`
1153 DROP TABLE IF EXISTS `0_wo_manufacture`;
1154 CREATE TABLE IF NOT EXISTS `0_wo_manufacture` (
1155 `id` int(11) NOT NULL auto_increment,
1156 `reference` varchar(100) default NULL,
1157 `workorder_id` int(11) NOT NULL default '0',
1158 `quantity` double NOT NULL default '0',
1159 `date_` date NOT NULL default '0000-00-00',
1163 -- --------------------------------------------------------
1166 -- Structure for table `wo_requirements`
1169 DROP TABLE IF EXISTS `0_wo_requirements`;
1170 CREATE TABLE IF NOT EXISTS `0_wo_requirements` (
1171 `id` int(11) NOT NULL auto_increment,
1172 `workorder_id` int(11) NOT NULL default '0',
1173 `stock_id` char(20) NOT NULL default '',
1174 `workcentre` char(5) NOT NULL default '',
1175 `units_req` double NOT NULL default '1',
1176 `std_cost` double NOT NULL default '0',
1177 `loc_code` char(5) NOT NULL default '',
1178 `units_issued` double NOT NULL default '0',
1182 -- --------------------------------------------------------
1185 -- Structure for table `workcentres`
1188 DROP TABLE IF EXISTS `0_workcentres`;
1189 CREATE TABLE IF NOT EXISTS `0_workcentres` (
1190 `id` int(11) NOT NULL auto_increment,
1191 `name` char(40) NOT NULL default '',
1192 `description` char(50) NOT NULL default '',
1194 UNIQUE KEY `name` (`name`)
1197 -- --------------------------------------------------------
1200 -- Structure for table `workorders`
1203 DROP TABLE IF EXISTS `0_workorders`;
1204 CREATE TABLE IF NOT EXISTS `0_workorders` (
1205 `id` int(11) NOT NULL auto_increment,
1206 `wo_ref` varchar(60) NOT NULL default '',
1207 `loc_code` varchar(5) NOT NULL default '',
1208 `units_reqd` double NOT NULL default '1',
1209 `stock_id` varchar(20) NOT NULL default '',
1210 `date_` date NOT NULL default '0000-00-00',
1211 `type` tinyint(4) NOT NULL default '0',
1212 `required_by` date NOT NULL default '0000-00-00',
1213 `released_date` date NOT NULL default '0000-00-00',
1214 `units_issued` double NOT NULL default '0',
1215 `closed` tinyint(1) NOT NULL default '0',
1216 `released` tinyint(1) NOT NULL default '0',
1217 `additional_costs` double NOT NULL default '0',
1219 UNIQUE KEY `wo_ref` (`wo_ref`)
1222 -- --------------------------------------------------------
1225 -- Data in table `areas`
1228 INSERT INTO `0_areas` VALUES (1, 'USA');
1231 -- Data in table `bank_accounts`
1234 INSERT INTO `0_bank_accounts` VALUES ('1700', 0, 'Current account', 'N/A', 'N/A', NULL, 'USD');
1235 INSERT INTO `0_bank_accounts` VALUES ('1705', 0, 'Petty Cash account', 'N/A', 'N/A', NULL, 'USD');
1238 -- Data in table `bank_trans_types`
1241 INSERT INTO `0_bank_trans_types` VALUES (1, 'Cash');
1242 INSERT INTO `0_bank_trans_types` VALUES (2, 'Transfer');
1245 -- Data in table `chart_class`
1248 INSERT INTO `0_chart_class` VALUES (1, 'Assets', 1);
1249 INSERT INTO `0_chart_class` VALUES (2, 'Liabilities', 1);
1250 INSERT INTO `0_chart_class` VALUES (3, 'Income', 0);
1251 INSERT INTO `0_chart_class` VALUES (4, 'Costs', 0);
1254 -- Data in table `chart_master`
1257 INSERT INTO `0_chart_master` VALUES ('3000', NULL, 'Sales', 1, 1);
1258 INSERT INTO `0_chart_master` VALUES ('3010', NULL, 'Sales - Wholesale', 1, 1);
1259 INSERT INTO `0_chart_master` VALUES ('3020', NULL, 'Sales of Other items', 1, 1);
1260 INSERT INTO `0_chart_master` VALUES ('3400', NULL, 'Difference On Exchange', 1, 0);
1261 INSERT INTO `0_chart_master` VALUES ('5000', NULL, 'Direct Labour', 2, 0);
1262 INSERT INTO `0_chart_master` VALUES ('5050', NULL, 'Direct Labour Recovery', 2, 0);
1263 INSERT INTO `0_chart_master` VALUES ('4200', NULL, 'Material Usage Varaiance', 2, 4);
1264 INSERT INTO `0_chart_master` VALUES ('4210', NULL, 'Consumable Materials', 2, 4);
1265 INSERT INTO `0_chart_master` VALUES ('4220', NULL, 'Purchase price Variance', 2, 0);
1266 INSERT INTO `0_chart_master` VALUES ('4000', NULL, 'Purchases of materials', 2, 4);
1267 INSERT INTO `0_chart_master` VALUES ('4250', NULL, 'Discounts Received', 2, 0);
1268 INSERT INTO `0_chart_master` VALUES ('4260', NULL, 'Exchange Variation', 2, 0);
1269 INSERT INTO `0_chart_master` VALUES ('4300', NULL, 'Freight Inwards', 2, 4);
1270 INSERT INTO `0_chart_master` VALUES ('4010', NULL, 'Cost of Goods Sold - Retail', 2, 4);
1271 INSERT INTO `0_chart_master` VALUES ('6790', NULL, 'Bank Charges', 5, 4);
1272 INSERT INTO `0_chart_master` VALUES ('6800', NULL, 'Entertainments', 5, 4);
1273 INSERT INTO `0_chart_master` VALUES ('6810', NULL, 'Legal Expenses', 5, 4);
1274 INSERT INTO `0_chart_master` VALUES ('6600', NULL, 'Repairs and Maintenance Office', 5, 4);
1275 INSERT INTO `0_chart_master` VALUES ('6730', NULL, 'phone', 5, 4);
1276 INSERT INTO `0_chart_master` VALUES ('8200', NULL, 'Bank Interest', 52, 0);
1277 INSERT INTO `0_chart_master` VALUES ('6840', NULL, 'Credit Control', 5, 0);
1278 INSERT INTO `0_chart_master` VALUES ('7040', NULL, 'Depreciation Office Equipment', 51, 0);
1279 INSERT INTO `0_chart_master` VALUES ('3800', NULL, 'Freight Outwards', 5, 4);
1280 INSERT INTO `0_chart_master` VALUES ('4500', NULL, 'Packaging', 5, 4);
1281 INSERT INTO `0_chart_master` VALUES ('6400', NULL, 'Commissions', 5, 0);
1282 INSERT INTO `0_chart_master` VALUES ('3200', NULL, 'Prompt Payment Discounts', 1, 0);
1283 INSERT INTO `0_chart_master` VALUES ('6700', NULL, 'General Expenses', 5, 4);
1284 INSERT INTO `0_chart_master` VALUES ('5200', NULL, 'Indirect Labour', 2, 0);
1285 INSERT INTO `0_chart_master` VALUES ('5210', NULL, 'Overhead Recovery', 5, 0);
1286 INSERT INTO `0_chart_master` VALUES ('1700', NULL, 'Bank account', 10, 0);
1287 INSERT INTO `0_chart_master` VALUES ('1705', NULL, 'Petty Cash', 10, 0);
1288 INSERT INTO `0_chart_master` VALUES ('1710', NULL, 'Foreign currency account', 10, 0);
1289 INSERT INTO `0_chart_master` VALUES ('1500', NULL, 'Accounts Receivable', 20, 0);
1290 INSERT INTO `0_chart_master` VALUES ('1400', NULL, 'Stocks of Raw Materials', 45, 0);
1291 INSERT INTO `0_chart_master` VALUES ('1410', NULL, 'Stocks of Work In Progress', 45, 0);
1292 INSERT INTO `0_chart_master` VALUES ('1420', NULL, 'Stocks of Finsihed Goods', 45, 0);
1293 INSERT INTO `0_chart_master` VALUES ('1430', NULL, 'Goods Received Clearing account', 30, 0);
1294 INSERT INTO `0_chart_master` VALUES ('2630', NULL, 'Accounts Payable', 30, 0);
1295 INSERT INTO `0_chart_master` VALUES ('2660', NULL, 'VAT out 5', 30, 0);
1296 INSERT INTO `0_chart_master` VALUES ('2662', NULL, 'VAT out 1', 30, 0);
1297 INSERT INTO `0_chart_master` VALUES ('2664', NULL, 'VAT out 25', 30, 0);
1298 INSERT INTO `0_chart_master` VALUES ('2680', NULL, 'VAT In 5', 30, 0);
1299 INSERT INTO `0_chart_master` VALUES ('2682', NULL, 'VAT In 25', 30, 0);
1300 INSERT INTO `0_chart_master` VALUES ('2050', NULL, 'Retained Earnings', 50, 0);
1301 INSERT INTO `0_chart_master` VALUES ('2000', NULL, 'Share Capital', 50, 0);
1304 -- Data in table `chart_types`
1307 INSERT INTO `0_chart_types` VALUES (1, 'Sales', 3, -1);
1308 INSERT INTO `0_chart_types` VALUES (2, 'Cost of Sales', 4, -1);
1309 INSERT INTO `0_chart_types` VALUES (5, 'Expenses', 4, -1);
1310 INSERT INTO `0_chart_types` VALUES (10, 'Cash/Bank', 1, -1);
1311 INSERT INTO `0_chart_types` VALUES (20, 'Accounts Receivable', 1, -1);
1312 INSERT INTO `0_chart_types` VALUES (30, 'Accounts Payable', 2, -1);
1313 INSERT INTO `0_chart_types` VALUES (40, 'Fixed Assets', 1, -1);
1314 INSERT INTO `0_chart_types` VALUES (45, 'Inventory', 1, -1);
1315 INSERT INTO `0_chart_types` VALUES (50, 'Equity', 2, -1);
1316 INSERT INTO `0_chart_types` VALUES (51, 'Depreciations', 4, -1);
1317 INSERT INTO `0_chart_types` VALUES (52, 'Financials', 4, -1);
1320 -- Data in table `company`
1323 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);
1326 -- Data in table `credit_status`
1329 INSERT INTO `0_credit_status` VALUES (1, 'Good History', 0);
1330 INSERT INTO `0_credit_status` VALUES (3, 'No more work until payment received', 1);
1331 INSERT INTO `0_credit_status` VALUES (4, 'In liquidation', 1);
1334 -- Data in table `currencies`
1337 INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents');
1338 INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence');
1339 INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents');
1342 -- Data in table `fiscal_year`
1345 INSERT INTO `0_fiscal_year` VALUES (1, '2007-01-01', '2007-12-31', 0);
1348 -- Data in table `locations`
1351 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '');
1354 -- Data in table `movement_types`
1357 INSERT INTO `0_movement_types` VALUES (1, 'Adjustment');
1360 -- Data in table `payment_terms`
1363 INSERT INTO `0_payment_terms` VALUES (1, 'Due 15th Of the Following Month', 0, 17);
1364 INSERT INTO `0_payment_terms` VALUES (2, 'Due By End Of The Following Month', 0, 30);
1365 INSERT INTO `0_payment_terms` VALUES (3, 'Payment due within 10 days', 10, 0);
1366 INSERT INTO `0_payment_terms` VALUES (4, 'Cash Only', 1, 0);
1369 -- Data in table `sales_types`
1372 INSERT INTO `0_sales_types` VALUES (1, 'Retail');
1373 INSERT INTO `0_sales_types` VALUES (2, 'Wholesale');
1376 -- Data in table `salesman`
1379 INSERT INTO `0_salesman` VALUES (1, 'Sales Person', '', '', '');
1382 -- Data in table `shippers`
1385 INSERT INTO `0_shippers` VALUES (1, 'Default', '', '', '');
1388 -- Data in table `stock_category`
1391 INSERT INTO `0_stock_category` VALUES (1, 'Components', NULL, NULL, NULL, NULL);
1392 INSERT INTO `0_stock_category` VALUES (2, 'Charges', NULL, NULL, NULL, NULL);
1393 INSERT INTO `0_stock_category` VALUES (3, 'Systems', NULL, NULL, NULL, NULL);
1394 INSERT INTO `0_stock_category` VALUES (4, 'Services', NULL, NULL, NULL, NULL);
1397 -- Data in table `sys_types`
1400 INSERT INTO `0_sys_types` VALUES (0, 'Journal - GL', 17, '1');
1401 INSERT INTO `0_sys_types` VALUES (1, 'Payment - GL', 7, '1');
1402 INSERT INTO `0_sys_types` VALUES (2, 'Receipt - GL', 4, '1');
1403 INSERT INTO `0_sys_types` VALUES (4, 'Funds Transfer', 3, '1');
1404 INSERT INTO `0_sys_types` VALUES (10, 'Sales Invoice', 16, '1');
1405 INSERT INTO `0_sys_types` VALUES (11, 'Credit Note', 2, '1');
1406 INSERT INTO `0_sys_types` VALUES (12, 'Receipt', 6, '1');
1407 INSERT INTO `0_sys_types` VALUES (16, 'Location Transfer', 2, '1');
1408 INSERT INTO `0_sys_types` VALUES (17, 'Inventory Adjustment', 2, '1');
1409 INSERT INTO `0_sys_types` VALUES (18, 'Purchase Order', 1, '1');
1410 INSERT INTO `0_sys_types` VALUES (20, 'Supplier Invoice', 6, '1');
1411 INSERT INTO `0_sys_types` VALUES (21, 'Supplier Credit Note', 1, '1');
1412 INSERT INTO `0_sys_types` VALUES (22, 'Supplier Payment', 3, '1');
1413 INSERT INTO `0_sys_types` VALUES (25, 'Purchase Order Delivery', 1, '1');
1414 INSERT INTO `0_sys_types` VALUES (26, 'Work Order', 1, '1');
1415 INSERT INTO `0_sys_types` VALUES (28, 'Work Order Issue', 1, '1');
1416 INSERT INTO `0_sys_types` VALUES (29, 'Work Order Production', 1, '1');
1417 INSERT INTO `0_sys_types` VALUES (30, 'Sales Order', 1, '1');
1418 INSERT INTO `0_sys_types` VALUES (35, 'Cost Update', 1, '1');
1419 INSERT INTO `0_sys_types` VALUES (40, 'Dimension', 1, '1');
1422 -- Data in table `users`
1425 INSERT INTO `0_users` VALUES ('admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', 2, '', 'info@frontaccounting.com', 'en_US', 0, 0, 0, 0, 'default', 'Letter', 2, 2, 4, 1, 1, 0, '2007-03-20 10:52:46');