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 `no_item_list` TINYINT(1) NOT NULL DEFAULT '0',
248 `no_customer_list` TINYINT(1) NOT NULL DEFAULT '0',
249 `no_supplier_list` TINYINT(1) NOT NULL DEFAULT '0',
250 PRIMARY KEY (`coy_code`)
253 -- --------------------------------------------------------
256 -- Structure for table `credit_status`
259 DROP TABLE IF EXISTS `0_credit_status`;
260 CREATE TABLE IF NOT EXISTS `0_credit_status` (
261 `id` int(11) NOT NULL auto_increment,
262 `reason_description` char(100) NOT NULL default '',
263 `dissallow_invoices` tinyint(1) NOT NULL default '0',
265 UNIQUE KEY `reason_description` (`reason_description`)
268 -- --------------------------------------------------------
271 -- Structure for table `currencies`
274 DROP TABLE IF EXISTS `0_currencies`;
275 CREATE TABLE IF NOT EXISTS `0_currencies` (
276 `currency` varchar(60) NOT NULL default '',
277 `curr_abrev` char(3) NOT NULL default '',
278 `curr_symbol` varchar(10) NOT NULL default '',
279 `country` varchar(100) NOT NULL default '',
280 `hundreds_name` varchar(15) NOT NULL default '',
281 PRIMARY KEY (`curr_abrev`)
284 -- --------------------------------------------------------
287 -- Structure for table `cust_allocations`
290 DROP TABLE IF EXISTS `0_cust_allocations`;
291 CREATE TABLE IF NOT EXISTS `0_cust_allocations` (
292 `id` int(11) NOT NULL auto_increment,
293 `amt` double unsigned default NULL,
294 `date_alloc` date NOT NULL default '0000-00-00',
295 `trans_no_from` int(11) default NULL,
296 `trans_type_from` int(11) default NULL,
297 `trans_no_to` int(11) default NULL,
298 `trans_type_to` int(11) default NULL,
302 -- --------------------------------------------------------
305 -- Structure for table `cust_branch`
308 DROP TABLE IF EXISTS `0_cust_branch`;
309 CREATE TABLE IF NOT EXISTS `0_cust_branch` (
310 `branch_code` int(11) NOT NULL auto_increment,
311 `debtor_no` int(11) NOT NULL default '0',
312 `br_name` varchar(60) NOT NULL default '',
313 `br_address` tinytext NOT NULL,
314 `area` int(11) default NULL,
315 `salesman` int(11) NOT NULL default '0',
316 `phone` varchar(30) NOT NULL default '',
317 `fax` varchar(30) NOT NULL default '',
318 `contact_name` varchar(60) NOT NULL default '',
319 `email` varchar(100) NOT NULL default '',
320 `default_location` varchar(5) NOT NULL default '',
321 `tax_group_id` int(11) default NULL,
322 `sales_account` varchar(11) default NULL,
323 `sales_discount_account` varchar(11) default NULL,
324 `receivables_account` varchar(11) default NULL,
325 `payment_discount_account` varchar(11) default NULL,
326 `default_ship_via` int(11) NOT NULL default '1',
327 `disable_trans` tinyint(4) NOT NULL default '0',
328 `br_post_address` tinytext NOT NULL,
329 PRIMARY KEY (`branch_code`,`debtor_no`),
330 KEY `branch_code` (`branch_code`),
331 KEY `br_name` (`br_name`)
334 -- --------------------------------------------------------
337 -- Structure for table `debtor_trans`
340 DROP TABLE IF EXISTS `0_debtor_trans`;
341 CREATE TABLE IF NOT EXISTS `0_debtor_trans` (
342 `trans_no` int(11) unsigned NOT NULL default '0',
343 `type` smallint(6) unsigned NOT NULL default '0',
344 `debtor_no` int(11) unsigned default NULL,
345 `branch_code` int(11) NOT NULL default '-1',
346 `tran_date` date NOT NULL default '0000-00-00',
347 `due_date` date NOT NULL default '0000-00-00',
348 `reference` varchar(60) NOT NULL default '',
349 `tpe` int(11) NOT NULL default '0',
350 `order_` int(11) NOT NULL default '0',
351 `ov_amount` double NOT NULL default '0',
352 `ov_gst` double NOT NULL default '0',
353 `ov_freight` double NOT NULL default '0',
354 `ov_discount` double NOT NULL default '0',
355 `alloc` double NOT NULL default '0',
356 `rate` double NOT NULL default '1',
357 `ship_via` int(11) default NULL,
358 PRIMARY KEY (`trans_no`,`type`),
359 KEY `debtor_no` (`debtor_no`,`branch_code`)
362 -- --------------------------------------------------------
365 -- Structure for table `debtor_trans_details`
368 DROP TABLE IF EXISTS `0_debtor_trans_details`;
369 CREATE TABLE IF NOT EXISTS `0_debtor_trans_details` (
370 `id` int(11) NOT NULL auto_increment,
371 `debtor_trans_no` int(11) default NULL,
372 `debtor_trans_type` int(11) default NULL,
373 `stock_id` varchar(20) NOT NULL default '',
374 `description` tinytext,
375 `unit_price` double NOT NULL default '0',
376 `unit_tax` double NOT NULL default '0',
377 `quantity` double NOT NULL default '0',
378 `discount_percent` double NOT NULL default '0',
379 `standard_cost` double NOT NULL default '0',
383 -- --------------------------------------------------------
386 -- Structure for table `debtor_trans_tax_details`
389 DROP TABLE IF EXISTS `0_debtor_trans_tax_details`;
390 CREATE TABLE IF NOT EXISTS `0_debtor_trans_tax_details` (
391 `id` int(11) NOT NULL auto_increment,
392 `debtor_trans_no` int(11) default NULL,
393 `debtor_trans_type` int(11) default NULL,
394 `tax_type_id` int(11) NOT NULL default '0',
395 `tax_type_name` varchar(60) default NULL,
396 `rate` double NOT NULL default '0',
397 `included_in_price` tinyint(1) NOT NULL default '0',
398 `amount` double NOT NULL default '0',
402 -- --------------------------------------------------------
405 -- Structure for table `debtors_master`
408 DROP TABLE IF EXISTS `0_debtors_master`;
409 CREATE TABLE IF NOT EXISTS `0_debtors_master` (
410 `debtor_no` int(11) NOT NULL auto_increment,
411 `name` varchar(60) NOT NULL default '',
413 `email` varchar(100) NOT NULL default '',
414 `tax_id` varchar(55) NOT NULL default '',
415 `curr_code` char(3) NOT NULL default '',
416 `sales_type` int(11) NOT NULL default '1',
417 `dimension_id` int(11) NOT NULL default '0',
418 `dimension2_id` int(11) NOT NULL default '0',
419 `credit_status` int(11) NOT NULL default '0',
420 `payment_terms` int(11) default NULL,
421 `discount` double NOT NULL default '0',
422 `pymt_discount` double NOT NULL default '0',
423 `credit_limit` float NOT NULL default '1000',
424 PRIMARY KEY (`debtor_no`),
425 UNIQUE KEY `name` (`name`)
428 -- --------------------------------------------------------
431 -- Structure for table `dimensions`
434 DROP TABLE IF EXISTS `0_dimensions`;
435 CREATE TABLE IF NOT EXISTS `0_dimensions` (
436 `id` int(11) NOT NULL auto_increment,
437 `reference` varchar(60) NOT NULL default '',
438 `name` varchar(60) NOT NULL default '',
439 `type_` tinyint(1) NOT NULL default '1',
440 `closed` tinyint(1) NOT NULL default '0',
441 `date_` date NOT NULL default '0000-00-00',
442 `due_date` date NOT NULL default '0000-00-00',
444 UNIQUE KEY `reference` (`reference`)
447 -- --------------------------------------------------------
450 -- Structure for table `exchange_rates`
453 DROP TABLE IF EXISTS `0_exchange_rates`;
454 CREATE TABLE IF NOT EXISTS `0_exchange_rates` (
455 `id` int(11) NOT NULL auto_increment,
456 `curr_code` char(3) NOT NULL default '',
457 `rate_buy` double NOT NULL default '0',
458 `rate_sell` double NOT NULL default '0',
459 `date_` date NOT NULL default '0000-00-00',
461 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
464 -- --------------------------------------------------------
467 -- Structure for table `fiscal_year`
470 DROP TABLE IF EXISTS `0_fiscal_year`;
471 CREATE TABLE IF NOT EXISTS `0_fiscal_year` (
472 `id` int(11) NOT NULL auto_increment,
473 `begin` date default '0000-00-00',
474 `end` date default '0000-00-00',
475 `closed` tinyint(1) NOT NULL default '0',
479 -- --------------------------------------------------------
482 -- Structure for table `form_items`
485 DROP TABLE IF EXISTS `0_form_items`;
486 CREATE TABLE IF NOT EXISTS `0_form_items` (
487 `form_id` int(11) NOT NULL default '0',
488 `form_type` int(11) NOT NULL default '0',
489 `trans_type` int(11) NOT NULL default '0',
490 `trans_id` int(11) NOT NULL default '0',
491 `param1` varchar(100) NOT NULL default '',
492 `param2` varchar(100) default NULL,
493 PRIMARY KEY (`form_id`,`form_type`)
496 -- --------------------------------------------------------
499 -- Structure for table `gl_trans`
502 DROP TABLE IF EXISTS `0_gl_trans`;
503 CREATE TABLE IF NOT EXISTS `0_gl_trans` (
504 `counter` int(11) NOT NULL auto_increment,
505 `type` smallint(6) NOT NULL default '0',
506 `type_no` bigint(16) NOT NULL default '1',
507 `tran_date` date NOT NULL default '0000-00-00',
508 `account` varchar(11) NOT NULL default '',
509 `memo_` tinytext NOT NULL,
510 `amount` double NOT NULL default '0',
511 `dimension_id` int(11) NOT NULL default '0',
512 `dimension2_id` int(11) NOT NULL default '0',
513 `person_type_id` int(11) default NULL,
514 `person_id` tinyblob,
515 PRIMARY KEY (`counter`),
516 KEY `Type_and_Number` (`type`,`type_no`)
519 -- --------------------------------------------------------
522 -- Structure for table `grn_batch`
525 DROP TABLE IF EXISTS `0_grn_batch`;
526 CREATE TABLE IF NOT EXISTS `0_grn_batch` (
527 `id` int(11) NOT NULL auto_increment,
528 `supplier_id` int(11) NOT NULL default '0',
529 `purch_order_no` int(11) default NULL,
530 `reference` varchar(60) NOT NULL default '',
531 `delivery_date` date NOT NULL default '0000-00-00',
532 `loc_code` varchar(5) default NULL,
536 -- --------------------------------------------------------
539 -- Structure for table `grn_items`
542 DROP TABLE IF EXISTS `0_grn_items`;
543 CREATE TABLE IF NOT EXISTS `0_grn_items` (
544 `id` int(11) NOT NULL auto_increment,
545 `grn_batch_id` int(11) default NULL,
546 `po_detail_item` int(11) NOT NULL default '0',
547 `item_code` varchar(20) NOT NULL default '',
548 `description` tinytext,
549 `qty_recd` double NOT NULL default '0',
550 `quantity_inv` double NOT NULL default '0',
554 -- --------------------------------------------------------
557 -- Structure for table `item_tax_type_exemptions`
560 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
561 CREATE TABLE IF NOT EXISTS `0_item_tax_type_exemptions` (
562 `item_tax_type_id` int(11) NOT NULL default '0',
563 `tax_type_id` int(11) NOT NULL default '0',
564 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
567 -- --------------------------------------------------------
570 -- Structure for table `item_tax_types`
573 DROP TABLE IF EXISTS `0_item_tax_types`;
574 CREATE TABLE IF NOT EXISTS `0_item_tax_types` (
575 `id` int(11) NOT NULL auto_increment,
576 `name` varchar(60) NOT NULL default '',
577 `exempt` tinyint(1) NOT NULL default '0',
579 UNIQUE KEY `name` (`name`)
582 -- --------------------------------------------------------
585 -- Structure for table `loc_stock`
588 DROP TABLE IF EXISTS `0_loc_stock`;
589 CREATE TABLE IF NOT EXISTS `0_loc_stock` (
590 `loc_code` char(5) NOT NULL default '',
591 `stock_id` char(20) NOT NULL default '',
592 `reorder_level` bigint(20) NOT NULL default '0',
593 PRIMARY KEY (`loc_code`,`stock_id`),
594 KEY `stock_id` (`stock_id`)
597 -- --------------------------------------------------------
600 -- Structure for table `locations`
603 DROP TABLE IF EXISTS `0_locations`;
604 CREATE TABLE IF NOT EXISTS `0_locations` (
605 `loc_code` varchar(5) NOT NULL default '',
606 `location_name` varchar(60) NOT NULL default '',
607 `delivery_address` tinytext NOT NULL,
608 `phone` varchar(30) NOT NULL default '',
609 `fax` varchar(30) NOT NULL default '',
610 `email` varchar(100) NOT NULL default '',
611 `contact` varchar(30) NOT NULL default '',
612 PRIMARY KEY (`loc_code`)
615 -- --------------------------------------------------------
618 -- Structure for table `movement_types`
621 DROP TABLE IF EXISTS `0_movement_types`;
622 CREATE TABLE IF NOT EXISTS `0_movement_types` (
623 `id` int(11) NOT NULL auto_increment,
624 `name` varchar(60) NOT NULL default '',
626 UNIQUE KEY `name` (`name`)
629 -- --------------------------------------------------------
632 -- Structure for table `payment_terms`
635 DROP TABLE IF EXISTS `0_payment_terms`;
636 CREATE TABLE IF NOT EXISTS `0_payment_terms` (
637 `terms_indicator` int(11) NOT NULL auto_increment,
638 `terms` char(80) NOT NULL default '',
639 `days_before_due` smallint(6) NOT NULL default '0',
640 `day_in_following_month` smallint(6) NOT NULL default '0',
641 PRIMARY KEY (`terms_indicator`),
642 UNIQUE KEY `terms` (`terms`)
645 -- --------------------------------------------------------
648 -- Structure for table `prices`
651 DROP TABLE IF EXISTS `0_prices`;
652 CREATE TABLE IF NOT EXISTS `0_prices` (
653 `id` int(11) NOT NULL auto_increment,
654 `stock_id` varchar(20) NOT NULL default '',
655 `sales_type_id` int(11) NOT NULL default '0',
656 `curr_abrev` char(3) NOT NULL default '',
657 `price` double NOT NULL default '0',
659 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
662 -- --------------------------------------------------------
665 -- Structure for table `purch_data`
668 DROP TABLE IF EXISTS `0_purch_data`;
669 CREATE TABLE IF NOT EXISTS `0_purch_data` (
670 `supplier_id` int(11) NOT NULL default '0',
671 `stock_id` char(20) NOT NULL default '',
672 `price` double NOT NULL default '0',
673 `suppliers_uom` char(50) NOT NULL default '',
674 `conversion_factor` double NOT NULL default '1',
675 `supplier_description` char(50) NOT NULL default '',
676 PRIMARY KEY (`supplier_id`,`stock_id`)
679 -- --------------------------------------------------------
682 -- Structure for table `purch_order_details`
685 DROP TABLE IF EXISTS `0_purch_order_details`;
686 CREATE TABLE IF NOT EXISTS `0_purch_order_details` (
687 `po_detail_item` int(11) NOT NULL auto_increment,
688 `order_no` int(11) NOT NULL default '0',
689 `item_code` varchar(20) NOT NULL default '',
690 `description` tinytext,
691 `delivery_date` date NOT NULL default '0000-00-00',
692 `qty_invoiced` double NOT NULL default '0',
693 `unit_price` double NOT NULL default '0',
694 `act_price` double NOT NULL default '0',
695 `std_cost_unit` double NOT NULL default '0',
696 `quantity_ordered` double NOT NULL default '0',
697 `quantity_received` double NOT NULL default '0',
698 PRIMARY KEY (`po_detail_item`)
701 -- --------------------------------------------------------
704 -- Structure for table `purch_orders`
707 DROP TABLE IF EXISTS `0_purch_orders`;
708 CREATE TABLE IF NOT EXISTS `0_purch_orders` (
709 `order_no` int(11) NOT NULL auto_increment,
710 `supplier_id` int(11) NOT NULL default '0',
712 `ord_date` date NOT NULL default '0000-00-00',
713 `reference` tinytext NOT NULL,
714 `requisition_no` tinytext,
715 `into_stock_location` varchar(5) NOT NULL default '',
716 `delivery_address` tinytext NOT NULL,
717 PRIMARY KEY (`order_no`)
720 -- --------------------------------------------------------
723 -- Structure for table `refs`
726 DROP TABLE IF EXISTS `0_refs`;
727 CREATE TABLE IF NOT EXISTS `0_refs` (
728 `id` int(11) NOT NULL default '0',
729 `type` int(11) NOT NULL default '0',
730 `reference` varchar(100) NOT NULL default '',
731 PRIMARY KEY (`id`,`type`)
734 -- --------------------------------------------------------
737 -- Structure for table `sales_order_details`
740 DROP TABLE IF EXISTS `0_sales_order_details`;
741 CREATE TABLE IF NOT EXISTS `0_sales_order_details` (
742 `order_no` int(11) NOT NULL default '0',
743 `stk_code` varchar(20) NOT NULL default '',
744 `description` tinytext,
745 `qty_invoiced` double NOT NULL default '0',
746 `unit_price` double NOT NULL default '0',
747 `quantity` double NOT NULL default '0',
748 `discount_percent` double NOT NULL default '0',
749 PRIMARY KEY (`order_no`,`stk_code`)
752 -- --------------------------------------------------------
755 -- Structure for table `sales_orders`
758 DROP TABLE IF EXISTS `0_sales_orders`;
759 CREATE TABLE IF NOT EXISTS `0_sales_orders` (
760 `order_no` int(11) NOT NULL auto_increment,
761 `debtor_no` int(11) NOT NULL default '0',
762 `branch_code` int(11) NOT NULL default '0',
763 `customer_ref` tinytext NOT NULL,
765 `ord_date` date NOT NULL default '0000-00-00',
766 `order_type` int(11) NOT NULL default '0',
767 `ship_via` int(11) NOT NULL default '0',
768 `delivery_address` tinytext NOT NULL,
769 `contact_phone` varchar(30) default NULL,
770 `contact_email` varchar(100) default NULL,
771 `deliver_to` tinytext NOT NULL,
772 `freight_cost` double NOT NULL default '0',
773 `from_stk_loc` varchar(5) NOT NULL default '',
774 `delivery_date` date NOT NULL default '0000-00-00',
775 PRIMARY KEY (`order_no`)
778 -- --------------------------------------------------------
781 -- Structure for table `sales_types`
784 DROP TABLE IF EXISTS `0_sales_types`;
785 CREATE TABLE IF NOT EXISTS `0_sales_types` (
786 `id` int(11) NOT NULL auto_increment,
787 `sales_type` char(50) NOT NULL default '',
789 UNIQUE KEY `sales_type` (`sales_type`)
792 -- --------------------------------------------------------
795 -- Structure for table `salesman`
798 DROP TABLE IF EXISTS `0_salesman`;
799 CREATE TABLE IF NOT EXISTS `0_salesman` (
800 `salesman_code` int(11) NOT NULL auto_increment,
801 `salesman_name` char(60) NOT NULL default '',
802 `salesman_phone` char(30) NOT NULL default '',
803 `salesman_fax` char(30) NOT NULL default '',
804 `salesman_email` varchar(100) NOT NULL default '',
805 PRIMARY KEY (`salesman_code`),
806 UNIQUE KEY `salesman_name` (`salesman_name`)
809 -- --------------------------------------------------------
812 -- Structure for table `shippers`
815 DROP TABLE IF EXISTS `0_shippers`;
816 CREATE TABLE IF NOT EXISTS `0_shippers` (
817 `shipper_id` int(11) NOT NULL auto_increment,
818 `shipper_name` varchar(60) NOT NULL default '',
819 `phone` varchar(30) NOT NULL default '',
820 `contact` tinytext NOT NULL,
821 `address` tinytext NOT NULL,
822 PRIMARY KEY (`shipper_id`),
823 UNIQUE KEY `name` (`shipper_name`)
826 -- --------------------------------------------------------
829 -- Structure for table `stock_category`
832 DROP TABLE IF EXISTS `0_stock_category`;
833 CREATE TABLE IF NOT EXISTS `0_stock_category` (
834 `category_id` int(11) NOT NULL auto_increment,
835 `description` varchar(60) NOT NULL default '',
836 `stock_act` varchar(11) default NULL,
837 `cogs_act` varchar(11) default NULL,
838 `adj_gl_act` varchar(11) default NULL,
839 `purch_price_var_act` varchar(11) default NULL,
840 PRIMARY KEY (`category_id`),
841 UNIQUE KEY `description` (`description`)
844 -- --------------------------------------------------------
847 -- Structure for table `stock_master`
850 DROP TABLE IF EXISTS `0_stock_master`;
851 CREATE TABLE IF NOT EXISTS `0_stock_master` (
852 `stock_id` varchar(20) NOT NULL default '',
853 `category_id` int(11) NOT NULL default '0',
854 `tax_type_id` int(11) NOT NULL default '0',
855 `description` varchar(200) NOT NULL default '',
856 `long_description` tinytext NOT NULL,
857 `units` varchar(20) NOT NULL default 'each',
858 `mb_flag` char(1) NOT NULL default 'B',
859 `sales_account` varchar(11) NOT NULL default '',
860 `cogs_account` varchar(11) NOT NULL default '',
861 `inventory_account` varchar(11) NOT NULL default '',
862 `adjustment_account` varchar(11) NOT NULL default '',
863 `assembly_account` varchar(11) NOT NULL default '',
864 `dimension_id` int(11) default NULL,
865 `dimension2_id` int(11) default NULL,
866 `actual_cost` double NOT NULL default '0',
867 `last_cost` double NOT NULL default '0',
868 `material_cost` double NOT NULL default '0',
869 `labour_cost` double NOT NULL default '0',
870 `overhead_cost` double NOT NULL default '0',
871 PRIMARY KEY (`stock_id`)
874 -- --------------------------------------------------------
877 -- Structure for table `stock_moves`
880 DROP TABLE IF EXISTS `0_stock_moves`;
881 CREATE TABLE IF NOT EXISTS `0_stock_moves` (
882 `trans_id` int(11) NOT NULL auto_increment,
883 `trans_no` int(11) NOT NULL default '0',
884 `stock_id` char(20) NOT NULL default '',
885 `type` smallint(6) NOT NULL default '0',
886 `loc_code` char(5) NOT NULL default '',
887 `tran_date` date NOT NULL default '0000-00-00',
888 `person_id` int(11) default NULL,
889 `price` double NOT NULL default '0',
890 `reference` char(40) NOT NULL default '',
891 `qty` double NOT NULL default '1',
892 `discount_percent` double NOT NULL default '0',
893 `standard_cost` double NOT NULL default '0',
894 `visible` tinyint(1) NOT NULL default '1',
895 PRIMARY KEY (`trans_id`),
896 KEY `type` (`type`,`trans_no`)
899 -- --------------------------------------------------------
902 -- Structure for table `supp_allocations`
905 DROP TABLE IF EXISTS `0_supp_allocations`;
906 CREATE TABLE IF NOT EXISTS `0_supp_allocations` (
907 `id` int(11) NOT NULL auto_increment,
908 `amt` double unsigned default NULL,
909 `date_alloc` date NOT NULL default '0000-00-00',
910 `trans_no_from` int(11) default NULL,
911 `trans_type_from` int(11) default NULL,
912 `trans_no_to` int(11) default NULL,
913 `trans_type_to` int(11) default NULL,
917 -- --------------------------------------------------------
920 -- Structure for table `supp_invoice_items`
923 DROP TABLE IF EXISTS `0_supp_invoice_items`;
924 CREATE TABLE IF NOT EXISTS `0_supp_invoice_items` (
925 `id` int(11) NOT NULL auto_increment,
926 `supp_trans_no` int(11) default NULL,
927 `supp_trans_type` int(11) default NULL,
928 `gl_code` int(11) NOT NULL default '0',
929 `grn_item_id` int(11) default NULL,
930 `po_detail_item_id` int(11) default NULL,
931 `stock_id` varchar(20) NOT NULL default '',
932 `description` tinytext,
933 `quantity` double NOT NULL default '0',
934 `unit_price` double NOT NULL default '0',
935 `unit_tax` double NOT NULL default '0',
940 -- --------------------------------------------------------
943 -- Structure for table `supp_invoice_tax_items`
946 DROP TABLE IF EXISTS `0_supp_invoice_tax_items`;
947 CREATE TABLE IF NOT EXISTS `0_supp_invoice_tax_items` (
948 `id` int(11) NOT NULL auto_increment,
949 `supp_trans_no` int(11) default NULL,
950 `supp_trans_type` int(11) default NULL,
951 `tax_type_id` int(11) NOT NULL default '0',
952 `tax_type_name` varchar(60) default NULL,
953 `rate` double NOT NULL default '0',
954 `included_in_price` tinyint(1) NOT NULL default '0',
955 `amount` double NOT NULL default '0',
959 -- --------------------------------------------------------
962 -- Structure for table `supp_trans`
965 DROP TABLE IF EXISTS `0_supp_trans`;
966 CREATE TABLE IF NOT EXISTS `0_supp_trans` (
967 `trans_no` int(11) unsigned NOT NULL default '0',
968 `type` smallint(6) unsigned NOT NULL default '0',
969 `supplier_id` int(11) unsigned default NULL,
970 `reference` tinytext NOT NULL,
971 `supp_reference` varchar(60) NOT NULL default '',
972 `tran_date` date NOT NULL default '0000-00-00',
973 `due_date` date NOT NULL default '0000-00-00',
974 `ov_amount` double NOT NULL default '0',
975 `ov_discount` double NOT NULL default '0',
976 `ov_gst` double NOT NULL default '0',
977 `rate` double NOT NULL default '1',
978 `alloc` double NOT NULL default '0',
979 PRIMARY KEY (`trans_no`,`type`),
980 KEY `supplier_id` (`supplier_id`),
981 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
985 -- --------------------------------------------------------
988 -- Structure for table `suppliers`
991 DROP TABLE IF EXISTS `0_suppliers`;
992 CREATE TABLE IF NOT EXISTS `0_suppliers` (
993 `supplier_id` int(11) NOT NULL auto_increment,
994 `supp_name` varchar(60) NOT NULL default '',
995 `address` tinytext NOT NULL,
996 `email` varchar(100) NOT NULL default '',
997 `bank_account` varchar(60) NOT NULL default '',
998 `curr_code` char(3) default NULL,
999 `payment_terms` int(11) default NULL,
1000 `dimension_id` int(11) default '0',
1001 `dimension2_id` int(11) default '0',
1002 `tax_group_id` int(11) default NULL,
1003 `purchase_account` varchar(11) default NULL,
1004 `payable_account` varchar(11) default NULL,
1005 `payment_discount_account` varchar(11) default NULL,
1006 PRIMARY KEY (`supplier_id`)
1009 -- --------------------------------------------------------
1012 -- Structure for table `sys_types`
1015 DROP TABLE IF EXISTS `0_sys_types`;
1016 CREATE TABLE IF NOT EXISTS `0_sys_types` (
1017 `type_id` smallint(6) NOT NULL default '0',
1018 `type_name` varchar(60) NOT NULL default '',
1019 `type_no` int(11) NOT NULL default '1',
1020 `next_reference` varchar(100) NOT NULL default '',
1021 PRIMARY KEY (`type_id`)
1024 -- --------------------------------------------------------
1027 -- Structure for table `tax_group_items`
1030 DROP TABLE IF EXISTS `0_tax_group_items`;
1031 CREATE TABLE IF NOT EXISTS `0_tax_group_items` (
1032 `tax_group_id` int(11) NOT NULL default '0',
1033 `tax_type_id` int(11) NOT NULL default '0',
1034 `rate` double NOT NULL default '0',
1035 `included_in_price` tinyint(1) NOT NULL default '0',
1036 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1039 -- --------------------------------------------------------
1042 -- Structure for table `tax_groups`
1045 DROP TABLE IF EXISTS `0_tax_groups`;
1046 CREATE TABLE IF NOT EXISTS `0_tax_groups` (
1047 `id` int(11) NOT NULL auto_increment,
1048 `name` varchar(60) NOT NULL default '',
1049 `tax_shipping` tinyint(1) NOT NULL default '0',
1051 UNIQUE KEY `name` (`name`)
1054 -- --------------------------------------------------------
1057 -- Structure for table `tax_types`
1060 DROP TABLE IF EXISTS `0_tax_types`;
1061 CREATE TABLE IF NOT EXISTS `0_tax_types` (
1062 `id` int(11) NOT NULL auto_increment,
1063 `rate` double NOT NULL default '0',
1064 `sales_gl_code` varchar(11) NOT NULL default '',
1065 `purchasing_gl_code` varchar(11) NOT NULL default '',
1066 `name` varchar(60) NOT NULL default '',
1067 `out` tinyint(1) NOT NULL default '1',
1069 UNIQUE KEY `name` (`name`)
1072 -- --------------------------------------------------------
1075 -- Structure for table `users`
1078 DROP TABLE IF EXISTS `0_users`;
1079 CREATE TABLE IF NOT EXISTS `0_users` (
1080 `user_id` varchar(60) NOT NULL default '',
1081 `password` varchar(100) NOT NULL default '',
1082 `real_name` varchar(100) NOT NULL default '',
1083 `full_access` int(11) NOT NULL default '1',
1084 `phone` varchar(30) NOT NULL default '',
1085 `email` varchar(100) default NULL,
1086 `language` varchar(20) default NULL,
1087 `date_format` tinyint(1) NOT NULL default '0',
1088 `date_sep` tinyint(1) NOT NULL default '0',
1089 `tho_sep` tinyint(1) NOT NULL default '0',
1090 `dec_sep` tinyint(1) NOT NULL default '0',
1091 `theme` varchar(20) NOT NULL default 'default',
1092 `page_size` varchar(20) NOT NULL default 'A4',
1093 `prices_dec` smallint(6) NOT NULL default '2',
1094 `qty_dec` smallint(6) NOT NULL default '2',
1095 `rates_dec` smallint(6) NOT NULL default '4',
1096 `percent_dec` smallint(6) NOT NULL default '1',
1097 `show_gl` tinyint(1) NOT NULL default '1',
1098 `show_codes` tinyint(1) NOT NULL default '0',
1099 `last_visit_date` datetime default NULL,
1100 PRIMARY KEY (`user_id`)
1103 -- --------------------------------------------------------
1106 -- Structure for table `voided`
1109 DROP TABLE IF EXISTS `0_voided`;
1110 CREATE TABLE IF NOT EXISTS `0_voided` (
1111 `type` int(11) NOT NULL default '0',
1112 `id` int(11) NOT NULL default '0',
1113 `date_` date NOT NULL default '0000-00-00',
1114 `memo_` tinytext NOT NULL,
1115 UNIQUE KEY `id` (`type`,`id`)
1118 -- --------------------------------------------------------
1121 -- Structure for table `wo_issue_items`
1124 DROP TABLE IF EXISTS `0_wo_issue_items`;
1125 CREATE TABLE IF NOT EXISTS `0_wo_issue_items` (
1126 `id` int(11) NOT NULL auto_increment,
1127 `stock_id` varchar(40) default NULL,
1128 `issue_id` int(11) default NULL,
1129 `qty_issued` double default NULL,
1133 -- --------------------------------------------------------
1136 -- Structure for table `wo_issues`
1139 DROP TABLE IF EXISTS `0_wo_issues`;
1140 CREATE TABLE IF NOT EXISTS `0_wo_issues` (
1141 `issue_no` int(11) NOT NULL auto_increment,
1142 `workorder_id` int(11) NOT NULL default '0',
1143 `reference` varchar(100) default NULL,
1144 `issue_date` date default NULL,
1145 `loc_code` varchar(5) default NULL,
1146 `workcentre_id` int(11) default NULL,
1147 PRIMARY KEY (`issue_no`)
1150 -- --------------------------------------------------------
1153 -- Structure for table `wo_manufacture`
1156 DROP TABLE IF EXISTS `0_wo_manufacture`;
1157 CREATE TABLE IF NOT EXISTS `0_wo_manufacture` (
1158 `id` int(11) NOT NULL auto_increment,
1159 `reference` varchar(100) default NULL,
1160 `workorder_id` int(11) NOT NULL default '0',
1161 `quantity` double NOT NULL default '0',
1162 `date_` date NOT NULL default '0000-00-00',
1166 -- --------------------------------------------------------
1169 -- Structure for table `wo_requirements`
1172 DROP TABLE IF EXISTS `0_wo_requirements`;
1173 CREATE TABLE IF NOT EXISTS `0_wo_requirements` (
1174 `id` int(11) NOT NULL auto_increment,
1175 `workorder_id` int(11) NOT NULL default '0',
1176 `stock_id` char(20) NOT NULL default '',
1177 `workcentre` char(5) NOT NULL default '',
1178 `units_req` double NOT NULL default '1',
1179 `std_cost` double NOT NULL default '0',
1180 `loc_code` char(5) NOT NULL default '',
1181 `units_issued` double NOT NULL default '0',
1185 -- --------------------------------------------------------
1188 -- Structure for table `workcentres`
1191 DROP TABLE IF EXISTS `0_workcentres`;
1192 CREATE TABLE IF NOT EXISTS `0_workcentres` (
1193 `id` int(11) NOT NULL auto_increment,
1194 `name` char(40) NOT NULL default '',
1195 `description` char(50) NOT NULL default '',
1197 UNIQUE KEY `name` (`name`)
1200 -- --------------------------------------------------------
1203 -- Structure for table `workorders`
1206 DROP TABLE IF EXISTS `0_workorders`;
1207 CREATE TABLE IF NOT EXISTS `0_workorders` (
1208 `id` int(11) NOT NULL auto_increment,
1209 `wo_ref` varchar(60) NOT NULL default '',
1210 `loc_code` varchar(5) NOT NULL default '',
1211 `units_reqd` double NOT NULL default '1',
1212 `stock_id` varchar(20) NOT NULL default '',
1213 `date_` date NOT NULL default '0000-00-00',
1214 `type` tinyint(4) NOT NULL default '0',
1215 `required_by` date NOT NULL default '0000-00-00',
1216 `released_date` date NOT NULL default '0000-00-00',
1217 `units_issued` double NOT NULL default '0',
1218 `closed` tinyint(1) NOT NULL default '0',
1219 `released` tinyint(1) NOT NULL default '0',
1220 `additional_costs` double NOT NULL default '0',
1222 UNIQUE KEY `wo_ref` (`wo_ref`)
1225 -- --------------------------------------------------------
1228 -- Data in table `areas`
1231 INSERT INTO `0_areas` VALUES (1, 'USA');
1234 -- Data in table `bank_accounts`
1237 INSERT INTO `0_bank_accounts` VALUES ('1700', 0, 'Current account', 'N/A', 'N/A', NULL, 'USD');
1238 INSERT INTO `0_bank_accounts` VALUES ('1705', 0, 'Petty Cash account', 'N/A', 'N/A', NULL, 'USD');
1241 -- Data in table `bank_trans_types`
1244 INSERT INTO `0_bank_trans_types` VALUES (1, 'Cash');
1245 INSERT INTO `0_bank_trans_types` VALUES (2, 'Transfer');
1248 -- Data in table `chart_class`
1251 INSERT INTO `0_chart_class` VALUES (1, 'Assets', 1);
1252 INSERT INTO `0_chart_class` VALUES (2, 'Liabilities', 1);
1253 INSERT INTO `0_chart_class` VALUES (3, 'Income', 0);
1254 INSERT INTO `0_chart_class` VALUES (4, 'Costs', 0);
1257 -- Data in table `chart_master`
1260 INSERT INTO `0_chart_master` VALUES ('3000', NULL, 'Sales', 1, 1);
1261 INSERT INTO `0_chart_master` VALUES ('3010', NULL, 'Sales - Wholesale', 1, 1);
1262 INSERT INTO `0_chart_master` VALUES ('3020', NULL, 'Sales of Other items', 1, 1);
1263 INSERT INTO `0_chart_master` VALUES ('3400', NULL, 'Difference On Exchange', 1, 0);
1264 INSERT INTO `0_chart_master` VALUES ('5000', NULL, 'Direct Labour', 2, 0);
1265 INSERT INTO `0_chart_master` VALUES ('5050', NULL, 'Direct Labour Recovery', 2, 0);
1266 INSERT INTO `0_chart_master` VALUES ('4200', NULL, 'Material Usage Varaiance', 2, 4);
1267 INSERT INTO `0_chart_master` VALUES ('4210', NULL, 'Consumable Materials', 2, 4);
1268 INSERT INTO `0_chart_master` VALUES ('4220', NULL, 'Purchase price Variance', 2, 0);
1269 INSERT INTO `0_chart_master` VALUES ('4000', NULL, 'Purchases of materials', 2, 4);
1270 INSERT INTO `0_chart_master` VALUES ('4250', NULL, 'Discounts Received', 2, 0);
1271 INSERT INTO `0_chart_master` VALUES ('4260', NULL, 'Exchange Variation', 2, 0);
1272 INSERT INTO `0_chart_master` VALUES ('4300', NULL, 'Freight Inwards', 2, 4);
1273 INSERT INTO `0_chart_master` VALUES ('4010', NULL, 'Cost of Goods Sold - Retail', 2, 4);
1274 INSERT INTO `0_chart_master` VALUES ('6790', NULL, 'Bank Charges', 5, 4);
1275 INSERT INTO `0_chart_master` VALUES ('6800', NULL, 'Entertainments', 5, 4);
1276 INSERT INTO `0_chart_master` VALUES ('6810', NULL, 'Legal Expenses', 5, 4);
1277 INSERT INTO `0_chart_master` VALUES ('6600', NULL, 'Repairs and Maintenance Office', 5, 4);
1278 INSERT INTO `0_chart_master` VALUES ('6730', NULL, 'phone', 5, 4);
1279 INSERT INTO `0_chart_master` VALUES ('8200', NULL, 'Bank Interest', 52, 0);
1280 INSERT INTO `0_chart_master` VALUES ('6840', NULL, 'Credit Control', 5, 0);
1281 INSERT INTO `0_chart_master` VALUES ('7040', NULL, 'Depreciation Office Equipment', 51, 0);
1282 INSERT INTO `0_chart_master` VALUES ('3800', NULL, 'Freight Outwards', 5, 4);
1283 INSERT INTO `0_chart_master` VALUES ('4500', NULL, 'Packaging', 5, 4);
1284 INSERT INTO `0_chart_master` VALUES ('6400', NULL, 'Commissions', 5, 0);
1285 INSERT INTO `0_chart_master` VALUES ('3200', NULL, 'Prompt Payment Discounts', 1, 0);
1286 INSERT INTO `0_chart_master` VALUES ('6700', NULL, 'General Expenses', 5, 4);
1287 INSERT INTO `0_chart_master` VALUES ('5200', NULL, 'Indirect Labour', 2, 0);
1288 INSERT INTO `0_chart_master` VALUES ('5210', NULL, 'Overhead Recovery', 5, 0);
1289 INSERT INTO `0_chart_master` VALUES ('1700', NULL, 'Bank account', 10, 0);
1290 INSERT INTO `0_chart_master` VALUES ('1705', NULL, 'Petty Cash', 10, 0);
1291 INSERT INTO `0_chart_master` VALUES ('1710', NULL, 'Foreign currency account', 10, 0);
1292 INSERT INTO `0_chart_master` VALUES ('1500', NULL, 'Accounts Receivable', 20, 0);
1293 INSERT INTO `0_chart_master` VALUES ('1400', NULL, 'Stocks of Raw Materials', 45, 0);
1294 INSERT INTO `0_chart_master` VALUES ('1410', NULL, 'Stocks of Work In Progress', 45, 0);
1295 INSERT INTO `0_chart_master` VALUES ('1420', NULL, 'Stocks of Finsihed Goods', 45, 0);
1296 INSERT INTO `0_chart_master` VALUES ('1430', NULL, 'Goods Received Clearing account', 30, 0);
1297 INSERT INTO `0_chart_master` VALUES ('2630', NULL, 'Accounts Payable', 30, 0);
1298 INSERT INTO `0_chart_master` VALUES ('2660', NULL, 'VAT out 5', 30, 0);
1299 INSERT INTO `0_chart_master` VALUES ('2662', NULL, 'VAT out 1', 30, 0);
1300 INSERT INTO `0_chart_master` VALUES ('2664', NULL, 'VAT out 25', 30, 0);
1301 INSERT INTO `0_chart_master` VALUES ('2680', NULL, 'VAT In 5', 30, 0);
1302 INSERT INTO `0_chart_master` VALUES ('2682', NULL, 'VAT In 25', 30, 0);
1303 INSERT INTO `0_chart_master` VALUES ('2050', NULL, 'Retained Earnings', 50, 0);
1304 INSERT INTO `0_chart_master` VALUES ('2000', NULL, 'Share Capital', 50, 0);
1307 -- Data in table `chart_types`
1310 INSERT INTO `0_chart_types` VALUES (1, 'Sales', 3, -1);
1311 INSERT INTO `0_chart_types` VALUES (2, 'Cost of Sales', 4, -1);
1312 INSERT INTO `0_chart_types` VALUES (5, 'Expenses', 4, -1);
1313 INSERT INTO `0_chart_types` VALUES (10, 'Cash/Bank', 1, -1);
1314 INSERT INTO `0_chart_types` VALUES (20, 'Accounts Receivable', 1, -1);
1315 INSERT INTO `0_chart_types` VALUES (30, 'Accounts Payable', 2, -1);
1316 INSERT INTO `0_chart_types` VALUES (40, 'Fixed Assets', 1, -1);
1317 INSERT INTO `0_chart_types` VALUES (45, 'Inventory', 1, -1);
1318 INSERT INTO `0_chart_types` VALUES (50, 'Equity', 2, -1);
1319 INSERT INTO `0_chart_types` VALUES (51, 'Depreciations', 4, -1);
1320 INSERT INTO `0_chart_types` VALUES (52, 'Financials', 4, -1);
1323 -- Data in table `company`
1326 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);
1329 -- Data in table `credit_status`
1332 INSERT INTO `0_credit_status` VALUES (1, 'Good History', 0);
1333 INSERT INTO `0_credit_status` VALUES (3, 'No more work until payment received', 1);
1334 INSERT INTO `0_credit_status` VALUES (4, 'In liquidation', 1);
1337 -- Data in table `currencies`
1340 INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents');
1341 INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence');
1342 INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents');
1345 -- Data in table `fiscal_year`
1348 INSERT INTO `0_fiscal_year` VALUES (1, '2007-01-01', '2007-12-31', 0);
1351 -- Data in table `locations`
1354 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '');
1357 -- Data in table `movement_types`
1360 INSERT INTO `0_movement_types` VALUES (1, 'Adjustment');
1363 -- Data in table `payment_terms`
1366 INSERT INTO `0_payment_terms` VALUES (1, 'Due 15th Of the Following Month', 0, 17);
1367 INSERT INTO `0_payment_terms` VALUES (2, 'Due By End Of The Following Month', 0, 30);
1368 INSERT INTO `0_payment_terms` VALUES (3, 'Payment due within 10 days', 10, 0);
1369 INSERT INTO `0_payment_terms` VALUES (4, 'Cash Only', 1, 0);
1372 -- Data in table `sales_types`
1375 INSERT INTO `0_sales_types` VALUES (1, 'Retail');
1376 INSERT INTO `0_sales_types` VALUES (2, 'Wholesale');
1379 -- Data in table `salesman`
1382 INSERT INTO `0_salesman` VALUES (1, 'Sales Person', '', '', '');
1385 -- Data in table `shippers`
1388 INSERT INTO `0_shippers` VALUES (1, 'Default', '', '', '');
1391 -- Data in table `stock_category`
1394 INSERT INTO `0_stock_category` VALUES (1, 'Components', NULL, NULL, NULL, NULL);
1395 INSERT INTO `0_stock_category` VALUES (2, 'Charges', NULL, NULL, NULL, NULL);
1396 INSERT INTO `0_stock_category` VALUES (3, 'Systems', NULL, NULL, NULL, NULL);
1397 INSERT INTO `0_stock_category` VALUES (4, 'Services', NULL, NULL, NULL, NULL);
1400 -- Data in table `sys_types`
1403 INSERT INTO `0_sys_types` VALUES (0, 'Journal - GL', 17, '1');
1404 INSERT INTO `0_sys_types` VALUES (1, 'Payment - GL', 7, '1');
1405 INSERT INTO `0_sys_types` VALUES (2, 'Receipt - GL', 4, '1');
1406 INSERT INTO `0_sys_types` VALUES (4, 'Funds Transfer', 3, '1');
1407 INSERT INTO `0_sys_types` VALUES (10, 'Sales Invoice', 16, '1');
1408 INSERT INTO `0_sys_types` VALUES (11, 'Credit Note', 2, '1');
1409 INSERT INTO `0_sys_types` VALUES (12, 'Receipt', 6, '1');
1410 INSERT INTO `0_sys_types` VALUES (16, 'Location Transfer', 2, '1');
1411 INSERT INTO `0_sys_types` VALUES (17, 'Inventory Adjustment', 2, '1');
1412 INSERT INTO `0_sys_types` VALUES (18, 'Purchase Order', 1, '1');
1413 INSERT INTO `0_sys_types` VALUES (20, 'Supplier Invoice', 6, '1');
1414 INSERT INTO `0_sys_types` VALUES (21, 'Supplier Credit Note', 1, '1');
1415 INSERT INTO `0_sys_types` VALUES (22, 'Supplier Payment', 3, '1');
1416 INSERT INTO `0_sys_types` VALUES (25, 'Purchase Order Delivery', 1, '1');
1417 INSERT INTO `0_sys_types` VALUES (26, 'Work Order', 1, '1');
1418 INSERT INTO `0_sys_types` VALUES (28, 'Work Order Issue', 1, '1');
1419 INSERT INTO `0_sys_types` VALUES (29, 'Work Order Production', 1, '1');
1420 INSERT INTO `0_sys_types` VALUES (30, 'Sales Order', 1, '1');
1421 INSERT INTO `0_sys_types` VALUES (35, 'Cost Update', 1, '1');
1422 INSERT INTO `0_sys_types` VALUES (40, 'Dimension', 1, '1');
1425 -- Data in table `users`
1428 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');