diff --git a/inoerp/engine/install/inoerp.sql b/inoerp/engine/install/inoerp.sql index bdf1e40b6..b8e3a9ef0 100644 --- a/inoerp/engine/install/inoerp.sql +++ b/inoerp/engine/install/inoerp.sql @@ -1,3 +1,12 @@ +-- phpMyAdmin SQL Dump +-- version 4.5.1 +-- http://www.phpmyadmin.net +-- +-- Host: 127.0.0.1 +-- Generation Time: Mar 29, 2016 at 06:03 AM +-- Server version: 10.1.9-MariaDB +-- PHP Version: 7.0.1 + SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; @@ -5,7 +14,7 @@ SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; -- -- Database: `inoerp` @@ -17,8 +26,8 @@ SET time_zone = "+00:00"; -- Table structure for table `address` -- -CREATE TABLE IF NOT EXISTS `address` ( - `address_id` int(10) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `address` ( + `address_id` int(10) UNSIGNED NOT NULL, `type` varchar(20) DEFAULT 'both', `address_name` varchar(50) DEFAULT NULL, `mdm_tax_region_id` int(12) DEFAULT NULL, @@ -36,12 +45,8 @@ CREATE TABLE IF NOT EXISTS `address` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`address_id`), - UNIQUE KEY `name` (`address_name`), - UNIQUE KEY `address` (`address_name`), - UNIQUE KEY `address_name` (`address_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=105 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `address` @@ -70,15 +75,13 @@ INSERT INTO `address` (`address_id`, `type`, `address_name`, `mdm_tax_region_id` -- Table structure for table `address_reference` -- -CREATE TABLE IF NOT EXISTS `address_reference` ( - `address_reference_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `address_reference` ( + `address_reference_id` int(12) UNSIGNED NOT NULL, `address_id` int(12) NOT NULL, `reference_table` varchar(50) NOT NULL, `reference_id` int(12) NOT NULL, - `status` varchar(25) DEFAULT NULL, - PRIMARY KEY (`address_reference_id`), - UNIQUE KEY `address_id` (`address_id`,`reference_table`,`reference_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `status` varchar(25) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `address_reference` @@ -96,8 +99,8 @@ INSERT INTO `address_reference` (`address_reference_id`, `address_id`, `referenc -- Table structure for table `adm_task_status` -- -CREATE TABLE IF NOT EXISTS `adm_task_status` ( - `adm_task_status_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `adm_task_status` ( + `adm_task_status_id` int(12) NOT NULL, `status` varchar(25) NOT NULL, `access_level` varchar(25) DEFAULT NULL, `start_by` varchar(50) NOT NULL, @@ -112,9 +115,8 @@ CREATE TABLE IF NOT EXISTS `adm_task_status` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`adm_task_status_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -122,8 +124,8 @@ CREATE TABLE IF NOT EXISTS `adm_task_status` ( -- Table structure for table `adm_task_template_header` -- -CREATE TABLE IF NOT EXISTS `adm_task_template_header` ( - `adm_task_template_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `adm_task_template_header` ( + `adm_task_template_header_id` int(12) NOT NULL, `template_name` varchar(25) NOT NULL, `description` varchar(255) DEFAULT NULL, `application` varchar(25) DEFAULT NULL, @@ -133,9 +135,8 @@ CREATE TABLE IF NOT EXISTS `adm_task_template_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`adm_task_template_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -143,8 +144,8 @@ CREATE TABLE IF NOT EXISTS `adm_task_template_header` ( -- Table structure for table `adm_task_template_line` -- -CREATE TABLE IF NOT EXISTS `adm_task_template_line` ( - `adm_task_template_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `adm_task_template_line` ( + `adm_task_template_line_id` int(12) NOT NULL, `adm_task_template_header_id` int(12) NOT NULL, `status` varchar(25) NOT NULL, `task_type_id` int(12) NOT NULL, @@ -164,9 +165,8 @@ CREATE TABLE IF NOT EXISTS `adm_task_template_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`adm_task_template_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -174,8 +174,8 @@ CREATE TABLE IF NOT EXISTS `adm_task_template_line` ( -- Table structure for table `adm_task_type` -- -CREATE TABLE IF NOT EXISTS `adm_task_type` ( - `adm_task_type_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `adm_task_type` ( + `adm_task_type_id` int(12) NOT NULL, `access_level` varchar(25) NOT NULL, `task_type` varchar(50) NOT NULL, `process_flow_header_id` int(12) DEFAULT NULL, @@ -189,9 +189,8 @@ CREATE TABLE IF NOT EXISTS `adm_task_type` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`adm_task_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `adm_task_type` @@ -207,8 +206,8 @@ INSERT INTO `adm_task_type` (`adm_task_type_id`, `access_level`, `task_type`, `p -- Table structure for table `am_activity_reference` -- -CREATE TABLE IF NOT EXISTS `am_activity_reference` ( - `am_activity_reference_id` int(10) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `am_activity_reference` ( + `am_activity_reference_id` int(10) UNSIGNED NOT NULL, `am_asset_id` int(12) NOT NULL, `activity_item_id_m` int(12) NOT NULL, `priority` int(14) DEFAULT NULL, @@ -224,12 +223,8 @@ CREATE TABLE IF NOT EXISTS `am_activity_reference` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`am_activity_reference_id`), - UNIQUE KEY `asset_number` (`am_asset_id`), - UNIQUE KEY `tag_number` (`priority`), - UNIQUE KEY `asset_number_2` (`am_asset_id`,`start_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `am_activity_reference` @@ -245,8 +240,8 @@ INSERT INTO `am_activity_reference` (`am_activity_reference_id`, `am_asset_id`, -- Table structure for table `am_asset` -- -CREATE TABLE IF NOT EXISTS `am_asset` ( - `am_asset_id` int(10) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `am_asset` ( + `am_asset_id` int(10) UNSIGNED NOT NULL, `asset_number` varchar(50) NOT NULL, `type` varchar(25) NOT NULL, `tag_number` varchar(50) DEFAULT NULL, @@ -274,12 +269,8 @@ CREATE TABLE IF NOT EXISTS `am_asset` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`am_asset_id`), - UNIQUE KEY `asset_number` (`asset_number`), - UNIQUE KEY `tag_number` (`tag_number`), - UNIQUE KEY `asset_number_2` (`asset_number`,`serial_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `am_asset` @@ -295,8 +286,8 @@ INSERT INTO `am_asset` (`am_asset_id`, `asset_number`, `type`, `tag_number`, `se -- Table structure for table `am_maintenance_schedule` -- -CREATE TABLE IF NOT EXISTS `am_maintenance_schedule` ( - `am_maintenance_schedule_id` int(10) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `am_maintenance_schedule` ( + `am_maintenance_schedule_id` int(10) UNSIGNED NOT NULL, `schedule_name` varchar(25) NOT NULL, `schedule_number` int(12) DEFAULT NULL, `item_id_m` int(12) DEFAULT NULL, @@ -319,10 +310,8 @@ CREATE TABLE IF NOT EXISTS `am_maintenance_schedule` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`am_maintenance_schedule_id`), - UNIQUE KEY `schedule_name` (`schedule_name`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `am_maintenance_schedule` @@ -339,8 +328,8 @@ INSERT INTO `am_maintenance_schedule` (`am_maintenance_schedule_id`, `schedule_n -- Table structure for table `am_meter` -- -CREATE TABLE IF NOT EXISTS `am_meter` ( - `am_meter_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `am_meter` ( + `am_meter_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `name` varchar(50) NOT NULL, `type` varchar(25) DEFAULT NULL, @@ -356,10 +345,8 @@ CREATE TABLE IF NOT EXISTS `am_meter` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`am_meter_id`), - UNIQUE KEY `base_interval_days` (`type`,`from_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `am_meter` @@ -374,8 +361,8 @@ INSERT INTO `am_meter` (`am_meter_id`, `org_id`, `name`, `type`, `uom_id`, `from -- Table structure for table `am_ms_activity_reference` -- -CREATE TABLE IF NOT EXISTS `am_ms_activity_reference` ( - `am_ms_activity_reference_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `am_ms_activity_reference` ( + `am_ms_activity_reference_id` int(12) UNSIGNED NOT NULL, `am_maintenance_schedule_id` int(12) NOT NULL, `activity_item_id_m` int(12) NOT NULL, `last_date` date DEFAULT NULL, @@ -388,10 +375,8 @@ CREATE TABLE IF NOT EXISTS `am_ms_activity_reference` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`am_ms_activity_reference_id`), - UNIQUE KEY `am_maintenance_schedule_id` (`am_maintenance_schedule_id`,`activity_item_id_m`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `am_ms_activity_reference` @@ -408,18 +393,16 @@ INSERT INTO `am_ms_activity_reference` (`am_ms_activity_reference_id`, `am_maint -- Table structure for table `am_ms_calendar_date` -- -CREATE TABLE IF NOT EXISTS `am_ms_calendar_date` ( - `am_ms_calendar_date_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `am_ms_calendar_date` ( + `am_ms_calendar_date_id` int(12) UNSIGNED NOT NULL, `am_maintenance_schedule_id` int(12) NOT NULL, `date` date DEFAULT NULL, `description` varchar(256) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`am_ms_calendar_date_id`), - UNIQUE KEY `am_maintenance_schedule_id` (`am_maintenance_schedule_id`,`date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `am_ms_calendar_date` @@ -436,8 +419,8 @@ INSERT INTO `am_ms_calendar_date` (`am_ms_calendar_date_id`, `am_maintenance_sch -- Table structure for table `am_ms_date_rule` -- -CREATE TABLE IF NOT EXISTS `am_ms_date_rule` ( - `am_ms_date_rule_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `am_ms_date_rule` ( + `am_ms_date_rule_id` int(12) UNSIGNED NOT NULL, `am_maintenance_schedule_id` int(12) NOT NULL, `base_interval_days` decimal(15,5) DEFAULT NULL, `cycle_interval_days` decimal(15,5) DEFAULT NULL, @@ -447,10 +430,8 @@ CREATE TABLE IF NOT EXISTS `am_ms_date_rule` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`am_ms_date_rule_id`), - UNIQUE KEY `base_interval_days` (`base_interval_days`,`from_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `am_ms_date_rule` @@ -466,8 +447,8 @@ INSERT INTO `am_ms_date_rule` (`am_ms_date_rule_id`, `am_maintenance_schedule_id -- Table structure for table `am_ms_meter_rule` -- -CREATE TABLE IF NOT EXISTS `am_ms_meter_rule` ( - `am_ms_meter_rule_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `am_ms_meter_rule` ( + `am_ms_meter_rule_id` int(12) UNSIGNED NOT NULL, `am_maintenance_schedule_id` int(12) NOT NULL, `am_meter_id` int(12) DEFAULT NULL, `from_date` date DEFAULT NULL, @@ -478,10 +459,8 @@ CREATE TABLE IF NOT EXISTS `am_ms_meter_rule` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`am_ms_meter_rule_id`), - UNIQUE KEY `am_maintenance_schedule_id` (`am_maintenance_schedule_id`,`am_meter_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `am_ms_meter_rule` @@ -497,8 +476,8 @@ INSERT INTO `am_ms_meter_rule` (`am_ms_meter_rule_id`, `am_maintenance_schedule_ -- Table structure for table `am_planned_wo` -- -CREATE TABLE IF NOT EXISTS `am_planned_wo` ( - `am_wo_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `am_planned_wo` ( + `am_wo_header_id` int(12) NOT NULL, `am_asset_id` int(12) NOT NULL, `activity_item_id_m` int(12) NOT NULL, `wo_number` varchar(50) DEFAULT NULL, @@ -530,9 +509,8 @@ CREATE TABLE IF NOT EXISTS `am_planned_wo` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`am_wo_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -540,10 +518,10 @@ CREATE TABLE IF NOT EXISTS `am_planned_wo` ( -- Table structure for table `am_wo_bom` -- -CREATE TABLE IF NOT EXISTS `am_wo_bom` ( - `am_wo_bom_id` int(12) unsigned NOT NULL AUTO_INCREMENT, - `am_wo_header_id` int(12) unsigned NOT NULL, - `bom_sequence` int(10) unsigned NOT NULL, +CREATE TABLE `am_wo_bom` ( + `am_wo_bom_id` int(12) UNSIGNED NOT NULL, + `am_wo_header_id` int(12) UNSIGNED NOT NULL, + `bom_sequence` int(10) UNSIGNED NOT NULL, `routing_sequence` int(12) DEFAULT NULL, `component_item_id_m` int(12) NOT NULL, `component_revision` varchar(10) DEFAULT NULL, @@ -566,11 +544,8 @@ CREATE TABLE IF NOT EXISTS `am_wo_bom` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`am_wo_bom_id`), - UNIQUE KEY `bom_header_id` (`am_wo_header_id`,`bom_sequence`), - UNIQUE KEY `bom_header_id_2` (`am_wo_header_id`,`routing_sequence`,`component_item_id_m`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=49 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `am_wo_bom` @@ -632,8 +607,8 @@ INSERT INTO `am_wo_bom` (`am_wo_bom_id`, `am_wo_header_id`, `bom_sequence`, `rou -- Table structure for table `am_wo_header` -- -CREATE TABLE IF NOT EXISTS `am_wo_header` ( - `am_wo_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `am_wo_header` ( + `am_wo_header_id` int(12) NOT NULL, `am_asset_id` int(12) NOT NULL, `activity_item_id_m` int(12) NOT NULL, `wo_number` varchar(50) DEFAULT NULL, @@ -668,9 +643,8 @@ CREATE TABLE IF NOT EXISTS `am_wo_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`am_wo_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=25 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `am_wo_header` @@ -708,8 +682,8 @@ INSERT INTO `am_wo_header` (`am_wo_header_id`, `am_asset_id`, `activity_item_id_ -- Table structure for table `am_wo_routing_detail` -- -CREATE TABLE IF NOT EXISTS `am_wo_routing_detail` ( - `am_wo_routing_detail_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `am_wo_routing_detail` ( + `am_wo_routing_detail_id` int(12) NOT NULL, `am_wo_routing_line_id` int(12) NOT NULL, `am_wo_header_id` int(12) NOT NULL, `resource_sequence` int(12) NOT NULL, @@ -725,10 +699,8 @@ CREATE TABLE IF NOT EXISTS `am_wo_routing_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`am_wo_routing_detail_id`), - UNIQUE KEY `wip_wo_routing_line_id` (`am_wo_routing_line_id`,`resource_sequence`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=24 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `am_wo_routing_detail` @@ -765,8 +737,8 @@ INSERT INTO `am_wo_routing_detail` (`am_wo_routing_detail_id`, `am_wo_routing_li -- Table structure for table `am_wo_routing_line` -- -CREATE TABLE IF NOT EXISTS `am_wo_routing_line` ( - `am_wo_routing_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `am_wo_routing_line` ( + `am_wo_routing_line_id` int(12) NOT NULL, `am_wo_header_id` int(12) NOT NULL, `routing_sequence` int(12) NOT NULL DEFAULT '1', `standard_operation_id` int(12) DEFAULT NULL, @@ -789,10 +761,8 @@ CREATE TABLE IF NOT EXISTS `am_wo_routing_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`am_wo_routing_line_id`), - UNIQUE KEY `bom_header_id` (`am_wo_header_id`,`routing_sequence`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=24 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `am_wo_routing_line` @@ -828,7 +798,7 @@ INSERT INTO `am_wo_routing_line` (`am_wo_routing_line_id`, `am_wo_header_id`, `r -- -- Stand-in structure for view `ap_import_claim_v` -- -CREATE TABLE IF NOT EXISTS `ap_import_claim_v` ( +CREATE TABLE `ap_import_claim_v` ( `claim_number` varchar(25) ,`hr_expense_header_id` int(12) unsigned ,`bu_org_id` int(12) @@ -848,14 +818,15 @@ CREATE TABLE IF NOT EXISTS `ap_import_claim_v` ( ,`last_name` varchar(50) ,`identification_id` varchar(50) ); + -- -------------------------------------------------------- -- -- Table structure for table `ap_payable_control` -- -CREATE TABLE IF NOT EXISTS `ap_payable_control` ( - `ap_payable_control_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `ap_payable_control` ( + `ap_payable_control_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `payment_term_id` int(12) DEFAULT NULL, `ship_to_id` int(12) DEFAULT NULL, @@ -877,10 +848,8 @@ CREATE TABLE IF NOT EXISTS `ap_payable_control` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ap_payable_control_id`), - UNIQUE KEY `org` (`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ap_payable_control` @@ -894,7 +863,7 @@ INSERT INTO `ap_payable_control` (`ap_payable_control_id`, `org_id`, `payment_te -- -- Stand-in structure for view `ap_payment_all_v` -- -CREATE TABLE IF NOT EXISTS `ap_payment_all_v` ( +CREATE TABLE `ap_payment_all_v` ( `ap_payment_header_id` int(12) ,`bu_org_id` int(12) ,`payment_type` varchar(25) @@ -925,14 +894,15 @@ CREATE TABLE IF NOT EXISTS `ap_payment_all_v` ( ,`supplier_site_name` varchar(60) ,`supplier_site_number` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `ap_payment_header` -- -CREATE TABLE IF NOT EXISTS `ap_payment_header` ( - `ap_payment_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ap_payment_header` ( + `ap_payment_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `payment_type` varchar(25) DEFAULT NULL, `payment_number` varchar(25) DEFAULT NULL, @@ -964,10 +934,8 @@ CREATE TABLE IF NOT EXISTS `ap_payment_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ap_payment_header_id`), - UNIQUE KEY `transaction_number` (`payment_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=122 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ap_payment_header` @@ -1092,8 +1060,7 @@ INSERT INTO `ap_payment_header` (`ap_payment_header_id`, `bu_org_id`, `payment_t (117, 8, 'MULTI_SELECT', '8-117', 2, 3, NULL, '', NULL, NULL, '12.00000', 'USD', '', NULL, NULL, NULL, '', '2015-07-25', '', 19, 30, '', NULL, NULL, '', NULL, NULL, NULL, 0, 34, '2015-07-25 13:46:56', 34, '2015-07-25 13:46:56'), (118, 8, 'MANUAL', '8-118', 2, 3, NULL, '', NULL, NULL, '12.00000', 'USD', '', NULL, NULL, NULL, '', '2015-07-25', '', 19, 30, '', NULL, NULL, '', NULL, NULL, NULL, 0, 34, '2015-07-25 14:15:53', 34, '2015-07-25 14:15:53'), (119, 5, 'MANUAL', '5-119', 2, 26, NULL, '', NULL, NULL, '10000.00000', 'USD', 'USD', NULL, NULL, NULL, '', '2015-07-25', '', 19, 30, '', NULL, NULL, '', NULL, NULL, NULL, 295, 34, '2015-07-25 15:01:53', 34, '2015-07-25 15:06:28'), -(120, 5, 'MANUAL', '5-120', 2, 26, NULL, '', NULL, NULL, '17000.00000', 'USD', 'USD', NULL, NULL, NULL, '', '2015-07-25', '', 19, 30, '', NULL, NULL, '', NULL, NULL, NULL, 297, 34, '2015-07-25 15:39:34', 34, '2015-07-25 15:41:16'), -(121, 5, 'MANUAL', '5-121', 2, 19, NULL, '', NULL, NULL, '400.00000', 'USD', 'USD', NULL, NULL, NULL, '', '0000-00-00', '', 19, 30, '', NULL, NULL, '', NULL, NULL, NULL, 0, 34, '2016-01-13 08:20:09', 34, '2016-01-13 08:20:09'); +(120, 5, 'MANUAL', '5-120', 2, 26, NULL, '', NULL, NULL, '17000.00000', 'USD', 'USD', NULL, NULL, NULL, '', '2015-07-25', '', 19, 30, '', NULL, NULL, '', NULL, NULL, NULL, 297, 34, '2015-07-25 15:39:34', 34, '2015-07-25 15:41:16'); -- -------------------------------------------------------- @@ -1101,8 +1068,8 @@ INSERT INTO `ap_payment_header` (`ap_payment_header_id`, `bu_org_id`, `payment_t -- Table structure for table `ap_payment_interface` -- -CREATE TABLE IF NOT EXISTS `ap_payment_interface` ( - `ap_payment_interface_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ap_payment_interface` ( + `ap_payment_interface_id` int(12) NOT NULL, `ap_transaction_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `payment_type` varchar(25) DEFAULT NULL, @@ -1134,10 +1101,8 @@ CREATE TABLE IF NOT EXISTS `ap_payment_interface` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ap_payment_interface_id`), - UNIQUE KEY `ap_payment_interface_id` (`ap_payment_interface_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -1145,8 +1110,8 @@ CREATE TABLE IF NOT EXISTS `ap_payment_interface` ( -- Table structure for table `ap_payment_line` -- -CREATE TABLE IF NOT EXISTS `ap_payment_line` ( - `ap_payment_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ap_payment_line` ( + `ap_payment_line_id` int(12) NOT NULL, `ap_payment_header_id` int(12) NOT NULL, `ap_transaction_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, @@ -1163,10 +1128,8 @@ CREATE TABLE IF NOT EXISTS `ap_payment_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ap_payment_line_id`), - UNIQUE KEY `ap_transaction_header_id` (`ap_payment_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=308 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ap_payment_line` @@ -1487,8 +1450,8 @@ INSERT INTO `ap_payment_line` (`ap_payment_line_id`, `ap_payment_header_id`, `ap -- Table structure for table `ap_payment_process` -- -CREATE TABLE IF NOT EXISTS `ap_payment_process` ( - `ap_payment_process_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ap_payment_process` ( + `ap_payment_process_id` int(12) NOT NULL, `payment_process` varchar(50) NOT NULL, `payment_type` varchar(25) NOT NULL, `cash_ac_id` int(12) NOT NULL, @@ -1502,10 +1465,8 @@ CREATE TABLE IF NOT EXISTS `ap_payment_process` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ap_payment_process_id`), - UNIQUE KEY `document_type_name` (`payment_process`,`cash_ac_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ap_payment_process` @@ -1520,14 +1481,12 @@ INSERT INTO `ap_payment_process` (`ap_payment_process_id`, `payment_process`, `p -- Table structure for table `ap_payment_terms` -- -CREATE TABLE IF NOT EXISTS `ap_payment_terms` ( - `term_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ap_payment_terms` ( + `term_id` int(12) NOT NULL, `term_name` varchar(12) DEFAULT NULL, `term_description` varchar(50) NOT NULL, - `end_date` date NOT NULL, - PRIMARY KEY (`term_id`), - UNIQUE KEY `term_name` (`term_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `end_date` date NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ap_payment_terms` @@ -1543,7 +1502,7 @@ INSERT INTO `ap_payment_terms` (`term_id`, `term_name`, `term_description`, `end -- -- Stand-in structure for view `ap_payment_trnx_v` -- -CREATE TABLE IF NOT EXISTS `ap_payment_trnx_v` ( +CREATE TABLE `ap_payment_trnx_v` ( `ap_transaction_header_id` int(12) ,`bu_org_id` int(12) ,`transaction_type` varchar(50) @@ -1592,12 +1551,13 @@ CREATE TABLE IF NOT EXISTS `ap_payment_trnx_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Stand-in structure for view `ap_po_matching_v` -- -CREATE TABLE IF NOT EXISTS `ap_po_matching_v` ( +CREATE TABLE `ap_po_matching_v` ( `po_header_id` int(12) ,`bu_org_id` int(12) ,`po_type` varchar(20) @@ -1657,12 +1617,13 @@ CREATE TABLE IF NOT EXISTS `ap_po_matching_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Stand-in structure for view `ap_transaction_all_v` -- -CREATE TABLE IF NOT EXISTS `ap_transaction_all_v` ( +CREATE TABLE `ap_transaction_all_v` ( `ap_transaction_header_id` int(12) ,`bu_org_id` int(12) ,`transaction_type` varchar(50) @@ -1712,14 +1673,15 @@ CREATE TABLE IF NOT EXISTS `ap_transaction_all_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Table structure for table `ap_transaction_detail` -- -CREATE TABLE IF NOT EXISTS `ap_transaction_detail` ( - `ap_transaction_detail_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ap_transaction_detail` ( + `ap_transaction_detail_id` int(12) NOT NULL, `ap_transaction_line_id` int(12) NOT NULL, `ap_transaction_header_id` int(12) NOT NULL, `detail_number` int(12) NOT NULL, @@ -1740,9 +1702,8 @@ CREATE TABLE IF NOT EXISTS `ap_transaction_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ap_transaction_detail_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=224 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ap_transaction_detail` @@ -1969,8 +1930,8 @@ INSERT INTO `ap_transaction_detail` (`ap_transaction_detail_id`, `ap_transaction -- Table structure for table `ap_transaction_header` -- -CREATE TABLE IF NOT EXISTS `ap_transaction_header` ( - `ap_transaction_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ap_transaction_header` ( + `ap_transaction_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `transaction_type` varchar(50) NOT NULL, `transaction_number` varchar(50) DEFAULT NULL, @@ -2007,10 +1968,8 @@ CREATE TABLE IF NOT EXISTS `ap_transaction_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ap_transaction_header_id`), - UNIQUE KEY `transaction_number` (`transaction_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=80 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ap_transaction_header` @@ -2102,8 +2061,8 @@ INSERT INTO `ap_transaction_header` (`ap_transaction_header_id`, `bu_org_id`, `t -- Table structure for table `ap_transaction_line` -- -CREATE TABLE IF NOT EXISTS `ap_transaction_line` ( - `ap_transaction_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ap_transaction_line` ( + `ap_transaction_line_id` int(12) NOT NULL, `ap_transaction_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, `item_id_m` int(12) DEFAULT NULL, @@ -2136,10 +2095,8 @@ CREATE TABLE IF NOT EXISTS `ap_transaction_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ap_transaction_line_id`), - UNIQUE KEY `ap_transaction_header_id` (`ap_transaction_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=175 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ap_transaction_line` @@ -2317,8 +2274,8 @@ INSERT INTO `ap_transaction_line` (`ap_transaction_line_id`, `ap_transaction_hea -- Table structure for table `ar_customer` -- -CREATE TABLE IF NOT EXISTS `ar_customer` ( - `ar_customer_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_customer` ( + `ar_customer_id` int(12) NOT NULL, `customer_number` varchar(25) NOT NULL, `customer_name` varchar(60) NOT NULL, `customer_relationship` varchar(25) DEFAULT NULL, @@ -2340,11 +2297,8 @@ CREATE TABLE IF NOT EXISTS `ar_customer` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_customer_id`), - UNIQUE KEY `customer_number` (`customer_number`), - UNIQUE KEY `customer_name` (`customer_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_customer` @@ -2363,15 +2317,15 @@ INSERT INTO `ar_customer` (`ar_customer_id`, `customer_number`, `customer_name`, -- Table structure for table `ar_customer_bu` -- -CREATE TABLE IF NOT EXISTS `ar_customer_bu` ( - `ar_customer_bu_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_customer_bu` ( + `ar_customer_bu_id` int(12) NOT NULL, `ar_customer_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `status` varchar(12) DEFAULT NULL, `profile_id` int(12) DEFAULT NULL, `currency` varchar(12) DEFAULT NULL, `payment_term_id` int(12) DEFAULT NULL, - `finance_profile_id` int(12) unsigned DEFAULT NULL, + `finance_profile_id` int(12) UNSIGNED DEFAULT NULL, `payment_method_id` int(12) DEFAULT NULL, `order_type_id` int(12) DEFAULT NULL, `price_list_id` int(12) DEFAULT NULL, @@ -2398,10 +2352,8 @@ CREATE TABLE IF NOT EXISTS `ar_customer_bu` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_customer_bu_id`), - UNIQUE KEY `ar_customer_id` (`ar_customer_id`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_customer_bu` @@ -2421,8 +2373,8 @@ INSERT INTO `ar_customer_bu` (`ar_customer_bu_id`, `ar_customer_id`, `org_id`, ` -- Table structure for table `ar_customer_relation` -- -CREATE TABLE IF NOT EXISTS `ar_customer_relation` ( - `ar_customer_relation_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_customer_relation` ( + `ar_customer_relation_id` int(12) NOT NULL, `ar_customer_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `reciprocal_cb` tinyint(1) DEFAULT NULL, @@ -2431,11 +2383,8 @@ CREATE TABLE IF NOT EXISTS `ar_customer_relation` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_customer_relation_id`), - UNIQUE KEY `customer_number` (`ar_customer_id`), - UNIQUE KEY `customer_name` (`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -2443,8 +2392,8 @@ CREATE TABLE IF NOT EXISTS `ar_customer_relation` ( -- Table structure for table `ar_customer_site` -- -CREATE TABLE IF NOT EXISTS `ar_customer_site` ( - `ar_customer_site_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_customer_site` ( + `ar_customer_site_id` int(12) NOT NULL, `ar_customer_id` int(12) NOT NULL, `customer_site_number` int(12) NOT NULL, `customer_site_name` varchar(60) NOT NULL, @@ -2458,7 +2407,7 @@ CREATE TABLE IF NOT EXISTS `ar_customer_site` ( `profile_id` int(12) DEFAULT NULL, `currency` varchar(12) DEFAULT NULL, `payment_term_id` int(12) DEFAULT NULL, - `finance_profile_id` int(12) unsigned DEFAULT NULL, + `finance_profile_id` int(12) UNSIGNED DEFAULT NULL, `payment_method_id` int(12) DEFAULT NULL, `order_type_id` int(12) DEFAULT NULL, `price_list_id` int(12) DEFAULT NULL, @@ -2479,11 +2428,8 @@ CREATE TABLE IF NOT EXISTS `ar_customer_site` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_customer_site_id`), - UNIQUE KEY `customer_site_number` (`customer_site_number`), - UNIQUE KEY `ar_customer_id` (`ar_customer_id`,`customer_site_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_customer_site` @@ -2506,7 +2452,7 @@ INSERT INTO `ar_customer_site` (`ar_customer_site_id`, `ar_customer_id`, `custom -- -- Stand-in structure for view `ar_customer_v` -- -CREATE TABLE IF NOT EXISTS `ar_customer_v` ( +CREATE TABLE `ar_customer_v` ( `ar_customer_id` int(12) ,`customer_number` varchar(25) ,`customer_name` varchar(60) @@ -2523,14 +2469,15 @@ CREATE TABLE IF NOT EXISTS `ar_customer_v` ( ,`currency` varchar(12) ,`payment_term_id` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `ar_payment_process` -- -CREATE TABLE IF NOT EXISTS `ar_payment_process` ( - `ar_receipt_source_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_payment_process` ( + `ar_receipt_source_id` int(12) NOT NULL, `receipt_source` varchar(50) NOT NULL, `receipt_type` varchar(25) NOT NULL, `creation_method` varchar(25) NOT NULL, @@ -2544,10 +2491,8 @@ CREATE TABLE IF NOT EXISTS `ar_payment_process` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_receipt_source_id`), - UNIQUE KEY `document_type_name` (`receipt_source`,`creation_method`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -2555,8 +2500,8 @@ CREATE TABLE IF NOT EXISTS `ar_payment_process` ( -- Table structure for table `ar_receipt_header` -- -CREATE TABLE IF NOT EXISTS `ar_receipt_header` ( - `ar_receipt_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_receipt_header` ( + `ar_receipt_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `ar_receipt_source_id` int(12) NOT NULL, `receipt_type` varchar(25) DEFAULT NULL, @@ -2589,10 +2534,8 @@ CREATE TABLE IF NOT EXISTS `ar_receipt_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_receipt_header_id`), - UNIQUE KEY `transaction_number` (`receipt_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_receipt_header` @@ -2628,8 +2571,8 @@ INSERT INTO `ar_receipt_header` (`ar_receipt_header_id`, `bu_org_id`, `ar_receip -- Table structure for table `ar_receipt_interface` -- -CREATE TABLE IF NOT EXISTS `ar_receipt_interface` ( - `ar_receipt_interface_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_receipt_interface` ( + `ar_receipt_interface_id` int(12) NOT NULL, `ar_transaction_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `receipt_type` varchar(25) DEFAULT NULL, @@ -2661,9 +2604,8 @@ CREATE TABLE IF NOT EXISTS `ar_receipt_interface` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_receipt_interface_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -2671,8 +2613,8 @@ CREATE TABLE IF NOT EXISTS `ar_receipt_interface` ( -- Table structure for table `ar_receipt_line` -- -CREATE TABLE IF NOT EXISTS `ar_receipt_line` ( - `ar_receipt_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_receipt_line` ( + `ar_receipt_line_id` int(12) NOT NULL, `ar_receipt_header_id` int(12) NOT NULL, `ar_transaction_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, @@ -2689,10 +2631,8 @@ CREATE TABLE IF NOT EXISTS `ar_receipt_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_receipt_line_id`), - UNIQUE KEY `ar_receipt_header_id` (`ar_receipt_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=35 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_receipt_line` @@ -2739,8 +2679,8 @@ INSERT INTO `ar_receipt_line` (`ar_receipt_line_id`, `ar_receipt_header_id`, `ar -- Table structure for table `ar_receipt_source` -- -CREATE TABLE IF NOT EXISTS `ar_receipt_source` ( - `ar_receipt_source_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_receipt_source` ( + `ar_receipt_source_id` int(12) NOT NULL, `receipt_source` varchar(50) NOT NULL, `receipt_type` varchar(25) NOT NULL, `creation_method` varchar(25) NOT NULL, @@ -2754,10 +2694,8 @@ CREATE TABLE IF NOT EXISTS `ar_receipt_source` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_receipt_source_id`), - UNIQUE KEY `document_type_name` (`receipt_source`,`creation_method`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_receipt_source` @@ -2773,8 +2711,8 @@ INSERT INTO `ar_receipt_source` (`ar_receipt_source_id`, `receipt_source`, `rece -- Table structure for table `ar_sales_region` -- -CREATE TABLE IF NOT EXISTS `ar_sales_region` ( - `ar_sales_region_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_sales_region` ( + `ar_sales_region_id` int(12) UNSIGNED NOT NULL, `country_code` varchar(5) NOT NULL, `state` varchar(25) DEFAULT NULL, `city` varchar(25) DEFAULT NULL, @@ -2786,11 +2724,8 @@ CREATE TABLE IF NOT EXISTS `ar_sales_region` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_sales_region_id`), - UNIQUE KEY `gl_calendar_id` (`state`,`description`), - UNIQUE KEY `tax_region_name` (`sales_region_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_sales_region` @@ -2804,7 +2739,7 @@ INSERT INTO `ar_sales_region` (`ar_sales_region_id`, `country_code`, `state`, `c -- -- Stand-in structure for view `ar_transaction_all_v` -- -CREATE TABLE IF NOT EXISTS `ar_transaction_all_v` ( +CREATE TABLE `ar_transaction_all_v` ( `ar_transaction_header_id` int(12) ,`bu_org_id` int(12) ,`transaction_type` varchar(50) @@ -2908,14 +2843,15 @@ CREATE TABLE IF NOT EXISTS `ar_transaction_all_v` ( ,`payment_term` varchar(50) ,`payment_term_description` varchar(256) ); + -- -------------------------------------------------------- -- -- Table structure for table `ar_transaction_detail` -- -CREATE TABLE IF NOT EXISTS `ar_transaction_detail` ( - `ar_transaction_detail_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_transaction_detail` ( + `ar_transaction_detail_id` int(12) NOT NULL, `ar_transaction_line_id` int(12) NOT NULL, `ar_transaction_header_id` int(12) NOT NULL, `detail_number` int(12) NOT NULL, @@ -2936,10 +2872,8 @@ CREATE TABLE IF NOT EXISTS `ar_transaction_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_transaction_detail_id`), - UNIQUE KEY `ar_transaction_line_id` (`ar_transaction_line_id`,`detail_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=146 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_transaction_detail` @@ -3076,8 +3010,8 @@ INSERT INTO `ar_transaction_detail` (`ar_transaction_detail_id`, `ar_transaction -- Table structure for table `ar_transaction_header` -- -CREATE TABLE IF NOT EXISTS `ar_transaction_header` ( - `ar_transaction_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_transaction_header` ( + `ar_transaction_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `transaction_type` varchar(50) NOT NULL, `transaction_class` varchar(25) DEFAULT NULL, @@ -3116,10 +3050,8 @@ CREATE TABLE IF NOT EXISTS `ar_transaction_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_transaction_header_id`), - UNIQUE KEY `transaction_number` (`transaction_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=78 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_transaction_header` @@ -3208,8 +3140,8 @@ INSERT INTO `ar_transaction_header` (`ar_transaction_header_id`, `bu_org_id`, `t -- Table structure for table `ar_transaction_interface` -- -CREATE TABLE IF NOT EXISTS `ar_transaction_interface` ( - `ar_transaction_interface_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_transaction_interface` ( + `ar_transaction_interface_id` int(12) NOT NULL, `ar_transaction_header_id` int(12) DEFAULT NULL, `bu_org_id` int(12) NOT NULL, `transaction_type` varchar(25) NOT NULL, @@ -3252,10 +3184,8 @@ CREATE TABLE IF NOT EXISTS `ar_transaction_interface` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_transaction_interface_id`), - UNIQUE KEY `ap_transaction_header_id` (`ar_transaction_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=49 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_transaction_interface` @@ -3287,8 +3217,8 @@ INSERT INTO `ar_transaction_interface` (`ar_transaction_interface_id`, `ar_trans -- Table structure for table `ar_transaction_line` -- -CREATE TABLE IF NOT EXISTS `ar_transaction_line` ( - `ar_transaction_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_transaction_line` ( + `ar_transaction_line_id` int(12) NOT NULL, `ar_transaction_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, `item_id_m` int(12) DEFAULT NULL, @@ -3319,10 +3249,8 @@ CREATE TABLE IF NOT EXISTS `ar_transaction_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_transaction_line_id`), - UNIQUE KEY `ap_transaction_header_id` (`ar_transaction_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=83 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_transaction_line` @@ -3411,8 +3339,8 @@ INSERT INTO `ar_transaction_line` (`ar_transaction_line_id`, `ar_transaction_hea -- Table structure for table `ar_transaction_source` -- -CREATE TABLE IF NOT EXISTS `ar_transaction_source` ( - `ar_transaction_source_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_transaction_source` ( + `ar_transaction_source_id` int(12) NOT NULL, `transaction_source` varchar(50) NOT NULL, `source_type` varchar(25) NOT NULL, `bu_org_id` int(12) NOT NULL, @@ -3426,10 +3354,8 @@ CREATE TABLE IF NOT EXISTS `ar_transaction_source` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_transaction_source_id`), - UNIQUE KEY `document_type_name` (`transaction_source`,`source_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_transaction_source` @@ -3445,8 +3371,8 @@ INSERT INTO `ar_transaction_source` (`ar_transaction_source_id`, `transaction_so -- Table structure for table `ar_transaction_type` -- -CREATE TABLE IF NOT EXISTS `ar_transaction_type` ( - `ar_transaction_type_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ar_transaction_type` ( + `ar_transaction_type_id` int(12) NOT NULL, `ar_transaction_type` varchar(50) NOT NULL, `transaction_class` varchar(25) DEFAULT NULL, `bu_org_id` int(12) NOT NULL, @@ -3468,10 +3394,8 @@ CREATE TABLE IF NOT EXISTS `ar_transaction_type` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ar_transaction_type_id`), - UNIQUE KEY `document_type_name` (`ar_transaction_type`,`transaction_class`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ar_transaction_type` @@ -3486,7 +3410,7 @@ INSERT INTO `ar_transaction_type` (`ar_transaction_type_id`, `ar_transaction_typ -- -- Stand-in structure for view `ar_unpaid_transaction_v` -- -CREATE TABLE IF NOT EXISTS `ar_unpaid_transaction_v` ( +CREATE TABLE `ar_unpaid_transaction_v` ( `ar_transaction_header_id` int(12) ,`bu_org_id` int(12) ,`transaction_class` varchar(25) @@ -3512,14 +3436,15 @@ CREATE TABLE IF NOT EXISTS `ar_unpaid_transaction_v` ( ,`so_number` varchar(50) ,`org` varchar(50) ); + -- -------------------------------------------------------- -- -- Table structure for table `bc_label_auto_trigger` -- -CREATE TABLE IF NOT EXISTS `bc_label_auto_trigger` ( - `bc_label_auto_trigger_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bc_label_auto_trigger` ( + `bc_label_auto_trigger_id` int(12) NOT NULL, `transaction_type_id` int(12) NOT NULL, `bc_label_format_header_id` int(12) NOT NULL, `association_level` varchar(25) NOT NULL, @@ -3530,10 +3455,8 @@ CREATE TABLE IF NOT EXISTS `bc_label_auto_trigger` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bc_label_auto_trigger_id`), - UNIQUE KEY `transaction_type_id` (`transaction_type_id`,`association_level`,`association_level_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bc_label_auto_trigger` @@ -3551,8 +3474,8 @@ INSERT INTO `bc_label_auto_trigger` (`bc_label_auto_trigger_id`, `transaction_ty -- Table structure for table `bc_label_format_header` -- -CREATE TABLE IF NOT EXISTS `bc_label_format_header` ( - `bc_label_format_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bc_label_format_header` ( + `bc_label_format_header_id` int(12) NOT NULL, `label_type` varchar(25) NOT NULL, `format_name` varchar(256) NOT NULL, `disable_date` date DEFAULT NULL, @@ -3563,10 +3486,8 @@ CREATE TABLE IF NOT EXISTS `bc_label_format_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bc_label_format_header_id`), - UNIQUE KEY `document_type_name` (`label_type`,`format_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bc_label_format_header` @@ -3586,8 +3507,8 @@ INSERT INTO `bc_label_format_header` (`bc_label_format_header_id`, `label_type`, -- Table structure for table `bc_label_format_line` -- -CREATE TABLE IF NOT EXISTS `bc_label_format_line` ( - `bc_label_format_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bc_label_format_line` ( + `bc_label_format_line_id` int(12) NOT NULL, `bc_label_format_header_id` int(12) NOT NULL, `object_name` varchar(50) NOT NULL, `sys_field_name` varchar(50) NOT NULL, @@ -3596,10 +3517,8 @@ CREATE TABLE IF NOT EXISTS `bc_label_format_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bc_label_format_line_id`), - UNIQUE KEY `document_type_name` (`bc_label_format_header_id`,`sys_field_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=26 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bc_label_format_line` @@ -3638,8 +3557,8 @@ INSERT INTO `bc_label_format_line` (`bc_label_format_line_id`, `bc_label_format_ -- Table structure for table `bc_label_request` -- -CREATE TABLE IF NOT EXISTS `bc_label_request` ( - `bc_label_request_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bc_label_request` ( + `bc_label_request_id` int(12) NOT NULL, `transaction_type_id` int(12) NOT NULL, `bc_label_format_header_id` int(12) NOT NULL, `status` varchar(25) DEFAULT NULL, @@ -3650,10 +3569,8 @@ CREATE TABLE IF NOT EXISTS `bc_label_request` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bc_label_request_id`), - UNIQUE KEY `transaction_type_id` (`transaction_type_id`,`status`,`label_content`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -3661,8 +3578,8 @@ CREATE TABLE IF NOT EXISTS `bc_label_request` ( -- Table structure for table `bc_static_label` -- -CREATE TABLE IF NOT EXISTS `bc_static_label` ( - `bc_static_label_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bc_static_label` ( + `bc_static_label_id` int(12) NOT NULL, `label_type` varchar(25) NOT NULL, `bc_label_format_header_id` int(12) NOT NULL, `status` varchar(25) DEFAULT NULL, @@ -3675,10 +3592,8 @@ CREATE TABLE IF NOT EXISTS `bc_static_label` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`bc_static_label_id`), - UNIQUE KEY `transaction_type_id` (`label_type`,`status`,`label_content`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bc_static_label` @@ -3697,8 +3612,8 @@ INSERT INTO `bc_static_label` (`bc_static_label_id`, `label_type`, `bc_label_for -- Table structure for table `block` -- -CREATE TABLE IF NOT EXISTS `block` ( - `block_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `block` ( + `block_id` int(12) UNSIGNED NOT NULL, `reference_table` varchar(50) DEFAULT NULL, `name` varchar(50) DEFAULT NULL, `reference_key_value` int(12) DEFAULT NULL, @@ -3717,10 +3632,8 @@ CREATE TABLE IF NOT EXISTS `block` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`block_id`), - UNIQUE KEY `reference_table` (`reference_table`,`name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=62 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `block` @@ -3748,11 +3661,10 @@ INSERT INTO `block` (`block_id`, `reference_table`, `name`, `reference_key_value -- Table structure for table `block_cache` -- -CREATE TABLE IF NOT EXISTS `block_cache` ( +CREATE TABLE `block_cache` ( `block_id` int(12) NOT NULL, `session_id` varchar(128) NOT NULL, - `block_data` longblob, - UNIQUE KEY `block_id` (`block_id`,`session_id`) + `block_data` longblob ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -3761,8 +3673,8 @@ CREATE TABLE IF NOT EXISTS `block_cache` ( -- Table structure for table `block_content` -- -CREATE TABLE IF NOT EXISTS `block_content` ( - `block_content_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `block_content` ( + `block_content_id` int(12) NOT NULL, `block_id` int(12) NOT NULL, `info` varchar(256) DEFAULT NULL, `content` text NOT NULL, @@ -3770,9 +3682,8 @@ CREATE TABLE IF NOT EXISTS `block_content` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`block_content_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `block_content` @@ -3801,7 +3712,7 @@ INSERT INTO `block_content` (`block_content_id`, `block_id`, `info`, `content`, -- -- Stand-in structure for view `bom_all_v` -- -CREATE TABLE IF NOT EXISTS `bom_all_v` ( +CREATE TABLE `bom_all_v` ( `bom_header_id` int(12) ,`item_id_m` int(12) ,`alternate_bom` varchar(50) @@ -3823,16 +3734,17 @@ CREATE TABLE IF NOT EXISTS `bom_all_v` ( ,`org_description` varchar(200) ,`org_code` varchar(5) ); + -- -------------------------------------------------------- -- -- Table structure for table `bom_commonbom_line` -- -CREATE TABLE IF NOT EXISTS `bom_commonbom_line` ( - `bom_commonbom_line_id` int(12) NOT NULL AUTO_INCREMENT, - `bom_header_id` int(12) unsigned NOT NULL, - `bom_line_id` int(12) unsigned NOT NULL, +CREATE TABLE `bom_commonbom_line` ( + `bom_commonbom_line_id` int(12) NOT NULL, + `bom_header_id` int(12) UNSIGNED NOT NULL, + `bom_line_id` int(12) UNSIGNED NOT NULL, `routing_sequence` int(10) DEFAULT NULL, `planning_percentage` decimal(6,2) DEFAULT NULL, `yield` decimal(6,6) DEFAULT NULL, @@ -3843,10 +3755,8 @@ CREATE TABLE IF NOT EXISTS `bom_commonbom_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bom_commonbom_line_id`), - UNIQUE KEY `bom_header_id` (`bom_header_id`,`bom_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_commonbom_line` @@ -3863,8 +3773,8 @@ INSERT INTO `bom_commonbom_line` (`bom_commonbom_line_id`, `bom_header_id`, `bom -- Table structure for table `bom_config_header` -- -CREATE TABLE IF NOT EXISTS `bom_config_header` ( - `bom_config_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_config_header` ( + `bom_config_header_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `bom_header_id` int(12) DEFAULT NULL, `org_id` int(12) NOT NULL, @@ -3873,10 +3783,8 @@ CREATE TABLE IF NOT EXISTS `bom_config_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`bom_config_header_id`), - UNIQUE KEY `item_id_m` (`item_id_m`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_config_header` @@ -3897,10 +3805,10 @@ INSERT INTO `bom_config_header` (`bom_config_header_id`, `item_id_m`, `bom_heade -- Table structure for table `bom_config_line` -- -CREATE TABLE IF NOT EXISTS `bom_config_line` ( - `bom_config_line_id` int(12) NOT NULL AUTO_INCREMENT, - `bom_config_header_id` int(12) unsigned NOT NULL, - `bom_sequence` int(10) unsigned NOT NULL, +CREATE TABLE `bom_config_line` ( + `bom_config_line_id` int(12) NOT NULL, + `bom_config_header_id` int(12) UNSIGNED NOT NULL, + `bom_sequence` int(10) UNSIGNED NOT NULL, `routing_sequence` int(12) DEFAULT NULL, `component_item_id_m` int(12) NOT NULL, `component_revision` varchar(10) DEFAULT NULL, @@ -3917,11 +3825,8 @@ CREATE TABLE IF NOT EXISTS `bom_config_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`bom_config_line_id`), - UNIQUE KEY `bom_header_id` (`bom_config_header_id`,`bom_sequence`), - UNIQUE KEY `bom_header_id_2` (`bom_config_header_id`,`routing_sequence`,`component_item_id_m`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_config_line` @@ -3947,8 +3852,8 @@ INSERT INTO `bom_config_line` (`bom_config_line_id`, `bom_config_header_id`, `bo -- Table structure for table `bom_cost_type` -- -CREATE TABLE IF NOT EXISTS `bom_cost_type` ( - `bom_cost_type_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_cost_type` ( + `bom_cost_type_id` int(12) NOT NULL, `cost_type_code` varchar(25) NOT NULL, `cost_type` varchar(50) NOT NULL, `description` varchar(256) NOT NULL, @@ -3960,11 +3865,8 @@ CREATE TABLE IF NOT EXISTS `bom_cost_type` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bom_cost_type_id`), - UNIQUE KEY `cost_type` (`cost_type`,`org_id`), - UNIQUE KEY `cost_type_code` (`cost_type_code`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_cost_type` @@ -3984,8 +3886,8 @@ INSERT INTO `bom_cost_type` (`bom_cost_type_id`, `cost_type_code`, `cost_type`, -- Table structure for table `bom_department` -- -CREATE TABLE IF NOT EXISTS `bom_department` ( - `bom_department_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_department` ( + `bom_department_id` int(12) UNSIGNED NOT NULL, `department` varchar(50) NOT NULL, `description` varchar(256) NOT NULL, `org_id` int(12) NOT NULL, @@ -3999,10 +3901,8 @@ CREATE TABLE IF NOT EXISTS `bom_department` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bom_department_id`), - UNIQUE KEY `overhead` (`department`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_department` @@ -4020,8 +3920,8 @@ INSERT INTO `bom_department` (`bom_department_id`, `department`, `description`, -- Table structure for table `bom_department_resource_assignment` -- -CREATE TABLE IF NOT EXISTS `bom_department_resource_assignment` ( - `bom_department_resource_assignment_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_department_resource_assignment` ( + `bom_department_resource_assignment_id` int(12) NOT NULL, `bom_department_id` int(12) NOT NULL, `cost_type_id` int(12) NOT NULL, `resource_id` int(12) NOT NULL, @@ -4031,9 +3931,8 @@ CREATE TABLE IF NOT EXISTS `bom_department_resource_assignment` ( `last_update_date` datetime DEFAULT NULL, `no_of_units` int(12) DEFAULT NULL, `efficiency` int(12) DEFAULT NULL, - `utilization` int(12) DEFAULT NULL, - PRIMARY KEY (`bom_department_resource_assignment_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=20 ; + `utilization` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_department_resource_assignment` @@ -4066,8 +3965,8 @@ INSERT INTO `bom_department_resource_assignment` (`bom_department_resource_assig -- Table structure for table `bom_header` -- -CREATE TABLE IF NOT EXISTS `bom_header` ( - `bom_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_header` ( + `bom_header_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `alternate_bom` varchar(50) DEFAULT NULL, `org_id` int(12) NOT NULL, @@ -4079,11 +3978,8 @@ CREATE TABLE IF NOT EXISTS `bom_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`bom_header_id`), - UNIQUE KEY `item_id` (`item_id_m`,`org_id`), - UNIQUE KEY `item_id_2` (`item_id_m`,`alternate_bom`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=43 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_header` @@ -4130,10 +4026,10 @@ INSERT INTO `bom_header` (`bom_header_id`, `item_id_m`, `alternate_bom`, `org_id -- Table structure for table `bom_line` -- -CREATE TABLE IF NOT EXISTS `bom_line` ( - `bom_line_id` int(12) NOT NULL AUTO_INCREMENT, - `bom_header_id` int(12) unsigned NOT NULL, - `bom_sequence` int(10) unsigned NOT NULL, +CREATE TABLE `bom_line` ( + `bom_line_id` int(12) NOT NULL, + `bom_header_id` int(12) UNSIGNED NOT NULL, + `bom_sequence` int(10) UNSIGNED NOT NULL, `routing_sequence` int(12) DEFAULT NULL, `component_item_id_m` int(12) NOT NULL, `component_revision` varchar(10) DEFAULT NULL, @@ -4154,11 +4050,8 @@ CREATE TABLE IF NOT EXISTS `bom_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`bom_line_id`), - UNIQUE KEY `bom_header_id` (`bom_header_id`,`bom_sequence`), - UNIQUE KEY `bom_header_id_2` (`bom_header_id`,`routing_sequence`,`component_item_id_m`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=67 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_line` @@ -4222,7 +4115,7 @@ INSERT INTO `bom_line` (`bom_line_id`, `bom_header_id`, `bom_sequence`, `routing -- -- Stand-in structure for view `bom_line_v` -- -CREATE TABLE IF NOT EXISTS `bom_line_v` ( +CREATE TABLE `bom_line_v` ( `bom_header_id_h` int(12) ,`item_id_m` int(12) ,`org_id` int(12) @@ -4257,14 +4150,15 @@ CREATE TABLE IF NOT EXISTS `bom_line_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Table structure for table `bom_material_element` -- -CREATE TABLE IF NOT EXISTS `bom_material_element` ( - `bom_material_element_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_material_element` ( + `bom_material_element_id` int(12) NOT NULL, `material_element` varchar(50) NOT NULL, `description` varchar(256) NOT NULL, `org_id` int(12) NOT NULL, @@ -4274,10 +4168,8 @@ CREATE TABLE IF NOT EXISTS `bom_material_element` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bom_material_element_id`), - UNIQUE KEY `cost_type` (`material_element`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_material_element` @@ -4294,8 +4186,8 @@ INSERT INTO `bom_material_element` (`bom_material_element_id`, `material_element -- Table structure for table `bom_overhead` -- -CREATE TABLE IF NOT EXISTS `bom_overhead` ( - `bom_overhead_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_overhead` ( + `bom_overhead_id` int(12) UNSIGNED NOT NULL, `overhead` varchar(50) NOT NULL, `description` varchar(256) NOT NULL, `org_id` int(12) NOT NULL, @@ -4309,10 +4201,8 @@ CREATE TABLE IF NOT EXISTS `bom_overhead` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bom_overhead_id`), - UNIQUE KEY `overhead` (`overhead`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_overhead` @@ -4329,8 +4219,8 @@ INSERT INTO `bom_overhead` (`bom_overhead_id`, `overhead`, `description`, `org_i -- Table structure for table `bom_overhead_rate_assignment` -- -CREATE TABLE IF NOT EXISTS `bom_overhead_rate_assignment` ( - `bom_overhead_rate_assignment_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_overhead_rate_assignment` ( + `bom_overhead_rate_assignment_id` int(12) NOT NULL, `bom_overhead_id` int(12) NOT NULL, `bom_cost_type` varchar(25) NOT NULL, `default_basis` varchar(25) NOT NULL, @@ -4338,10 +4228,8 @@ CREATE TABLE IF NOT EXISTS `bom_overhead_rate_assignment` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bom_overhead_rate_assignment_id`), - UNIQUE KEY `bom_overhead_id` (`bom_overhead_id`,`bom_cost_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_overhead_rate_assignment` @@ -4360,18 +4248,16 @@ INSERT INTO `bom_overhead_rate_assignment` (`bom_overhead_rate_assignment_id`, ` -- Table structure for table `bom_overhead_resource_assignment` -- -CREATE TABLE IF NOT EXISTS `bom_overhead_resource_assignment` ( - `bom_overhead_resource_assignment_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_overhead_resource_assignment` ( + `bom_overhead_resource_assignment_id` int(12) NOT NULL, `bom_overhead_id` int(12) NOT NULL, `bom_cost_type` varchar(25) NOT NULL, `resource_id` int(12) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bom_overhead_resource_assignment_id`), - UNIQUE KEY `bom_overhead_id` (`bom_overhead_id`,`bom_cost_type`,`resource_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_overhead_resource_assignment` @@ -4391,7 +4277,7 @@ INSERT INTO `bom_overhead_resource_assignment` (`bom_overhead_resource_assignmen -- -- Stand-in structure for view `bom_overhead_v` -- -CREATE TABLE IF NOT EXISTS `bom_overhead_v` ( +CREATE TABLE `bom_overhead_v` ( `bom_overhead_resource_assignment_id` int(12) ,`resource_bom_cost_type` varchar(25) ,`resource_id` int(12) @@ -4406,14 +4292,15 @@ CREATE TABLE IF NOT EXISTS `bom_overhead_v` ( ,`overhead_type` varchar(50) ,`absorption_ac_id` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `bom_resource` -- -CREATE TABLE IF NOT EXISTS `bom_resource` ( - `bom_resource_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_resource` ( + `bom_resource_id` int(12) NOT NULL, `resource` varchar(50) NOT NULL, `description` varchar(256) DEFAULT NULL, `org_id` int(12) DEFAULT NULL, @@ -4434,11 +4321,8 @@ CREATE TABLE IF NOT EXISTS `bom_resource` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`bom_resource_id`), - UNIQUE KEY `item_id` (`resource`,`org_id`), - UNIQUE KEY `item_id_2` (`resource`,`description`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_resource` @@ -4456,17 +4340,16 @@ INSERT INTO `bom_resource` (`bom_resource_id`, `resource`, `description`, `org_i -- Table structure for table `bom_resource_cost` -- -CREATE TABLE IF NOT EXISTS `bom_resource_cost` ( - `bom_resource_cost_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_resource_cost` ( + `bom_resource_cost_id` int(12) NOT NULL, `bom_resource_id` int(12) NOT NULL, `bom_cost_type` varchar(25) NOT NULL, `resource_rate` decimal(20,5) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bom_resource_cost_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_resource_cost` @@ -4489,8 +4372,8 @@ INSERT INTO `bom_resource_cost` (`bom_resource_cost_id`, `bom_resource_id`, `bom -- Table structure for table `bom_routing_detail` -- -CREATE TABLE IF NOT EXISTS `bom_routing_detail` ( - `bom_routing_detail_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_routing_detail` ( + `bom_routing_detail_id` int(12) NOT NULL, `bom_routing_line_id` int(12) DEFAULT NULL, `bom_routing_header_id` int(12) DEFAULT NULL, `bom_standard_operation_id` int(12) DEFAULT NULL, @@ -4506,9 +4389,8 @@ CREATE TABLE IF NOT EXISTS `bom_routing_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`bom_routing_detail_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=32 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_routing_detail` @@ -4553,8 +4435,8 @@ INSERT INTO `bom_routing_detail` (`bom_routing_detail_id`, `bom_routing_line_id` -- Table structure for table `bom_routing_header` -- -CREATE TABLE IF NOT EXISTS `bom_routing_header` ( - `bom_routing_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_routing_header` ( + `bom_routing_header_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `alternate_routing` varchar(50) DEFAULT NULL, `org_id` int(12) NOT NULL, @@ -4568,11 +4450,8 @@ CREATE TABLE IF NOT EXISTS `bom_routing_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`bom_routing_header_id`), - UNIQUE KEY `item_id` (`item_id_m`,`org_id`), - UNIQUE KEY `item_id_2` (`item_id_m`,`alternate_routing`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_routing_header` @@ -4603,8 +4482,8 @@ INSERT INTO `bom_routing_header` (`bom_routing_header_id`, `item_id_m`, `alterna -- Table structure for table `bom_routing_line` -- -CREATE TABLE IF NOT EXISTS `bom_routing_line` ( - `bom_routing_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_routing_line` ( + `bom_routing_line_id` int(12) NOT NULL, `bom_routing_header_id` int(12) NOT NULL, `routing_sequence` int(12) NOT NULL, `standard_operation_id` int(12) DEFAULT NULL, @@ -4627,11 +4506,8 @@ CREATE TABLE IF NOT EXISTS `bom_routing_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`bom_routing_line_id`), - UNIQUE KEY `bom_header_id` (`bom_routing_header_id`,`routing_sequence`), - UNIQUE KEY `bom_header_id_2` (`bom_routing_header_id`,`department_id`,`description`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=25 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_routing_line` @@ -4668,7 +4544,7 @@ INSERT INTO `bom_routing_line` (`bom_routing_line_id`, `bom_routing_header_id`, -- -- Stand-in structure for view `bom_routing_line_v` -- -CREATE TABLE IF NOT EXISTS `bom_routing_line_v` ( +CREATE TABLE `bom_routing_line_v` ( `bom_routing_header_id_h` int(12) ,`item_id_m` int(12) ,`alternate_routing` varchar(50) @@ -4699,12 +4575,13 @@ CREATE TABLE IF NOT EXISTS `bom_routing_line_v` ( ,`yield` decimal(6,6) ,`cumm_yield` tinyint(4) ); + -- -------------------------------------------------------- -- -- Stand-in structure for view `bom_routing_v` -- -CREATE TABLE IF NOT EXISTS `bom_routing_v` ( +CREATE TABLE `bom_routing_v` ( `bom_routing_header_id` int(12) ,`item_id_m` int(12) ,`alternate_routing` varchar(50) @@ -4736,14 +4613,15 @@ CREATE TABLE IF NOT EXISTS `bom_routing_v` ( ,`subinventory` varchar(25) ,`locator` varchar(256) ); + -- -------------------------------------------------------- -- -- Table structure for table `bom_standard_operation` -- -CREATE TABLE IF NOT EXISTS `bom_standard_operation` ( - `bom_standard_operation_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_standard_operation` ( + `bom_standard_operation_id` int(12) NOT NULL, `standard_operation` varchar(50) NOT NULL, `org_id` int(12) NOT NULL, `department_id` int(12) NOT NULL, @@ -4756,9 +4634,8 @@ CREATE TABLE IF NOT EXISTS `bom_standard_operation` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bom_standard_operation_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_standard_operation` @@ -4776,8 +4653,8 @@ INSERT INTO `bom_standard_operation` (`bom_standard_operation_id`, `standard_ope -- Table structure for table `bom_standard_operation_resource_assignment` -- -CREATE TABLE IF NOT EXISTS `bom_standard_operation_resource_assignment` ( - `bom_standard_operation_resource_assignment_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `bom_standard_operation_resource_assignment` ( + `bom_standard_operation_resource_assignment_id` int(12) NOT NULL, `resource_sequence` int(12) DEFAULT NULL, `bom_standard_operation_id` int(12) DEFAULT NULL, `charge_basis` int(12) NOT NULL, @@ -4791,9 +4668,8 @@ CREATE TABLE IF NOT EXISTS `bom_standard_operation_resource_assignment` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`bom_standard_operation_resource_assignment_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bom_standard_operation_resource_assignment` @@ -4816,8 +4692,8 @@ INSERT INTO `bom_standard_operation_resource_assignment` (`bom_standard_operatio -- Table structure for table `business` -- -CREATE TABLE IF NOT EXISTS `business` ( - `business_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `business` ( + `business_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `business_org_type` varchar(50) DEFAULT NULL, `manager` varchar(50) DEFAULT NULL, @@ -4831,10 +4707,8 @@ CREATE TABLE IF NOT EXISTS `business` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`business_id`), - UNIQUE KEY `org_id` (`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `business` @@ -4852,8 +4726,8 @@ INSERT INTO `business` (`business_id`, `org_id`, `business_org_type`, `manager`, -- Table structure for table `category` -- -CREATE TABLE IF NOT EXISTS `category` ( - `category_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `category` ( + `category_id` int(12) NOT NULL, `major_category_id` int(12) DEFAULT NULL, `parent_id` int(12) DEFAULT NULL, `category` varchar(50) NOT NULL DEFAULT 'none', @@ -4869,10 +4743,8 @@ CREATE TABLE IF NOT EXISTS `category` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`category_id`), - UNIQUE KEY `parent_id` (`parent_id`,`category`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=77 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `category` @@ -4956,8 +4828,8 @@ INSERT INTO `category` (`category_id`, `major_category_id`, `parent_id`, `catego -- Table structure for table `category_reference` -- -CREATE TABLE IF NOT EXISTS `category_reference` ( - `category_reference_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `category_reference` ( + `category_reference_id` int(12) NOT NULL, `major_category_id` int(12) DEFAULT NULL, `category_id` int(12) NOT NULL, `reference_type` varchar(50) DEFAULT NULL, @@ -4966,10 +4838,8 @@ CREATE TABLE IF NOT EXISTS `category_reference` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`category_reference_id`), - UNIQUE KEY `category_id` (`category_id`,`reference_type`,`reference_table`,`reference_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=237 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `category_reference` @@ -5089,8 +4959,8 @@ INSERT INTO `category_reference` (`category_reference_id`, `major_category_id`, -- Table structure for table `cc_co_header` -- -CREATE TABLE IF NOT EXISTS `cc_co_header` ( - `cc_co_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `cc_co_header` ( + `cc_co_header_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `change_number` varchar(20) DEFAULT NULL, `status` varchar(25) DEFAULT NULL, @@ -5114,11 +4984,8 @@ CREATE TABLE IF NOT EXISTS `cc_co_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`cc_co_header_id`), - UNIQUE KEY `release_number` (`security_level`,`change_type`), - UNIQUE KEY `po_header_id` (`cc_co_header_id`,`security_level`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cc_co_header` @@ -5136,8 +5003,8 @@ INSERT INTO `cc_co_header` (`cc_co_header_id`, `org_id`, `change_number`, `statu -- Table structure for table `cc_co_line` -- -CREATE TABLE IF NOT EXISTS `cc_co_line` ( - `cc_co_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `cc_co_line` ( + `cc_co_line_id` int(12) NOT NULL, `cc_co_header_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `item_description` varchar(256) DEFAULT NULL, @@ -5146,10 +5013,8 @@ CREATE TABLE IF NOT EXISTS `cc_co_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`cc_co_line_id`), - UNIQUE KEY `po_header_id` (`cc_co_header_id`,`item_description`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cc_co_line` @@ -5171,18 +5036,16 @@ INSERT INTO `cc_co_line` (`cc_co_line_id`, `cc_co_header_id`, `item_id_m`, `item -- Table structure for table `cc_co_line_value` -- -CREATE TABLE IF NOT EXISTS `cc_co_line_value` ( - `cc_co_line_value_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `cc_co_line_value` ( + `cc_co_line_value_id` int(12) NOT NULL, `cc_co_line_id` int(12) NOT NULL, `cc_co_template_line_id` int(12) DEFAULT NULL, `field_value` varchar(256) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`cc_co_line_value_id`), - UNIQUE KEY `cc_co_line_id` (`cc_co_line_id`,`cc_co_template_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=84 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cc_co_line_value` @@ -5217,8 +5080,8 @@ INSERT INTO `cc_co_line_value` (`cc_co_line_value_id`, `cc_co_line_id`, `cc_co_t -- Table structure for table `cc_co_process_flow_action` -- -CREATE TABLE IF NOT EXISTS `cc_co_process_flow_action` ( - `cc_co_process_flow_action_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `cc_co_process_flow_action` ( + `cc_co_process_flow_action_id` int(12) NOT NULL, `cc_co_header_id` int(12) NOT NULL, `sys_process_flow_line_id` int(12) NOT NULL, `action_number` mediumint(6) NOT NULL, @@ -5233,12 +5096,8 @@ CREATE TABLE IF NOT EXISTS `cc_co_process_flow_action` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`cc_co_process_flow_action_id`), - UNIQUE KEY `document_type_name` (`cc_co_header_id`,`role_code`), - UNIQUE KEY `sys_process_flow_line_id` (`cc_co_header_id`,`role_code`), - UNIQUE KEY `sys_process_flow_line_id_2` (`cc_co_header_id`,`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cc_co_process_flow_action` @@ -5254,8 +5113,8 @@ INSERT INTO `cc_co_process_flow_action` (`cc_co_process_flow_action_id`, `cc_co_ -- Table structure for table `cc_co_process_flow_action_value` -- -CREATE TABLE IF NOT EXISTS `cc_co_process_flow_action_value` ( - `sys_process_flow_action_value_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `cc_co_process_flow_action_value` ( + `sys_process_flow_action_value_id` int(12) NOT NULL, `sys_process_flow_action_id` int(12) NOT NULL, `value` varchar(256) NOT NULL, `comment` varchar(256) DEFAULT NULL, @@ -5264,10 +5123,8 @@ CREATE TABLE IF NOT EXISTS `cc_co_process_flow_action_value` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_process_flow_action_value_id`), - UNIQUE KEY `document_type_name` (`sys_process_flow_action_id`,`comment`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -5275,8 +5132,8 @@ CREATE TABLE IF NOT EXISTS `cc_co_process_flow_action_value` ( -- Table structure for table `cc_co_template_header` -- -CREATE TABLE IF NOT EXISTS `cc_co_template_header` ( - `cc_co_template_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `cc_co_template_header` ( + `cc_co_template_header_id` int(12) NOT NULL, `template_name` varchar(25) NOT NULL, `org_id` int(12) DEFAULT NULL, `description` varchar(256) DEFAULT NULL, @@ -5284,10 +5141,8 @@ CREATE TABLE IF NOT EXISTS `cc_co_template_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`cc_co_template_header_id`), - UNIQUE KEY `po_header_id` (`template_name`,`description`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cc_co_template_header` @@ -5302,8 +5157,8 @@ INSERT INTO `cc_co_template_header` (`cc_co_template_header_id`, `template_name` -- Table structure for table `cc_co_template_line` -- -CREATE TABLE IF NOT EXISTS `cc_co_template_line` ( - `cc_co_template_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `cc_co_template_line` ( + `cc_co_template_line_id` int(12) NOT NULL, `cc_co_template_header_id` int(12) NOT NULL, `field_name` varchar(25) DEFAULT NULL, `required_cb` varchar(25) DEFAULT NULL, @@ -5321,10 +5176,8 @@ CREATE TABLE IF NOT EXISTS `cc_co_template_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`cc_co_template_line_id`), - UNIQUE KEY `sys_extra_field_id` (`cc_co_template_header_id`,`field_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cc_co_template_line` @@ -5346,8 +5199,8 @@ INSERT INTO `cc_co_template_line` (`cc_co_template_line_id`, `cc_co_template_hea -- Table structure for table `coa` -- -CREATE TABLE IF NOT EXISTS `coa` ( - `coa_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `coa` ( + `coa_id` int(12) NOT NULL, `coa_structure_id` int(12) NOT NULL, `coa_name` varchar(50) NOT NULL, `description` varchar(200) DEFAULT NULL, @@ -5369,10 +5222,8 @@ CREATE TABLE IF NOT EXISTS `coa` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`coa_id`), - UNIQUE KEY `value` (`coa_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `coa` @@ -5389,8 +5240,8 @@ INSERT INTO `coa` (`coa_id`, `coa_structure_id`, `coa_name`, `description`, `bal -- Table structure for table `coa_combination` -- -CREATE TABLE IF NOT EXISTS `coa_combination` ( - `coa_combination_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `coa_combination` ( + `coa_combination_id` int(12) NOT NULL, `coa_id` int(12) NOT NULL, `coa_structure_id` int(12) DEFAULT NULL, `field1` varchar(12) DEFAULT NULL, @@ -5413,19 +5264,8 @@ CREATE TABLE IF NOT EXISTS `coa_combination` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`coa_combination_id`), - UNIQUE KEY `combination` (`combination`), - KEY `coa_id` (`coa_id`), - KEY `balancing` (`field1`), - KEY `cost_center` (`field2`), - KEY `natural_account` (`field3`), - KEY `inter_company` (`field4`), - KEY `segment1` (`field5`), - KEY `segment2` (`field6`), - KEY `segment3` (`field7`), - KEY `segment4` (`field8`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6207 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `coa_combination` @@ -6670,8 +6510,8 @@ INSERT INTO `coa_combination` (`coa_combination_id`, `coa_id`, `coa_structure_id -- Table structure for table `coa_segment_values` -- -CREATE TABLE IF NOT EXISTS `coa_segment_values` ( - `coa_segment_values_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `coa_segment_values` ( + `coa_segment_values_id` int(12) UNSIGNED NOT NULL, `coa_id` int(12) NOT NULL, `coa_segments` varchar(50) NOT NULL, `account_type` varchar(50) DEFAULT NULL, @@ -6686,12 +6526,8 @@ CREATE TABLE IF NOT EXISTS `coa_segment_values` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`coa_segment_values_id`), - KEY `coa_id` (`coa_id`), - KEY `coa_segments` (`coa_segments`), - KEY `coa_segment_values_id` (`coa_segment_values_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=90 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `coa_segment_values` @@ -6761,8 +6597,8 @@ INSERT INTO `coa_segment_values` (`coa_segment_values_id`, `coa_id`, `coa_segmen -- Table structure for table `comment` -- -CREATE TABLE IF NOT EXISTS `comment` ( - `comment_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `comment` ( + `comment_id` int(12) NOT NULL, `reference_table` varchar(50) NOT NULL, `reference_id` int(12) NOT NULL, `subject` varchar(256) DEFAULT NULL, @@ -6774,11 +6610,8 @@ CREATE TABLE IF NOT EXISTS `comment` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`comment_id`), - FULLTEXT KEY `content` (`comment`), - FULLTEXT KEY `subject` (`subject`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=480 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `comment` @@ -7089,10 +6922,6 @@ INSERT INTO `comment` (`comment_id`, `reference_table`, `reference_id`, `subject (456, 'hr_timesheet_header', 6, NULL, ' Timesheet is sent for approval to Matt Jacob ', NULL, 1, NULL, '34', 34, '2015-09-04 07:45:41', 34, '2015-09-04 07:45:41'), (457, 'hr_timesheet_header', 7, NULL, ' Timesheet is sent for approval to Matt Jacob ', NULL, 1, NULL, '34', 34, '2015-09-04 08:32:18', 34, '2015-09-04 08:32:18'), (458, 'hr_timesheet_header', 7, NULL, ' Timesheet is Approved By 88 ', NULL, 1, NULL, '88', 88, '2015-09-04 08:32:48', 88, '2015-09-04 08:32:48'), -(479, 'po_header', 306, NULL, ' PO Approved By 34 ', NULL, 1, NULL, '34', 34, '2016-01-18 17:32:40', 34, '2016-01-18 17:32:40'), -(478, 'po_requisition_header', 49, NULL, 'PO Approved By 34', NULL, 1, NULL, '34', 34, '2016-01-15 08:37:36', 34, '2016-01-15 08:37:36'), -(477, 'po_header', 293, NULL, ' PO Approved By 34 ', NULL, 1, NULL, '34', 34, '2016-01-07 10:24:45', 34, '2016-01-07 10:24:45'), -(476, 'po_header', 292, NULL, ' PO Approved By 34 ', NULL, 1, NULL, '34', 34, '2016-01-07 10:20:40', 34, '2016-01-07 10:20:40'), (475, 'content', 267, ' Comment 01', ' Comment 01', NULL, NULL, NULL, NULL, 34, '2016-01-04 05:48:13', 34, '2016-01-04 05:48:13'), (474, 'bc_label_label_request', 0, NULL, '
Couldn''t connect : [10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.\r\n \n', NULL, NULL, NULL, NULL, 34, '2016-01-01 17:07:48', 34, '2016-01-01 17:07:48'), (473, 'po_header', 291, NULL, ' PO Approved By 34 ', NULL, 1, NULL, '34', 34, '2015-12-26 04:10:18', 34, '2015-12-26 04:10:18'); @@ -7103,10 +6932,10 @@ INSERT INTO `comment` (`comment_id`, `reference_table`, `reference_id`, `subject -- Table structure for table `common_bom_line` -- -CREATE TABLE IF NOT EXISTS `common_bom_line` ( - `bom_line_id` int(12) NOT NULL AUTO_INCREMENT, - `bom_header_id` int(12) unsigned NOT NULL, - `bom_sequence` int(10) unsigned NOT NULL, +CREATE TABLE `common_bom_line` ( + `bom_line_id` int(12) NOT NULL, + `bom_header_id` int(12) UNSIGNED NOT NULL, + `bom_sequence` int(10) UNSIGNED NOT NULL, `routing_sequence` int(12) DEFAULT NULL, `component_item_id_m` int(12) NOT NULL, `usage_basis` varchar(50) DEFAULT NULL, @@ -7126,11 +6955,8 @@ CREATE TABLE IF NOT EXISTS `common_bom_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`bom_line_id`), - UNIQUE KEY `bom_header_id` (`bom_header_id`,`bom_sequence`), - UNIQUE KEY `bom_header_id_2` (`bom_header_id`,`routing_sequence`,`component_item_id_m`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -7138,8 +6964,8 @@ CREATE TABLE IF NOT EXISTS `common_bom_line` ( -- Table structure for table `content` -- -CREATE TABLE IF NOT EXISTS `content` ( - `content_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `content` ( + `content_id` int(12) NOT NULL, `content_type_id` int(12) NOT NULL, `parent_id` int(12) DEFAULT NULL, `subject` varchar(256) DEFAULT NULL, @@ -7153,10 +6979,8 @@ CREATE TABLE IF NOT EXISTS `content` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`content_id`), - FULLTEXT KEY `subject` (`subject`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=269 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `content` @@ -7173,8 +6997,8 @@ INSERT INTO `content` (`content_id`, `content_type_id`, `parent_id`, `subject`, -- Table structure for table `content_type` -- -CREATE TABLE IF NOT EXISTS `content_type` ( - `content_type_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `content_type` ( + `content_type_id` int(12) NOT NULL, `allow_file_cb` tinyint(1) DEFAULT NULL, `allow_comment_cb` tinyint(1) DEFAULT NULL, `content_type` varchar(25) NOT NULL, @@ -7199,12 +7023,8 @@ CREATE TABLE IF NOT EXISTS `content_type` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`content_type_id`), - UNIQUE KEY `content_type` (`content_type`), - FULLTEXT KEY `content` (`content_label`), - FULLTEXT KEY `subject` (`subject_label`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=50 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `content_type` @@ -7223,8 +7043,8 @@ INSERT INTO `content_type` (`content_type_id`, `allow_file_cb`, `allow_comment_c -- Table structure for table `content_type_reference` -- -CREATE TABLE IF NOT EXISTS `content_type_reference` ( - `content_type_reference_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `content_type_reference` ( + `content_type_reference_id` int(12) NOT NULL, `content_type_id` int(12) NOT NULL, `field_name` varchar(256) NOT NULL, `field_label` varchar(256) DEFAULT NULL, @@ -7234,10 +7054,8 @@ CREATE TABLE IF NOT EXISTS `content_type_reference` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`content_type_reference_id`), - UNIQUE KEY `field_name` (`content_type_id`,`field_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=39 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `content_type_reference` @@ -7287,7 +7105,7 @@ INSERT INTO `content_type_reference` (`content_type_reference_id`, `content_type -- -- Stand-in structure for view `cst_gross_margin_v` -- -CREATE TABLE IF NOT EXISTS `cst_gross_margin_v` ( +CREATE TABLE `cst_gross_margin_v` ( `ar_transaction_header_id` int(12) ,`bu_org_id` int(12) ,`transaction_type` varchar(50) @@ -7341,14 +7159,15 @@ CREATE TABLE IF NOT EXISTS `cst_gross_margin_v` ( ,`gross_profit` decimal(48,10) ,`gross_margin` decimal(57,5) ); + -- -------------------------------------------------------- -- -- Table structure for table `cst_item_cost_header` -- -CREATE TABLE IF NOT EXISTS `cst_item_cost_header` ( - `cst_item_cost_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `cst_item_cost_header` ( + `cst_item_cost_header_id` int(12) NOT NULL, `bom_cost_type` varchar(25) NOT NULL, `org_id` int(12) DEFAULT NULL, `item_id_m` int(12) DEFAULT NULL, @@ -7359,10 +7178,8 @@ CREATE TABLE IF NOT EXISTS `cst_item_cost_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`cst_item_cost_header_id`), - UNIQUE KEY `bom_cost_type` (`bom_cost_type`,`org_id`,`item_id_m`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=202 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cst_item_cost_header` @@ -7491,8 +7308,8 @@ INSERT INTO `cst_item_cost_header` (`cst_item_cost_header_id`, `bom_cost_type`, -- Table structure for table `cst_item_cost_line` -- -CREATE TABLE IF NOT EXISTS `cst_item_cost_line` ( - `cst_item_cost_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `cst_item_cost_line` ( + `cst_item_cost_line_id` int(12) NOT NULL, `cst_item_cost_header_id` int(12) NOT NULL, `cost_element_type` enum('MAT','MOH','OH','RES','OSP') NOT NULL, `cost_element_id` int(12) DEFAULT NULL, @@ -7503,10 +7320,8 @@ CREATE TABLE IF NOT EXISTS `cst_item_cost_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`cst_item_cost_line_id`), - UNIQUE KEY `cst_item_cost_header_id_2` (`cst_item_cost_header_id`,`cost_element_type`,`cost_element_id`,`this_level_cb`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=411 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cst_item_cost_line` @@ -7613,7 +7428,7 @@ INSERT INTO `cst_item_cost_line` (`cst_item_cost_line_id`, `cst_item_cost_header -- Table structure for table `cst_item_cost_line_pre` -- -CREATE TABLE IF NOT EXISTS `cst_item_cost_line_pre` ( +CREATE TABLE `cst_item_cost_line_pre` ( `cst_item_cost_line_id` int(12) NOT NULL, `cst_item_cost_header_id` int(12) NOT NULL, `cost_element_type` enum('MAT','MOH','OH','RES','OSP') NOT NULL, @@ -7626,9 +7441,8 @@ CREATE TABLE IF NOT EXISTS `cst_item_cost_line_pre` ( `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, - `cst_item_cost_line_pre_id` int(12) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`cst_item_cost_line_pre_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=75 ; + `cst_item_cost_line_pre_id` int(12) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cst_item_cost_line_pre` @@ -7709,16 +7523,17 @@ INSERT INTO `cst_item_cost_line_pre` (`cst_item_cost_line_id`, `cst_item_cost_he -- -- Stand-in structure for view `cst_item_cost_sum_v` -- -CREATE TABLE IF NOT EXISTS `cst_item_cost_sum_v` ( +CREATE TABLE `cst_item_cost_sum_v` ( `cst_item_cost_header_id` int(12) ,`standard_cost` decimal(42,5) ); + -- -------------------------------------------------------- -- -- Stand-in structure for view `cst_item_cost_v` -- -CREATE TABLE IF NOT EXISTS `cst_item_cost_v` ( +CREATE TABLE `cst_item_cost_v` ( `item_number` varchar(50) ,`item_description` varchar(256) ,`item_id_m` int(12) @@ -7730,16 +7545,16 @@ CREATE TABLE IF NOT EXISTS `cst_item_cost_v` ( ,`bom_cost_type` varchar(25) ,`standard_cost` decimal(42,5) ); + -- -------------------------------------------------------- -- -- Table structure for table `c_article` -- -CREATE TABLE IF NOT EXISTS `c_article` ( +CREATE TABLE `c_article` ( `content_id` int(12) NOT NULL, - `content` text, - PRIMARY KEY (`content_id`) + `content` text ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -7748,11 +7563,10 @@ CREATE TABLE IF NOT EXISTS `c_article` ( -- Table structure for table `c_collections` -- -CREATE TABLE IF NOT EXISTS `c_collections` ( +CREATE TABLE `c_collections` ( `content_id` int(12) NOT NULL, `length` varchar(200) DEFAULT NULL, - `height` varchar(200) DEFAULT NULL, - PRIMARY KEY (`content_id`) + `height` varchar(200) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- @@ -7771,10 +7585,9 @@ INSERT INTO `c_collections` (`content_id`, `length`, `height`) VALUES -- Table structure for table `c_content` -- -CREATE TABLE IF NOT EXISTS `c_content` ( +CREATE TABLE `c_content` ( `content_id` int(12) NOT NULL, - `content` text, - PRIMARY KEY (`content_id`) + `content` text ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- @@ -7795,11 +7608,10 @@ INSERT INTO `c_content` (`content_id`, `content`) VALUES -- Table structure for table `c_documentation` -- -CREATE TABLE IF NOT EXISTS `c_documentation` ( +CREATE TABLE `c_documentation` ( `content_id` int(12) NOT NULL, `content` text, - `chapter` varchar(256) DEFAULT NULL, - PRIMARY KEY (`content_id`) + `chapter` varchar(256) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- @@ -7839,10 +7651,9 @@ INSERT INTO `c_documentation` (`content_id`, `content`, `chapter`) VALUES -- Table structure for table `c_forum` -- -CREATE TABLE IF NOT EXISTS `c_forum` ( +CREATE TABLE `c_forum` ( `content_id` int(12) NOT NULL, - `content` text, - PRIMARY KEY (`content_id`) + `content` text ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- @@ -7898,15 +7709,14 @@ INSERT INTO `c_forum` (`content_id`, `content`) VALUES -- Table structure for table `c_issue` -- -CREATE TABLE IF NOT EXISTS `c_issue` ( +CREATE TABLE `c_issue` ( `content_id` int(12) NOT NULL, `priority` varchar(256) DEFAULT NULL, `category` varchar(256) DEFAULT NULL, `component` varchar(256) DEFAULT NULL, `status` varchar(256) DEFAULT NULL, `content` text, - `testabab` text, - PRIMARY KEY (`content_id`) + `testabab` text ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -7915,8 +7725,8 @@ CREATE TABLE IF NOT EXISTS `c_issue` ( -- Table structure for table `ec_cart` -- -CREATE TABLE IF NOT EXISTS `ec_cart` ( - `ec_cart_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `ec_cart` ( + `ec_cart_id` int(12) UNSIGNED NOT NULL, `ec_product_id` int(12) DEFAULT NULL, `quantity` decimal(15,5) DEFAULT NULL, `price` decimal(15,5) DEFAULT NULL, @@ -7925,10 +7735,8 @@ CREATE TABLE IF NOT EXISTS `ec_cart` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ec_cart_id`), - UNIQUE KEY `ec_product_id` (`ec_product_id`,`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -7936,7 +7744,7 @@ CREATE TABLE IF NOT EXISTS `ec_cart` ( -- Table structure for table `ec_control` -- -CREATE TABLE IF NOT EXISTS `ec_control` ( +CREATE TABLE `ec_control` ( `default_home_page` varchar(50) NOT NULL, `site_name` varchar(256) NOT NULL, `price_round` tinyint(2) DEFAULT NULL, @@ -7952,8 +7760,7 @@ CREATE TABLE IF NOT EXISTS `ec_control` ( `send_email_cb` tinyint(1) DEFAULT NULL, `email_cc` varchar(255) DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - UNIQUE KEY `name` (`site_name`) + `last_update_date` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- @@ -7969,8 +7776,8 @@ INSERT INTO `ec_control` (`default_home_page`, `site_name`, `price_round`, `tax_ -- Table structure for table `ec_paid_order` -- -CREATE TABLE IF NOT EXISTS `ec_paid_order` ( - `ec_paid_order_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `ec_paid_order` ( + `ec_paid_order_id` int(12) UNSIGNED NOT NULL, `payment_method_id` int(12) DEFAULT NULL, `total_amount` decimal(15,5) DEFAULT NULL, `doc_currency` varchar(25) DEFAULT NULL, @@ -7984,10 +7791,8 @@ CREATE TABLE IF NOT EXISTS `ec_paid_order` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ec_paid_order_id`), - UNIQUE KEY `service_provider` (`service_provider`,`sp_transaction_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ec_paid_order` @@ -8015,8 +7820,8 @@ INSERT INTO `ec_paid_order` (`ec_paid_order_id`, `payment_method_id`, `total_amo -- Table structure for table `ec_payment_method` -- -CREATE TABLE IF NOT EXISTS `ec_payment_method` ( - `ec_payment_method_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `ec_payment_method` ( + `ec_payment_method_id` int(12) UNSIGNED NOT NULL, `type` varchar(25) DEFAULT NULL, `payment_method_name` varchar(25) DEFAULT NULL, `mode` varchar(255) DEFAULT NULL, @@ -8035,10 +7840,8 @@ CREATE TABLE IF NOT EXISTS `ec_payment_method` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ec_payment_method_id`), - UNIQUE KEY `item_id_m` (`type`,`username`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ec_payment_method` @@ -8055,8 +7858,8 @@ INSERT INTO `ec_payment_method` (`ec_payment_method_id`, `type`, `payment_method -- Table structure for table `ec_product` -- -CREATE TABLE IF NOT EXISTS `ec_product` ( - `ec_product_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `ec_product` ( + `ec_product_id` int(12) UNSIGNED NOT NULL, `item_id_m` int(12) DEFAULT NULL, `org_id` int(12) DEFAULT NULL, `product_name` varchar(255) DEFAULT NULL, @@ -8079,17 +7882,15 @@ CREATE TABLE IF NOT EXISTS `ec_product` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ec_product_id`), - UNIQUE KEY `item_id_m` (`item_id_m`,`product_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ec_product` -- INSERT INTO `ec_product` (`ec_product_id`, `item_id_m`, `org_id`, `product_name`, `product_description`, `new_date_trom`, `new_date_to`, `status`, `visibility`, `tax_code_id`, `meta_title`, `meta_keywords`, `meta_description`, `price_list_id`, `list_price`, `no_of_view`, `sales_price`, `sp_from_date`, `sp_to_date`, `featured_product_cb`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES -(1, 10034, 6, 'Desktop', 'A laptop or a notebook is a portable personal computer with a clamshell form factor, suitable for mobile use.[1] There was a difference between laptops and notebooks in the past, but nowadays it has gradually died away.[2] Laptops are commonly used in a variety of settings, including at work, in education, and for personal multimedia.\r\n\r\nA laptop combines the components and inputs of a desktop computer, including display, speakers, keyboard and pointing device (such as a touchpad or a trackpad) into a single device. Most modern-day laptops also have an integrated webcam and a microphone. A laptop can be powered either from a rechargeable battery, or by mains electricity via an AC adapter. Laptop is a diverse category of devices and other more specific terms, such as rugged notebook or convertible, refer to specialist types of laptops, which have been optimized for specific uses. Hardware specifications change significantly between different types, makes and models of laptops.', NULL, NULL, 'ENABLED', 'ALL', NULL, NULL, NULL, NULL, 2, '120.00000', NULL, '65.00000', NULL, NULL, NULL, 34, '2015-03-27 09:07:15', 34, '2015-04-02 04:36:43'), +(1, 10034, 6, 'Desktop', 'A laptop or a notebook is a portable personal computer with a clamshell form factor, suitable for mobile use.[1] There was a difference between laptops and notebooks in the past, but nowadays it has gradually died away.[2] Laptops are commonly used in a variety of settings, including at work, in education, and for personal multimedia.\r\n\r\nA laptop combines the components and inputs of a desktop computer, including display, speakers, keyboard and pointing device (such as a touchpad or a trackpad) into a single device. Most modern-day laptops also have an integrated webcam and a microphone. A laptop can be powered either from a rechargeable battery, or by mains electricity via an AC adapter. Laptop is a diverse category of devices and other more specific terms, such as rugged notebook or convertible, refer to specialist types of laptops, which have been optimized for specific uses. Hardware specifications change significantly between different types, makes and models of laptops.', NULL, NULL, 'ENABLED', 0x414c4c, NULL, NULL, NULL, NULL, 2, '120.00000', NULL, '65.00000', NULL, NULL, NULL, 34, '2015-03-27 09:07:15', 34, '2015-04-02 04:36:43'), (4, 10197, 6, 'Lenovo G70', 'AccuType Keyboard\r\n\r\nFeaturing a modern look and feel, the acclaimed AccuType keyboard has island-style, ergonomic keys that allow a more fluid, spacious, comfortable, and accurate typing experience than standard keyboard designs.\r\n\r\nFast Data Transfer\r\n\r\nMove data between the G50 and other devices quickly with USB 3.0 SuperSpeed; it''s up to ten times faster than previous USB technologies, and it''s backward-compatible.\r\n\r\nBattery-Saving Technology\r\n\r\nLenovo Energy Management protects the long-term durability of the battery and uses advanced energy-saving technology to increase time spent between charges.\r\n\r\nSimple Maintenance\r\n\r\nWith OneKey Recovery, recovering from viruses or other technical difficulties is a snap.\r\n\r\n\r\n\r\nConnectivity Options\r\n\r\nWith 802.11 AC WiFi connectivity, 10/100 LAN, and Bluetooth , you''ll be able to connect to the internet wherever you go.', NULL, NULL, 'ENABLED', NULL, NULL, NULL, NULL, NULL, 2, '100.00000', NULL, '70.00000', NULL, NULL, NULL, 34, '2015-04-01 13:04:28', 34, '2015-04-02 04:35:32'), (5, 10195, 6, 'Lenovo 2', 'AccuType Keyboard\r\n\r\nFeaturing a modern look and feel, the acclaimed AccuType keyboard has island-style, ergonomic keys that allow a more fluid, spacious, comfortable, and accurate typing experience than standard keyboard designs.\r\n\r\nFast Data Transfer\r\n\r\nMove data between the G50 and other devices quickly with USB 3.0 SuperSpeed; it''s up to ten times faster than previous USB technologies, and it''s backward-compatible.\r\n\r\nBattery-Saving Technology\r\n\r\nLenovo Energy Management protects the long-term durability of the battery and uses advanced energy-saving technology to increase time spent between charges.\r\n\r\nSimple Maintenance\r\n\r\nWith OneKey Recovery, recovering from viruses or other technical difficulties is a snap.\r\n\r\n\r\n\r\nConnectivity Options\r\n\r\nWith 802.11 AC WiFi connectivity, 10/100 LAN, and Bluetooth , you''ll be able to connect to the internet wherever you go.', NULL, NULL, 'ENABLED', NULL, NULL, NULL, NULL, NULL, NULL, '150.00000', NULL, '120.00000', NULL, NULL, NULL, 34, '2015-04-01 13:09:51', 34, '2015-04-02 04:34:53'), (7, 10193, 6, 'Lenovo 3', 'AccuType Keyboard\r\n\r\nFeaturing a modern look and feel, the acclaimed AccuType keyboard has island-style, ergonomic keys that allow a more fluid, spacious, comfortable, and accurate typing experience than standard keyboard designs.\r\n\r\nFast Data Transfer\r\n\r\nMove data between the G50 and other devices quickly with USB 3.0 SuperSpeed; it''s up to ten times faster than previous USB technologies, and it''s backward-compatible.\r\n\r\nBattery-Saving Technology\r\n\r\nLenovo Energy Management protects the long-term durability of the battery and uses advanced energy-saving technology to increase time spent between charges.\r\n\r\nSimple Maintenance\r\n\r\nWith OneKey Recovery, recovering from viruses or other technical difficulties is a snap.\r\n\r\n\r\n\r\nConnectivity Options\r\n\r\nWith 802.11 AC WiFi connectivity, 10/100 LAN, and Bluetooth , you''ll be able to connect to the internet wherever you go.', NULL, NULL, 'ENABLED', NULL, NULL, NULL, NULL, NULL, NULL, '120.00000', NULL, '85.00000', NULL, NULL, NULL, 34, '2015-04-01 13:12:58', 34, '2015-04-02 06:07:35'), @@ -8110,10 +7911,10 @@ INSERT INTO `ec_product` (`ec_product_id`, `item_id_m`, `org_id`, `product_name` -- Table structure for table `engine` -- -CREATE TABLE IF NOT EXISTS `engine` ( - `engine_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `engine` ( + `engine_id` int(12) UNSIGNED NOT NULL, `obj_class_name` varchar(100) NOT NULL, - `number` int(12) unsigned NOT NULL, + `number` int(12) UNSIGNED NOT NULL, `type` varchar(50) NOT NULL, `enabled_cb` tinyint(1) DEFAULT NULL, `db_version` varchar(25) DEFAULT NULL, @@ -8125,11 +7926,8 @@ CREATE TABLE IF NOT EXISTS `engine` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`engine_id`), - UNIQUE KEY `reference_table` (`obj_class_name`,`type`), - UNIQUE KEY `number` (`number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=257 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `engine` @@ -8350,9 +8148,9 @@ INSERT INTO `engine` (`engine_id`, `obj_class_name`, `number`, `type`, `enabled_ -- Table structure for table `enterprise` -- -CREATE TABLE IF NOT EXISTS `enterprise` ( - `enterprise_id` int(12) unsigned NOT NULL AUTO_INCREMENT, - `org_id` int(10) unsigned NOT NULL, +CREATE TABLE `enterprise` ( + `enterprise_id` int(12) UNSIGNED NOT NULL, + `org_id` int(10) UNSIGNED NOT NULL, `designation_option_header_id` int(12) DEFAULT NULL, `type_option_header_id` int(12) DEFAULT NULL, `efid` int(12) DEFAULT NULL, @@ -8362,10 +8160,8 @@ CREATE TABLE IF NOT EXISTS `enterprise` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`enterprise_id`), - UNIQUE KEY `org_id` (`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=44 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `enterprise` @@ -8383,8 +8179,8 @@ INSERT INTO `enterprise` (`enterprise_id`, `org_id`, `designation_option_header_ -- Table structure for table `extn_contact` -- -CREATE TABLE IF NOT EXISTS `extn_contact` ( - `extn_contact_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `extn_contact` ( + `extn_contact_id` int(12) UNSIGNED NOT NULL, `contact_name` varchar(25) NOT NULL, `last_name` varchar(25) NOT NULL, `first_name` varchar(100) DEFAULT NULL, @@ -8404,13 +8200,8 @@ CREATE TABLE IF NOT EXISTS `extn_contact` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`extn_contact_id`), - UNIQUE KEY `job_code` (`contact_name`), - UNIQUE KEY `job_code_2` (`contact_name`), - UNIQUE KEY `job_name` (`last_name`), - UNIQUE KEY `job_name_2` (`last_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extn_contact` @@ -8426,8 +8217,8 @@ INSERT INTO `extn_contact` (`extn_contact_id`, `contact_name`, `last_name`, `fir -- Table structure for table `extn_contact_reference` -- -CREATE TABLE IF NOT EXISTS `extn_contact_reference` ( - `extn_contact_reference_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `extn_contact_reference` ( + `extn_contact_reference_id` int(12) NOT NULL, `extn_contact_id` int(12) NOT NULL, `status` varchar(20) DEFAULT NULL, `reference_type` varchar(50) DEFAULT NULL, @@ -8436,10 +8227,8 @@ CREATE TABLE IF NOT EXISTS `extn_contact_reference` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`extn_contact_reference_id`), - UNIQUE KEY `category_id` (`status`,`reference_type`,`reference_table`,`reference_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=25 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extn_contact_reference` @@ -8470,8 +8259,8 @@ INSERT INTO `extn_contact_reference` (`extn_contact_reference_id`, `extn_contact -- Table structure for table `extn_image` -- -CREATE TABLE IF NOT EXISTS `extn_image` ( - `extn_image_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `extn_image` ( + `extn_image_id` int(12) UNSIGNED NOT NULL, `file_path` varchar(255) NOT NULL, `file_name` varchar(50) NOT NULL, `file_size` varchar(25) NOT NULL, @@ -8483,9 +8272,8 @@ CREATE TABLE IF NOT EXISTS `extn_image` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`extn_image_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=110 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extn_image` @@ -8599,16 +8387,15 @@ INSERT INTO `extn_image` (`extn_image_id`, `file_path`, `file_name`, `file_size` -- Table structure for table `extn_image_reference` -- -CREATE TABLE IF NOT EXISTS `extn_image_reference` ( - `extn_image_reference_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `extn_image_reference` ( + `extn_image_reference_id` int(12) UNSIGNED NOT NULL, `extn_image_id` int(12) NOT NULL, `reference_table` varchar(50) NOT NULL, `reference_id` int(12) NOT NULL, `img_description1` varchar(255) DEFAULT NULL, `img_description2` varchar(255) DEFAULT NULL, - `status` varchar(25) DEFAULT NULL, - PRIMARY KEY (`extn_image_reference_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=105 ; + `status` varchar(25) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extn_image_reference` @@ -8702,8 +8489,8 @@ INSERT INTO `extn_image_reference` (`extn_image_reference_id`, `extn_image_id`, -- Table structure for table `extn_rating_control` -- -CREATE TABLE IF NOT EXISTS `extn_rating_control` ( - `pos_inv_control_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `extn_rating_control` ( + `pos_inv_control_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `cogs_ac_id` int(12) DEFAULT NULL, `ar_transaction_type_id` int(12) DEFAULT NULL, @@ -8718,9 +8505,8 @@ CREATE TABLE IF NOT EXISTS `extn_rating_control` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`pos_inv_control_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -8728,8 +8514,8 @@ CREATE TABLE IF NOT EXISTS `extn_rating_control` ( -- Table structure for table `extn_rating_values` -- -CREATE TABLE IF NOT EXISTS `extn_rating_values` ( - `extn_rating_values_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `extn_rating_values` ( + `extn_rating_values_id` int(12) NOT NULL, `reference_table` varchar(50) NOT NULL, `reference_id` int(12) NOT NULL, `rating` int(5) DEFAULT NULL, @@ -8738,9 +8524,8 @@ CREATE TABLE IF NOT EXISTS `extn_rating_values` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`extn_rating_values_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extn_rating_values` @@ -8762,8 +8547,8 @@ INSERT INTO `extn_rating_values` (`extn_rating_values_id`, `reference_table`, `r -- Table structure for table `extn_report` -- -CREATE TABLE IF NOT EXISTS `extn_report` ( - `extn_report_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `extn_report` ( + `extn_report_id` int(12) UNSIGNED NOT NULL, `report_name` varchar(100) NOT NULL, `module_code` varchar(10) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, @@ -8799,10 +8584,8 @@ CREATE TABLE IF NOT EXISTS `extn_report` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`extn_report_id`), - UNIQUE KEY `name` (`report_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extn_report` @@ -8822,15 +8605,13 @@ INSERT INTO `extn_report` (`extn_report_id`, `report_name`, `module_code`, `desc -- Table structure for table `extn_report_path` -- -CREATE TABLE IF NOT EXISTS `extn_report_path` ( - `extn_report_path_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `extn_report_path` ( + `extn_report_path_id` int(12) NOT NULL, `extn_report_id` int(12) NOT NULL, `column_name` varchar(100) NOT NULL, `path` varchar(255) NOT NULL, - `description` varchar(255) DEFAULT NULL, - PRIMARY KEY (`extn_report_path_id`), - UNIQUE KEY `view_id` (`extn_report_id`,`column_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `description` varchar(255) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -8838,8 +8619,8 @@ CREATE TABLE IF NOT EXISTS `extn_report_path` ( -- Table structure for table `extn_social_login` -- -CREATE TABLE IF NOT EXISTS `extn_social_login` ( - `extn_social_login_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `extn_social_login` ( + `extn_social_login_id` int(12) NOT NULL, `provider_name` varchar(50) DEFAULT NULL, `enabled_cb` tinyint(1) DEFAULT NULL, `sl_key` varchar(255) DEFAULT NULL, @@ -8851,10 +8632,8 @@ CREATE TABLE IF NOT EXISTS `extn_social_login` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`extn_social_login_id`), - UNIQUE KEY `name` (`enabled_cb`,`sl_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extn_social_login` @@ -8870,8 +8649,8 @@ INSERT INTO `extn_social_login` (`extn_social_login_id`, `provider_name`, `enabl -- Table structure for table `extn_subscribe` -- -CREATE TABLE IF NOT EXISTS `extn_subscribe` ( - `extn_subscribe_id` int(20) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `extn_subscribe` ( + `extn_subscribe_id` int(20) UNSIGNED NOT NULL, `reference_key_name` varchar(50) NOT NULL, `reference_key_value` int(12) NOT NULL, `user_email` varchar(50) NOT NULL, @@ -8882,10 +8661,8 @@ CREATE TABLE IF NOT EXISTS `extn_subscribe` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`extn_subscribe_id`), - UNIQUE KEY `reference_key_name` (`reference_key_name`,`reference_key_value`,`user_email`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extn_subscribe` @@ -8900,8 +8677,8 @@ INSERT INTO `extn_subscribe` (`extn_subscribe_id`, `reference_key_name`, `refere -- Table structure for table `extn_theme` -- -CREATE TABLE IF NOT EXISTS `extn_theme` ( - `extn_theme_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `extn_theme` ( + `extn_theme_id` int(12) UNSIGNED NOT NULL, `theme_name` varchar(100) NOT NULL, `developer_name` varchar(50) DEFAULT NULL, `developer_email` varchar(50) DEFAULT NULL, @@ -8915,10 +8692,8 @@ CREATE TABLE IF NOT EXISTS `extn_theme` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`extn_theme_id`), - UNIQUE KEY `theme_name` (`theme_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extn_theme` @@ -8936,7 +8711,7 @@ INSERT INTO `extn_theme` (`extn_theme_id`, `theme_name`, `developer_name`, `deve -- Table structure for table `extn_web_tracking` -- -CREATE TABLE IF NOT EXISTS `extn_web_tracking` ( +CREATE TABLE `extn_web_tracking` ( `extn_web_tracking_id` int(12) NOT NULL, `page_visited` varchar(256) DEFAULT NULL, `referrer` varchar(256) DEFAULT NULL, @@ -8946,9 +8721,7 @@ CREATE TABLE IF NOT EXISTS `extn_web_tracking` ( `country` varchar(60) DEFAULT NULL, `city` varchar(128) DEFAULT NULL, `http_user_agent` varchar(256) DEFAULT NULL, - `creation_date` datetime DEFAULT NULL, - PRIMARY KEY (`extn_web_tracking_id`), - UNIQUE KEY `name` (`referrer`) + `creation_date` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -8957,8 +8730,8 @@ CREATE TABLE IF NOT EXISTS `extn_web_tracking` ( -- Table structure for table `extra_field_calculated_power` -- -CREATE TABLE IF NOT EXISTS `extra_field_calculated_power` ( - `extra_field_calculated_power_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `extra_field_calculated_power` ( + `extra_field_calculated_power_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -8967,10 +8740,8 @@ CREATE TABLE IF NOT EXISTS `extra_field_calculated_power` ( `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, - `extra_field_calculated_power_value` decimal(20,8) DEFAULT NULL, - PRIMARY KEY (`extra_field_calculated_power_id`), - UNIQUE KEY `extra_field_value` (`extra_field_calculated_power_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `extra_field_calculated_power_value` decimal(20,8) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extra_field_calculated_power` @@ -8987,8 +8758,8 @@ INSERT INTO `extra_field_calculated_power` (`extra_field_calculated_power_id`, ` -- Table structure for table `extra_field_grade` -- -CREATE TABLE IF NOT EXISTS `extra_field_grade` ( - `extra_field_grade_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `extra_field_grade` ( + `extra_field_grade_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -8997,10 +8768,8 @@ CREATE TABLE IF NOT EXISTS `extra_field_grade` ( `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, - `extra_field_grade_value` varchar(25) DEFAULT NULL, - PRIMARY KEY (`extra_field_grade_id`), - UNIQUE KEY `extra_field_value` (`extra_field_grade_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `extra_field_grade_value` varchar(25) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extra_field_grade` @@ -9016,8 +8785,8 @@ INSERT INTO `extra_field_grade` (`extra_field_grade_id`, `reference_type`, `refe -- Table structure for table `extra_field_length` -- -CREATE TABLE IF NOT EXISTS `extra_field_length` ( - `extra_field_length_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `extra_field_length` ( + `extra_field_length_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -9026,10 +8795,8 @@ CREATE TABLE IF NOT EXISTS `extra_field_length` ( `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, - `extra_field_length_value` varchar(20) DEFAULT NULL, - PRIMARY KEY (`extra_field_length_id`), - UNIQUE KEY `extra_field_value` (`extra_field_length_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `extra_field_length_value` varchar(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extra_field_length` @@ -9045,8 +8812,8 @@ INSERT INTO `extra_field_length` (`extra_field_length_id`, `reference_type`, `re -- Table structure for table `extra_field_per_master_file` -- -CREATE TABLE IF NOT EXISTS `extra_field_per_master_file` ( - `extra_field_per_master_file_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `extra_field_per_master_file` ( + `extra_field_per_master_file_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -9055,10 +8822,8 @@ CREATE TABLE IF NOT EXISTS `extra_field_per_master_file` ( `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, - `extra_field_per_master_file_value` int(12) DEFAULT NULL, - PRIMARY KEY (`extra_field_per_master_file_id`), - UNIQUE KEY `extra_field_value` (`extra_field_per_master_file_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `extra_field_per_master_file_value` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extra_field_per_master_file` @@ -9073,8 +8838,8 @@ INSERT INTO `extra_field_per_master_file` (`extra_field_per_master_file_id`, `re -- Table structure for table `extra_field_power_cable` -- -CREATE TABLE IF NOT EXISTS `extra_field_power_cable` ( - `extra_field_power_cable_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `extra_field_power_cable` ( + `extra_field_power_cable_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -9083,10 +8848,8 @@ CREATE TABLE IF NOT EXISTS `extra_field_power_cable` ( `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, - `extra_field_power_cable_value` tinyint(1) DEFAULT NULL, - PRIMARY KEY (`extra_field_power_cable_id`), - UNIQUE KEY `extra_field_value` (`extra_field_power_cable_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `extra_field_power_cable_value` tinyint(1) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extra_field_power_cable` @@ -9102,8 +8865,8 @@ INSERT INTO `extra_field_power_cable` (`extra_field_power_cable_id`, `reference_ -- Table structure for table `extra_field_serial_status` -- -CREATE TABLE IF NOT EXISTS `extra_field_serial_status` ( - `extra_field_serial_status_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `extra_field_serial_status` ( + `extra_field_serial_status_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -9112,10 +8875,8 @@ CREATE TABLE IF NOT EXISTS `extra_field_serial_status` ( `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, - `extra_field_serial_status_value` varchar(50) DEFAULT NULL, - PRIMARY KEY (`extra_field_serial_status_id`), - UNIQUE KEY `extra_field_value` (`extra_field_serial_status_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `extra_field_serial_status_value` varchar(50) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `extra_field_serial_status` @@ -9130,18 +8891,16 @@ INSERT INTO `extra_field_serial_status` (`extra_field_serial_status_id`, `refere -- Table structure for table `ext_test_case_header` -- -CREATE TABLE IF NOT EXISTS `ext_test_case_header` ( - `ext_test_case_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ext_test_case_header` ( + `ext_test_case_header_id` int(12) NOT NULL, `module_name` varchar(50) NOT NULL, `name` varchar(256) NOT NULL, `description` varchar(512) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ext_test_case_header_id`), - UNIQUE KEY `module_name` (`module_name`,`name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ext_test_case_header` @@ -9156,8 +8915,8 @@ INSERT INTO `ext_test_case_header` (`ext_test_case_header_id`, `module_name`, `n -- Table structure for table `ext_test_case_line` -- -CREATE TABLE IF NOT EXISTS `ext_test_case_line` ( - `ext_test_case_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ext_test_case_line` ( + `ext_test_case_line_id` int(12) NOT NULL, `ext_test_case_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, `step_action` text NOT NULL, @@ -9166,10 +8925,8 @@ CREATE TABLE IF NOT EXISTS `ext_test_case_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ext_test_case_line_id`), - UNIQUE KEY `module_name` (`ext_test_case_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -9177,19 +8934,16 @@ CREATE TABLE IF NOT EXISTS `ext_test_case_line` ( -- Table structure for table `ext_url_alias` -- -CREATE TABLE IF NOT EXISTS `ext_url_alias` ( - `ext_url_alias_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `ext_url_alias` ( + `ext_url_alias_id` int(12) NOT NULL, `content_id` int(12) NOT NULL, `original_url` varchar(256) NOT NULL, `alias` varchar(256) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`ext_url_alias_id`), - UNIQUE KEY `original_url` (`original_url`), - UNIQUE KEY `alias` (`alias`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ext_url_alias` @@ -9215,8 +8969,8 @@ INSERT INTO `ext_url_alias` (`ext_url_alias_id`, `content_id`, `original_url`, ` -- Table structure for table `fa_asset` -- -CREATE TABLE IF NOT EXISTS `fa_asset` ( - `fa_asset_id` int(10) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_asset` ( + `fa_asset_id` int(10) UNSIGNED NOT NULL, `asset_number` varchar(30) NOT NULL, `type` varchar(25) NOT NULL, `tag_number` varchar(50) DEFAULT NULL, @@ -9239,12 +8993,8 @@ CREATE TABLE IF NOT EXISTS `fa_asset` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_asset_id`), - UNIQUE KEY `asset_number` (`asset_number`), - UNIQUE KEY `tag_number` (`tag_number`), - UNIQUE KEY `asset_number_2` (`asset_number`,`serial_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_asset` @@ -9263,8 +9013,8 @@ INSERT INTO `fa_asset` (`fa_asset_id`, `asset_number`, `type`, `tag_number`, `se -- Table structure for table `fa_asset_assignment` -- -CREATE TABLE IF NOT EXISTS `fa_asset_assignment` ( - `fa_asset_assignment_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_asset_assignment` ( + `fa_asset_assignment_id` int(12) UNSIGNED NOT NULL, `fa_asset_id` int(12) NOT NULL, `units` decimal(10,5) NOT NULL, `hr_employee_id` int(12) DEFAULT NULL, @@ -9274,9 +9024,8 @@ CREATE TABLE IF NOT EXISTS `fa_asset_assignment` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_asset_assignment_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_asset_assignment` @@ -9299,8 +9048,8 @@ INSERT INTO `fa_asset_assignment` (`fa_asset_assignment_id`, `fa_asset_id`, `uni -- Table structure for table `fa_asset_book` -- -CREATE TABLE IF NOT EXISTS `fa_asset_book` ( - `fa_asset_book_id` int(10) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_asset_book` ( + `fa_asset_book_id` int(10) UNSIGNED NOT NULL, `asset_book_name` varchar(25) NOT NULL, `bu_org_id` int(12) NOT NULL, `type` varchar(25) NOT NULL, @@ -9334,10 +9083,8 @@ CREATE TABLE IF NOT EXISTS `fa_asset_book` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_asset_book_id`), - UNIQUE KEY `asset_book_name` (`asset_book_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_asset_book` @@ -9355,8 +9102,8 @@ INSERT INTO `fa_asset_book` (`fa_asset_book_id`, `asset_book_name`, `bu_org_id`, -- Table structure for table `fa_asset_book_info` -- -CREATE TABLE IF NOT EXISTS `fa_asset_book_info` ( - `fa_asset_book_info_id` int(10) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_asset_book_info` ( + `fa_asset_book_info_id` int(10) UNSIGNED NOT NULL, `fa_asset_book_id` int(12) NOT NULL, `fa_asset_id` int(12) NOT NULL, `referece` varchar(50) DEFAULT NULL, @@ -9378,10 +9125,8 @@ CREATE TABLE IF NOT EXISTS `fa_asset_book_info` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_asset_book_info_id`), - UNIQUE KEY `fa_asset_book_id` (`fa_asset_book_id`,`fa_asset_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_asset_book_info` @@ -9401,8 +9146,8 @@ INSERT INTO `fa_asset_book_info` (`fa_asset_book_info_id`, `fa_asset_book_id`, ` -- Table structure for table `fa_asset_category` -- -CREATE TABLE IF NOT EXISTS `fa_asset_category` ( - `fa_asset_category_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_asset_category` ( + `fa_asset_category_id` int(12) UNSIGNED NOT NULL, `asset_category` varchar(25) DEFAULT NULL, `segment1` varchar(50) DEFAULT NULL, `segment2` varchar(50) DEFAULT NULL, @@ -9415,12 +9160,8 @@ CREATE TABLE IF NOT EXISTS `fa_asset_category` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_asset_category_id`), - UNIQUE KEY `name` (`type`), - UNIQUE KEY `address` (`type`), - UNIQUE KEY `address_name` (`type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_asset_category` @@ -9435,8 +9176,8 @@ INSERT INTO `fa_asset_category` (`fa_asset_category_id`, `asset_category`, `segm -- Table structure for table `fa_asset_component` -- -CREATE TABLE IF NOT EXISTS `fa_asset_component` ( - `fa_asset_component_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_asset_component` ( + `fa_asset_component_id` int(12) UNSIGNED NOT NULL, `fa_asset_id` int(12) NOT NULL, `component_asset_id` int(12) NOT NULL, `source_type` varchar(15) DEFAULT NULL, @@ -9448,10 +9189,8 @@ CREATE TABLE IF NOT EXISTS `fa_asset_component` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_asset_component_id`), - UNIQUE KEY `fa_asset_book_id` (`fa_asset_id`,`reference2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_asset_component` @@ -9466,8 +9205,8 @@ INSERT INTO `fa_asset_component` (`fa_asset_component_id`, `fa_asset_id`, `compo -- Table structure for table `fa_asset_retirement` -- -CREATE TABLE IF NOT EXISTS `fa_asset_retirement` ( - `fa_asset_retirement_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_asset_retirement` ( + `fa_asset_retirement_id` int(12) UNSIGNED NOT NULL, `fa_asset_id` int(12) NOT NULL, `fa_asset_book_id` int(12) NOT NULL, `source_type` varchar(255) DEFAULT NULL, @@ -9485,10 +9224,8 @@ CREATE TABLE IF NOT EXISTS `fa_asset_retirement` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_asset_retirement_id`), - UNIQUE KEY `fa_asset_book_id` (`fa_asset_id`,`retired_cost`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_asset_retirement` @@ -9507,8 +9244,8 @@ INSERT INTO `fa_asset_retirement` (`fa_asset_retirement_id`, `fa_asset_id`, `fa_ -- Table structure for table `fa_asset_source` -- -CREATE TABLE IF NOT EXISTS `fa_asset_source` ( - `fa_asset_source_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_asset_source` ( + `fa_asset_source_id` int(12) UNSIGNED NOT NULL, `fa_asset_id` int(12) NOT NULL, `source_type` varchar(15) DEFAULT NULL, `line_number` int(12) DEFAULT NULL, @@ -9521,10 +9258,8 @@ CREATE TABLE IF NOT EXISTS `fa_asset_source` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_asset_source_id`), - UNIQUE KEY `fa_asset_book_id` (`fa_asset_id`,`ap_transaction_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_asset_source` @@ -9540,8 +9275,8 @@ INSERT INTO `fa_asset_source` (`fa_asset_source_id`, `fa_asset_id`, `source_type -- Table structure for table `fa_asset_trasaction` -- -CREATE TABLE IF NOT EXISTS `fa_asset_trasaction` ( - `fa_asset_trasaction_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_asset_trasaction` ( + `fa_asset_trasaction_id` int(12) UNSIGNED NOT NULL, `fa_asset_id` int(12) NOT NULL, `transaction_type_id` int(12) DEFAULT NULL, `quantity` decimal(10,5) DEFAULT NULL, @@ -9553,12 +9288,8 @@ CREATE TABLE IF NOT EXISTS `fa_asset_trasaction` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_asset_trasaction_id`), - UNIQUE KEY `asset_number` (`fa_asset_id`), - UNIQUE KEY `tag_number` (`transaction_type_id`), - UNIQUE KEY `asset_number_2` (`fa_asset_id`,`quantity`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -9566,8 +9297,8 @@ CREATE TABLE IF NOT EXISTS `fa_asset_trasaction` ( -- Table structure for table `fa_book_category_association` -- -CREATE TABLE IF NOT EXISTS `fa_book_category_association` ( - `fa_book_category_association_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_book_category_association` ( + `fa_book_category_association_id` int(12) UNSIGNED NOT NULL, `fa_asset_category_id` int(12) DEFAULT NULL, `fa_asset_book_id` int(12) DEFAULT NULL, `asset_cost_ac_id` int(12) DEFAULT NULL, @@ -9585,10 +9316,8 @@ CREATE TABLE IF NOT EXISTS `fa_book_category_association` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_book_category_association_id`), - UNIQUE KEY `fa_asset_category_id` (`fa_asset_category_id`,`fa_asset_book_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_book_category_association` @@ -9604,8 +9333,8 @@ INSERT INTO `fa_book_category_association` (`fa_book_category_association_id`, ` -- Table structure for table `fa_depreciation_header` -- -CREATE TABLE IF NOT EXISTS `fa_depreciation_header` ( - `fa_depreciation_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_depreciation_header` ( + `fa_depreciation_header_id` int(12) UNSIGNED NOT NULL, `fa_asset_book_id` int(12) NOT NULL, `gl_period_id` int(12) NOT NULL, `status` varchar(15) DEFAULT NULL, @@ -9614,10 +9343,8 @@ CREATE TABLE IF NOT EXISTS `fa_depreciation_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_depreciation_header_id`), - UNIQUE KEY `fa_asset_book_id` (`fa_asset_book_id`,`gl_period_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_depreciation_header` @@ -9634,8 +9361,8 @@ INSERT INTO `fa_depreciation_header` (`fa_depreciation_header_id`, `fa_asset_boo -- Table structure for table `fa_depreciation_line` -- -CREATE TABLE IF NOT EXISTS `fa_depreciation_line` ( - `fa_depreciation_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_depreciation_line` ( + `fa_depreciation_line_id` int(12) UNSIGNED NOT NULL, `fa_depreciation_header_id` int(12) NOT NULL, `asset_id` int(12) DEFAULT NULL, `depreciation_amount` decimal(15,5) DEFAULT NULL, @@ -9648,10 +9375,8 @@ CREATE TABLE IF NOT EXISTS `fa_depreciation_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_depreciation_line_id`), - UNIQUE KEY `fa_depreciation_header_id` (`fa_depreciation_header_id`,`asset_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_depreciation_line` @@ -9669,8 +9394,8 @@ INSERT INTO `fa_depreciation_line` (`fa_depreciation_line_id`, `fa_depreciation_ -- Table structure for table `fa_depreciation_method` -- -CREATE TABLE IF NOT EXISTS `fa_depreciation_method` ( - `fa_depreciation_method_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_depreciation_method` ( + `fa_depreciation_method_id` int(12) UNSIGNED NOT NULL, `depreciation_method` varchar(25) NOT NULL, `method_type` varchar(25) DEFAULT NULL, `calculation_basis` varchar(25) DEFAULT NULL, @@ -9681,10 +9406,8 @@ CREATE TABLE IF NOT EXISTS `fa_depreciation_method` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_depreciation_method_id`), - UNIQUE KEY `depreciation_method` (`depreciation_method`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_depreciation_method` @@ -9701,8 +9424,8 @@ INSERT INTO `fa_depreciation_method` (`fa_depreciation_method_id`, `depreciation -- Table structure for table `fa_depreciation_method_rate` -- -CREATE TABLE IF NOT EXISTS `fa_depreciation_method_rate` ( - `fa_depreciation_method_rate_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fa_depreciation_method_rate` ( + `fa_depreciation_method_rate_id` int(12) UNSIGNED NOT NULL, `fa_depreciation_method_id` int(12) DEFAULT NULL, `year` int(12) DEFAULT NULL, `period` int(12) DEFAULT NULL, @@ -9711,10 +9434,8 @@ CREATE TABLE IF NOT EXISTS `fa_depreciation_method_rate` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fa_depreciation_method_rate_id`), - UNIQUE KEY `fa_depreciation_method_id` (`fa_depreciation_method_id`,`year`,`period`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fa_depreciation_method_rate` @@ -9748,8 +9469,8 @@ INSERT INTO `fa_depreciation_method_rate` (`fa_depreciation_method_rate_id`, `fa -- Table structure for table `file` -- -CREATE TABLE IF NOT EXISTS `file` ( - `file_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `file` ( + `file_id` int(12) UNSIGNED NOT NULL, `file_path` varchar(256) NOT NULL, `file_name` varchar(50) NOT NULL, `file_size` varchar(50) NOT NULL, @@ -9761,9 +9482,8 @@ CREATE TABLE IF NOT EXISTS `file` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, `module_name` varchar(20) DEFAULT NULL, - `document_type` varchar(50) DEFAULT NULL, - PRIMARY KEY (`file_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=613 ; + `document_type` varchar(50) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `file` @@ -9802,14 +9522,13 @@ INSERT INTO `file` (`file_id`, `file_path`, `file_name`, `file_size`, `file_type -- Table structure for table `file_reference` -- -CREATE TABLE IF NOT EXISTS `file_reference` ( - `file_reference_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `file_reference` ( + `file_reference_id` int(12) UNSIGNED NOT NULL, `file_id` int(12) NOT NULL, `reference_table` varchar(50) NOT NULL, `reference_id` int(12) NOT NULL, - `status` varchar(25) DEFAULT NULL, - PRIMARY KEY (`file_reference_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=166 ; + `status` varchar(25) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `file_reference` @@ -9970,7 +9689,7 @@ INSERT INTO `file_reference` (`file_reference_id`, `file_id`, `reference_table`, -- Table structure for table `form` -- -CREATE TABLE IF NOT EXISTS `form` ( +CREATE TABLE `form` ( `form_id` int(12) NOT NULL, `form` varchar(50) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -9979,8 +9698,7 @@ CREATE TABLE IF NOT EXISTS `form` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`form_id`) + `last_update_date` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -9989,8 +9707,8 @@ CREATE TABLE IF NOT EXISTS `form` ( -- Table structure for table `fp_forecast_consumption` -- -CREATE TABLE IF NOT EXISTS `fp_forecast_consumption` ( - `fp_forecast_consumption_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_forecast_consumption` ( + `fp_forecast_consumption_id` int(12) NOT NULL, `fp_forecast_line_date_id` int(12) DEFAULT NULL, `fp_forecast_line_id` int(12) DEFAULT NULL, `fp_forecast_group_id` int(12) DEFAULT NULL, @@ -10000,9 +9718,8 @@ CREATE TABLE IF NOT EXISTS `fp_forecast_consumption` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`fp_forecast_consumption_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=30 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_forecast_consumption` @@ -10025,8 +9742,8 @@ INSERT INTO `fp_forecast_consumption` (`fp_forecast_consumption_id`, `fp_forecas -- Table structure for table `fp_forecast_group` -- -CREATE TABLE IF NOT EXISTS `fp_forecast_group` ( - `fp_forecast_group_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_forecast_group` ( + `fp_forecast_group_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `forecast_group` varchar(25) NOT NULL, `description` varchar(256) NOT NULL, @@ -10039,9 +9756,8 @@ CREATE TABLE IF NOT EXISTS `fp_forecast_group` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_forecast_group_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_forecast_group` @@ -10056,8 +9772,8 @@ INSERT INTO `fp_forecast_group` (`fp_forecast_group_id`, `org_id`, `forecast_gro -- Table structure for table `fp_forecast_header` -- -CREATE TABLE IF NOT EXISTS `fp_forecast_header` ( - `fp_forecast_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_forecast_header` ( + `fp_forecast_header_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `forecast` varchar(25) NOT NULL, `description` varchar(256) NOT NULL, @@ -10068,10 +9784,8 @@ CREATE TABLE IF NOT EXISTS `fp_forecast_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_forecast_header_id`), - UNIQUE KEY `org_id` (`org_id`,`forecast`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_forecast_header` @@ -10090,8 +9804,8 @@ INSERT INTO `fp_forecast_header` (`fp_forecast_header_id`, `org_id`, `forecast`, -- Table structure for table `fp_forecast_line` -- -CREATE TABLE IF NOT EXISTS `fp_forecast_line` ( - `fp_forecast_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_forecast_line` ( + `fp_forecast_line_id` int(12) NOT NULL, `fp_forecast_header_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `bucket_type` varchar(25) NOT NULL, @@ -10104,9 +9818,8 @@ CREATE TABLE IF NOT EXISTS `fp_forecast_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_forecast_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=28 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_forecast_line` @@ -10147,8 +9860,8 @@ INSERT INTO `fp_forecast_line` (`fp_forecast_line_id`, `fp_forecast_header_id`, -- Table structure for table `fp_forecast_line_date` -- -CREATE TABLE IF NOT EXISTS `fp_forecast_line_date` ( - `fp_forecast_line_date_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_forecast_line_date` ( + `fp_forecast_line_date_id` int(12) NOT NULL, `fp_forecast_line_id` int(12) NOT NULL, `forecast_date` date NOT NULL, `original_quantity` decimal(20,5) NOT NULL, @@ -10157,10 +9870,8 @@ CREATE TABLE IF NOT EXISTS `fp_forecast_line_date` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_forecast_line_date_id`), - UNIQUE KEY `fp_forecast_line_id` (`fp_forecast_line_id`,`forecast_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=248 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_forecast_line_date` @@ -10246,7 +9957,7 @@ INSERT INTO `fp_forecast_line_date` (`fp_forecast_line_date_id`, `fp_forecast_li -- -- Stand-in structure for view `fp_forecast_line_date_v` -- -CREATE TABLE IF NOT EXISTS `fp_forecast_line_date_v` ( +CREATE TABLE `fp_forecast_line_date_v` ( `fp_forecast_line_date_id` int(12) ,`fp_forecast_line_id` int(12) ,`forecast` varchar(25) @@ -10263,12 +9974,13 @@ CREATE TABLE IF NOT EXISTS `fp_forecast_line_date_v` ( ,`item_id_m` int(12) ,`uom_id` int(12) ); + -- -------------------------------------------------------- -- -- Stand-in structure for view `fp_forecast_over_consumption_v` -- -CREATE TABLE IF NOT EXISTS `fp_forecast_over_consumption_v` ( +CREATE TABLE `fp_forecast_over_consumption_v` ( `forecast_group` varchar(25) ,`org` varchar(50) ,`so_number` varchar(50) @@ -10284,14 +9996,15 @@ CREATE TABLE IF NOT EXISTS `fp_forecast_over_consumption_v` ( ,`sd_so_line_id` int(12) ,`sd_so_header_id` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `fp_kanban_demand` -- -CREATE TABLE IF NOT EXISTS `fp_kanban_demand` ( - `fp_kanban_demand_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_kanban_demand` ( + `fp_kanban_demand_id` int(12) NOT NULL, `plan_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `quantity` decimal(20,5) DEFAULT NULL, @@ -10302,9 +10015,8 @@ CREATE TABLE IF NOT EXISTS `fp_kanban_demand` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_kanban_demand_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=40 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_kanban_demand` @@ -10356,7 +10068,7 @@ INSERT INTO `fp_kanban_demand` (`fp_kanban_demand_id`, `plan_id`, `item_id_m`, ` -- -- Stand-in structure for view `fp_kanban_demand_v` -- -CREATE TABLE IF NOT EXISTS `fp_kanban_demand_v` ( +CREATE TABLE `fp_kanban_demand_v` ( `plan_name` varchar(25) ,`org_id` int(12) ,`planning_horizon_days` int(12) @@ -10382,14 +10094,15 @@ CREATE TABLE IF NOT EXISTS `fp_kanban_demand_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Table structure for table `fp_kanban_header` -- -CREATE TABLE IF NOT EXISTS `fp_kanban_header` ( - `fp_kanban_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_kanban_header` ( + `fp_kanban_header_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `description` varchar(255) DEFAULT NULL, `item_id_m` int(12) NOT NULL, @@ -10417,21 +10130,19 @@ CREATE TABLE IF NOT EXISTS `fp_kanban_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_kanban_header_id`), - UNIQUE KEY `org_id` (`org_id`,`item_id_m`,`subinventory_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_kanban_header` -- INSERT INTO `fp_kanban_header` (`fp_kanban_header_id`, `org_id`, `description`, `item_id_m`, `effective_from`, `effective_to`, `subinventory_id`, `locator_id`, `source_type`, `supplier_id`, `supplier_site_id`, `from_org_id`, `from_subinventory_id`, `from_locator_id`, `planning_only_cb`, `auto_request_cb`, `calculate`, `card_size`, `noof_card`, `moq`, `lead_time`, `allocation_per`, `flm`, `ssd`, `rfid_reference`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES -(1, 6, NULL, 10038, NULL, NULL, 2, NULL, 'SUPPLIER', 2, NULL, NULL, NULL, NULL, NULL, NULL, 'CARD', '100.00000', 2, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-07-30 19:16:17', 34, '2015-08-05 07:39:13'), -(3, 6, NULL, 10036, NULL, NULL, 2, 0, 'SUPPLIER', 2, NULL, NULL, NULL, NULL, NULL, NULL, 'CARD', '30.00000', 16, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-08-03 13:09:24', 34, '2015-08-04 05:16:22'), -(4, 9, NULL, 10197, NULL, NULL, 2, NULL, 'SUPPLIER', 2, NULL, NULL, NULL, NULL, NULL, NULL, 'CARD', '30.00000', 16, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-08-04 05:14:06', 34, '2015-08-04 05:14:06'), -(5, 6, NULL, 10089, NULL, NULL, 2, NULL, 'SUPPLIER', 2, NULL, NULL, NULL, NULL, NULL, NULL, 'CARD', '200.00000', 2, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-08-04 05:14:38', 34, '2015-08-04 05:17:11'), -(6, 6, NULL, 10103, NULL, NULL, 2, NULL, 'SUPPLIER', 2, NULL, NULL, NULL, NULL, NULL, NULL, 'CARD', NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-08-04 05:15:50', 34, '2015-08-06 16:27:25'); +(1, 6, '', 10038, '0000-00-00', '0000-00-00', 2, 0, 'SUPPLIER', 2, 0, 0, 0, 0, 0, 0, 'CARD', '200.00000', 2, '0.00000', 0, '0.000', 0, 0, '', 34, '2015-07-30 19:16:17', 34, '2016-03-08 08:53:32'), +(3, 6, '', 10036, '0000-00-00', '0000-00-00', 2, 0, 'SUPPLIER', 2, 0, 0, 0, 0, 0, 0, 'CARD', '200.00000', 16, '0.00000', 0, '0.000', 0, 0, '', 34, '2015-08-03 13:09:24', 34, '2016-03-08 08:53:32'), +(4, 9, '', 10197, '0000-00-00', '0000-00-00', 2, 0, 'SUPPLIER', 2, 0, 0, 0, 0, 0, 0, 'CARD', '200.00000', 16, '0.00000', 0, '0.000', 0, 0, '', 34, '2015-08-04 05:14:06', 34, '2016-03-08 08:53:32'), +(5, 6, '', 10089, '0000-00-00', '0000-00-00', 2, 0, 'SUPPLIER', 2, 0, 0, 0, 0, 0, 0, 'CARD', '200.00000', 2, '0.00000', 0, '0.000', 0, 0, '', 34, '2015-08-04 05:14:38', 34, '2016-03-08 08:53:32'), +(6, 6, '', 10103, '0000-00-00', '0000-00-00', 2, 0, 'SUPPLIER', 2, 0, 0, 0, 0, 0, 0, 'CARD', '200.00000', 2, '0.00000', 0, '0.000', 0, 0, '', 34, '2015-08-04 05:15:50', 34, '2016-03-08 08:53:32'); -- -------------------------------------------------------- @@ -10439,8 +10150,8 @@ INSERT INTO `fp_kanban_header` (`fp_kanban_header_id`, `org_id`, `description`, -- Table structure for table `fp_kanban_line` -- -CREATE TABLE IF NOT EXISTS `fp_kanban_line` ( - `fp_kanban_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_kanban_line` ( + `fp_kanban_line_id` int(12) UNSIGNED NOT NULL, `fp_kanban_header_id` int(12) NOT NULL, `description` varchar(255) DEFAULT NULL, `card_number` varchar(25) DEFAULT NULL, @@ -10452,10 +10163,8 @@ CREATE TABLE IF NOT EXISTS `fp_kanban_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_kanban_line_id`), - UNIQUE KEY `card_number` (`card_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=159 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_kanban_line` @@ -10481,16 +10190,14 @@ INSERT INTO `fp_kanban_line` (`fp_kanban_line_id`, `fp_kanban_header_id`, `descr (153, 1, 'Auto Generated Card', '153', NULL, 'ACTIVE', 'NEW', '100.00000', 'SUPPLIER', -99, '2015-08-06 13:20:49', -99, '2015-08-06 13:20:49'), (154, 1, 'Auto Generated Card', '154', NULL, 'ACTIVE', 'NEW', '100.00000', 'SUPPLIER', -99, '2015-08-06 13:20:49', -99, '2015-08-06 13:20:49'), (155, 5, 'Auto Generated Card', '155', NULL, 'ACTIVE', 'NEW', '200.00000', 'SUPPLIER', -99, '2015-08-06 13:20:49', -99, '2015-08-06 13:20:49'), -(156, 5, 'Auto Generated Card', '156', NULL, 'ACTIVE', 'NEW', '200.00000', 'SUPPLIER', -99, '2015-08-06 13:20:49', -99, '2015-08-06 13:20:49'), -(157, 6, 'Auto Generated Card', '157', NULL, 'ACTIVE', NULL, '20.00000', '', -99, '2015-08-06 13:20:49', 34, '2015-08-06 16:27:26'), -(158, 6, 'Auto Generated Card', '158', NULL, 'ACTIVE', NULL, '20.00000', '', -99, '2015-08-06 13:20:49', 34, '2015-08-06 16:27:25'); +(156, 5, 'Auto Generated Card', '156', NULL, 'ACTIVE', 'NEW', '200.00000', 'SUPPLIER', -99, '2015-08-06 13:20:49', -99, '2015-08-06 13:20:49'); -- -------------------------------------------------------- -- -- Stand-in structure for view `fp_kanban_line_v` -- -CREATE TABLE IF NOT EXISTS `fp_kanban_line_v` ( +CREATE TABLE `fp_kanban_line_v` ( `fp_kanban_line_id` int(12) unsigned ,`fp_kanban_header_id` int(12) ,`description` varchar(255) @@ -10523,14 +10230,15 @@ CREATE TABLE IF NOT EXISTS `fp_kanban_line_v` ( ,`org` varchar(50) ,`bu_org_id` int(12) unsigned ); + -- -------------------------------------------------------- -- -- Table structure for table `fp_kanban_planner_header` -- -CREATE TABLE IF NOT EXISTS `fp_kanban_planner_header` ( - `fp_kanban_planner_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_kanban_planner_header` ( + `fp_kanban_planner_header_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `plan_name` varchar(25) NOT NULL, `planning_horizon_days` int(12) NOT NULL, @@ -10540,10 +10248,8 @@ CREATE TABLE IF NOT EXISTS `fp_kanban_planner_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_kanban_planner_header_id`), - UNIQUE KEY `org_id` (`org_id`,`plan_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_kanban_planner_header` @@ -10557,7 +10263,7 @@ INSERT INTO `fp_kanban_planner_header` (`fp_kanban_planner_header_id`, `org_id`, -- -- Stand-in structure for view `fp_kanban_suggestion_v` -- -CREATE TABLE IF NOT EXISTS `fp_kanban_suggestion_v` ( +CREATE TABLE `fp_kanban_suggestion_v` ( `plan_name` varchar(25) ,`org_id` int(12) ,`planning_horizon_days` int(12) @@ -10595,13 +10301,14 @@ CREATE TABLE IF NOT EXISTS `fp_kanban_suggestion_v` ( ,`last_update_date` datetime ,`fp_kanban_header_id` int(12) unsigned ); + -- -------------------------------------------------------- -- -- Table structure for table `fp_mds_header` -- -CREATE TABLE IF NOT EXISTS `fp_mds_header` ( +CREATE TABLE `fp_mds_header` ( `org_id` int(12) NOT NULL, `mds_name` varchar(25) NOT NULL, `description` varchar(256) NOT NULL, @@ -10612,10 +10319,8 @@ CREATE TABLE IF NOT EXISTS `fp_mds_header` ( `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, - `fp_mds_header_id` int(12) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`fp_mds_header_id`), - UNIQUE KEY `org_id` (`org_id`,`mds_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `fp_mds_header_id` int(12) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_mds_header` @@ -10632,8 +10337,8 @@ INSERT INTO `fp_mds_header` (`org_id`, `mds_name`, `description`, `fp_source_lis -- Table structure for table `fp_mds_line` -- -CREATE TABLE IF NOT EXISTS `fp_mds_line` ( - `fp_mds_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_mds_line` ( + `fp_mds_line_id` int(12) NOT NULL, `fp_mds_header_id` int(12) DEFAULT NULL, `item_id_m` int(12) NOT NULL, `demand_date` date DEFAULT NULL, @@ -10644,9 +10349,8 @@ CREATE TABLE IF NOT EXISTS `fp_mds_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_mds_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=241 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_mds_line` @@ -10731,8 +10435,8 @@ INSERT INTO `fp_mds_line` (`fp_mds_line_id`, `fp_mds_header_id`, `item_id_m`, `d -- Table structure for table `fp_minmax_demand` -- -CREATE TABLE IF NOT EXISTS `fp_minmax_demand` ( - `fp_minmax_demand_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_minmax_demand` ( + `fp_minmax_demand_id` int(12) NOT NULL, `plan_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `quantity` decimal(20,5) DEFAULT NULL, @@ -10743,9 +10447,8 @@ CREATE TABLE IF NOT EXISTS `fp_minmax_demand` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_minmax_demand_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=348 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_minmax_demand` @@ -10852,7 +10555,7 @@ INSERT INTO `fp_minmax_demand` (`fp_minmax_demand_id`, `plan_id`, `item_id_m`, ` -- -- Stand-in structure for view `fp_minmax_demand_v` -- -CREATE TABLE IF NOT EXISTS `fp_minmax_demand_v` ( +CREATE TABLE `fp_minmax_demand_v` ( `plan_name` varchar(25) ,`org_id` int(12) ,`planning_horizon_days` int(12) @@ -10878,14 +10581,15 @@ CREATE TABLE IF NOT EXISTS `fp_minmax_demand_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Table structure for table `fp_minmax_header` -- -CREATE TABLE IF NOT EXISTS `fp_minmax_header` ( - `fp_minmax_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_minmax_header` ( + `fp_minmax_header_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `plan_name` varchar(25) NOT NULL, `planning_horizon_days` int(12) NOT NULL, @@ -10895,11 +10599,8 @@ CREATE TABLE IF NOT EXISTS `fp_minmax_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_minmax_header_id`), - UNIQUE KEY `org_id` (`org_id`,`plan_name`), - UNIQUE KEY `org_id_2` (`org_id`,`plan_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_minmax_header` @@ -10915,8 +10616,8 @@ INSERT INTO `fp_minmax_header` (`fp_minmax_header_id`, `org_id`, `plan_name`, `p -- Table structure for table `fp_minmax_line` -- -CREATE TABLE IF NOT EXISTS `fp_minmax_line` ( - `fp_minmax_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_minmax_line` ( + `fp_minmax_line_id` int(12) NOT NULL, `fp_minmax_header_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `min_quantity` decimal(20,5) DEFAULT NULL, @@ -10930,17 +10631,15 @@ CREATE TABLE IF NOT EXISTS `fp_minmax_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_minmax_line_id`), - UNIQUE KEY `fp_mrp_header_id` (`fp_minmax_header_id`,`item_id_m`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Stand-in structure for view `fp_minmax_suggestion_v` -- -CREATE TABLE IF NOT EXISTS `fp_minmax_suggestion_v` ( +CREATE TABLE `fp_minmax_suggestion_v` ( `plan_name` varchar(25) ,`org_id` int(12) ,`planning_horizon_days` int(12) @@ -10977,14 +10676,15 @@ CREATE TABLE IF NOT EXISTS `fp_minmax_suggestion_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Table structure for table `fp_mrp_demand` -- -CREATE TABLE IF NOT EXISTS `fp_mrp_demand` ( - `fp_mrp_demand_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_mrp_demand` ( + `fp_mrp_demand_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `fp_mrp_header_id` int(12) DEFAULT NULL, `item_id_m` int(12) NOT NULL, @@ -10999,9 +10699,8 @@ CREATE TABLE IF NOT EXISTS `fp_mrp_demand` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_mrp_demand_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2739 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_mrp_demand` @@ -11163,7 +10862,7 @@ INSERT INTO `fp_mrp_demand` (`fp_mrp_demand_id`, `org_id`, `fp_mrp_header_id`, ` -- -- Stand-in structure for view `fp_mrp_demand_v` -- -CREATE TABLE IF NOT EXISTS `fp_mrp_demand_v` ( +CREATE TABLE `fp_mrp_demand_v` ( `fp_mrp_demand_id` int(12) ,`fp_mrp_header_id` int(12) ,`mrp_name` varchar(25) @@ -11185,14 +10884,15 @@ CREATE TABLE IF NOT EXISTS `fp_mrp_demand_v` ( ,`sales_price` decimal(20,5) ,`purchase_price` decimal(20,5) ); + -- -------------------------------------------------------- -- -- Table structure for table `fp_mrp_exception` -- -CREATE TABLE IF NOT EXISTS `fp_mrp_exception` ( - `fp_mrp_exception_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_mrp_exception` ( + `fp_mrp_exception_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `fp_mrp_header_id` int(12) NOT NULL, `exception_message` varchar(256) NOT NULL, @@ -11204,9 +10904,8 @@ CREATE TABLE IF NOT EXISTS `fp_mrp_exception` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_mrp_exception_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=322 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_mrp_exception` @@ -11244,21 +10943,22 @@ INSERT INTO `fp_mrp_exception` (`fp_mrp_exception_id`, `org_id`, `fp_mrp_header_ -- -- Stand-in structure for view `fp_mrp_existing_supply_v` -- -CREATE TABLE IF NOT EXISTS `fp_mrp_existing_supply_v` ( +CREATE TABLE `fp_mrp_existing_supply_v` ( `item_id_m` int(12) ,`document_type` varchar(11) ,`quantity` double ,`supply_date` date ,`document_id` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `fp_mrp_header` -- -CREATE TABLE IF NOT EXISTS `fp_mrp_header` ( - `fp_mrp_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_mrp_header` ( + `fp_mrp_header_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `mrp_name` varchar(25) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -11269,10 +10969,8 @@ CREATE TABLE IF NOT EXISTS `fp_mrp_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_mrp_header_id`), - UNIQUE KEY `org_id` (`org_id`,`mrp_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_mrp_header` @@ -11290,18 +10988,16 @@ INSERT INTO `fp_mrp_header` (`fp_mrp_header_id`, `org_id`, `mrp_name`, `descript -- Table structure for table `fp_mrp_lowlevel_code` -- -CREATE TABLE IF NOT EXISTS `fp_mrp_lowlevel_code` ( - `fp_mrp_lowlevel_code_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_mrp_lowlevel_code` ( + `fp_mrp_lowlevel_code_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `level` int(5) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_mrp_lowlevel_code_id`), - UNIQUE KEY `item_id` (`item_id_m`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=70 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_mrp_lowlevel_code` @@ -11381,7 +11077,7 @@ INSERT INTO `fp_mrp_lowlevel_code` (`fp_mrp_lowlevel_code_id`, `org_id`, `item_i -- Table structure for table `fp_mrp_planned_order` -- -CREATE TABLE IF NOT EXISTS `fp_mrp_planned_order` ( +CREATE TABLE `fp_mrp_planned_order` ( `fp_mrp_header_id` int(12) DEFAULT NULL, `order_type` varchar(25) DEFAULT NULL, `order_action` varchar(25) NOT NULL, @@ -11400,10 +11096,9 @@ CREATE TABLE IF NOT EXISTS `fp_mrp_planned_order` ( `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, - `fp_mrp_planned_order_id` int(12) NOT NULL AUTO_INCREMENT, - `org_id` int(12) DEFAULT NULL, - PRIMARY KEY (`fp_mrp_planned_order_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=821 ; + `fp_mrp_planned_order_id` int(12) NOT NULL, + `org_id` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_mrp_planned_order` @@ -11493,8 +11188,8 @@ INSERT INTO `fp_mrp_planned_order` (`fp_mrp_header_id`, `order_type`, `order_act -- Table structure for table `fp_mrp_supply` -- -CREATE TABLE IF NOT EXISTS `fp_mrp_supply` ( - `fp_mrp_supply_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_mrp_supply` ( + `fp_mrp_supply_id` int(12) NOT NULL, `fp_mrp_header_id` int(12) DEFAULT NULL, `item_id_m` int(12) NOT NULL, `supply_date` date DEFAULT NULL, @@ -11508,16 +11203,15 @@ CREATE TABLE IF NOT EXISTS `fp_mrp_supply` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_mrp_supply_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Stand-in structure for view `fp_mrp_v` -- -CREATE TABLE IF NOT EXISTS `fp_mrp_v` ( +CREATE TABLE `fp_mrp_v` ( `mrp_name` varchar(25) ,`org_id` int(12) ,`org` varchar(50) @@ -11547,14 +11241,15 @@ CREATE TABLE IF NOT EXISTS `fp_mrp_v` ( ,`forecast` varchar(25) ,`sales_order_line` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `fp_planning_control` -- -CREATE TABLE IF NOT EXISTS `fp_planning_control` ( - `fp_planning_control_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_planning_control` ( + `fp_planning_control_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `auto_consumed_group_id` int(12) DEFAULT NULL, `auto_consumed_frwd_days` int(12) DEFAULT NULL, @@ -11565,9 +11260,8 @@ CREATE TABLE IF NOT EXISTS `fp_planning_control` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_planning_control_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_planning_control` @@ -11585,8 +11279,8 @@ INSERT INTO `fp_planning_control` (`fp_planning_control_id`, `org_id`, `auto_con -- Table structure for table `fp_source_list_header` -- -CREATE TABLE IF NOT EXISTS `fp_source_list_header` ( - `fp_source_list_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_source_list_header` ( + `fp_source_list_header_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `source_list` varchar(25) DEFAULT NULL, `description` varchar(256) NOT NULL, @@ -11596,10 +11290,8 @@ CREATE TABLE IF NOT EXISTS `fp_source_list_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_source_list_header_id`), - UNIQUE KEY `org_id` (`org_id`,`source_list`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_source_list_header` @@ -11617,8 +11309,8 @@ INSERT INTO `fp_source_list_header` (`fp_source_list_header_id`, `org_id`, `sour -- Table structure for table `fp_source_list_line` -- -CREATE TABLE IF NOT EXISTS `fp_source_list_line` ( - `fp_source_list_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_source_list_line` ( + `fp_source_list_line_id` int(12) NOT NULL, `fp_source_list_header_id` int(12) DEFAULT NULL, `source_list_line_type` varchar(50) DEFAULT NULL, `source_list_id` int(12) DEFAULT NULL, @@ -11628,9 +11320,8 @@ CREATE TABLE IF NOT EXISTS `fp_source_list_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_source_list_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_source_list_line` @@ -11650,15 +11341,14 @@ INSERT INTO `fp_source_list_line` (`fp_source_list_line_id`, `fp_source_list_hea -- Table structure for table `fp_urgent_card` -- -CREATE TABLE IF NOT EXISTS `fp_urgent_card` ( - `fp_urgent_card_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `fp_urgent_card` ( + `fp_urgent_card_id` int(12) NOT NULL, `card_details` blob, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`fp_urgent_card_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=28 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fp_urgent_card` @@ -11694,8 +11384,8 @@ INSERT INTO `fp_urgent_card` (`fp_urgent_card_id`, `card_details`, `created_by`, -- Table structure for table `gl_balance` -- -CREATE TABLE IF NOT EXISTS `gl_balance` ( - `gl_balance_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `gl_balance` ( + `gl_balance_id` int(12) NOT NULL, `ledger_id` int(12) NOT NULL, `coa_combination_id` int(12) NOT NULL, `period_id` int(12) NOT NULL, @@ -11707,13 +11397,8 @@ CREATE TABLE IF NOT EXISTS `gl_balance` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`gl_balance_id`), - UNIQUE KEY `begin_balance_dr` (`coa_combination_id`,`balance_type`,`begin_balance_dr`,`period_id`), - UNIQUE KEY `begin_balance_cr` (`period_id`,`coa_combination_id`,`balance_type`,`begin_balance_cr`), - UNIQUE KEY `period_net_cr` (`period_id`,`coa_combination_id`,`balance_type`,`period_net_cr`), - UNIQUE KEY `period_net_dr` (`period_id`,`coa_combination_id`,`balance_type`,`period_net_dr`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=166 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gl_balance` @@ -11836,7 +11521,7 @@ INSERT INTO `gl_balance` (`gl_balance_id`, `ledger_id`, `coa_combination_id`, `p -- -- Stand-in structure for view `gl_balance_v` -- -CREATE TABLE IF NOT EXISTS `gl_balance_v` ( +CREATE TABLE `gl_balance_v` ( `period_name` varchar(25) ,`gl_period_id` int(12) unsigned ,`combination` varchar(256) @@ -11861,14 +11546,15 @@ CREATE TABLE IF NOT EXISTS `gl_balance_v` ( ,`field7` varchar(12) ,`field8` varchar(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `gl_calendar` -- -CREATE TABLE IF NOT EXISTS `gl_calendar` ( - `gl_calendar_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `gl_calendar` ( + `gl_calendar_id` int(12) NOT NULL, `option_line_code` varchar(50) NOT NULL, `adjustment_period_cb` tinyint(1) DEFAULT NULL, `name` varchar(50) NOT NULL, @@ -11883,11 +11569,8 @@ CREATE TABLE IF NOT EXISTS `gl_calendar` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`gl_calendar_id`), - UNIQUE KEY `option_line_code` (`option_line_code`,`name`), - UNIQUE KEY `option_line_code_2` (`option_line_code`,`year`,`number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=39 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gl_calendar` @@ -11930,8 +11613,8 @@ INSERT INTO `gl_calendar` (`gl_calendar_id`, `option_line_code`, `adjustment_per -- Table structure for table `gl_currency_conversion` -- -CREATE TABLE IF NOT EXISTS `gl_currency_conversion` ( - `gl_currency_conversion_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `gl_currency_conversion` ( + `gl_currency_conversion_id` int(12) UNSIGNED NOT NULL, `currency_conversion_type` varchar(25) NOT NULL, `from_currency` varchar(5) NOT NULL, `to_currency` varchar(5) NOT NULL, @@ -11943,10 +11626,8 @@ CREATE TABLE IF NOT EXISTS `gl_currency_conversion` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`gl_currency_conversion_id`), - UNIQUE KEY `currency_conversion_type` (`currency_conversion_type`,`from_date`,`from_currency`,`to_currency`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gl_currency_conversion` @@ -11966,8 +11647,8 @@ INSERT INTO `gl_currency_conversion` (`gl_currency_conversion_id`, `currency_con -- Table structure for table `gl_journal_header` -- -CREATE TABLE IF NOT EXISTS `gl_journal_header` ( - `gl_journal_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `gl_journal_header` ( + `gl_journal_header_id` int(12) NOT NULL, `ledger_id` int(12) NOT NULL, `currency` varchar(25) NOT NULL, `document_date` date DEFAULT NULL, @@ -11997,10 +11678,8 @@ CREATE TABLE IF NOT EXISTS `gl_journal_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`gl_journal_header_id`), - UNIQUE KEY `ledger_id` (`ledger_id`,`period_id`,`reference_type`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=359 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gl_journal_header` @@ -12252,8 +11931,7 @@ INSERT INTO `gl_journal_header` (`gl_journal_header_id`, `ledger_id`, `currency` (354, 19, 'USD', NULL, 30, 'ar', 'AR_RECEIPTS', 'AR_RECEIPTS-22', 'AR_RECEIPTS-22-2015-09-23 10:33:43', 'A', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'table', 'ar_receipt_header', '22', 'ENTERED', NULL, NULL, 34, '2015-09-23 10:33:43', 34, '2015-09-23 10:33:43'), (355, 19, 'USD', NULL, 30, 'prj', 'PRJ_EXPENDITURE', 'PRJ_EXPENDITURE-22', 'PRJ_EXPENDITURE-22-2015-10-02 12:51:00', 'A', NULL, '7500.00000', 'USD', 'NA', NULL, '1.00000', NULL, NULL, NULL, NULL, NULL, 'table', 'gl_journal_interface', '22', 'ENTERED', NULL, NULL, -99, '2015-10-02 12:51:00', -99, '2015-10-02 12:51:00'), (356, 19, 'USD', NULL, 30, 'inv', 'INV_INVENTORY', 'INV_INVENTORY-1508', 'INV_INVENTORY-1508-2015-11-10 17:21:42', 'A', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'table', 'inv_transaction', '1508', 'ENTERED', NULL, NULL, 34, '2015-11-10 17:21:42', 34, '2015-11-10 17:21:42'), -(357, 19, 'USD', NULL, 30, 'inv', 'INV_INVENTORY', 'INV_INVENTORY-1509', 'INV_INVENTORY-1509-2015-11-10 17:22:50', 'A', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'table', 'inv_transaction', '1509', 'ENTERED', NULL, NULL, 34, '2015-11-10 17:22:50', 34, '2015-11-10 17:22:50'), -(358, 19, 'USD', NULL, 30, 'inv', 'INV_INVENTORY', 'INV_INVENTORY-1510', 'INV_INVENTORY-1510-2016-01-14 09:35:48', 'A', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'table', 'inv_transaction', '1510', 'ENTERED', NULL, NULL, 34, '2016-01-14 09:35:48', 34, '2016-01-14 09:35:48'); +(357, 19, 'USD', NULL, 30, 'inv', 'INV_INVENTORY', 'INV_INVENTORY-1509', 'INV_INVENTORY-1509-2015-11-10 17:22:50', 'A', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'table', 'inv_transaction', '1509', 'ENTERED', NULL, NULL, 34, '2015-11-10 17:22:50', 34, '2015-11-10 17:22:50'); -- -------------------------------------------------------- @@ -12261,8 +11939,8 @@ INSERT INTO `gl_journal_header` (`gl_journal_header_id`, `ledger_id`, `currency` -- Table structure for table `gl_journal_interface` -- -CREATE TABLE IF NOT EXISTS `gl_journal_interface` ( - `gl_journal_interface_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `gl_journal_interface` ( + `gl_journal_interface_id` int(12) NOT NULL, `ledger_id` int(12) NOT NULL, `currency` varchar(25) NOT NULL, `document_date` date DEFAULT NULL, @@ -12305,10 +11983,8 @@ CREATE TABLE IF NOT EXISTS `gl_journal_interface` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime NOT NULL, `gl_journal_header_id` int(12) DEFAULT NULL, - `gl_journal_line_id` int(12) DEFAULT NULL, - PRIMARY KEY (`gl_journal_interface_id`), - UNIQUE KEY `ledger_id` (`ledger_id`,`document_date`,`line_reference_key_name`,`line_reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ; + `gl_journal_line_id` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gl_journal_interface` @@ -12344,8 +12020,8 @@ INSERT INTO `gl_journal_interface` (`gl_journal_interface_id`, `ledger_id`, `cur -- Table structure for table `gl_journal_line` -- -CREATE TABLE IF NOT EXISTS `gl_journal_line` ( - `gl_journal_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `gl_journal_line` ( + `gl_journal_line_id` int(12) NOT NULL, `gl_journal_header_id` int(12) NOT NULL, `line_num` int(12) NOT NULL, `status` enum('P','U') NOT NULL DEFAULT 'U', @@ -12363,10 +12039,8 @@ CREATE TABLE IF NOT EXISTS `gl_journal_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`gl_journal_line_id`), - UNIQUE KEY `gl_journal_header_id` (`gl_journal_header_id`,`line_num`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=899 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gl_journal_line` @@ -13104,16 +12778,14 @@ INSERT INTO `gl_journal_line` (`gl_journal_line_id`, `gl_journal_header_id`, `li (893, 356, 3, 'U', NULL, 'Inv Transaction Id 1508 item id 10034', 1154, NULL, '998.15000', NULL, '998.15000', 'table', 'inv_transaction', '1508', NULL, 34, '2015-11-10 17:21:42', 34, '2015-11-10 17:21:42'), (894, 357, 1, 'U', NULL, 'Inv Transaction Id 1509 item id 10034', 216, '1000.00000', NULL, '1000.00000', NULL, 'table', 'inv_transaction', '1509', NULL, 34, '2015-11-10 17:22:50', 34, '2015-11-10 17:22:50'), (895, 357, 2, 'U', NULL, 'Inv Transaction Id 1509 item id 10034', 1208, NULL, '0.20000', NULL, '0.20000', 'table', 'inv_transaction', '1509', NULL, 34, '2015-11-10 17:22:50', 34, '2015-11-10 17:22:50'), -(896, 357, 3, 'U', NULL, 'Inv Transaction Id 1509 item id 10034', 1154, NULL, '999.80000', NULL, '999.80000', 'table', 'inv_transaction', '1509', NULL, 34, '2015-11-10 17:22:50', 34, '2015-11-10 17:22:50'), -(897, 358, 1, 'U', NULL, 'Inv Transaction Id 1510 item id 10034', 216, NULL, '1000.00000', NULL, '1000.00000', 'table', 'inv_transaction', '1510', NULL, 34, '2016-01-14 09:35:48', 34, '2016-01-14 09:35:48'), -(898, 358, 2, 'U', NULL, 'Inv Transaction Id 1510 item id 10034', 216, '1000.00000', NULL, '1000.00000', NULL, 'table', 'inv_transaction', '1510', NULL, 34, '2016-01-14 09:35:48', 34, '2016-01-14 09:35:48'); +(896, 357, 3, 'U', NULL, 'Inv Transaction Id 1509 item id 10034', 1154, NULL, '999.80000', NULL, '999.80000', 'table', 'inv_transaction', '1509', NULL, 34, '2015-11-10 17:22:50', 34, '2015-11-10 17:22:50'); -- -------------------------------------------------------- -- -- Stand-in structure for view `gl_journal_line_v` -- -CREATE TABLE IF NOT EXISTS `gl_journal_line_v` ( +CREATE TABLE `gl_journal_line_v` ( `combination` varchar(256) ,`code_combination_id` int(12) ,`period_name` varchar(25) @@ -13152,14 +12824,15 @@ CREATE TABLE IF NOT EXISTS `gl_journal_line_v` ( ,`reference_key_name_h` varchar(25) ,`reference_key_value_h` varchar(25) ); + -- -------------------------------------------------------- -- -- Table structure for table `gl_ledger` -- -CREATE TABLE IF NOT EXISTS `gl_ledger` ( - `gl_ledger_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `gl_ledger` ( + `gl_ledger_id` int(12) NOT NULL, `ledger` varchar(50) NOT NULL, `description` varchar(256) DEFAULT NULL, `coa_id` int(12) NOT NULL, @@ -13175,9 +12848,8 @@ CREATE TABLE IF NOT EXISTS `gl_ledger` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`gl_ledger_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gl_ledger` @@ -13195,16 +12867,15 @@ INSERT INTO `gl_ledger` (`gl_ledger_id`, `ledger`, `description`, `coa_id`, `coa -- Table structure for table `gl_ledger_balancing_values` -- -CREATE TABLE IF NOT EXISTS `gl_ledger_balancing_values` ( - `gl_ledger_balancing_values_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `gl_ledger_balancing_values` ( + `gl_ledger_balancing_values_id` int(12) NOT NULL, `gl_ledger_id` int(12) NOT NULL, `balancing_values` varchar(50) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`gl_ledger_balancing_values_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gl_ledger_balancing_values` @@ -13234,8 +12905,8 @@ INSERT INTO `gl_ledger_balancing_values` (`gl_ledger_balancing_values_id`, `gl_l -- Table structure for table `gl_period` -- -CREATE TABLE IF NOT EXISTS `gl_period` ( - `gl_period_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `gl_period` ( + `gl_period_id` int(12) UNSIGNED NOT NULL, `gl_calendar_id` int(12) NOT NULL, `ledger_id` int(12) NOT NULL, `period_name` varchar(25) NOT NULL, @@ -13243,10 +12914,8 @@ CREATE TABLE IF NOT EXISTS `gl_period` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`gl_period_id`), - UNIQUE KEY `gl_calendar_id` (`gl_calendar_id`,`ledger_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=31 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gl_period` @@ -13286,7 +12955,7 @@ INSERT INTO `gl_period` (`gl_period_id`, `gl_calendar_id`, `ledger_id`, `period_ -- -- Stand-in structure for view `gl_unposted_balance_v` -- -CREATE TABLE IF NOT EXISTS `gl_unposted_balance_v` ( +CREATE TABLE `gl_unposted_balance_v` ( `combination` varchar(256) ,`code_combination_id` int(12) ,`period_name` varchar(25) @@ -13318,12 +12987,13 @@ CREATE TABLE IF NOT EXISTS `gl_unposted_balance_v` ( ,`post_date` date ,`gl_period_id` int(12) unsigned ); + -- -------------------------------------------------------- -- -- Stand-in structure for view `gl_unposted_journal_lines_v` -- -CREATE TABLE IF NOT EXISTS `gl_unposted_journal_lines_v` ( +CREATE TABLE `gl_unposted_journal_lines_v` ( `combination` varchar(256) ,`code_combination_id` int(12) ,`period_name` varchar(25) @@ -13362,14 +13032,15 @@ CREATE TABLE IF NOT EXISTS `gl_unposted_journal_lines_v` ( ,`reference_key_name_h` varchar(25) ,`reference_key_value_h` varchar(25) ); + -- -------------------------------------------------------- -- -- Table structure for table `hd_change_request` -- -CREATE TABLE IF NOT EXISTS `hd_change_request` ( - `hd_change_request_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_change_request` ( + `hd_change_request_id` int(12) UNSIGNED NOT NULL, `request_number` varchar(25) DEFAULT NULL, `requester_user_id` int(12) DEFAULT NULL, `requester_username` varchar(25) DEFAULT NULL, @@ -13405,9 +13076,8 @@ CREATE TABLE IF NOT EXISTS `hd_change_request` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_change_request_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_change_request` @@ -13423,8 +13093,8 @@ INSERT INTO `hd_change_request` (`hd_change_request_id`, `request_number`, `requ -- Table structure for table `hd_repair_type_line` -- -CREATE TABLE IF NOT EXISTS `hd_repair_type_line` ( - `hd_service_activity_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_repair_type_line` ( + `hd_service_activity_line_id` int(12) NOT NULL, `hd_service_activity_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `header_type_id` int(12) DEFAULT NULL, @@ -13433,11 +13103,8 @@ CREATE TABLE IF NOT EXISTS `hd_repair_type_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_service_activity_line_id`), - UNIQUE KEY `sd_so_header_id_2` (`hd_service_activity_header_id`,`bu_org_id`), - UNIQUE KEY `sd_so_header_id` (`hd_service_activity_header_id`,`line_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -13445,8 +13112,8 @@ CREATE TABLE IF NOT EXISTS `hd_repair_type_line` ( -- Table structure for table `hd_sbp_header` -- -CREATE TABLE IF NOT EXISTS `hd_sbp_header` ( - `hd_sbp_header_id` int(6) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_sbp_header` ( + `hd_sbp_header_id` int(6) NOT NULL, `business_process` varchar(25) NOT NULL, `description` varchar(255) DEFAULT NULL, `service_order_cb` tinyint(1) DEFAULT NULL, @@ -13455,11 +13122,8 @@ CREATE TABLE IF NOT EXISTS `hd_sbp_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hd_sbp_header_id`), - UNIQUE KEY `customer_number` (`business_process`), - UNIQUE KEY `customer_name` (`description`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_sbp_header` @@ -13476,8 +13140,8 @@ INSERT INTO `hd_sbp_header` (`hd_sbp_header_id`, `business_process`, `descriptio -- Table structure for table `hd_sbp_line` -- -CREATE TABLE IF NOT EXISTS `hd_sbp_line` ( - `hd_sbp_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_sbp_line` ( + `hd_sbp_line_id` int(12) NOT NULL, `hd_sbp_header_id` int(12) NOT NULL, `hd_service_activity_header_id` int(12) NOT NULL, `start_date` date DEFAULT NULL, @@ -13486,10 +13150,8 @@ CREATE TABLE IF NOT EXISTS `hd_sbp_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hd_sbp_line_id`), - UNIQUE KEY `hd_sbp_header_id` (`hd_sbp_header_id`,`hd_service_activity_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_sbp_line` @@ -13512,8 +13174,8 @@ INSERT INTO `hd_sbp_line` (`hd_sbp_line_id`, `hd_sbp_header_id`, `hd_service_act -- Table structure for table `hd_service_activity_header` -- -CREATE TABLE IF NOT EXISTS `hd_service_activity_header` ( - `hd_service_activity_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_service_activity_header` ( + `hd_service_activity_header_id` int(12) NOT NULL, `activity_name` varchar(50) NOT NULL, `activity_description` varchar(256) DEFAULT NULL, `line_category` varchar(25) DEFAULT NULL, @@ -13529,9 +13191,8 @@ CREATE TABLE IF NOT EXISTS `hd_service_activity_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_service_activity_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_service_activity_header` @@ -13550,8 +13211,8 @@ INSERT INTO `hd_service_activity_header` (`hd_service_activity_header_id`, `acti -- Table structure for table `hd_service_activity_line` -- -CREATE TABLE IF NOT EXISTS `hd_service_activity_line` ( - `hd_service_activity_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_service_activity_line` ( + `hd_service_activity_line_id` int(12) NOT NULL, `hd_service_activity_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `header_type_id` int(12) DEFAULT NULL, @@ -13560,11 +13221,8 @@ CREATE TABLE IF NOT EXISTS `hd_service_activity_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_service_activity_line_id`), - UNIQUE KEY `sd_so_header_id_2` (`hd_service_activity_header_id`,`bu_org_id`), - UNIQUE KEY `sd_so_header_id` (`hd_service_activity_header_id`,`line_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_service_activity_line` @@ -13583,8 +13241,8 @@ INSERT INTO `hd_service_activity_line` (`hd_service_activity_line_id`, `hd_servi -- Table structure for table `hd_service_contract_detail` -- -CREATE TABLE IF NOT EXISTS `hd_service_contract_detail` ( - `hd_service_contract_detail_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_service_contract_detail` ( + `hd_service_contract_detail_id` int(12) NOT NULL, `hd_service_contract_line_id` int(12) NOT NULL, `item_id_m` int(12) DEFAULT NULL, `inv_serial_number_id` int(12) DEFAULT NULL, @@ -13610,9 +13268,8 @@ CREATE TABLE IF NOT EXISTS `hd_service_contract_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hd_service_contract_detail_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_service_contract_detail` @@ -13627,8 +13284,8 @@ INSERT INTO `hd_service_contract_detail` (`hd_service_contract_detail_id`, `hd_s -- Table structure for table `hd_service_contract_header` -- -CREATE TABLE IF NOT EXISTS `hd_service_contract_header` ( - `hd_service_contract_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_service_contract_header` ( + `hd_service_contract_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `category` varchar(25) NOT NULL, `contract_number` varchar(15) DEFAULT NULL, @@ -13674,10 +13331,8 @@ CREATE TABLE IF NOT EXISTS `hd_service_contract_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hd_service_contract_header_id`), - UNIQUE KEY `transaction_number` (`version`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_service_contract_header` @@ -13694,8 +13349,8 @@ INSERT INTO `hd_service_contract_header` (`hd_service_contract_header_id`, `bu_o -- Table structure for table `hd_service_contract_line` -- -CREATE TABLE IF NOT EXISTS `hd_service_contract_line` ( - `hd_service_contract_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_service_contract_line` ( + `hd_service_contract_line_id` int(12) NOT NULL, `hd_service_contract_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, `item_id_m` int(12) DEFAULT NULL, @@ -13726,10 +13381,8 @@ CREATE TABLE IF NOT EXISTS `hd_service_contract_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hd_service_contract_line_id`), - UNIQUE KEY `ap_transaction_header_id` (`hd_service_contract_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_service_contract_line` @@ -13744,8 +13397,8 @@ INSERT INTO `hd_service_contract_line` (`hd_service_contract_line_id`, `hd_servi -- Table structure for table `hd_service_contract_schedule` -- -CREATE TABLE IF NOT EXISTS `hd_service_contract_schedule` ( - `hd_service_contract_schedule_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_service_contract_schedule` ( + `hd_service_contract_schedule_id` int(12) NOT NULL, `hd_service_contract_line_id` int(12) DEFAULT NULL, `hd_service_contract_detail_id` int(12) DEFAULT NULL, `hd_service_contract_header_id` int(12) NOT NULL, @@ -13760,9 +13413,8 @@ CREATE TABLE IF NOT EXISTS `hd_service_contract_schedule` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hd_service_contract_schedule_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -13770,8 +13422,8 @@ CREATE TABLE IF NOT EXISTS `hd_service_contract_schedule` ( -- Table structure for table `hd_service_request` -- -CREATE TABLE IF NOT EXISTS `hd_service_request` ( - `hd_service_request_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_service_request` ( + `hd_service_request_id` int(12) UNSIGNED NOT NULL, `service_request_number` varchar(25) DEFAULT NULL, `ar_customer_id` int(12) NOT NULL, `ar_customer_site_id` int(12) DEFAULT NULL, @@ -13796,9 +13448,8 @@ CREATE TABLE IF NOT EXISTS `hd_service_request` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_service_request_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_service_request` @@ -13814,8 +13465,8 @@ INSERT INTO `hd_service_request` (`hd_service_request_id`, `service_request_numb -- Table structure for table `hd_service_type_header` -- -CREATE TABLE IF NOT EXISTS `hd_service_type_header` ( - `hd_service_type_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_service_type_header` ( + `hd_service_type_header_id` int(12) NOT NULL, `service_type` varchar(50) NOT NULL, `description` varchar(255) DEFAULT NULL, `active_cb` tinyint(1) DEFAULT NULL, @@ -13830,9 +13481,8 @@ CREATE TABLE IF NOT EXISTS `hd_service_type_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_service_type_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_service_type_header` @@ -13847,8 +13497,8 @@ INSERT INTO `hd_service_type_header` (`hd_service_type_header_id`, `service_type -- Table structure for table `hd_service_type_line` -- -CREATE TABLE IF NOT EXISTS `hd_service_type_line` ( - `hd_service_type_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_service_type_line` ( + `hd_service_type_line_id` int(12) NOT NULL, `hd_service_type_header_id` int(12) NOT NULL, `billing_type` varchar(25) NOT NULL, `service_activity_id` int(12) DEFAULT NULL, @@ -13856,10 +13506,8 @@ CREATE TABLE IF NOT EXISTS `hd_service_type_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_service_type_line_id`), - UNIQUE KEY `hd_service_type_header_id` (`hd_service_type_header_id`,`billing_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_service_type_line` @@ -13874,8 +13522,8 @@ INSERT INTO `hd_service_type_line` (`hd_service_type_line_id`, `hd_service_type_ -- Table structure for table `hd_subscription_detail` -- -CREATE TABLE IF NOT EXISTS `hd_subscription_detail` ( - `hd_subscription_detail_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_subscription_detail` ( + `hd_subscription_detail_id` int(12) NOT NULL, `hd_subscription_header_id` int(12) NOT NULL, `hd_subscription_line_id` int(12) NOT NULL, `member_name` varchar(100) DEFAULT NULL, @@ -13889,10 +13537,8 @@ CREATE TABLE IF NOT EXISTS `hd_subscription_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_subscription_detail_id`), - UNIQUE KEY `hd_subscription_line_id` (`hd_subscription_line_id`,`member_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_subscription_detail` @@ -13914,8 +13560,8 @@ INSERT INTO `hd_subscription_detail` (`hd_subscription_detail_id`, `hd_subscript -- Table structure for table `hd_subscription_header` -- -CREATE TABLE IF NOT EXISTS `hd_subscription_header` ( - `hd_subscription_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_subscription_header` ( + `hd_subscription_header_id` int(12) NOT NULL, `org_id` int(12) DEFAULT NULL, `document_type` int(12) NOT NULL, `subscription_type` varchar(25) NOT NULL, @@ -13954,10 +13600,8 @@ CREATE TABLE IF NOT EXISTS `hd_subscription_header` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime NOT NULL, `header_amount` decimal(15,5) DEFAULT NULL, - `tax_amount` decimal(15,5) DEFAULT NULL, - PRIMARY KEY (`hd_subscription_header_id`), - UNIQUE KEY `order_reference_table` (`mobile_phone2`,`fax_no`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `tax_amount` decimal(15,5) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_subscription_header` @@ -13974,8 +13618,8 @@ INSERT INTO `hd_subscription_header` (`hd_subscription_header_id`, `org_id`, `do -- Table structure for table `hd_subscription_line` -- -CREATE TABLE IF NOT EXISTS `hd_subscription_line` ( - `hd_subscription_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_subscription_line` ( + `hd_subscription_line_id` int(12) NOT NULL, `hd_subscription_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, `shipping_org_id` int(12) DEFAULT NULL, @@ -13997,10 +13641,8 @@ CREATE TABLE IF NOT EXISTS `hd_subscription_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_subscription_line_id`), - UNIQUE KEY `hd_subscription_header_id` (`hd_subscription_header_id`,`item_id_m`,`line_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_subscription_line` @@ -14024,8 +13666,8 @@ INSERT INTO `hd_subscription_line` (`hd_subscription_line_id`, `hd_subscription_ -- Table structure for table `hd_support_request` -- -CREATE TABLE IF NOT EXISTS `hd_support_request` ( - `hd_support_request_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_support_request` ( + `hd_support_request_id` int(12) UNSIGNED NOT NULL, `support_number` varchar(25) DEFAULT NULL, `requester_user_id` int(12) DEFAULT NULL, `requester_username` varchar(25) DEFAULT NULL, @@ -14051,9 +13693,8 @@ CREATE TABLE IF NOT EXISTS `hd_support_request` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_support_request_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_support_request` @@ -14072,8 +13713,8 @@ INSERT INTO `hd_support_request` (`hd_support_request_id`, `support_number`, `re -- Table structure for table `hd_svo_actuals` -- -CREATE TABLE IF NOT EXISTS `hd_svo_actuals` ( - `hd_svo_actuals_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_svo_actuals` ( + `hd_svo_actuals_id` int(12) NOT NULL, `hd_svo_header_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `source` varchar(25) DEFAULT NULL, @@ -14090,11 +13731,8 @@ CREATE TABLE IF NOT EXISTS `hd_svo_actuals` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_svo_actuals_id`), - UNIQUE KEY `hd_svo_header_id` (`hd_svo_header_id`,`source`,`wip_wo_header_id`), - UNIQUE KEY `hd_svo_header_id_2` (`hd_svo_header_id`,`hd_svo_estimates_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_svo_actuals` @@ -14109,8 +13747,8 @@ INSERT INTO `hd_svo_actuals` (`hd_svo_actuals_id`, `hd_svo_header_id`, `item_id_ -- Table structure for table `hd_svo_estimates` -- -CREATE TABLE IF NOT EXISTS `hd_svo_estimates` ( - `hd_svo_estimates_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_svo_estimates` ( + `hd_svo_estimates_id` int(12) NOT NULL, `hd_svo_header_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `billing_source` varchar(25) DEFAULT NULL, @@ -14127,11 +13765,8 @@ CREATE TABLE IF NOT EXISTS `hd_svo_estimates` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_svo_estimates_id`), - UNIQUE KEY `sd_so_header_id_2` (`hd_svo_header_id`), - UNIQUE KEY `sd_so_header_id` (`hd_svo_header_id`,`billing_source`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_svo_estimates` @@ -14146,8 +13781,8 @@ INSERT INTO `hd_svo_estimates` (`hd_svo_estimates_id`, `hd_svo_header_id`, `item -- Table structure for table `hd_svo_header` -- -CREATE TABLE IF NOT EXISTS `hd_svo_header` ( - `hd_svo_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_svo_header` ( + `hd_svo_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `hd_service_type_header_id` int(12) NOT NULL, `order_number` varchar(50) DEFAULT NULL, @@ -14186,10 +13821,8 @@ CREATE TABLE IF NOT EXISTS `hd_svo_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_svo_header_id`), - UNIQUE KEY `primary_sd_so_header_id` (`primary_sd_so_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_svo_header` @@ -14208,8 +13841,8 @@ INSERT INTO `hd_svo_header` (`hd_svo_header_id`, `bu_org_id`, `hd_service_type_h -- Table structure for table `hd_svo_line` -- -CREATE TABLE IF NOT EXISTS `hd_svo_line` ( - `hd_svo_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_svo_line` ( + `hd_svo_line_id` int(12) NOT NULL, `hd_svo_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, `inv_org_id` int(12) NOT NULL, @@ -14239,11 +13872,8 @@ CREATE TABLE IF NOT EXISTS `hd_svo_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hd_svo_line_id`), - UNIQUE KEY `sd_so_header_id_2` (`hd_svo_header_id`,`line_number`), - UNIQUE KEY `sd_so_header_id` (`hd_svo_header_id`,`hd_service_type_header_id`,`requested_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hd_svo_line` @@ -14261,8 +13891,8 @@ INSERT INTO `hd_svo_line` (`hd_svo_line_id`, `hd_svo_header_id`, `line_number`, -- Table structure for table `hd_task_type` -- -CREATE TABLE IF NOT EXISTS `hd_task_type` ( - `hd_task_type_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hd_task_type` ( + `hd_task_type_id` int(12) UNSIGNED NOT NULL, `task_type` varchar(100) NOT NULL, `description` varchar(255) DEFAULT NULL, `from_date` date DEFAULT NULL, @@ -14273,10 +13903,8 @@ CREATE TABLE IF NOT EXISTS `hd_task_type` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hd_task_type_id`), - UNIQUE KEY `org` (`task_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -14284,8 +13912,8 @@ CREATE TABLE IF NOT EXISTS `hd_task_type` ( -- Table structure for table `hr_approval_limit_assignment` -- -CREATE TABLE IF NOT EXISTS `hr_approval_limit_assignment` ( - `hr_approval_limit_assignment_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_approval_limit_assignment` ( + `hr_approval_limit_assignment_id` int(12) UNSIGNED NOT NULL, `hr_approval_limit_header_id` int(12) NOT NULL, `bu_org_id` int(12) DEFAULT NULL, `job_id` int(12) DEFAULT NULL, @@ -14296,10 +13924,8 @@ CREATE TABLE IF NOT EXISTS `hr_approval_limit_assignment` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_approval_limit_assignment_id`), - UNIQUE KEY `hr_approval_limit_header_id` (`hr_approval_limit_header_id`,`bu_org_id`,`job_id`,`document_type`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_approval_limit_assignment` @@ -14331,8 +13957,8 @@ INSERT INTO `hr_approval_limit_assignment` (`hr_approval_limit_assignment_id`, ` -- Table structure for table `hr_approval_limit_header` -- -CREATE TABLE IF NOT EXISTS `hr_approval_limit_header` ( - `hr_approval_limit_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_approval_limit_header` ( + `hr_approval_limit_header_id` int(12) UNSIGNED NOT NULL, `bu_org_id` int(12) NOT NULL, `limit_name` varchar(50) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -14340,10 +13966,8 @@ CREATE TABLE IF NOT EXISTS `hr_approval_limit_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_approval_limit_header_id`), - UNIQUE KEY `element_name` (`limit_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_approval_limit_header` @@ -14359,8 +13983,8 @@ INSERT INTO `hr_approval_limit_header` (`hr_approval_limit_header_id`, `bu_org_i -- Table structure for table `hr_approval_limit_line` -- -CREATE TABLE IF NOT EXISTS `hr_approval_limit_line` ( - `hr_approval_limit_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_approval_limit_line` ( + `hr_approval_limit_line_id` int(12) UNSIGNED NOT NULL, `hr_approval_limit_header_id` int(12) NOT NULL, `limit_object` varchar(25) NOT NULL, `limit_type` varchar(25) DEFAULT NULL, @@ -14371,10 +13995,8 @@ CREATE TABLE IF NOT EXISTS `hr_approval_limit_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_approval_limit_line_id`), - UNIQUE KEY `hr_approval_limit_header_id` (`hr_approval_limit_header_id`,`limit_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_approval_limit_line` @@ -14394,8 +14016,8 @@ INSERT INTO `hr_approval_limit_line` (`hr_approval_limit_line_id`, `hr_approval_ -- Table structure for table `hr_approval_object` -- -CREATE TABLE IF NOT EXISTS `hr_approval_object` ( - `hr_approval_object_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_approval_object` ( + `hr_approval_object_id` int(12) UNSIGNED NOT NULL, `object_code` varchar(25) NOT NULL, `object_name` varchar(50) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -14405,10 +14027,8 @@ CREATE TABLE IF NOT EXISTS `hr_approval_object` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_approval_object_id`), - UNIQUE KEY `object_name` (`object_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_approval_object` @@ -14425,8 +14045,8 @@ INSERT INTO `hr_approval_object` (`hr_approval_object_id`, `object_code`, `objec -- Table structure for table `hr_attendance` -- -CREATE TABLE IF NOT EXISTS `hr_attendance` ( - `hr_attendance_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_attendance` ( + `hr_attendance_id` int(12) NOT NULL, `hr_employee_id` int(12) DEFAULT NULL, `date` date DEFAULT NULL, `punch_in` datetime DEFAULT NULL, @@ -14437,10 +14057,8 @@ CREATE TABLE IF NOT EXISTS `hr_attendance` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_attendance_id`), - UNIQUE KEY `hr_employee_id` (`hr_employee_id`,`date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_attendance` @@ -14455,8 +14073,8 @@ INSERT INTO `hr_attendance` (`hr_attendance_id`, `hr_employee_id`, `date`, `punc -- Table structure for table `hr_compensation_element` -- -CREATE TABLE IF NOT EXISTS `hr_compensation_element` ( - `hr_compensation_element_id` int(10) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_compensation_element` ( + `hr_compensation_element_id` int(10) UNSIGNED NOT NULL, `element_type` varchar(25) DEFAULT NULL, `start_date` date DEFAULT NULL, `element_name` varchar(50) DEFAULT NULL, @@ -14476,10 +14094,8 @@ CREATE TABLE IF NOT EXISTS `hr_compensation_element` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_compensation_element_id`), - UNIQUE KEY `position_name_2` (`element_type`,`element_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_compensation_element` @@ -14497,8 +14113,8 @@ INSERT INTO `hr_compensation_element` (`hr_compensation_element_id`, `element_ty -- Table structure for table `hr_control` -- -CREATE TABLE IF NOT EXISTS `hr_control` ( - `hr_control_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_control` ( + `hr_control_id` int(12) UNSIGNED NOT NULL, `bu_org_id` int(12) NOT NULL, `default_job_id` int(12) DEFAULT NULL, `default_grade_id` int(12) DEFAULT NULL, @@ -14511,10 +14127,8 @@ CREATE TABLE IF NOT EXISTS `hr_control` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_control_id`), - UNIQUE KEY `org` (`bu_org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_control` @@ -14531,16 +14145,14 @@ INSERT INTO `hr_control` (`hr_control_id`, `bu_org_id`, `default_job_id`, `defau -- Table structure for table `hr_element_entry_header` -- -CREATE TABLE IF NOT EXISTS `hr_element_entry_header` ( - `hr_element_entry_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_element_entry_header` ( + `hr_element_entry_header_id` int(12) UNSIGNED NOT NULL, `hr_employee_id` int(12) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_element_entry_header_id`), - UNIQUE KEY `element_name` (`hr_employee_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_element_entry_header` @@ -14558,8 +14170,8 @@ INSERT INTO `hr_element_entry_header` (`hr_element_entry_header_id`, `hr_employe -- Table structure for table `hr_element_entry_line` -- -CREATE TABLE IF NOT EXISTS `hr_element_entry_line` ( - `hr_element_entry_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_element_entry_line` ( + `hr_element_entry_line_id` int(12) UNSIGNED NOT NULL, `hr_element_entry_header_id` int(12) NOT NULL, `element_id` int(12) NOT NULL, `element_value` varchar(25) NOT NULL, @@ -14568,10 +14180,8 @@ CREATE TABLE IF NOT EXISTS `hr_element_entry_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_element_entry_line_id`), - UNIQUE KEY `hr_element_entry_header_id` (`hr_element_entry_header_id`,`element_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_element_entry_line` @@ -14597,17 +14207,15 @@ INSERT INTO `hr_element_entry_line` (`hr_element_entry_line_id`, `hr_element_ent -- Table structure for table `hr_element_entry_tpl_header` -- -CREATE TABLE IF NOT EXISTS `hr_element_entry_tpl_header` ( - `hr_element_entry_tpl_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_element_entry_tpl_header` ( + `hr_element_entry_tpl_header_id` int(12) UNSIGNED NOT NULL, `template_name` varchar(50) DEFAULT NULL, `description` varchar(256) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_element_entry_tpl_header_id`), - UNIQUE KEY `element_name` (`template_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_element_entry_tpl_header` @@ -14623,8 +14231,8 @@ INSERT INTO `hr_element_entry_tpl_header` (`hr_element_entry_tpl_header_id`, `te -- Table structure for table `hr_element_entry_tpl_line` -- -CREATE TABLE IF NOT EXISTS `hr_element_entry_tpl_line` ( - `hr_element_entry_tpl_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_element_entry_tpl_line` ( + `hr_element_entry_tpl_line_id` int(12) UNSIGNED NOT NULL, `hr_element_entry_tpl_header_id` int(12) NOT NULL, `element_id` int(12) NOT NULL, `element_value` varchar(25) NOT NULL, @@ -14633,10 +14241,8 @@ CREATE TABLE IF NOT EXISTS `hr_element_entry_tpl_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_element_entry_tpl_line_id`), - UNIQUE KEY `hr_element_entry_tpl_header_id` (`hr_element_entry_tpl_header_id`,`element_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Stotes information for element ' AUTO_INCREMENT=10 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Stotes information for element '; -- -- Dumping data for table `hr_element_entry_tpl_line` @@ -14656,18 +14262,16 @@ INSERT INTO `hr_element_entry_tpl_line` (`hr_element_entry_tpl_line_id`, `hr_ele -- Table structure for table `hr_element_history_header` -- -CREATE TABLE IF NOT EXISTS `hr_element_history_header` ( - `hr_element_history_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_element_history_header` ( + `hr_element_history_header_id` int(12) UNSIGNED NOT NULL, `hr_element_entry_header_id` int(12) NOT NULL, `archive_date` datetime NOT NULL, `hr_employee_id` int(12) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_element_history_header_id`), - UNIQUE KEY `hr_element_entry_header_id` (`hr_element_entry_header_id`,`archive_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_element_history_header` @@ -14685,8 +14289,8 @@ INSERT INTO `hr_element_history_header` (`hr_element_history_header_id`, `hr_ele -- Table structure for table `hr_element_history_line` -- -CREATE TABLE IF NOT EXISTS `hr_element_history_line` ( - `hr_element_history_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_element_history_line` ( + `hr_element_history_line_id` int(12) UNSIGNED NOT NULL, `hr_element_history_header_id` int(12) NOT NULL, `element_id` int(12) NOT NULL, `element_value` varchar(25) NOT NULL, @@ -14695,10 +14299,8 @@ CREATE TABLE IF NOT EXISTS `hr_element_history_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_element_history_line_id`), - UNIQUE KEY `hr_element_entry_header_id` (`hr_element_history_header_id`,`element_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_element_history_line` @@ -14724,8 +14326,8 @@ INSERT INTO `hr_element_history_line` (`hr_element_history_line_id`, `hr_element -- Table structure for table `hr_employee` -- -CREATE TABLE IF NOT EXISTS `hr_employee` ( - `hr_employee_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_employee` ( + `hr_employee_id` int(12) UNSIGNED NOT NULL, `identification_id` varchar(50) DEFAULT NULL, `start_date` date NOT NULL, `identification_type` varchar(50) NOT NULL, @@ -14787,11 +14389,8 @@ CREATE TABLE IF NOT EXISTS `hr_employee` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_employee_id`), - UNIQUE KEY `email` (`email`), - UNIQUE KEY `identification_id` (`identification_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_employee` @@ -14815,8 +14414,8 @@ INSERT INTO `hr_employee` (`hr_employee_id`, `identification_id`, `start_date`, -- Table structure for table `hr_employee_education` -- -CREATE TABLE IF NOT EXISTS `hr_employee_education` ( - `hr_employee_education_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_employee_education` ( + `hr_employee_education_id` int(12) UNSIGNED NOT NULL, `employee_id` int(12) NOT NULL, `degree_name` varchar(256) NOT NULL, `university` varchar(256) NOT NULL, @@ -14831,10 +14430,8 @@ CREATE TABLE IF NOT EXISTS `hr_employee_education` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_employee_education_id`), - UNIQUE KEY `employee_id` (`employee_id`,`degree_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=28 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_employee_education` @@ -14869,8 +14466,8 @@ INSERT INTO `hr_employee_education` (`hr_employee_education_id`, `employee_id`, -- Table structure for table `hr_employee_experience` -- -CREATE TABLE IF NOT EXISTS `hr_employee_experience` ( - `hr_employee_experience_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_employee_experience` ( + `hr_employee_experience_id` int(12) UNSIGNED NOT NULL, `employee_id` int(12) NOT NULL, `organization_name` varchar(256) NOT NULL, `designation` varchar(100) NOT NULL, @@ -14885,10 +14482,8 @@ CREATE TABLE IF NOT EXISTS `hr_employee_experience` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_employee_experience_id`), - UNIQUE KEY `employee_id_2` (`employee_id`,`organization_name`,`designation`,`employee_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_employee_experience` @@ -14908,7 +14503,7 @@ INSERT INTO `hr_employee_experience` (`hr_employee_experience_id`, `employee_id` -- -- Stand-in structure for view `hr_employee_position_v` -- -CREATE TABLE IF NOT EXISTS `hr_employee_position_v` ( +CREATE TABLE `hr_employee_position_v` ( `user_id` int(12) unsigned ,`username` varchar(256) ,`first_name` varchar(100) @@ -14943,14 +14538,15 @@ CREATE TABLE IF NOT EXISTS `hr_employee_position_v` ( ,`bu_org_id` int(12) ,`currency_code` varchar(20) ); + -- -------------------------------------------------------- -- -- Table structure for table `hr_employee_termination` -- -CREATE TABLE IF NOT EXISTS `hr_employee_termination` ( - `hr_employee_termination_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_employee_termination` ( + `hr_employee_termination_id` int(12) UNSIGNED NOT NULL, `employee_id` int(12) NOT NULL, `new_employer` varchar(256) DEFAULT NULL, `reason` varchar(256) NOT NULL, @@ -14963,10 +14559,8 @@ CREATE TABLE IF NOT EXISTS `hr_employee_termination` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_employee_termination_id`), - UNIQUE KEY `employee_id` (`employee_id`,`new_employer`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_employee_termination` @@ -14980,7 +14574,7 @@ INSERT INTO `hr_employee_termination` (`hr_employee_termination_id`, `employee_i -- -- Stand-in structure for view `hr_employee_v` -- -CREATE TABLE IF NOT EXISTS `hr_employee_v` ( +CREATE TABLE `hr_employee_v` ( `user_id` int(12) unsigned ,`username` varchar(256) ,`first_name` varchar(100) @@ -15006,12 +14600,13 @@ CREATE TABLE IF NOT EXISTS `hr_employee_v` ( ,`currency_code` varchar(20) ,`org` varchar(50) ); + -- -------------------------------------------------------- -- -- Stand-in structure for view `hr_expense_all_v` -- -CREATE TABLE IF NOT EXISTS `hr_expense_all_v` ( +CREATE TABLE `hr_expense_all_v` ( `hr_expense_header_id` int(12) unsigned ,`bu_org_id` int(12) ,`hr_employee_id` int(12) @@ -15037,14 +14632,15 @@ CREATE TABLE IF NOT EXISTS `hr_expense_all_v` ( ,`line_exchange_rate` decimal(15,5) ,`supplier_id` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `hr_expense_header` -- -CREATE TABLE IF NOT EXISTS `hr_expense_header` ( - `hr_expense_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_expense_header` ( + `hr_expense_header_id` int(12) UNSIGNED NOT NULL, `bu_org_id` int(12) NOT NULL, `claim_number` varchar(25) DEFAULT NULL, `exchange_rate_type` varchar(25) DEFAULT NULL, @@ -15066,10 +14662,8 @@ CREATE TABLE IF NOT EXISTS `hr_expense_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_expense_header_id`), - UNIQUE KEY `bu_org_id` (`bu_org_id`,`claim_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=27 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_expense_header` @@ -15107,8 +14701,8 @@ INSERT INTO `hr_expense_header` (`hr_expense_header_id`, `bu_org_id`, `claim_num -- Table structure for table `hr_expense_line` -- -CREATE TABLE IF NOT EXISTS `hr_expense_line` ( - `hr_expense_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_expense_line` ( + `hr_expense_line_id` int(12) UNSIGNED NOT NULL, `hr_expense_header_id` int(12) NOT NULL, `claim_date` date DEFAULT NULL, `receipt_amount` decimal(15,5) DEFAULT NULL, @@ -15137,10 +14731,8 @@ CREATE TABLE IF NOT EXISTS `hr_expense_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_expense_line_id`), - UNIQUE KEY `hr_expense_header_id` (`hr_expense_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=43 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_expense_line` @@ -15180,8 +14772,8 @@ INSERT INTO `hr_expense_line` (`hr_expense_line_id`, `hr_expense_header_id`, `cl -- Table structure for table `hr_expense_tpl_header` -- -CREATE TABLE IF NOT EXISTS `hr_expense_tpl_header` ( - `hr_expense_tpl_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_expense_tpl_header` ( + `hr_expense_tpl_header_id` int(12) UNSIGNED NOT NULL, `bu_org_id` int(12) NOT NULL, `inactive_date` date DEFAULT NULL, `template_name` varchar(50) NOT NULL, @@ -15189,9 +14781,8 @@ CREATE TABLE IF NOT EXISTS `hr_expense_tpl_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_expense_tpl_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_expense_tpl_header` @@ -15210,8 +14801,8 @@ INSERT INTO `hr_expense_tpl_header` (`hr_expense_tpl_header_id`, `bu_org_id`, `i -- Table structure for table `hr_expense_tpl_line` -- -CREATE TABLE IF NOT EXISTS `hr_expense_tpl_line` ( - `hr_expense_tpl_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_expense_tpl_line` ( + `hr_expense_tpl_line_id` int(12) UNSIGNED NOT NULL, `hr_expense_tpl_header_id` int(12) NOT NULL, `expense_item` varchar(50) DEFAULT NULL, `expense_category` varchar(25) DEFAULT NULL, @@ -15223,10 +14814,8 @@ CREATE TABLE IF NOT EXISTS `hr_expense_tpl_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_expense_tpl_line_id`), - UNIQUE KEY `hr_expense_tpl_header_id` (`hr_expense_tpl_header_id`,`expense_item`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=29 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_expense_tpl_line` @@ -15268,8 +14857,8 @@ INSERT INTO `hr_expense_tpl_line` (`hr_expense_tpl_line_id`, `hr_expense_tpl_hea -- Table structure for table `hr_grade` -- -CREATE TABLE IF NOT EXISTS `hr_grade` ( - `hr_grade_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_grade` ( + `hr_grade_id` int(12) NOT NULL, `grade` varchar(50) NOT NULL, `hr_element_entry_tpl_header_id` int(12) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, @@ -15280,10 +14869,8 @@ CREATE TABLE IF NOT EXISTS `hr_grade` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_grade_id`), - UNIQUE KEY `grade` (`grade`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_grade` @@ -15303,8 +14890,8 @@ INSERT INTO `hr_grade` (`hr_grade_id`, `grade`, `hr_element_entry_tpl_header_id` -- Table structure for table `hr_job` -- -CREATE TABLE IF NOT EXISTS `hr_job` ( - `hr_job_id` int(10) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_job` ( + `hr_job_id` int(10) UNSIGNED NOT NULL, `job_code` varchar(25) DEFAULT NULL, `job_name` varchar(50) DEFAULT NULL, `start_date` date DEFAULT NULL, @@ -15326,13 +14913,8 @@ CREATE TABLE IF NOT EXISTS `hr_job` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_job_id`), - UNIQUE KEY `job_code` (`job_code`), - UNIQUE KEY `job_name` (`job_name`), - UNIQUE KEY `job_code_2` (`job_code`), - UNIQUE KEY `job_name_2` (`job_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_job` @@ -15348,8 +14930,8 @@ INSERT INTO `hr_job` (`hr_job_id`, `job_code`, `job_name`, `start_date`, `end_da -- Table structure for table `hr_leave_balance` -- -CREATE TABLE IF NOT EXISTS `hr_leave_balance` ( - `hr_leave_balance_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_leave_balance` ( + `hr_leave_balance_id` int(12) UNSIGNED NOT NULL, `employee_id` int(12) NOT NULL, `leave_type` varchar(50) NOT NULL, `leave_per_year` decimal(20,5) DEFAULT NULL, @@ -15358,10 +14940,8 @@ CREATE TABLE IF NOT EXISTS `hr_leave_balance` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_leave_balance_id`), - UNIQUE KEY `gl_calendar_id` (`leave_type`,`total_used`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_leave_balance` @@ -15381,8 +14961,8 @@ INSERT INTO `hr_leave_balance` (`hr_leave_balance_id`, `employee_id`, `leave_typ -- Table structure for table `hr_leave_entitlement_header` -- -CREATE TABLE IF NOT EXISTS `hr_leave_entitlement_header` ( - `hr_leave_entitlement_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_leave_entitlement_header` ( + `hr_leave_entitlement_header_id` int(12) UNSIGNED NOT NULL, `entitlement_name` varchar(256) NOT NULL, `description` varchar(256) DEFAULT NULL, `status` varchar(25) DEFAULT NULL, @@ -15394,10 +14974,8 @@ CREATE TABLE IF NOT EXISTS `hr_leave_entitlement_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_leave_entitlement_header_id`), - UNIQUE KEY `gl_calendar_id` (`job_id`,`grade_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_leave_entitlement_header` @@ -15413,8 +14991,8 @@ INSERT INTO `hr_leave_entitlement_header` (`hr_leave_entitlement_header_id`, `en -- Table structure for table `hr_leave_entitlement_line` -- -CREATE TABLE IF NOT EXISTS `hr_leave_entitlement_line` ( - `hr_leave_entitlement_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_leave_entitlement_line` ( + `hr_leave_entitlement_line_id` int(12) UNSIGNED NOT NULL, `hr_leave_entitlement_header_id` int(12) NOT NULL, `leave_type` varchar(50) NOT NULL, `leave_per_period` decimal(20,5) DEFAULT NULL, @@ -15423,10 +15001,8 @@ CREATE TABLE IF NOT EXISTS `hr_leave_entitlement_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_leave_entitlement_line_id`), - UNIQUE KEY `gl_calendar_id` (`leave_type`,`default_no_of_period`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_leave_entitlement_line` @@ -15441,8 +15017,8 @@ INSERT INTO `hr_leave_entitlement_line` (`hr_leave_entitlement_line_id`, `hr_lea -- Table structure for table `hr_leave_transaction` -- -CREATE TABLE IF NOT EXISTS `hr_leave_transaction` ( - `hr_leave_transaction_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_leave_transaction` ( + `hr_leave_transaction_id` int(12) UNSIGNED NOT NULL, `employee_id` int(12) NOT NULL, `requsted_date` date DEFAULT NULL, `approved_date` date DEFAULT NULL, @@ -15461,9 +15037,8 @@ CREATE TABLE IF NOT EXISTS `hr_leave_transaction` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_leave_transaction_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=18 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_leave_transaction` @@ -15493,8 +15068,8 @@ INSERT INTO `hr_leave_transaction` (`hr_leave_transaction_id`, `employee_id`, `r -- Table structure for table `hr_leave_type` -- -CREATE TABLE IF NOT EXISTS `hr_leave_type` ( - `hr_leave_type_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_leave_type` ( + `hr_leave_type_id` int(12) UNSIGNED NOT NULL, `leave_type` varchar(50) NOT NULL, `leave_category` varchar(50) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -15509,10 +15084,8 @@ CREATE TABLE IF NOT EXISTS `hr_leave_type` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_leave_type_id`), - UNIQUE KEY `leave_type` (`leave_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_leave_type` @@ -15529,8 +15102,8 @@ INSERT INTO `hr_leave_type` (`hr_leave_type_id`, `leave_type`, `leave_category`, -- Table structure for table `hr_location` -- -CREATE TABLE IF NOT EXISTS `hr_location` ( - `hr_location_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_location` ( + `hr_location_id` int(12) NOT NULL, `country` varchar(50) DEFAULT NULL, `state` varchar(50) DEFAULT NULL, `city` varchar(50) DEFAULT NULL, @@ -15539,13 +15112,8 @@ CREATE TABLE IF NOT EXISTS `hr_location` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_location_id`), - UNIQUE KEY `combination` (`combination`), - KEY `balancing` (`country`), - KEY `cost_center` (`state`), - KEY `natural_account` (`city`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_location` @@ -15562,8 +15130,8 @@ INSERT INTO `hr_location` (`hr_location_id`, `country`, `state`, `city`, `combin -- Table structure for table `hr_payroll` -- -CREATE TABLE IF NOT EXISTS `hr_payroll` ( - `hr_payroll_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_payroll` ( + `hr_payroll_id` int(12) UNSIGNED NOT NULL, `payroll` varchar(100) NOT NULL, `period_type` varchar(50) NOT NULL, `start_date` date NOT NULL, @@ -15573,10 +15141,8 @@ CREATE TABLE IF NOT EXISTS `hr_payroll` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_payroll_id`), - UNIQUE KEY `payroll` (`payroll`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_payroll` @@ -15592,8 +15158,8 @@ INSERT INTO `hr_payroll` (`hr_payroll_id`, `payroll`, `period_type`, `start_date -- Table structure for table `hr_payroll_payment_method` -- -CREATE TABLE IF NOT EXISTS `hr_payroll_payment_method` ( - `hr_payroll_payment_method_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_payroll_payment_method` ( + `hr_payroll_payment_method_id` int(12) UNSIGNED NOT NULL, `payment_method` varchar(100) DEFAULT NULL, `ledger_id` int(12) NOT NULL, `payment_type` varchar(50) DEFAULT NULL, @@ -15610,20 +15176,15 @@ CREATE TABLE IF NOT EXISTS `hr_payroll_payment_method` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_payroll_payment_method_id`), - UNIQUE KEY `job_code` (`payment_method`), - UNIQUE KEY `job_name` (`payment_type`), - UNIQUE KEY `job_code_2` (`payment_method`), - UNIQUE KEY `job_name_2` (`payment_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_payroll_payment_method` -- INSERT INTO `hr_payroll_payment_method` (`hr_payroll_payment_method_id`, `payment_method`, `ledger_id`, `payment_type`, `start_date`, `end_date`, `description`, `currency`, `bank_account_id`, `cash_ac_id`, `clearing_ac_id`, `bank_charge_ac_id`, `salary_payable_ac_id`, `costed_cb`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES -(1, 'SPG_MNTHLY', 19, 'DIRECT', NULL, NULL, 'test01A', 'SGD', 1, NULL, NULL, NULL, 0, 1, 0, '2014-08-15 00:00:00', 34, '2015-03-07 08:24:11'); +(1, 'SPG_MNTHLY', 19, 'DIRECT', NULL, NULL, 'test01A', 0x534744, 1, NULL, NULL, NULL, 0, 1, 0, '2014-08-15 00:00:00', 34, '2015-03-07 08:24:11'); -- -------------------------------------------------------- @@ -15631,8 +15192,8 @@ INSERT INTO `hr_payroll_payment_method` (`hr_payroll_payment_method_id`, `paymen -- Table structure for table `hr_payroll_process` -- -CREATE TABLE IF NOT EXISTS `hr_payroll_process` ( - `hr_payroll_process_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_payroll_process` ( + `hr_payroll_process_id` int(12) UNSIGNED NOT NULL, `hr_payroll_id` int(12) NOT NULL, `hr_payroll_schedule_id` int(12) NOT NULL, `proces_name` varchar(50) DEFAULT NULL, @@ -15642,10 +15203,8 @@ CREATE TABLE IF NOT EXISTS `hr_payroll_process` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_payroll_process_id`), - UNIQUE KEY `hr_payroll_schedule_id` (`hr_payroll_schedule_id`,`proces_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_payroll_process` @@ -15665,8 +15224,8 @@ INSERT INTO `hr_payroll_process` (`hr_payroll_process_id`, `hr_payroll_id`, `hr_ -- Table structure for table `hr_payroll_schedule` -- -CREATE TABLE IF NOT EXISTS `hr_payroll_schedule` ( - `hr_payroll_schedule_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_payroll_schedule` ( + `hr_payroll_schedule_id` int(12) UNSIGNED NOT NULL, `hr_payroll_id` int(12) NOT NULL, `scheduled_date` date NOT NULL, `start_date` date NOT NULL, @@ -15677,10 +15236,8 @@ CREATE TABLE IF NOT EXISTS `hr_payroll_schedule` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_payroll_schedule_id`), - UNIQUE KEY `hr_payroll_id` (`hr_payroll_id`,`scheduled_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=110 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_payroll_schedule` @@ -15803,8 +15360,8 @@ INSERT INTO `hr_payroll_schedule` (`hr_payroll_schedule_id`, `hr_payroll_id`, `s -- Table structure for table `hr_payslip_header` -- -CREATE TABLE IF NOT EXISTS `hr_payslip_header` ( - `hr_payslip_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_payslip_header` ( + `hr_payslip_header_id` int(12) UNSIGNED NOT NULL, `hr_payroll_process_id` int(12) DEFAULT NULL, `period_name_id` int(12) DEFAULT NULL, `pay_date` date NOT NULL, @@ -15825,10 +15382,8 @@ CREATE TABLE IF NOT EXISTS `hr_payslip_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_payslip_header_id`), - UNIQUE KEY `pay_date` (`pay_date`,`employee_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=29 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_payslip_header` @@ -15854,8 +15409,8 @@ INSERT INTO `hr_payslip_header` (`hr_payslip_header_id`, `hr_payroll_process_id` -- Table structure for table `hr_payslip_line` -- -CREATE TABLE IF NOT EXISTS `hr_payslip_line` ( - `hr_payslip_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_payslip_line` ( + `hr_payslip_line_id` int(12) UNSIGNED NOT NULL, `hr_payslip_header_id` int(12) NOT NULL, `hr_compensation_element_id` int(12) NOT NULL, `element_value` decimal(20,5) DEFAULT NULL, @@ -15863,10 +15418,8 @@ CREATE TABLE IF NOT EXISTS `hr_payslip_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_payslip_line_id`), - UNIQUE KEY `hr_payslip_header_id` (`hr_payslip_header_id`,`hr_compensation_element_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=82 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_payslip_line` @@ -15916,8 +15469,8 @@ INSERT INTO `hr_payslip_line` (`hr_payslip_line_id`, `hr_payslip_header_id`, `hr -- Table structure for table `hr_perdiem_rate` -- -CREATE TABLE IF NOT EXISTS `hr_perdiem_rate` ( - `hr_perdiem_rate_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_perdiem_rate` ( + `hr_perdiem_rate_id` int(12) NOT NULL, `hr_location_id` varchar(50) NOT NULL, `hr_grade_id` varchar(255) DEFAULT NULL, `rate` decimal(15,5) NOT NULL, @@ -15928,10 +15481,8 @@ CREATE TABLE IF NOT EXISTS `hr_perdiem_rate` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_perdiem_rate_id`), - UNIQUE KEY `hr_location_id` (`hr_location_id`,`hr_grade_id`,`from_date`,`currency`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_perdiem_rate` @@ -15948,8 +15499,8 @@ INSERT INTO `hr_perdiem_rate` (`hr_perdiem_rate_id`, `hr_location_id`, `hr_grade -- Table structure for table `hr_position` -- -CREATE TABLE IF NOT EXISTS `hr_position` ( - `hr_position_id` int(10) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_position` ( + `hr_position_id` int(10) UNSIGNED NOT NULL, `position_name` varchar(100) DEFAULT NULL, `job_id` int(12) DEFAULT NULL, `org_id` int(12) DEFAULT NULL, @@ -15968,10 +15519,8 @@ CREATE TABLE IF NOT EXISTS `hr_position` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_position_id`), - UNIQUE KEY `position_name_2` (`position_name`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_position` @@ -15989,8 +15538,8 @@ INSERT INTO `hr_position` (`hr_position_id`, `position_name`, `job_id`, `org_id` -- Table structure for table `hr_position_hierarchy_header` -- -CREATE TABLE IF NOT EXISTS `hr_position_hierarchy_header` ( - `hr_position_hierarchy_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_position_hierarchy_header` ( + `hr_position_hierarchy_header_id` int(12) NOT NULL, `starting_position_id` int(12) NOT NULL, `hierarchy_name` varchar(50) DEFAULT NULL, `description` varchar(256) DEFAULT NULL, @@ -15999,11 +15548,8 @@ CREATE TABLE IF NOT EXISTS `hr_position_hierarchy_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_position_hierarchy_header_id`), - UNIQUE KEY `item_id` (`starting_position_id`), - UNIQUE KEY `item_id_2` (`starting_position_id`,`hierarchy_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_position_hierarchy_header` @@ -16019,20 +15565,18 @@ INSERT INTO `hr_position_hierarchy_header` (`hr_position_hierarchy_header_id`, ` -- Table structure for table `hr_position_hierarchy_line` -- -CREATE TABLE IF NOT EXISTS `hr_position_hierarchy_line` ( - `hr_position_hierarchy_line_id` int(12) NOT NULL AUTO_INCREMENT, - `hr_position_hierarchy_header_id` int(12) unsigned NOT NULL, - `position_id` int(12) unsigned NOT NULL, +CREATE TABLE `hr_position_hierarchy_line` ( + `hr_position_hierarchy_line_id` int(12) NOT NULL, + `hr_position_hierarchy_header_id` int(12) UNSIGNED NOT NULL, + `position_id` int(12) UNSIGNED NOT NULL, `description` varchar(256) NOT NULL, `effective_start_date` date DEFAULT NULL, `effective_end_date` date DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_position_hierarchy_line_id`), - UNIQUE KEY `hr_position_hierarchy_header_id` (`hr_position_hierarchy_header_id`,`position_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_position_hierarchy_line` @@ -16049,8 +15593,8 @@ INSERT INTO `hr_position_hierarchy_line` (`hr_position_hierarchy_line_id`, `hr_p -- Table structure for table `hr_team_header` -- -CREATE TABLE IF NOT EXISTS `hr_team_header` ( - `hr_team_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_team_header` ( + `hr_team_header_id` int(12) UNSIGNED NOT NULL, `team_name` varchar(256) NOT NULL, `team_lead_employee_id` int(12) NOT NULL, `type` varchar(25) DEFAULT NULL, @@ -16063,10 +15607,8 @@ CREATE TABLE IF NOT EXISTS `hr_team_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_team_header_id`), - UNIQUE KEY `element_name` (`team_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_team_header` @@ -16081,8 +15623,8 @@ INSERT INTO `hr_team_header` (`hr_team_header_id`, `team_name`, `team_lead_emplo -- Table structure for table `hr_team_line` -- -CREATE TABLE IF NOT EXISTS `hr_team_line` ( - `hr_team_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_team_line` ( + `hr_team_line_id` int(12) UNSIGNED NOT NULL, `hr_team_header_id` int(12) NOT NULL, `member_employee_id` int(12) NOT NULL, `role` varchar(25) DEFAULT NULL, @@ -16094,10 +15636,8 @@ CREATE TABLE IF NOT EXISTS `hr_team_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_team_line_id`), - UNIQUE KEY `hr_team_header_id` (`hr_team_header_id`,`member_employee_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_team_line` @@ -16114,8 +15654,8 @@ INSERT INTO `hr_team_line` (`hr_team_line_id`, `hr_team_header_id`, `member_empl -- Table structure for table `hr_timesheet_header` -- -CREATE TABLE IF NOT EXISTS `hr_timesheet_header` ( - `hr_timesheet_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_timesheet_header` ( + `hr_timesheet_header_id` int(12) UNSIGNED NOT NULL, `hr_timesheet_period_id` int(12) NOT NULL, `approver_employee_id` int(12) DEFAULT NULL, `entered_on` date DEFAULT NULL, @@ -16127,10 +15667,8 @@ CREATE TABLE IF NOT EXISTS `hr_timesheet_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_timesheet_header_id`), - UNIQUE KEY `hr_timesheet_period_id` (`hr_timesheet_period_id`,`hr_employee_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_timesheet_header` @@ -16146,8 +15684,8 @@ INSERT INTO `hr_timesheet_header` (`hr_timesheet_header_id`, `hr_timesheet_perio -- Table structure for table `hr_timesheet_line` -- -CREATE TABLE IF NOT EXISTS `hr_timesheet_line` ( - `hr_timesheet_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_timesheet_line` ( + `hr_timesheet_line_id` int(12) UNSIGNED NOT NULL, `hr_timesheet_header_id` int(12) NOT NULL, `work_date` date DEFAULT NULL, `prj_project_header_id` int(12) DEFAULT NULL, @@ -16166,10 +15704,8 @@ CREATE TABLE IF NOT EXISTS `hr_timesheet_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`hr_timesheet_line_id`), - UNIQUE KEY `hr_timesheet_header_id` (`hr_timesheet_header_id`,`prj_project_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_timesheet_line` @@ -16187,8 +15723,8 @@ INSERT INTO `hr_timesheet_line` (`hr_timesheet_line_id`, `hr_timesheet_header_id -- Table structure for table `hr_timesheet_period` -- -CREATE TABLE IF NOT EXISTS `hr_timesheet_period` ( - `hr_timesheet_period_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `hr_timesheet_period` ( + `hr_timesheet_period_id` int(12) NOT NULL, `timesheet_period` varchar(50) DEFAULT NULL, `from_date` date DEFAULT NULL, `to_date` date DEFAULT NULL, @@ -16199,13 +15735,8 @@ CREATE TABLE IF NOT EXISTS `hr_timesheet_period` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`hr_timesheet_period_id`), - UNIQUE KEY `combination` (`max_work_hour`), - KEY `balancing` (`timesheet_period`), - KEY `cost_center` (`from_date`), - KEY `natural_account` (`to_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hr_timesheet_period` @@ -16226,8 +15757,8 @@ INSERT INTO `hr_timesheet_period` (`hr_timesheet_period_id`, `timesheet_period`, -- Table structure for table `inventory` -- -CREATE TABLE IF NOT EXISTS `inventory` ( - `inventory_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inventory` ( + `inventory_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `type` varchar(25) NOT NULL, `code` varchar(25) NOT NULL, @@ -16277,9 +15808,8 @@ CREATE TABLE IF NOT EXISTS `inventory` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inventory_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inventory` @@ -16298,8 +15828,8 @@ INSERT INTO `inventory` (`inventory_id`, `org_id`, `type`, `code`, `item_master_ -- Table structure for table `inv_abc_assignment_header` -- -CREATE TABLE IF NOT EXISTS `inv_abc_assignment_header` ( - `inv_abc_assignment_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_abc_assignment_header` ( + `inv_abc_assignment_header_id` int(12) NOT NULL, `abc_assignment_name` varchar(50) NOT NULL, `inv_abc_valuation_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, @@ -16307,10 +15837,8 @@ CREATE TABLE IF NOT EXISTS `inv_abc_assignment_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_abc_assignment_header_id`), - UNIQUE KEY `document_type_name` (`abc_assignment_name`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_abc_assignment_header` @@ -16327,8 +15855,8 @@ INSERT INTO `inv_abc_assignment_header` (`inv_abc_assignment_header_id`, `abc_as -- Table structure for table `inv_abc_assignment_line` -- -CREATE TABLE IF NOT EXISTS `inv_abc_assignment_line` ( - `inv_abc_assignment_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_abc_assignment_line` ( + `inv_abc_assignment_line_id` int(12) NOT NULL, `inv_abc_assignment_header_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `abc_class` char(2) NOT NULL, @@ -16336,10 +15864,8 @@ CREATE TABLE IF NOT EXISTS `inv_abc_assignment_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_abc_assignment_line_id`), - UNIQUE KEY `inv_abc_assignment_header_id` (`inv_abc_assignment_header_id`,`item_id_m`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=254 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_abc_assignment_line` @@ -16457,8 +15983,8 @@ INSERT INTO `inv_abc_assignment_line` (`inv_abc_assignment_line_id`, `inv_abc_as -- Table structure for table `inv_abc_valuation` -- -CREATE TABLE IF NOT EXISTS `inv_abc_valuation` ( - `inv_abc_valuation_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_abc_valuation` ( + `inv_abc_valuation_id` int(12) NOT NULL, `valuation_name` varchar(50) NOT NULL, `scope_org_id` int(12) DEFAULT NULL, `scope_sub_inventory_id` int(12) DEFAULT NULL, @@ -16474,10 +16000,8 @@ CREATE TABLE IF NOT EXISTS `inv_abc_valuation` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_abc_valuation_id`), - UNIQUE KEY `document_type_name` (`valuation_name`,`scope_sub_inventory_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_abc_valuation` @@ -16500,8 +16024,8 @@ INSERT INTO `inv_abc_valuation` (`inv_abc_valuation_id`, `valuation_name`, `scop -- Table structure for table `inv_abc_valuation_result` -- -CREATE TABLE IF NOT EXISTS `inv_abc_valuation_result` ( - `inv_abc_valuation_result_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_abc_valuation_result` ( + `inv_abc_valuation_result_id` int(12) NOT NULL, `inv_abc_valuation_id` int(12) NOT NULL, `seq_number` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, @@ -16512,11 +16036,8 @@ CREATE TABLE IF NOT EXISTS `inv_abc_valuation_result` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_abc_valuation_result_id`), - UNIQUE KEY `inv_abc_valuation_id` (`inv_abc_valuation_id`,`seq_number`), - UNIQUE KEY `inv_abc_valuation_id_2` (`inv_abc_valuation_id`,`item_id_m`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=635 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_abc_valuation_result` @@ -16873,18 +16394,16 @@ INSERT INTO `inv_abc_valuation_result` (`inv_abc_valuation_result_id`, `inv_abc_ -- Table structure for table `inv_count_abc_ref` -- -CREATE TABLE IF NOT EXISTS `inv_count_abc_ref` ( - `inv_count_abc_ref_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_count_abc_ref` ( + `inv_count_abc_ref_id` int(12) NOT NULL, `inv_count_header_id` int(12) NOT NULL, `class_code` char(2) NOT NULL, `count_per_year` mediumint(2) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_count_abc_ref_id`), - UNIQUE KEY `inv_count_header_id` (`inv_count_header_id`,`class_code`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=34 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_count_abc_ref` @@ -16913,8 +16432,8 @@ INSERT INTO `inv_count_abc_ref` (`inv_count_abc_ref_id`, `inv_count_header_id`, -- Table structure for table `inv_count_entries` -- -CREATE TABLE IF NOT EXISTS `inv_count_entries` ( - `inv_count_entries_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_count_entries` ( + `inv_count_entries_id` int(12) NOT NULL, `inv_count_schedule_id` int(12) DEFAULT NULL, `item_id_m` int(12) NOT NULL, `uom_id` int(12) NOT NULL, @@ -16937,10 +16456,8 @@ CREATE TABLE IF NOT EXISTS `inv_count_entries` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_count_entries_id`), - UNIQUE KEY `inv_count_schedule_id` (`inv_count_schedule_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_count_entries` @@ -16964,7 +16481,7 @@ INSERT INTO `inv_count_entries` (`inv_count_entries_id`, `inv_count_schedule_id` -- -- Stand-in structure for view `inv_count_entries_v` -- -CREATE TABLE IF NOT EXISTS `inv_count_entries_v` ( +CREATE TABLE `inv_count_entries_v` ( `inv_count_entries_id` int(12) ,`inv_count_schedule_id` int(12) ,`item_id_m` int(12) @@ -16996,14 +16513,15 @@ CREATE TABLE IF NOT EXISTS `inv_count_entries_v` ( ,`uom_name` varchar(25) ,`org` varchar(50) ); + -- -------------------------------------------------------- -- -- Table structure for table `inv_count_header` -- -CREATE TABLE IF NOT EXISTS `inv_count_header` ( - `inv_count_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_count_header` ( + `inv_count_header_id` int(12) NOT NULL, `count_name` varchar(50) NOT NULL, `count_type` varchar(25) NOT NULL, `adjustment_ac_id` int(12) NOT NULL, @@ -17019,10 +16537,8 @@ CREATE TABLE IF NOT EXISTS `inv_count_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_count_header_id`), - UNIQUE KEY `document_type_name` (`count_name`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_count_header` @@ -17041,8 +16557,8 @@ INSERT INTO `inv_count_header` (`inv_count_header_id`, `count_name`, `count_type -- Table structure for table `inv_count_schedule` -- -CREATE TABLE IF NOT EXISTS `inv_count_schedule` ( - `inv_count_schedule_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_count_schedule` ( + `inv_count_schedule_id` int(12) NOT NULL, `inv_count_header_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `subinventory_id` int(12) DEFAULT NULL, @@ -17057,10 +16573,8 @@ CREATE TABLE IF NOT EXISTS `inv_count_schedule` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_count_schedule_id`), - UNIQUE KEY `inv_count_header_id` (`inv_count_header_id`,`item_id_m`,`subinventory_id`,`locator_id`,`schedule_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4261 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_count_schedule` @@ -17373,7 +16887,7 @@ INSERT INTO `inv_count_schedule` (`inv_count_schedule_id`, `inv_count_header_id` -- -- Stand-in structure for view `inv_interorg_receipt_header` -- -CREATE TABLE IF NOT EXISTS `inv_interorg_receipt_header` ( +CREATE TABLE `inv_interorg_receipt_header` ( `inv_receipt_header_id` int(12) ,`receipt_number` varchar(50) ,`org_id` int(12) @@ -17389,14 +16903,15 @@ CREATE TABLE IF NOT EXISTS `inv_interorg_receipt_header` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Table structure for table `inv_interorg_transfer_header` -- -CREATE TABLE IF NOT EXISTS `inv_interorg_transfer_header` ( - `inv_interorg_transfer_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_interorg_transfer_header` ( + `inv_interorg_transfer_header_id` int(12) NOT NULL, `order_number` varchar(25) DEFAULT NULL, `comment` varchar(256) DEFAULT NULL, `from_org_id` int(12) NOT NULL, @@ -17411,10 +16926,8 @@ CREATE TABLE IF NOT EXISTS `inv_interorg_transfer_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`inv_interorg_transfer_header_id`), - UNIQUE KEY `order_number` (`order_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=105 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_interorg_transfer_header` @@ -17530,8 +17043,8 @@ INSERT INTO `inv_interorg_transfer_header` (`inv_interorg_transfer_header_id`, ` -- Table structure for table `inv_interorg_transfer_line` -- -CREATE TABLE IF NOT EXISTS `inv_interorg_transfer_line` ( - `inv_interorg_transfer_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_interorg_transfer_line` ( + `inv_interorg_transfer_line_id` int(12) NOT NULL, `inv_interorg_transfer_header_id` int(12) NOT NULL, `transaction_type_id` int(12) NOT NULL, `line_number` int(12) DEFAULT NULL, @@ -17556,9 +17069,8 @@ CREATE TABLE IF NOT EXISTS `inv_interorg_transfer_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`inv_interorg_transfer_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=110 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_interorg_transfer_line` @@ -17651,7 +17163,7 @@ INSERT INTO `inv_interorg_transfer_line` (`inv_interorg_transfer_line_id`, `inv_ -- -- Stand-in structure for view `inv_interorg_transfer_v` -- -CREATE TABLE IF NOT EXISTS `inv_interorg_transfer_v` ( +CREATE TABLE `inv_interorg_transfer_v` ( `inv_interorg_transfer_header_id` int(12) ,`order_number` varchar(25) ,`io_order_number` varchar(25) @@ -17678,14 +17190,15 @@ CREATE TABLE IF NOT EXISTS `inv_interorg_transfer_v` ( ,`serial_number` varchar(256) ,`lot_number` varchar(256) ); + -- -------------------------------------------------------- -- -- Table structure for table `inv_item_relation` -- -CREATE TABLE IF NOT EXISTS `inv_item_relation` ( - `inv_item_relation_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_item_relation` ( + `inv_item_relation_id` int(12) UNSIGNED NOT NULL, `relation_type` varchar(25) NOT NULL, `from_item_id_m` int(12) NOT NULL, `to_item_id_m` int(12) NOT NULL, @@ -17698,10 +17211,8 @@ CREATE TABLE IF NOT EXISTS `inv_item_relation` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_item_relation_id`), - UNIQUE KEY `gl_calendar_id` (`to_item_id_m`,`description`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_item_relation` @@ -17718,8 +17229,8 @@ INSERT INTO `inv_item_relation` (`inv_item_relation_id`, `relation_type`, `from_ -- Table structure for table `inv_item_revision` -- -CREATE TABLE IF NOT EXISTS `inv_item_revision` ( - `inv_item_revision_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_item_revision` ( + `inv_item_revision_id` int(12) NOT NULL, `revision_name` varchar(10) NOT NULL, `item_id_m` int(12) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -17733,10 +17244,8 @@ CREATE TABLE IF NOT EXISTS `inv_item_revision` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`inv_item_revision_id`), - UNIQUE KEY `serial_number` (`revision_name`,`item_id_m`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_item_revision` @@ -17764,8 +17273,8 @@ INSERT INTO `inv_item_revision` (`inv_item_revision_id`, `revision_name`, `item_ -- Table structure for table `inv_location_default` -- -CREATE TABLE IF NOT EXISTS `inv_location_default` ( - `inv_location_default_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_location_default` ( + `inv_location_default_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `item_id_m` int(12) DEFAULT NULL, `priority` int(3) DEFAULT NULL, @@ -17777,10 +17286,8 @@ CREATE TABLE IF NOT EXISTS `inv_location_default` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_location_default_id`), - UNIQUE KEY `org_id` (`org_id`,`item_id_m`,`priority`,`subinventory_id`,`locator_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_location_default` @@ -17797,8 +17304,8 @@ INSERT INTO `inv_location_default` (`inv_location_default_id`, `org_id`, `item_i -- Table structure for table `inv_lot_number` -- -CREATE TABLE IF NOT EXISTS `inv_lot_number` ( - `inv_lot_number_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_lot_number` ( + `inv_lot_number_id` int(12) NOT NULL, `lot_number` varchar(50) NOT NULL, `quantity` decimal(20,5) DEFAULT NULL, `item_id_m` int(12) NOT NULL, @@ -17828,10 +17335,8 @@ CREATE TABLE IF NOT EXISTS `inv_lot_number` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`inv_lot_number_id`), - UNIQUE KEY `serial_number` (`lot_number`,`item_id_m`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=37 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_lot_number` @@ -17865,18 +17370,16 @@ INSERT INTO `inv_lot_number` (`inv_lot_number_id`, `lot_number`, `quantity`, `it -- Table structure for table `inv_lot_onhand` -- -CREATE TABLE IF NOT EXISTS `inv_lot_onhand` ( - `inv_lot_onhand_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_lot_onhand` ( + `inv_lot_onhand_id` int(12) NOT NULL, `onhand_id` int(12) NOT NULL, `inv_lot_number_id` int(12) NOT NULL, `lot_quantity` decimal(20,5) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_lot_onhand_id`), - UNIQUE KEY `onhand_id` (`onhand_id`,`inv_lot_number_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=42 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_lot_onhand` @@ -17912,7 +17415,7 @@ INSERT INTO `inv_lot_onhand` (`inv_lot_onhand_id`, `onhand_id`, `inv_lot_number_ -- -- Stand-in structure for view `inv_lot_onhand_v` -- -CREATE TABLE IF NOT EXISTS `inv_lot_onhand_v` ( +CREATE TABLE `inv_lot_onhand_v` ( `inv_lot_onhand_id` int(12) ,`onhand_id` int(12) ,`lot_inv_lot_number_id` int(12) @@ -17930,23 +17433,23 @@ CREATE TABLE IF NOT EXISTS `inv_lot_onhand_v` ( ,`subinventory_id` int(12) ,`locator_id` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `inv_lot_transaction` -- -CREATE TABLE IF NOT EXISTS `inv_lot_transaction` ( - `inv_lot_transaction_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_lot_transaction` ( + `inv_lot_transaction_id` int(12) NOT NULL, `inv_transaction_id` int(12) NOT NULL, `inv_lot_number_id` int(12) NOT NULL, `lot_quantity` decimal(20,5) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_lot_transaction_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=191 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_lot_transaction` @@ -18100,7 +17603,7 @@ INSERT INTO `inv_lot_transaction` (`inv_lot_transaction_id`, `inv_transaction_id -- -- Stand-in structure for view `inv_lot_transaction_v` -- -CREATE TABLE IF NOT EXISTS `inv_lot_transaction_v` ( +CREATE TABLE `inv_lot_transaction_v` ( `inv_lot_transaction_id` int(12) ,`inv_transaction_id` int(12) ,`inv_lot_number_id` int(12) @@ -18135,14 +17638,15 @@ CREATE TABLE IF NOT EXISTS `inv_lot_transaction_v` ( ,`from_locator_id` int(12) ,`to_locator_id` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `inv_moveorder_header` -- -CREATE TABLE IF NOT EXISTS `inv_moveorder_header` ( - `inv_moveorder_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_moveorder_header` ( + `inv_moveorder_header_id` int(12) NOT NULL, `order_number` varchar(25) DEFAULT NULL, `comment` varchar(256) DEFAULT NULL, `org_id` int(12) NOT NULL, @@ -18153,18 +17657,15 @@ CREATE TABLE IF NOT EXISTS `inv_moveorder_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`inv_moveorder_header_id`), - UNIQUE KEY `order_number` (`order_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_moveorder_header` -- INSERT INTO `inv_moveorder_header` (`inv_moveorder_header_id`, `order_number`, `comment`, `org_id`, `transaction_type_id`, `status`, `transfer_to_gl`, `transaction_date`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES -(1, '-1', ' ', 6, 26, 'ENTERED', NULL, '2016-01-14', 34, '2015-08-02 03:00:07', 34, '2016-01-14 09:35:04'), -(2, '6-2', ' ', 6, 26, 'COMPLETED', NULL, '2016-01-14', 34, '2016-01-14 09:35:15', 34, '2016-01-14 09:35:15'); +(1, '-1', ' ', 6, 26, NULL, NULL, '2015-08-02', 34, '2015-08-02 03:00:07', 34, '2015-08-02 03:07:15'); -- -------------------------------------------------------- @@ -18172,8 +17673,8 @@ INSERT INTO `inv_moveorder_header` (`inv_moveorder_header_id`, `order_number`, ` -- Table structure for table `inv_moveorder_line` -- -CREATE TABLE IF NOT EXISTS `inv_moveorder_line` ( - `inv_moveorder_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_moveorder_line` ( + `inv_moveorder_line_id` int(12) NOT NULL, `inv_moveorder_header_id` int(12) NOT NULL, `transaction_type_id` int(12) NOT NULL, `line_number` int(12) DEFAULT NULL, @@ -18200,17 +17701,15 @@ CREATE TABLE IF NOT EXISTS `inv_moveorder_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`inv_moveorder_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_moveorder_line` -- INSERT INTO `inv_moveorder_line` (`inv_moveorder_line_id`, `inv_moveorder_header_id`, `transaction_type_id`, `line_number`, `from_subinventory_id`, `from_locator_id`, `item_id_m`, `revision_name`, `item_description`, `status`, `uom_id`, `to_subinventory_id`, `to_locator_id`, `transaction_quantity`, `received_quantity`, `description`, `reason`, `reference_type`, `reference_key_name`, `reference_key_value`, `inv_lot_number_id`, `inv_serial_number_id`, `account_id`, `location_id`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES -(1, 1, 26, 1, 2, 5, 10034, NULL, 'Desktop 01 of Model A', NULL, 27, 3, 9, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-08-02 03:00:07', 34, '2015-08-02 03:00:07'), -(2, 2, 26, 1, 2, 5, 10034, NULL, 'Desktop 01 of Model A', NULL, 27, 3, 9, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-14 09:35:15', 34, '2016-01-14 09:35:15'); +(1, 1, 26, 1, 2, 5, 10034, NULL, 'Desktop 01 of Model A', NULL, 27, 3, 9, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-08-02 03:00:07', 34, '2015-08-02 03:00:07'); -- -------------------------------------------------------- @@ -18218,8 +17717,8 @@ INSERT INTO `inv_moveorder_line` (`inv_moveorder_line_id`, `inv_moveorder_header -- Table structure for table `inv_receipt_header` -- -CREATE TABLE IF NOT EXISTS `inv_receipt_header` ( - `inv_receipt_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_receipt_header` ( + `inv_receipt_header_id` int(12) NOT NULL, `receipt_number` varchar(50) DEFAULT NULL, `comment` varchar(256) DEFAULT NULL, `org_id` int(12) NOT NULL, @@ -18234,9 +17733,8 @@ CREATE TABLE IF NOT EXISTS `inv_receipt_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`inv_receipt_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=178 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_receipt_header` @@ -18418,8 +17916,7 @@ INSERT INTO `inv_receipt_header` (`inv_receipt_header_id`, `receipt_number`, `co (173, '6-173', NULL, 6, 5, '2015-11-10', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-11-10 17:20:41', 34, '2015-11-10 17:20:41'), (174, '6-174', NULL, 6, 5, '2015-11-10', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-11-10 17:21:42', 34, '2015-11-10 17:21:42'), (175, '6-175', NULL, 6, 5, '2015-11-10', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-11-10 17:22:49', 34, '2015-11-10 17:23:45'), -(176, '6-176', NULL, 6, 4, '2015-11-10', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-11-10 17:24:37', 34, '2015-11-10 17:24:37'), -(177, '6-177', NULL, 6, 4, '2016-01-18', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-18 17:34:12', 34, '2016-01-18 17:34:12'); +(176, '6-176', NULL, 6, 4, '2015-11-10', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-11-10 17:24:37', 34, '2015-11-10 17:24:37'); -- -------------------------------------------------------- @@ -18427,8 +17924,8 @@ INSERT INTO `inv_receipt_header` (`inv_receipt_header_id`, `receipt_number`, `co -- Table structure for table `inv_receipt_line` -- -CREATE TABLE IF NOT EXISTS `inv_receipt_line` ( - `inv_receipt_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_receipt_line` ( + `inv_receipt_line_id` int(12) NOT NULL, `inv_receipt_header_id` int(12) NOT NULL, `transaction_type_id` int(12) NOT NULL, `line_number` varchar(25) NOT NULL, @@ -18461,10 +17958,8 @@ CREATE TABLE IF NOT EXISTS `inv_receipt_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`inv_receipt_line_id`), - UNIQUE KEY `inv_receipt_header_id` (`inv_receipt_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=192 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_receipt_line` @@ -18573,8 +18068,7 @@ INSERT INTO `inv_receipt_line` (`inv_receipt_line_id`, `inv_receipt_header_id`, (185, 172, 20, '1', 38, NULL, 10034, NULL, 'Desktop 01 of Model A', 'SHIPPED', 27, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 103, 107, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-07-14 07:27:57', 34, '2015-07-14 07:27:57'), (187, 174, 5, '1', 2, 5, 10034, '', 'Desktop 01 of Model A', 'Error', 27, NULL, NULL, 1, NULL, NULL, 231, 244, 215, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'USD', 'INR', 'CORP', '0.01667', 34, '2015-11-10 17:21:42', 34, '2015-11-10 17:21:42'), (188, 175, 5, '1', 2, 5, 10034, '', 'Desktop 01 of Model A', 'Error', 27, NULL, NULL, 1, NULL, NULL, 232, 245, 216, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'USD', 'INR', 'CORP', '0.01667', 34, '2015-11-10 17:22:50', 34, '2015-11-10 17:22:50'), -(190, 176, 4, '1', 2, 5, 10034, NULL, 'Desktop 01 of Model A', NULL, 27, NULL, NULL, 1, NULL, NULL, 231, 244, 215, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'USD', 'INR', 'CORP', '0.01667', 34, '2015-11-10 17:24:37', 34, '2015-11-10 17:24:37'), -(191, 177, 4, '1', 2, 5, 10038, NULL, 'MI Monitor A 01', NULL, 27, NULL, NULL, 1, NULL, NULL, 306, 339, 321, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'USD', 'GBP', 'CORP', '1.00000', 34, '2016-01-18 17:34:13', 34, '2016-01-18 17:34:13'); +(190, 176, 4, '1', 2, 5, 10034, NULL, 'Desktop 01 of Model A', NULL, 27, NULL, NULL, 1, NULL, NULL, 231, 244, 215, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'USD', 'INR', 'CORP', '0.01667', 34, '2015-11-10 17:24:37', 34, '2015-11-10 17:24:37'); -- -------------------------------------------------------- @@ -18582,8 +18076,8 @@ INSERT INTO `inv_receipt_line` (`inv_receipt_line_id`, `inv_receipt_header_id`, -- Table structure for table `inv_reservation` -- -CREATE TABLE IF NOT EXISTS `inv_reservation` ( - `inv_reservation_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_reservation` ( + `inv_reservation_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `org_id` int(12) NOT NULL, `status` varchar(25) DEFAULT NULL, @@ -18613,11 +18107,8 @@ CREATE TABLE IF NOT EXISTS `inv_reservation` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) DEFAULT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_reservation_id`), - UNIQUE KEY `d_reference_key_name` (`d_reference_key_name`,`d_reference_key_value`,`s_reference_key_name`,`s_reference_key_value`,`inv_serial_number_id`), - UNIQUE KEY `sd_so_line_id` (`sd_so_line_id`,`inv_serial_number_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=139 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_reservation` @@ -18679,8 +18170,7 @@ INSERT INTO `inv_reservation` (`inv_reservation_id`, `item_id_m`, `org_id`, `sta (131, 10232, 6, NULL, 'DELIVERY_LINE', NULL, NULL, 'sd_delivery_line', 244, NULL, '2015-09-19 00:00:00', 27, '-11.00000', 'ONHAND', 1, 1, 'onhand', 217, 217, NULL, NULL, 28, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-19 16:50:17', 34, '2015-09-19 16:50:17'), (132, 10232, 6, NULL, 'DELIVERY_LINE', NULL, NULL, 'sd_delivery_line', 244, NULL, '2015-09-19 00:00:00', 27, '88.00000', 'ONHAND', 1, 1, 'onhand', 217, 217, NULL, NULL, 29, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-19 16:50:17', 34, '2015-09-19 16:50:17'), (135, 10232, 6, NULL, 'DELIVERY_LINE', NULL, NULL, 'sd_delivery_line', 245, NULL, '2015-09-19 00:00:00', 27, '10.00000', 'ONHAND', 1, 1, 'onhand', 217, 217, NULL, NULL, 31, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-19 16:54:38', 34, '2015-09-19 16:54:38'), -(137, 10232, 6, NULL, 'DELIVERY_LINE', NULL, NULL, 'sd_delivery_line', 246, NULL, '2015-09-19 00:00:00', 27, '4.00000', 'ONHAND', 1, 1, 'onhand', 217, 217, NULL, NULL, 31, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-19 17:01:24', 34, '2015-09-19 17:01:24'), -(138, 10240, 6, NULL, 'SALES_ORDER', '133', '200', 'sd_so_line', 200, NULL, '2016-01-08 00:00:00', 27, '1.00000', 'ONHAND', 2, 5, 'onhand', 220, 220, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 13:40:51', 34, '2016-01-07 13:40:51'); +(137, 10232, 6, NULL, 'DELIVERY_LINE', NULL, NULL, 'sd_delivery_line', 246, NULL, '2015-09-19 00:00:00', 27, '4.00000', 'ONHAND', 1, 1, 'onhand', 217, 217, NULL, NULL, 31, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-19 17:01:24', 34, '2015-09-19 17:01:24'); -- -------------------------------------------------------- @@ -18688,8 +18178,8 @@ INSERT INTO `inv_reservation` (`inv_reservation_id`, `item_id_m`, `org_id`, `sta -- Table structure for table `inv_serial_number` -- -CREATE TABLE IF NOT EXISTS `inv_serial_number` ( - `inv_serial_number_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_serial_number` ( + `inv_serial_number_id` int(12) NOT NULL, `serial_number` varchar(50) NOT NULL, `item_id_m` int(12) NOT NULL, `generation` varchar(25) NOT NULL, @@ -18724,10 +18214,8 @@ CREATE TABLE IF NOT EXISTS `inv_serial_number` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`inv_serial_number_id`), - UNIQUE KEY `serial_number` (`serial_number`,`item_id_m`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=322 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_serial_number` @@ -18979,16 +18467,15 @@ INSERT INTO `inv_serial_number` (`inv_serial_number_id`, `serial_number`, `item_ -- Table structure for table `inv_serial_transaction` -- -CREATE TABLE IF NOT EXISTS `inv_serial_transaction` ( - `inv_serial_transaction_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_serial_transaction` ( + `inv_serial_transaction_id` int(12) NOT NULL, `inv_transaction_id` int(12) NOT NULL, `inv_serial_number_id` int(12) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_serial_transaction_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=300 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_serial_transaction` @@ -19245,7 +18732,7 @@ INSERT INTO `inv_serial_transaction` (`inv_serial_transaction_id`, `inv_transact -- -- Stand-in structure for view `inv_serial_transaction_v` -- -CREATE TABLE IF NOT EXISTS `inv_serial_transaction_v` ( +CREATE TABLE `inv_serial_transaction_v` ( `inv_serial_transaction_id` int(12) ,`inv_transaction_id` int(12) ,`inv_serial_number_id` int(12) @@ -19280,14 +18767,15 @@ CREATE TABLE IF NOT EXISTS `inv_serial_transaction_v` ( ,`from_locator_id` int(12) ,`to_locator_id` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `inv_transaction` -- -CREATE TABLE IF NOT EXISTS `inv_transaction` ( - `inv_transaction_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `inv_transaction` ( + `inv_transaction_id` int(12) NOT NULL, `transaction_type_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `status` varchar(25) DEFAULT NULL, @@ -19330,10 +18818,8 @@ CREATE TABLE IF NOT EXISTS `inv_transaction` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`inv_transaction_id`), - KEY `transaction_type_id` (`transaction_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1511 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `inv_transaction` @@ -20395,8 +19881,7 @@ INSERT INTO `inv_transaction` (`inv_transaction_id`, `transaction_type_id`, `org (1506, 15, 6, 'Success', NULL, NULL, NULL, 10240, 27, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 193, 'SO Shipping', 'table', 'sd_delivery_header', '253', NULL, NULL, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 352, NULL, NULL, NULL, 34, '2015-09-23 10:30:35', 34, '2015-09-23 10:30:35'), (1507, 2, 6, 'Success', NULL, 'MI_CABINETA01', '', 10042, 27, 0, 0, '', '', 0, 0, NULL, NULL, NULL, 0, 0, '', '', '', '', '', NULL, 0, 0, 5, 4062, NULL, 2, 5, NULL, 0, 0, 0, 0, 0, NULL, 34, '2015-10-02 06:53:27', 34, '2015-10-02 06:53:27'), (1508, 5, 6, 'Success', NULL, NULL, '', 10034, NULL, NULL, NULL, 'PO', '5-231', NULL, NULL, NULL, NULL, NULL, 215, NULL, NULL, 'table', 'inv_receipt_line', '187', NULL, NULL, NULL, NULL, 1, NULL, NULL, 2, 5, NULL, NULL, NULL, 356, NULL, NULL, NULL, 34, '2015-11-10 17:21:42', 34, '2015-11-10 17:21:42'), -(1509, 5, 6, 'Success', NULL, NULL, '', 10034, NULL, NULL, NULL, 'PO', '5-232', NULL, NULL, NULL, NULL, NULL, 216, NULL, NULL, 'table', 'inv_receipt_line', '188', NULL, NULL, NULL, NULL, 1, NULL, NULL, 2, 5, NULL, NULL, NULL, 357, NULL, NULL, NULL, 34, '2015-11-10 17:22:50', 34, '2015-11-10 17:22:50'), -(1510, 26, 6, 'Success', NULL, NULL, NULL, 10034, 27, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Move Trasaction', 'table', 'inv_moveorder_line', '2', NULL, NULL, 2, 5, 1, NULL, NULL, 3, 9, NULL, NULL, NULL, 358, NULL, NULL, NULL, 34, '2016-01-14 09:35:48', 34, '2016-01-14 09:35:48'); +(1509, 5, 6, 'Success', NULL, NULL, '', 10034, NULL, NULL, NULL, 'PO', '5-232', NULL, NULL, NULL, NULL, NULL, 216, NULL, NULL, 'table', 'inv_receipt_line', '188', NULL, NULL, NULL, NULL, 1, NULL, NULL, 2, 5, NULL, NULL, NULL, 357, NULL, NULL, NULL, 34, '2015-11-10 17:22:50', 34, '2015-11-10 17:22:50'); -- -------------------------------------------------------- @@ -20404,8 +19889,8 @@ INSERT INTO `inv_transaction` (`inv_transaction_id`, `transaction_type_id`, `org -- Table structure for table `item` -- -CREATE TABLE IF NOT EXISTS `item` ( - `item_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `item` ( + `item_id` int(12) NOT NULL, `item_id_m` int(12) DEFAULT NULL, `org_id` int(12) NOT NULL, `item_number` varchar(50) NOT NULL, @@ -20529,11 +20014,8 @@ CREATE TABLE IF NOT EXISTS `item` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`item_id`), - UNIQUE KEY `item_number_2` (`item_number`,`org_id`), - UNIQUE KEY `item_id_m` (`item_id_m`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10242 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `item` @@ -20754,27 +20236,28 @@ INSERT INTO `item` (`item_id`, `item_id_m`, `org_id`, `item_number`, `item_descr (10238, 10238, 7, 'MI_T1_EXP01', 'MI_T1_EXP01', NULL, NULL, NULL, NULL, NULL, 'Model : A\r\nSeq : 01\r\nItem : MI_T1_PUR01\r\nPORG : USA_01', 27, '', '0000-00-00', 'PRODUCT', '277', 1, 1, 1, 1, 1, NULL, 1, NULL, NULL, NULL, NULL, 1224, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, '0.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'BUY', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, 2, 6, NULL, NULL, NULL, 1, NULL, 1, 1, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1224, 1224, NULL, NULL, NULL, NULL, '0.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-20 08:18:12', 34, '2015-09-20 08:19:09'), (10239, 10238, 6, 'MI_T1_EXP01', 'MI_T1_EXP01', NULL, NULL, NULL, NULL, NULL, 'Model : A\r\nSeq : 01\r\nItem : MI_T1_PUR01\r\nPORG : USA_01', 27, '', '0000-00-00', 'PRODUCT', '277', 1, 1, 1, 1, 1, NULL, 1, NULL, NULL, NULL, NULL, 1224, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, '0.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'BUY', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, 2, 6, NULL, NULL, NULL, 1, NULL, 1, 1, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1224, 1224, NULL, NULL, NULL, NULL, '0.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-20 08:18:23', 34, '2015-09-20 08:19:35'), (10240, 10240, 7, 'MI_T1_FG01', 'MI_T1_FG01', 0, '', '0.00000', '', 0, 'Model : A\r\nSeq : 01\r\nItem : MI_T1_FG01\r\nPORG : USA_01', 27, '', '0000-00-00', 'PRODUCT', '277', 1, 1, 1, 1, 1, 0, 1, 'STANDARD', 1, 1, NULL, 1224, 0, 0, 0, 0, 0, 'ORG', 'AT_RECEIPT', '', '', '', '', '', 0, 1, 0, '', 0, '0.00000', '', '', NULL, 0, NULL, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 'MAKE', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '0.00000', '0.00000', 0, '0.00000', '', '', 0, 0, 0, 2, 2, 6, 0, 0, 0, 1, '', 1, 1, 1, 1, 1, '', 0, '', '', NULL, 0, 1224, 1224, '', '', NULL, NULL, '0.00000', 0, '', NULL, NULL, '', '', '', '', 34, '2015-09-20 08:20:53', 34, '2015-09-20 08:20:53'), -(10241, 10240, 6, 'MI_T1_FG01', 'MI_T1_FG01', NULL, NULL, NULL, NULL, NULL, 'Model : A\r\nSeq : 01\r\nItem : MI_T1_FG01\r\nPORG : USA_01', 27, '', '0000-00-00', 'PRODUCT', '277', 1, 1, 1, 1, 1, NULL, 1, 'STANDARD', 1, 1, NULL, 1224, NULL, NULL, NULL, NULL, NULL, 'ORG', 'AT_RECEIPT', NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, '0.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'MAKE', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, 2, 6, NULL, NULL, NULL, 1, NULL, 1, 1, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1224, 1224, NULL, NULL, NULL, NULL, '0.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-20 08:21:07', 34, '2016-01-13 04:19:37'); +(10241, 10240, 6, 'MI_T1_FG01', 'MI_T1_FG01', NULL, NULL, NULL, NULL, NULL, 'Model : A\r\nSeq : 01\r\nItem : MI_T1_FG01\r\nPORG : USA_01', 27, '', '0000-00-00', 'PRODUCT', '277', 1, 1, 1, 1, 1, NULL, 1, 'STANDARD', 1, 1, NULL, 1224, NULL, NULL, NULL, NULL, NULL, 'ORG', 'AT_RECEIPT', NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, '0.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'MAKE', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, 2, 6, NULL, NULL, NULL, 1, NULL, 1, 1, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1224, 1224, NULL, NULL, NULL, NULL, '0.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-20 08:21:07', 34, '2015-10-26 12:14:51'); -- -------------------------------------------------------- -- -- Stand-in structure for view `item_select_v` -- -CREATE TABLE IF NOT EXISTS `item_select_v` ( +CREATE TABLE `item_select_v` ( `item_number` varchar(50) ,`item_description` varchar(256) ,`product_line` varchar(20) ,`item_id_m` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `item_status` -- -CREATE TABLE IF NOT EXISTS `item_status` ( - `item_status_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `item_status` ( + `item_status_id` int(12) UNSIGNED NOT NULL, `code` varchar(25) NOT NULL, `active` tinyint(1) NOT NULL, `description` varchar(200) DEFAULT NULL, @@ -20790,10 +20273,8 @@ CREATE TABLE IF NOT EXISTS `item_status` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`item_status_id`), - UNIQUE KEY `name` (`active`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -20801,8 +20282,8 @@ CREATE TABLE IF NOT EXISTS `item_status` ( -- Table structure for table `legal` -- -CREATE TABLE IF NOT EXISTS `legal` ( - `legal_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `legal` ( + `legal_id` int(12) NOT NULL, `org_id` int(11) NOT NULL, `legal_org_type` varchar(50) DEFAULT NULL, `registration_number` varchar(50) DEFAULT NULL, @@ -20819,9 +20300,8 @@ CREATE TABLE IF NOT EXISTS `legal` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`legal_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `legal` @@ -20838,8 +20318,8 @@ INSERT INTO `legal` (`legal_id`, `org_id`, `legal_org_type`, `registration_numbe -- Table structure for table `locator` -- -CREATE TABLE IF NOT EXISTS `locator` ( - `locator_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `locator` ( + `locator_id` int(12) NOT NULL, `subinventory_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `locator_structure` varchar(256) DEFAULT NULL, @@ -20864,9 +20344,8 @@ CREATE TABLE IF NOT EXISTS `locator` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`locator_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `locator` @@ -20890,7 +20369,7 @@ INSERT INTO `locator` (`locator_id`, `subinventory_id`, `org_id`, `locator_struc -- -- Stand-in structure for view `locator_v` -- -CREATE TABLE IF NOT EXISTS `locator_v` ( +CREATE TABLE `locator_v` ( `org_id` int(12) unsigned ,`locator` varchar(256) ,`alias` varchar(25) @@ -20912,14 +20391,15 @@ CREATE TABLE IF NOT EXISTS `locator_v` ( ,`coa_structure_id` int(12) ,`currency_code` varchar(20) ); + -- -------------------------------------------------------- -- -- Table structure for table `mdm_bank_account` -- -CREATE TABLE IF NOT EXISTS `mdm_bank_account` ( - `mdm_bank_account_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `mdm_bank_account` ( + `mdm_bank_account_id` int(12) NOT NULL, `mdm_bank_header_id` int(12) NOT NULL, `mdm_bank_site_id` int(12) NOT NULL, `account_number` varchar(25) NOT NULL, @@ -20948,11 +20428,8 @@ CREATE TABLE IF NOT EXISTS `mdm_bank_account` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`mdm_bank_account_id`), - UNIQUE KEY `supplier_number` (`mdm_bank_site_id`), - UNIQUE KEY `mdm_bank_site_id` (`mdm_bank_site_id`,`account_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `mdm_bank_account` @@ -20966,7 +20443,7 @@ INSERT INTO `mdm_bank_account` (`mdm_bank_account_id`, `mdm_bank_header_id`, `md -- -- Stand-in structure for view `mdm_bank_account_v` -- -CREATE TABLE IF NOT EXISTS `mdm_bank_account_v` ( +CREATE TABLE `mdm_bank_account_v` ( `mdm_bank_account_id` int(12) ,`account_number` varchar(25) ,`account_description` varchar(256) @@ -21013,14 +20490,15 @@ CREATE TABLE IF NOT EXISTS `mdm_bank_account_v` ( ,`customer_name` varchar(60) ,`customer_number` varchar(25) ); + -- -------------------------------------------------------- -- -- Table structure for table `mdm_bank_header` -- -CREATE TABLE IF NOT EXISTS `mdm_bank_header` ( - `mdm_bank_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `mdm_bank_header` ( + `mdm_bank_header_id` int(12) NOT NULL, `country` varchar(25) NOT NULL, `bank_name` varchar(256) NOT NULL, `bank_number` int(12) DEFAULT NULL, @@ -21035,13 +20513,8 @@ CREATE TABLE IF NOT EXISTS `mdm_bank_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`mdm_bank_header_id`), - UNIQUE KEY `bank_name` (`bank_name`), - UNIQUE KEY `bank_name_short` (`bank_name_short`), - UNIQUE KEY `bank_name_short_2` (`bank_name_short`), - UNIQUE KEY `bank_name_alt` (`bank_name_alt`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `mdm_bank_header` @@ -21057,8 +20530,8 @@ INSERT INTO `mdm_bank_header` (`mdm_bank_header_id`, `country`, `bank_name`, `ba -- Table structure for table `mdm_bank_site` -- -CREATE TABLE IF NOT EXISTS `mdm_bank_site` ( - `mdm_bank_site_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `mdm_bank_site` ( + `mdm_bank_site_id` int(12) NOT NULL, `mdm_bank_header_id` int(12) NOT NULL, `branch_name` varchar(256) NOT NULL, `country` varchar(25) DEFAULT NULL, @@ -21078,11 +20551,8 @@ CREATE TABLE IF NOT EXISTS `mdm_bank_site` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`mdm_bank_site_id`), - UNIQUE KEY `mdm_bank_header_id` (`mdm_bank_header_id`,`branch_name`), - UNIQUE KEY `branch_name_short` (`branch_name_short`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `mdm_bank_site` @@ -21098,7 +20568,7 @@ INSERT INTO `mdm_bank_site` (`mdm_bank_site_id`, `mdm_bank_header_id`, `branch_n -- -- Stand-in structure for view `mdm_bank_v` -- -CREATE TABLE IF NOT EXISTS `mdm_bank_v` ( +CREATE TABLE `mdm_bank_v` ( `mdm_bank_header_id` int(12) ,`country` varchar(25) ,`bank_name` varchar(256) @@ -21122,14 +20592,15 @@ CREATE TABLE IF NOT EXISTS `mdm_bank_v` ( ,`branch_tax_payer_id` varchar(40) ,`site_address_id` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `mdm_price_list_detail` -- -CREATE TABLE IF NOT EXISTS `mdm_price_list_detail` ( - `mdm_price_list_detail_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `mdm_price_list_detail` ( + `mdm_price_list_detail_id` int(12) NOT NULL, `mdm_price_list_header_id` int(12) NOT NULL, `mdm_price_list_line_id` int(12) NOT NULL, `qty_from` decimal(20,5) DEFAULT NULL, @@ -21145,10 +20616,8 @@ CREATE TABLE IF NOT EXISTS `mdm_price_list_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`mdm_price_list_detail_id`), - UNIQUE KEY `mdm_price_list_line_id` (`mdm_price_list_line_id`,`qty_from`,`effective_start_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `mdm_price_list_detail` @@ -21168,8 +20637,8 @@ INSERT INTO `mdm_price_list_detail` (`mdm_price_list_detail_id`, `mdm_price_list -- Table structure for table `mdm_price_list_header` -- -CREATE TABLE IF NOT EXISTS `mdm_price_list_header` ( - `mdm_price_list_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `mdm_price_list_header` ( + `mdm_price_list_header_id` int(12) NOT NULL, `price_list` varchar(25) NOT NULL, `module_name` enum('PO','SD','','') NOT NULL, `currency_code` varchar(25) NOT NULL, @@ -21180,10 +20649,8 @@ CREATE TABLE IF NOT EXISTS `mdm_price_list_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`mdm_price_list_header_id`), - UNIQUE KEY `price_list` (`price_list`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `mdm_price_list_header` @@ -21200,8 +20667,8 @@ INSERT INTO `mdm_price_list_header` (`mdm_price_list_header_id`, `price_list`, ` -- Table structure for table `mdm_price_list_line` -- -CREATE TABLE IF NOT EXISTS `mdm_price_list_line` ( - `mdm_price_list_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `mdm_price_list_line` ( + `mdm_price_list_line_id` int(12) NOT NULL, `mdm_price_list_header_id` int(12) NOT NULL, `line_type` varchar(25) NOT NULL, `org_id` int(12) DEFAULT NULL, @@ -21215,10 +20682,8 @@ CREATE TABLE IF NOT EXISTS `mdm_price_list_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`mdm_price_list_line_id`), - UNIQUE KEY `mdm_price_list_header_id` (`mdm_price_list_header_id`,`org_id`,`item_id_m`,`effective_start_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=32 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `mdm_price_list_line` @@ -21263,8 +20728,8 @@ INSERT INTO `mdm_price_list_line` (`mdm_price_list_line_id`, `mdm_price_list_hea -- Table structure for table `mdm_tax_code` -- -CREATE TABLE IF NOT EXISTS `mdm_tax_code` ( - `mdm_tax_code_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `mdm_tax_code` ( + `mdm_tax_code_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `tax_code` varchar(25) NOT NULL, `tax_type` varchar(25) DEFAULT NULL, @@ -21287,10 +20752,8 @@ CREATE TABLE IF NOT EXISTS `mdm_tax_code` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`mdm_tax_code_id`), - UNIQUE KEY `gl_calendar_id` (`tax_code`,`description`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `mdm_tax_code` @@ -21310,8 +20773,8 @@ INSERT INTO `mdm_tax_code` (`mdm_tax_code_id`, `org_id`, `tax_code`, `tax_type`, -- Table structure for table `mdm_tax_region` -- -CREATE TABLE IF NOT EXISTS `mdm_tax_region` ( - `mdm_tax_region_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `mdm_tax_region` ( + `mdm_tax_region_id` int(12) UNSIGNED NOT NULL, `country_code` varchar(5) NOT NULL, `state` varchar(25) DEFAULT NULL, `city` varchar(25) DEFAULT NULL, @@ -21323,11 +20786,8 @@ CREATE TABLE IF NOT EXISTS `mdm_tax_region` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`mdm_tax_region_id`), - UNIQUE KEY `gl_calendar_id` (`state`,`description`), - UNIQUE KEY `tax_region_name` (`tax_region_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `mdm_tax_region` @@ -21346,8 +20806,8 @@ INSERT INTO `mdm_tax_region` (`mdm_tax_region_id`, `country_code`, `state`, `cit -- Table structure for table `mdm_tax_rule` -- -CREATE TABLE IF NOT EXISTS `mdm_tax_rule` ( - `mdm_tax_rule_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `mdm_tax_rule` ( + `mdm_tax_rule_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `ship_to_region_id` int(12) DEFAULT NULL, `op_tax_class` varchar(25) DEFAULT NULL, @@ -21359,11 +20819,8 @@ CREATE TABLE IF NOT EXISTS `mdm_tax_rule` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`mdm_tax_rule_id`), - UNIQUE KEY `tax_region_name` (`weightage`), - UNIQUE KEY `gl_calendar_id` (`ship_to_region_id`,`tax_code_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -21371,18 +20828,16 @@ CREATE TABLE IF NOT EXISTS `mdm_tax_rule` ( -- Table structure for table `module` -- -CREATE TABLE IF NOT EXISTS `module` ( - `module_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `module` ( + `module_id` int(12) NOT NULL, `number` int(12) NOT NULL, `name` varchar(50) NOT NULL, `description` varchar(200) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`module_id`), - UNIQUE KEY `number` (`number`,`name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `module` @@ -21410,8 +20865,8 @@ INSERT INTO `module` (`module_id`, `number`, `name`, `description`, `created_by` -- Table structure for table `onhand` -- -CREATE TABLE IF NOT EXISTS `onhand` ( - `onhand_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `onhand` ( + `onhand_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `revision_name` varchar(10) DEFAULT NULL, `org_id` int(12) NOT NULL, @@ -21431,10 +20886,8 @@ CREATE TABLE IF NOT EXISTS `onhand` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`onhand_id`), - UNIQUE KEY `item_id_m` (`item_id_m`,`revision_name`,`org_id`,`subinventory_id`,`locator_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=224 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `onhand` @@ -21449,9 +20902,9 @@ INSERT INTO `onhand` (`onhand_id`, `item_id_m`, `revision_name`, `org_id`, `subi (30, 6, NULL, 6, 3, 9, NULL, NULL, 94, 4, 4, NULL, NULL, 2, NULL, NULL, NULL, 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00'), (31, 6, NULL, 6, 5, NULL, NULL, NULL, 45, 45, 45, NULL, NULL, 27, NULL, NULL, NULL, 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00'), (32, 6, NULL, 6, 6, NULL, NULL, NULL, 45, 45, 45, NULL, NULL, 27, NULL, NULL, NULL, 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00'), -(49, 10034, '', 6, 2, 5, NULL, NULL, 2694, 2693, 2694, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-07-29 15:42:18', 34, '2015-11-10 17:22:50'), +(49, 10034, '', 6, 2, 5, NULL, NULL, 2695, 2693, 2695, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-07-29 15:42:18', 34, '2015-11-10 17:22:50'), (50, 10050, NULL, 6, 2, 5, NULL, NULL, 12, 12, 12, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-04-28 11:21:42', 0, '2028-04-14 11:21:42'), -(62, 10034, '', 6, 3, 9, NULL, NULL, 631, 630, 631, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-07-29 15:06:22', 34, '2016-01-14 09:35:48'), +(62, 10034, '', 6, 3, 9, NULL, NULL, 630, 630, 630, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-07-29 15:06:22', 34, '2015-06-18 07:34:07'), (63, 10048, NULL, 6, 3, 9, NULL, NULL, 333, 333, 333, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-07-29 15:01:31', 0, '2029-07-14 15:01:31'), (75, 10107, NULL, 6, 2, 5, NULL, NULL, 20, 20, 20, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-07-12 08:39:09', 34, '2015-01-01 04:37:15'), (76, 10107, NULL, 6, 3, 9, NULL, NULL, 333, 333, 333, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-07-29 12:15:27', 0, '2029-07-14 12:15:27'), @@ -21544,7 +20997,7 @@ INSERT INTO `onhand` (`onhand_id`, `item_id_m`, `revision_name`, `org_id`, `subi -- -- Stand-in structure for view `onhand_summary_v` -- -CREATE TABLE IF NOT EXISTS `onhand_summary_v` ( +CREATE TABLE `onhand_summary_v` ( `onhand_id` int(12) ,`item_number` varchar(50) ,`item_description` varchar(256) @@ -21556,12 +21009,13 @@ CREATE TABLE IF NOT EXISTS `onhand_summary_v` ( ,`reservable_onhand` float ,`transactable_onhand` float ); + -- -------------------------------------------------------- -- -- Stand-in structure for view `onhand_v` -- -CREATE TABLE IF NOT EXISTS `onhand_v` ( +CREATE TABLE `onhand_v` ( `onhand_id` int(12) ,`item_number` varchar(50) ,`item_description` varchar(256) @@ -21594,16 +21048,17 @@ CREATE TABLE IF NOT EXISTS `onhand_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Table structure for table `option_detail` -- -CREATE TABLE IF NOT EXISTS `option_detail` ( - `option_detail_id` int(12) unsigned NOT NULL AUTO_INCREMENT, - `option_header_id` int(12) unsigned NOT NULL, - `option_line_id` int(12) unsigned NOT NULL, +CREATE TABLE `option_detail` ( + `option_detail_id` int(12) UNSIGNED NOT NULL, + `option_header_id` int(12) UNSIGNED NOT NULL, + `option_line_id` int(12) UNSIGNED NOT NULL, `option_detail_value` varchar(256) NOT NULL, `description` varchar(255) DEFAULT NULL, `efid` int(12) DEFAULT NULL, @@ -21615,45 +21070,14 @@ CREATE TABLE IF NOT EXISTS `option_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`option_detail_id`), - UNIQUE KEY `option_line_id` (`option_line_id`,`option_detail_value`), - KEY `option_header_id` (`option_header_id`,`option_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=37 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `option_detail` -- INSERT INTO `option_detail` (`option_detail_id`, `option_header_id`, `option_line_id`, `option_detail_value`, `description`, `efid`, `status`, `rev_enabled`, `rev_number`, `effective_start_date`, `effective_end_date`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES -(1, 117, 250, '002', 'TEST945 Descsdsds', 1, 'active', 'enabled', 1, '0000-00-00', '0000-00-00', 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00'), -(2, 117, 250, '0003', 'testhdfgdgdg', 1, 'active', 'enabled', NULL, '0000-00-00', '0000-00-00', 0, '2013-09-14 15:33:09', 0, '2013-09-14 15:33:09'), -(3, 117, 250, '0004', '43453543', 1, 'active', 'enabled', NULL, NULL, NULL, 0, '2013-09-14 15:33:54', 0, '2013-09-14 15:33:54'), -(4, 118, 0, 'TEST950A1A', 'TEST950A1A', 1, 'active', NULL, NULL, NULL, NULL, 0, '2013-09-17 19:31:17', 0, '2013-09-17 19:31:17'), -(5, 118, 254, 'TEST950A2', 'TEST950A1', 1, 'active', 'enabled', 0, '0000-00-00', '0000-00-00', 0, '2013-09-17 19:56:20', 0, '2013-09-17 19:56:20'), -(6, 118, 256, 'TEST950B1', 'TEST950B1', 1, 'active', 'enabled', 1, '0000-00-00', NULL, 0, '2013-09-17 19:42:58', 0, '2013-09-17 19:42:58'), -(7, 118, 257, 'TEST950C1', 'TEST950C12', 1, 'active', 'enabled', 1, '0000-00-00', NULL, 0, '2013-09-17 19:45:58', 0, '2013-09-17 19:45:58'), -(8, 118, 254, 'TEST950A2A', 'TEST950A2A', 1, 'active', 'enabled', 1, '0000-00-00', NULL, 0, '2013-09-17 21:23:47', 0, '2013-09-17 21:23:47'), -(11, 118, 254, 'TEST950A2B1', 'TEST950A2B1', 2, 'active', 'enabled', 2, '0000-00-00', NULL, 0, '2013-09-17 22:16:50', 0, '2013-09-17 22:16:50'), -(12, 118, 254, 'TEST950A2B2', 'TEST950A2B2', 2, 'active', 'enabled', 2, '0000-00-00', NULL, 0, '2013-09-17 22:16:50', 0, '2013-09-17 22:16:50'), -(13, 98, 2, 'TEST01A', 'TEST01A', 1, 'active', 'enabled', 1, '0000-00-00', '0000-00-00', 0, '2013-10-13 05:12:36', 0, '2013-10-13 05:12:36'), -(14, 98, 5, 'TEST01BCC', 'TEST01B', 1, 'active', 'enabled', 1, '0000-00-00', '0000-00-00', 0, '2013-10-13 05:12:36', 0, '2013-10-13 05:12:36'), -(15, 118, 259, 'TEST9509a11', 'TEST9509a11', NULL, 'active', 'enabled', 1, '0000-00-00', NULL, 0, '2013-09-18 19:56:22', 0, '2013-09-18 19:56:22'), -(16, 119, 264, 'Senior Buyer', 'Senior Buyer', 1, 'active', 'enabled', 1, '0000-00-00', '0000-00-00', 0, '2013-09-30 01:14:40', 0, '2013-09-30 01:14:40'), -(17, 119, 264, 'Buyer Trainee', 'Buyer Trainee', 1, 'active', 'enabled', 1, '0000-00-00', '0000-00-00', 0, '2013-09-30 01:14:40', 0, '2013-09-30 01:14:40'), -(19, 98, 2, 'TEST90502A', 'TEST90502A', 0, 'active', '', 0, '0000-00-00', '0000-00-00', 0, '2013-10-13 05:12:35', 0, '2013-10-13 05:12:35'), -(20, 98, 8, 'TEST90503A', 'TEST90503A', 0, 'active', 'enabled', 0, '0000-00-00', '0000-00-00', 0, '2013-10-13 05:12:36', 0, '2013-10-13 05:12:36'), -(21, 98, 258, 'TEST90503B', 'TEST90503B', NULL, 'active', 'enabled', NULL, NULL, NULL, 0, '2013-10-13 05:04:00', 0, '2013-10-13 05:04:00'), -(22, 98, 2, 'TEST90503BA', 'TEST90503BA', 0, '', '', 0, '0000-00-00', '0000-00-00', 0, '2013-10-13 05:12:35', 0, '2013-10-13 05:12:35'), -(23, 98, 288, 'TEST90509A', 'TEST90509A', NULL, 'active', 'enabled', NULL, NULL, NULL, 0, '2013-10-13 05:17:32', 0, '2013-10-13 05:17:32'), -(24, 98, 289, 'TEST90510A', 'TEST90510A', NULL, 'active', 'enabled', NULL, NULL, NULL, 0, '2013-10-13 05:19:44', 0, '2013-10-13 05:19:44'), -(25, 98, 290, 'TEST90511A', 'TEST90511A', NULL, 'active', 'enabled', NULL, NULL, NULL, 0, '2013-10-13 05:22:31', 0, '2013-10-13 05:22:31'), -(26, 98, 290, 'TEST90511b', 'TEST90511b', NULL, 'active', 'enabled', NULL, NULL, NULL, 0, '2013-10-13 05:37:55', 0, '2013-10-13 05:37:55'), -(27, 98, 290, 'TEST90511c', 'TEST90511c', NULL, 'active', 'enabled', NULL, NULL, NULL, 0, '2013-10-13 05:37:55', 0, '2013-10-13 05:37:55'), -(30, 98, 274, 'TEST90502A', 'TEST90502A', NULL, NULL, NULL, NULL, NULL, NULL, 0, '2013-10-13 06:19:55', 0, '2013-10-13 06:19:55'), -(32, 117, 311, 'TEST945F01', 'TEST945F01', NULL, NULL, NULL, NULL, NULL, NULL, 0, '2013-10-16 22:23:55', 0, '2013-10-16 22:23:55'), -(33, 117, 311, 'TEST945F02', 'TEST945F02', NULL, NULL, NULL, NULL, NULL, NULL, 0, '2013-10-16 22:23:55', 0, '2013-10-16 22:23:55'), -(34, 221, 1068, 'TEST90503B', 'TEST90503B', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-02-06 05:51:23', 34, '2015-02-06 05:51:23'), (35, 223, 1084, 'Buyer Trainee', 'Buyer Trainee', NULL, NULL, NULL, 1, NULL, NULL, 34, '2015-02-21 18:48:15', 34, '2015-02-21 18:48:15'), (36, 223, 1084, 'Senior Buyer', 'Senior Buyer', NULL, NULL, NULL, 1, NULL, NULL, 34, '2015-02-21 18:48:15', 34, '2015-02-21 18:48:15'); @@ -21663,8 +21087,8 @@ INSERT INTO `option_detail` (`option_detail_id`, `option_header_id`, `option_lin -- Table structure for table `option_header` -- -CREATE TABLE IF NOT EXISTS `option_header` ( - `option_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `option_header` ( + `option_header_id` int(12) UNSIGNED NOT NULL, `access_level` varchar(20) NOT NULL DEFAULT 'both', `option_type` varchar(50) NOT NULL, `description` varchar(200) DEFAULT NULL, @@ -21677,10 +21101,8 @@ CREATE TABLE IF NOT EXISTS `option_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`option_header_id`), - UNIQUE KEY `option_type` (`option_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=268 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `option_header` @@ -21768,7 +21190,7 @@ INSERT INTO `option_header` (`option_header_id`, `access_level`, `option_type`, (179, 'SYSTEM', 'FP_MRP_EXCEPTION_TYPE', 'MRP Exceptions', 'fp', '', 0, '', '', 0, 0, '2014-05-21 09:32:10', 0, '2021-05-14 09:32:10'), (180, 'SYSTEM', 'MDM_TAX_TYPE', 'Tax Types', 'sys', '', 0, 'active', 'enabled', 2, 0, '2014-06-03 02:56:45', 0, '2003-06-14 02:56:45'), (181, 'BOTH', 'INV_ITEM_TAX_CLASS', 'Product Tax Classification', 'inv', '', 0, '', '', 0, 0, '2014-06-04 08:13:47', 0, '2004-06-14 08:13:47'), -(182, 'SYSTEM', 'SYS_MODULE', 'Module Name', 'sys', NULL, NULL, NULL, NULL, NULL, 0, '2014-08-07 09:55:00', 34, '2015-11-02 03:29:06'), +(182, 'SYSTEM', 'SYS_MODULE', 'Module Name', 'sys', NULL, NULL, NULL, NULL, NULL, 0, '2014-08-07 09:55:00', 34, '2016-02-11 08:45:10'), (183, 'SYSTEM', 'SD_SO_STATUS', 'Sales Order Header Status', 'sys', '', 0, 'active', 'enabled', 0, 0, '2014-06-29 11:56:44', 0, '2029-06-14 11:56:44'), (184, 'SYSTEM', 'EXT_PATH_TYPE', 'Extension Path Types', 'sys', NULL, NULL, NULL, NULL, NULL, 0, '2014-07-19 05:45:25', 34, '2015-05-25 04:13:48'), (185, 'BOTH', 'MDM_BANK_ACCOUNT_TYPE', 'Bank Account Types', 'gl', '', 0, 'active', 'enabled', 0, 0, '2014-07-15 12:15:20', 0, '2015-07-14 12:15:20'), @@ -21853,7 +21275,9 @@ INSERT INTO `option_header` (`option_header_id`, `access_level`, `option_type`, (264, 'BOTH', 'QA_ELEMENT_TYPE', 'Quality Element Type', 'qa', NULL, NULL, NULL, NULL, NULL, 34, '2015-11-02 03:30:23', 34, '2015-11-02 03:30:23'), (265, 'BOTH', 'QA_COLLECTION_PLAN_TYPE', 'Quality Collection Plan Types', 'qa', NULL, NULL, NULL, NULL, NULL, 34, '2015-11-06 03:27:01', 34, '2015-11-06 03:27:01'), (266, 'BOTH', 'QA_COLLECTION_TRIGGER', 'Quality Collection Plan Triggers', 'qa', NULL, NULL, NULL, NULL, NULL, 34, '2015-11-06 09:17:43', 34, '2015-11-12 05:40:27'), -(267, 'BOTH', 'QA_QUALITY_ACTION', 'System Actions on Quality Results', 'qa', NULL, NULL, NULL, NULL, NULL, 34, '2015-11-07 11:28:19', 34, '2015-11-07 11:28:19'); +(267, 'BOTH', 'QA_QUALITY_ACTION', 'System Actions on Quality Results', 'qa', NULL, NULL, NULL, NULL, NULL, 34, '2015-11-07 11:28:19', 34, '2015-11-07 11:28:19'), +(268, 'BOTH', 'PM_FORMULA_TYPE', 'Formula Type', 'pm', NULL, NULL, NULL, NULL, NULL, 34, '2016-03-08 06:25:37', 34, '2016-03-08 08:12:56'), +(269, 'BOTH', 'PM_OPERATION_ACTIVITY', NULL, 'pm', NULL, NULL, NULL, NULL, NULL, 34, '2016-03-14 10:21:42', 34, '2016-03-14 10:21:42'); -- -------------------------------------------------------- @@ -21861,9 +21285,9 @@ INSERT INTO `option_header` (`option_header_id`, `access_level`, `option_type`, -- Table structure for table `option_line` -- -CREATE TABLE IF NOT EXISTS `option_line` ( - `option_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, - `option_header_id` int(12) unsigned NOT NULL, +CREATE TABLE `option_line` ( + `option_line_id` int(12) UNSIGNED NOT NULL, + `option_header_id` int(12) UNSIGNED NOT NULL, `option_line_code` varchar(50) CHARACTER SET latin1 NOT NULL, `option_line_value` varchar(50) CHARACTER SET latin1 NOT NULL, `description` varchar(256) COLLATE utf8_unicode_ci NOT NULL, @@ -21879,11 +21303,8 @@ CREATE TABLE IF NOT EXISTS `option_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`option_line_id`), - UNIQUE KEY `option_header_id_2` (`option_header_id`,`option_line_code`), - KEY `option_header_id` (`option_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1379 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `option_line` @@ -22353,16 +21774,16 @@ INSERT INTO `option_line` (`option_line_id`, `option_header_id`, `option_line_co (622, 181, 'EXEMPT', 'Exempt', 'Exempt', 0, 0, '', NULL, NULL, 'enabled', 0, '', '', 0, '2014-06-04 08:13:49', 0, '2004-06-14 08:13:49'), (623, 181, 'IND_RURAL_EDUCATION', 'Rural Education IND', 'Rural Education IND', 0, 0, '', NULL, NULL, 'enabled', 0, '', '', 0, '2014-06-04 08:13:49', 0, '2004-06-14 08:13:49'), (624, 181, 'EMISSION_INSPECTION', 'Emission Inspection', 'Emmision Inspection', 0, 0, '', NULL, NULL, 'enabled', 0, '', '', 0, '2014-06-04 08:13:50', 0, '2004-06-14 08:13:50'), -(625, 182, 'ap', 'Accounts Payable', '101. Accounts Payable', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:48', 34, '2015-11-02 03:27:42'), -(626, 182, 'gl', 'General Ledger', '100. General Ledger', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:48', 34, '2015-11-02 03:27:43'), -(627, 182, 'ar', 'Accounts Receviable', '102. Accounts Receviable', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:48', 34, '2015-11-02 03:27:42'), -(628, 182, 'fa', 'Fixed Asset', '103. Fixed Asset', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:47', 34, '2015-11-02 03:27:43'), -(629, 182, 'cm', 'Cash Managment', '104. Cash Management', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:48', 34, '2015-11-02 03:27:43'), -(630, 182, 'inv', 'Inventory', '200. Inventory', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:49', 34, '2015-11-02 03:27:43'), -(631, 182, 'pur', 'Purchasing', '201. Purchasing', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:49', 34, '2015-11-02 03:27:43'), -(632, 182, 'sd', 'Sales & Distribution', '202. Sales & Distribution', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:49', 34, '2015-11-02 03:27:43'), -(633, 182, 'bom', 'Bills of Material', '203. Bills of Material', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:50', 34, '2015-11-02 03:27:44'), -(634, 182, 'wip', 'Work In Process', '204. Work In Process', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:50', 34, '2015-11-02 03:27:44'), +(625, 182, 'ap', 'Accounts Payable', '101. Accounts Payable', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:48', 34, '2016-02-11 08:43:55'), +(626, 182, 'gl', 'General Ledger', '100. General Ledger', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:48', 34, '2016-02-11 08:43:55'), +(627, 182, 'ar', 'Accounts Receviable', '102. Accounts Receviable', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:48', 34, '2016-02-11 08:43:55'), +(628, 182, 'fa', 'Fixed Asset', '103. Fixed Asset', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:47', 34, '2016-02-11 08:43:56'), +(629, 182, 'cm', 'Cash Managment', '104. Cash Management', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:48', 34, '2016-02-11 08:43:56'), +(630, 182, 'inv', 'Inventory', '200. Inventory', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:49', 34, '2016-02-11 08:43:56'), +(631, 182, 'pur', 'Purchasing', '201. Purchasing', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:49', 34, '2016-02-11 08:43:57'), +(632, 182, 'sd', 'Sales & Distribution', '202. Sales & Distribution', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:49', 34, '2016-02-11 08:43:57'), +(633, 182, 'bom', 'Bills of Material', '203. Bills of Material', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:50', 34, '2016-02-11 08:43:57'), +(634, 182, 'wip', 'Work In Process', '204. Work In Process', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-06-27 11:25:50', 34, '2016-02-11 08:43:58'), (635, 182, 'fp', 'Forecast & Planning', '205. Forecast & Planning', 0, 0, '', NULL, NULL, 'enabled', 0, '', '', 0, '2014-06-27 11:25:50', 0, '2027-06-14 11:25:50'), (636, 182, 'sys', 'System', '1. System', 0, 0, '', NULL, NULL, 'enabled', 0, '', '', 0, '2014-06-27 11:25:50', 0, '2027-06-14 11:25:50'), (637, 182, 'org', 'Organization', '2. Organization', 0, 0, '', NULL, NULL, 'enabled', 0, '', '', 0, '2014-06-27 11:25:50', 0, '2027-06-14 11:25:50'), @@ -23078,7 +22499,24 @@ INSERT INTO `option_line` (`option_line_id`, `option_header_id`, `option_line_co (1375, 267, 'RUN_PROGRAM', 'Run Program', 'Run Program', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-11-07 11:43:47', 34, '2015-11-07 11:43:47'), (1376, 224, 'it_IT', 'Italian', 'Italian-italiano', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-11-11 03:47:03', 34, '2015-11-11 03:47:03'), (1377, 266, 'category.category', 'Category', 'Category', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-11-12 05:23:06', 34, '2015-11-12 05:23:06'), -(1378, 266, 'supplier.supplier_name', 'Supplier Name', 'Supplier Name', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-11-12 05:40:26', 34, '2015-11-12 05:40:26'); +(1378, 266, 'supplier.supplier_name', 'Supplier Name', 'Supplier Name', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-11-12 05:40:26', 34, '2015-11-12 05:40:26'), +(1379, 182, 'pm', 'Process Manufacturing', 'Process Manufacturing', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-02-11 08:43:54', 34, '2016-02-11 08:43:54'), +(1380, 268, 'BLEND', 'Blending Formula', 'Blending Formula', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-08 06:28:43', 34, '2016-03-08 08:12:55'), +(1381, 268, 'PROCESS', 'Production Formula', 'Production Formula', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-08 06:28:43', 34, '2016-03-08 08:12:57'), +(1382, 268, 'COST', 'Costing Formula', 'Costing Formula', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-08 06:28:43', 34, '2016-03-08 08:12:56'), +(1383, 268, 'MIX', 'Mixing Formula', 'Mixing Formula', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-08 06:28:43', 34, '2016-03-08 08:12:56'), +(1384, 268, 'PKG', 'Packaging Formula', 'Packaging Formula', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-08 06:28:44', 34, '2016-03-08 08:12:56'), +(1385, 268, 'CAPSULE', 'Capsulation Formula', 'Capsulation Formula', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-08 06:28:44', 34, '2016-03-08 08:12:57'), +(1386, 269, 'BRKDOWN', 'Break Down', 'Break Down', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-14 10:24:39', 34, '2016-03-14 10:24:39'), +(1387, 269, 'RUNTIME', 'Run Time', 'Run Time', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-14 10:24:39', 34, '2016-03-14 10:24:39'), +(1388, 269, 'PREPROCESS', 'Pre Process', 'Pre Process', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-14 10:24:39', 34, '2016-03-14 10:24:39'), +(1389, 269, 'PKG', 'Packaging', 'Packaging', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-14 10:24:39', 34, '2016-03-14 10:24:39'), +(1390, 269, 'WASH', 'Washing', 'Washing', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-14 10:24:40', 34, '2016-03-14 10:24:40'), +(1391, 269, 'BLEND', 'Blend', 'Blend', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-14 10:24:40', 34, '2016-03-14 10:24:40'), +(1392, 269, 'HEAT', 'Heat', 'Heat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-14 10:24:40', 34, '2016-03-14 10:24:40'), +(1393, 269, 'DRY', 'Dry', 'Dry', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-14 10:24:41', 34, '2016-03-14 10:24:41'), +(1394, 269, 'COOL', 'Cooling', 'Cooling', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-14 10:24:41', 34, '2016-03-14 10:24:41'), +(1395, 269, 'FILTER', 'Filtering', 'Filtering', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-14 10:24:41', 34, '2016-03-14 10:24:41'); -- -------------------------------------------------------- @@ -23086,16 +22524,16 @@ INSERT INTO `option_line` (`option_line_id`, `option_header_id`, `option_line_co -- Table structure for table `org` -- -CREATE TABLE IF NOT EXISTS `org` ( - `org_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `org` ( + `org_id` int(12) UNSIGNED NOT NULL, `org` varchar(50) NOT NULL, `code` varchar(5) NOT NULL, `type` varchar(50) NOT NULL, `description` varchar(200) DEFAULT NULL, - `enterprise_org_id` int(12) unsigned DEFAULT NULL, - `legal_org_id` int(12) unsigned DEFAULT NULL, - `business_org_id` int(12) unsigned DEFAULT NULL, - `inventory_org_id` int(12) unsigned DEFAULT NULL, + `enterprise_org_id` int(12) UNSIGNED DEFAULT NULL, + `legal_org_id` int(12) UNSIGNED DEFAULT NULL, + `business_org_id` int(12) UNSIGNED DEFAULT NULL, + `inventory_org_id` int(12) UNSIGNED DEFAULT NULL, `ef_id` int(12) DEFAULT NULL, `status` varchar(50) DEFAULT NULL, `rev_enabled` varchar(50) DEFAULT NULL, @@ -23104,14 +22542,8 @@ CREATE TABLE IF NOT EXISTS `org` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`org_id`), - UNIQUE KEY `org` (`org`), - KEY `inventory_id` (`inventory_org_id`), - KEY `enterprise_id` (`enterprise_org_id`), - KEY `legal_id` (`legal_org_id`), - KEY `business_id` (`business_org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `org` @@ -23143,7 +22575,7 @@ INSERT INTO `org` (`org_id`, `org`, `code`, `type`, `description`, `enterprise_o -- -- Stand-in structure for view `org_v` -- -CREATE TABLE IF NOT EXISTS `org_v` ( +CREATE TABLE `org_v` ( `org_id` int(12) unsigned ,`org` varchar(50) ,`type` varchar(50) @@ -23159,14 +22591,15 @@ CREATE TABLE IF NOT EXISTS `org_v` ( ,`coa_structure_id` int(12) ,`currency_code` varchar(20) ); + -- -------------------------------------------------------- -- -- Table structure for table `page` -- -CREATE TABLE IF NOT EXISTS `page` ( - `page_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `page` ( + `page_id` int(12) NOT NULL, `parent_id` int(12) DEFAULT NULL, `subject` varchar(256) DEFAULT NULL, `content` text NOT NULL, @@ -23180,11 +22613,8 @@ CREATE TABLE IF NOT EXISTS `page` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`page_id`), - FULLTEXT KEY `content` (`content`), - FULLTEXT KEY `subject` (`subject`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=73 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `page` @@ -23202,8 +22632,8 @@ INSERT INTO `page` (`page_id`, `parent_id`, `subject`, `content`, `content_php_c -- Table structure for table `path` -- -CREATE TABLE IF NOT EXISTS `path` ( - `path_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `path` ( + `path_id` int(12) NOT NULL, `parent_id` int(12) DEFAULT '0', `name` varchar(256) NOT NULL DEFAULT 'none', `path_link` varchar(256) NOT NULL DEFAULT 'none', @@ -23219,10 +22649,8 @@ CREATE TABLE IF NOT EXISTS `path` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`path_id`), - UNIQUE KEY `name` (`name`,`module_code`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=866 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `path` @@ -23279,7 +22707,7 @@ INSERT INTO `path` (`path_id`, `parent_id`, `name`, `path_link`, `description`, (85, 487, 'Content Management', 'form.php?module_code=da&path_id=85', 'Content Management - Create & Update Contents such as Forum, Article, etc', 'da', 'da', 2, NULL, NULL, 'CONTAINER', NULL, 3, 0, '2014-07-23 00:00:00', 34, '2015-05-25 04:58:54'), (87, 674, 'Custom Report(Views)', 'form.php?class_name=view&mode=9', 'Custom Report(Views)', 'ext', 'view', 9, NULL, NULL, 'FORM', NULL, NULL, 0, '2014-09-06 00:00:00', 34, '2015-06-14 07:39:47'), (88, 87, 'Search Custome Reports (Views)', 'search.php?class_name=view', 'List of views', 'ext', 'extension', 2, NULL, NULL, NULL, 1, NULL, 0, '2014-06-21 00:00:00', 1, '2014-10-25 10:07:22'), -(89, 84, 'View forum', 'extensions/content/contents.php?content_type=forum', 'view forum content type', 'da', NULL, NULL, NULL, 'content_id', NULL, NULL, NULL, 0, '2013-09-07 00:00:00', 34, '2015-05-05 15:23:46'), +(89, 84, 'View Forum', 'content.php?content_type=forum&category_id=1', 'View Forum', 'da', 'forum', 2, NULL, 'content_id', NULL, NULL, NULL, 0, '2013-09-07 00:00:00', 34, '2016-02-25 09:10:24'), (90, 18, 'Search Options', 'search.php?class_name=option_header', 'Option lists', 'sys', 'option_header', NULL, NULL, 'option_header_id', NULL, 1, NULL, 0, '2014-02-27 00:00:00', 0, '2010-06-14 00:00:00'), (91, 323, 'Role Path', 'form.php?class_name=role_path&mode=9&role_id=261', 'Role Path', 'adm', 'role_path', 9, NULL, 'role_path_id', NULL, NULL, NULL, 0, '2014-06-09 00:00:00', 34, '2015-05-25 09:32:53'), (92, 59, 'User', 'form.php?class_name=user&mode=9', 'User - Creation & Update', 'adm', 'user', 9, NULL, 'user_id', NULL, NULL, NULL, 0, '2014-05-01 00:00:00', 0, '2010-06-14 00:00:00'), @@ -24035,7 +23463,18 @@ INSERT INTO `path` (`path_id`, `parent_id`, `name`, `path_link`, `description`, (862, 860, 'Collection Plan Assignment', 'form.php?class_name=qa_cp_assignment_header&mode=9', 'Collection Plan Assignment', 'qa', 'qa_cp_assignment_header', 9, NULL, 'Collection Plan', 'SEARCH', NULL, NULL, 34, '2015-11-06 10:24:46', 34, '2015-11-06 10:24:46'), (863, 860, 'Search Assignment', 'search.php?class_name=qa_cp_assignment_header', 'Search Assignment', 'qa', 'qa_cp_assignment_header', 2, NULL, 'Collection Plan', 'SEARCH', NULL, NULL, 34, '2015-11-06 10:25:20', 34, '2015-11-06 10:25:20'), (864, 858, 'Quality Actions', 'form.php?class_name=option_header&option_header_id=267&mode=9', 'Quality Actions', 'qa', 'option_header', 9, NULL, NULL, 'FORM', NULL, NULL, 34, '2015-11-07 11:44:37', 34, '2015-11-07 11:44:37'), -(865, 852, 'Quality Result', 'form.php?class_name=qa_quality_result&mode=9', 'Quality Result', 'qa', 'qa_quality_result', 9, NULL, NULL, 'FORM', NULL, NULL, 34, '2015-11-09 02:15:21', 34, '2015-11-09 02:15:21'); +(865, 852, 'Quality Result', 'form.php?class_name=qa_quality_result&mode=9', 'Quality Result', 'qa', 'qa_quality_result', 9, NULL, NULL, 'FORM', NULL, NULL, 34, '2015-11-09 02:15:21', 34, '2015-11-09 02:15:21'), +(866, NULL, 'Process Manufacturing', 'form.php?module_code=pm', 'Process Manufacturing', 'pm', 'pm', 2, NULL, NULL, NULL, NULL, 15, 34, '2016-02-18 10:28:59', 34, '2016-02-18 10:28:59'), +(867, 866, 'Formula', 'form.php?class_name=pm_formula_header&mode=9', 'Formula Header', 'pm', 'pm_formula_header', 9, NULL, NULL, 'FORM', NULL, NULL, 34, '2016-02-18 10:30:20', 34, '2016-02-18 10:30:20'), +(868, 867, 'Search Formula', 'search.php?class_name=pm_formula_header&mode=2', 'Search Formula', 'pm', 'pm_formula_header', 2, NULL, NULL, 'SEARCH', NULL, NULL, 34, '2016-02-18 10:30:58', 34, '2016-02-18 10:30:58'), +(869, 866, 'Process Routing', 'form.php?class_name=pm_process_routing_header&mode=9', 'Process Routing', 'pm', 'pm_process_routing_header', 9, NULL, NULL, 'FORM', NULL, NULL, 34, '2016-03-12 12:49:03', 34, '2016-03-12 12:49:03'), +(871, 869, 'Search Process Routing', 'search.php?class_name=pm_process_routing_header&mode=2', 'Search Process Routing', 'pm', 'pm_process_routing_header', 2, NULL, NULL, 'SEARCH', NULL, NULL, 34, '2016-03-12 12:50:03', 34, '2016-03-27 07:02:19'), +(872, 866, 'Process Operation', 'form.php?class_name=pm_process_operation_header&mode=9', 'Process Operation', 'pm', 'pm_process_operation_header', 9, NULL, NULL, 'FORM', NULL, NULL, 34, '2016-03-14 09:20:18', 34, '2016-03-14 09:20:18'), +(873, 872, 'Search Process Operation', 'search.php?class_name=pm_process_operation_header&mode=2', 'Search Process Operation', 'pm', 'pm_process_operation_header', 2, NULL, NULL, 'SEARCH', NULL, NULL, 34, '2016-03-14 09:20:59', 34, '2016-03-14 09:20:59'), +(874, 866, 'Recipe', 'form.php?class_name=pm_recipe_header&mode=9', 'Process Manufacturing Recipe', 'pm', 'pm_recipe_header', 9, NULL, NULL, 'FORM', NULL, NULL, 34, '2016-03-20 04:13:08', 34, '2016-03-20 04:13:08'), +(875, 874, 'Search Recipe', 'search.php?class_name=pm_recipe_header&mode=2', 'Search Recipe', 'pm', 'pm_recipe_header', 2, NULL, NULL, 'SEARCH', NULL, NULL, 34, '2016-03-20 04:13:53', 34, '2016-03-20 04:13:53'), +(876, 874, 'Search Recipe All', 'search.php?class_name=pm_recipe_all_v&mode=2', 'Search Recipe All', 'pm', 'pm_recipe_all_v', 2, NULL, NULL, 'SEARCH', NULL, NULL, 34, '2016-03-27 07:15:03', 34, '2016-03-27 07:15:03'), +(877, 874, 'Recipe Material', 'form.php?class_name=pm_recipe_material_header&mode=9', 'Recipe Material', 'pm', 'pm_recipe_material_header', 9, NULL, NULL, 'FORM', NULL, NULL, 34, '2016-03-27 07:19:04', 34, '2016-03-27 07:19:04'); -- -------------------------------------------------------- @@ -24043,8 +23482,8 @@ INSERT INTO `path` (`path_id`, `parent_id`, `name`, `path_link`, `description`, -- Table structure for table `payment_term` -- -CREATE TABLE IF NOT EXISTS `payment_term` ( - `payment_term_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `payment_term` ( + `payment_term_id` int(12) NOT NULL, `payment_term` varchar(50) NOT NULL, `description` varchar(256) DEFAULT NULL, `prepayment_cb` tinyint(1) DEFAULT NULL, @@ -24055,9 +23494,8 @@ CREATE TABLE IF NOT EXISTS `payment_term` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`payment_term_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `payment_term` @@ -24077,8 +23515,8 @@ INSERT INTO `payment_term` (`payment_term_id`, `payment_term`, `description`, `p -- Table structure for table `payment_term_discount` -- -CREATE TABLE IF NOT EXISTS `payment_term_discount` ( - `payment_term_discount_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `payment_term_discount` ( + `payment_term_discount_id` int(12) NOT NULL, `payment_term_id` int(12) NOT NULL, `seq_number` int(12) NOT NULL, `discount_percentage` float NOT NULL, @@ -24089,9 +23527,8 @@ CREATE TABLE IF NOT EXISTS `payment_term_discount` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`payment_term_discount_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `payment_term_discount` @@ -24116,8 +23553,8 @@ INSERT INTO `payment_term_discount` (`payment_term_discount_id`, `payment_term_i -- Table structure for table `payment_term_schedule` -- -CREATE TABLE IF NOT EXISTS `payment_term_schedule` ( - `payment_term_schedule_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `payment_term_schedule` ( + `payment_term_schedule_id` int(12) NOT NULL, `payment_term_id` int(12) NOT NULL, `seq_number` int(12) NOT NULL, `amount_percentage` float NOT NULL, @@ -24128,9 +23565,8 @@ CREATE TABLE IF NOT EXISTS `payment_term_schedule` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`payment_term_schedule_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `payment_term_schedule` @@ -24153,12 +23589,435 @@ INSERT INTO `payment_term_schedule` (`payment_term_schedule_id`, `payment_term_i -- -------------------------------------------------------- +-- +-- Table structure for table `pm_formula_byproduct` +-- + +CREATE TABLE `pm_formula_byproduct` ( + `pm_formula_byproduct_id` int(12) UNSIGNED NOT NULL, + `pm_formula_header_id` int(12) NOT NULL, + `line_no` int(2) NOT NULL, + `line_type` varchar(15) DEFAULT NULL, + `item_id_m` int(12) DEFAULT NULL, + `uom_id` int(12) DEFAULT NULL, + `quantity` decimal(15,5) DEFAULT NULL, + `description` varchar(256) DEFAULT NULL, + `scale_type` varchar(15) DEFAULT NULL, + `yield_type` varchar(15) DEFAULT NULL, + `byproduct_type` varchar(15) DEFAULT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_formula_byproduct` +-- + +INSERT INTO `pm_formula_byproduct` (`pm_formula_byproduct_id`, `pm_formula_header_id`, `line_no`, `line_type`, `item_id_m`, `uom_id`, `quantity`, `description`, `scale_type`, `yield_type`, `byproduct_type`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 1, 1, NULL, 10046, 27, '2.00000', NULL, NULL, 'MANUAL', NULL, 34, '2016-03-11 06:08:55', 34, '2016-03-11 06:13:03'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pm_formula_header` +-- + +CREATE TABLE `pm_formula_header` ( + `pm_formula_header_id` int(12) UNSIGNED NOT NULL, + `org_id` int(12) NOT NULL, + `formula_name` varchar(50) NOT NULL, + `type` varchar(15) DEFAULT NULL, + `revision` varchar(20) DEFAULT NULL, + `comment` varchar(255) DEFAULT NULL, + `status` varchar(20) DEFAULT NULL, + `description` varchar(256) DEFAULT NULL, + `owner_employee_id` int(12) DEFAULT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_formula_header` +-- + +INSERT INTO `pm_formula_header` (`pm_formula_header_id`, `org_id`, `formula_name`, `type`, `revision`, `comment`, `status`, `description`, `owner_employee_id`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 6, 'F001', '0.00000', NULL, NULL, NULL, 'Formula for MI_FG001', NULL, 34, '2016-03-10 03:02:29', 34, '2016-03-11 06:13:02'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pm_formula_ingredient` +-- + +CREATE TABLE `pm_formula_ingredient` ( + `pm_formula_ingredient_id` int(12) UNSIGNED NOT NULL, + `pm_formula_header_id` int(12) NOT NULL, + `line_no` int(2) NOT NULL, + `revision_name` varchar(15) DEFAULT NULL, + `item_id_m` int(12) DEFAULT NULL, + `uom_id` int(12) DEFAULT NULL, + `quantity` decimal(15,5) DEFAULT NULL, + `description` varchar(256) DEFAULT NULL, + `buffer_cb` tinyint(1) DEFAULT NULL, + `scale_type` varchar(15) DEFAULT NULL, + `contribute_yield_cb` tinyint(1) DEFAULT NULL, + `byproduct_type` varchar(15) DEFAULT NULL, + `consumption_type` varchar(15) DEFAULT NULL, + `phantom_type` varchar(15) DEFAULT NULL, + `required_qty` decimal(15,5) DEFAULT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_formula_ingredient` +-- + +INSERT INTO `pm_formula_ingredient` (`pm_formula_ingredient_id`, `pm_formula_header_id`, `line_no`, `revision_name`, `item_id_m`, `uom_id`, `quantity`, `description`, `buffer_cb`, `scale_type`, `contribute_yield_cb`, `byproduct_type`, `consumption_type`, `phantom_type`, `required_qty`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 1, 1, NULL, 10238, 27, '5.00000', NULL, NULL, NULL, NULL, NULL, 'AUTO', NULL, NULL, 34, '2016-03-11 04:26:55', 34, '2016-03-11 06:05:21'), +(2, 1, 4, NULL, 10052, 27, '2.00000', NULL, NULL, NULL, NULL, NULL, 'AUTOBS', NULL, NULL, 34, '2016-03-11 05:37:56', 34, '2016-03-11 05:37:56'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pm_formula_line` +-- + +CREATE TABLE `pm_formula_line` ( + `pm_formula_line_id` int(12) UNSIGNED NOT NULL, + `pm_formula_header_id` int(12) NOT NULL, + `line_no` int(2) NOT NULL, + `line_type` varchar(15) DEFAULT NULL, + `item_id_m` int(12) NOT NULL, + `uom_id` int(12) DEFAULT NULL, + `quantity` decimal(15,5) DEFAULT NULL, + `description` varchar(256) DEFAULT NULL, + `cost_allocation` decimal(15,5) DEFAULT NULL, + `scale_type` varchar(15) DEFAULT NULL, + `yield_type` varchar(15) DEFAULT NULL, + `byproduct_type` varchar(15) DEFAULT NULL, + `consumption_type` varchar(15) DEFAULT NULL, + `phantom_type` varchar(15) DEFAULT NULL, + `required_qty` decimal(15,5) DEFAULT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_formula_line` +-- + +INSERT INTO `pm_formula_line` (`pm_formula_line_id`, `pm_formula_header_id`, `line_no`, `line_type`, `item_id_m`, `uom_id`, `quantity`, `description`, `cost_allocation`, `scale_type`, `yield_type`, `byproduct_type`, `consumption_type`, `phantom_type`, `required_qty`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 1, 2, NULL, 10074, 27, '1.00000', NULL, NULL, 'FIX', 'AUTO', NULL, NULL, NULL, NULL, 34, '2016-03-10 03:11:12', 34, '2016-03-10 09:09:22'), +(3, 1, 3, NULL, 10060, 27, '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-10 03:12:15', 34, '2016-03-10 09:09:22'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pm_process_operation_header` +-- + +CREATE TABLE `pm_process_operation_header` ( + `pm_process_operation_header_id` int(12) UNSIGNED NOT NULL, + `operation_name` varchar(25) NOT NULL, + `org_id` int(12) NOT NULL, + `operation_class` varchar(25) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `version` varchar(20) DEFAULT NULL, + `start_date` date DEFAULT NULL, + `end_date` date DEFAULT NULL, + `status` varchar(25) DEFAULT NULL, + `min_quantity` decimal(15,5) DEFAULT NULL, + `uom_id` int(12) NOT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_process_operation_header` +-- + +INSERT INTO `pm_process_operation_header` (`pm_process_operation_header_id`, `operation_name`, `org_id`, `operation_class`, `description`, `version`, `start_date`, `end_date`, `status`, `min_quantity`, `uom_id`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, '1-BLISTER PACK', 6, NULL, 'Blister Packaging Operation', NULL, NULL, NULL, NULL, NULL, 0, 34, '2016-03-15 07:53:59', 34, '2016-03-15 07:55:05'), +(2, '1-BLISTER PACK', 9, NULL, 'Blister Packaging Operation', NULL, NULL, NULL, NULL, NULL, 37, 34, '2016-03-15 08:21:39', 34, '2016-03-15 08:21:39'), +(3, '2-BLISTER PACK', 9, NULL, 'Blister Packaging Operation', NULL, NULL, NULL, NULL, NULL, 37, 34, '2016-03-15 09:15:19', 34, '2016-03-15 09:15:19'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pm_process_operation_line` +-- + +CREATE TABLE `pm_process_operation_line` ( + `pm_process_operation_line_id` int(12) UNSIGNED NOT NULL, + `pm_process_operation_header_id` int(12) NOT NULL, + `activity_code` varchar(25) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `activity_factror` decimal(10,5) DEFAULT NULL, + `sequence_dependency_cb` tinyint(1) DEFAULT NULL, + `offset_interval` decimal(10,5) DEFAULT NULL, + `breakable_cb` tinyint(1) DEFAULT NULL, + `material_scheduled_cb` tinyint(1) DEFAULT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_process_operation_line` +-- + +INSERT INTO `pm_process_operation_line` (`pm_process_operation_line_id`, `pm_process_operation_header_id`, `activity_code`, `description`, `activity_factror`, `sequence_dependency_cb`, `offset_interval`, `breakable_cb`, `material_scheduled_cb`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 1, 'PKG', NULL, '1.00000', NULL, NULL, NULL, NULL, 34, '2016-03-15 07:55:06', 34, '2016-03-15 07:55:06'), +(2, 2, 'PKG', NULL, '1.00000', NULL, NULL, NULL, NULL, 34, '2016-03-15 08:21:39', 34, '2016-03-15 08:21:39'), +(3, 3, 'PKG', NULL, '1.00000', NULL, NULL, NULL, NULL, 34, '2016-03-15 09:15:19', 34, '2016-03-15 09:15:19'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pm_process_routing_header` +-- + +CREATE TABLE `pm_process_routing_header` ( + `pm_process_routing_header_id` int(12) UNSIGNED NOT NULL, + `routing_name` varchar(25) NOT NULL, + `org_id` int(12) NOT NULL, + `status` varchar(50) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `revision` varchar(20) DEFAULT NULL, + `start_date` date DEFAULT NULL, + `end_date` date DEFAULT NULL, + `routing_class` varchar(25) DEFAULT NULL, + `owner_employee_id` int(12) DEFAULT NULL, + `quantity` decimal(15,5) NOT NULL, + `uom_id` int(12) NOT NULL, + `planned_loss` decimal(8,5) DEFAULT NULL, + `theoretical_loss` decimal(8,5) DEFAULT NULL, + `fixed_loss` decimal(8,5) DEFAULT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_process_routing_header` +-- + +INSERT INTO `pm_process_routing_header` (`pm_process_routing_header_id`, `routing_name`, `org_id`, `status`, `description`, `revision`, `start_date`, `end_date`, `routing_class`, `owner_employee_id`, `quantity`, `uom_id`, `planned_loss`, `theoretical_loss`, `fixed_loss`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, '100-BAKE', 9, 'APPROVED', 'Baking Routing-Plant PR1', '100', '1998-01-01', NULL, NULL, NULL, '100.00000', 39, NULL, NULL, NULL, 34, '2016-03-14 06:03:11', 34, '2016-03-15 08:52:17'), +(2, '100-BAKE', 6, 'APPROVED', 'Baking Routing-Plant PR1', NULL, NULL, NULL, NULL, NULL, '100.00000', 36, '1.00000', NULL, NULL, 34, '2016-03-15 08:19:01', 34, '2016-03-15 08:19:01'), +(3, '200-BAKE', 6, 'APPROVED', 'Baking Routing-Plant PR1', NULL, NULL, NULL, NULL, NULL, '100.00000', 36, '1.00000', NULL, NULL, 34, '2016-03-22 03:26:45', 34, '2016-03-22 03:26:45'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pm_process_routing_line` +-- + +CREATE TABLE `pm_process_routing_line` ( + `pm_process_routing_line_id` int(12) UNSIGNED NOT NULL, + `pm_process_routing_header_id` int(12) NOT NULL, + `step_no` int(12) NOT NULL, + `pm_process_operation_header_id` int(12) DEFAULT NULL, + `uom_id` int(12) DEFAULT NULL, + `release_type` varchar(255) DEFAULT NULL, + `min_quantity` varchar(20) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `step_quantity` decimal(15,5) DEFAULT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_process_routing_line` +-- + +INSERT INTO `pm_process_routing_line` (`pm_process_routing_line_id`, `pm_process_routing_header_id`, `step_no`, `pm_process_operation_header_id`, `uom_id`, `release_type`, `min_quantity`, `description`, `step_quantity`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 2, 10, 1, 30, 'MANUAL', NULL, NULL, '10.00000', 34, '2016-03-15 08:19:02', 34, '2016-03-15 08:19:02'), +(2, 3, 10, 1, 30, 'MANUAL', NULL, NULL, '10.00000', 34, '2016-03-22 03:26:46', 34, '2016-03-22 03:26:46'); + +-- -------------------------------------------------------- + +-- +-- Stand-in structure for view `pm_recipe_all_v` +-- +CREATE TABLE `pm_recipe_all_v` ( +`pm_recipe_header_id` int(12) unsigned +,`org_id` int(12) +,`recipe_name` varchar(25) +,`pm_formula_header_id` varchar(15) +,`pm_process_routing_header_id` int(12) +,`item_id_m` int(12) +,`formula_name` varchar(50) +,`formula_description` varchar(256) +,`routing_name` varchar(25) +,`routing_description` varchar(255) +,`item_number` varchar(50) +,`item_description` varchar(256) +); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pm_recipe_customer` +-- + +CREATE TABLE `pm_recipe_customer` ( + `pm_recipe_customer_id` int(12) UNSIGNED NOT NULL, + `pm_recipe_header_id` int(12) NOT NULL, + `org_id` int(12) NOT NULL, + `ar_customer_id` int(12) DEFAULT NULL, + `ar_customer_site_id` int(12) DEFAULT NULL, + `description` varchar(256) DEFAULT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_recipe_customer` +-- + +INSERT INTO `pm_recipe_customer` (`pm_recipe_customer_id`, `pm_recipe_header_id`, `org_id`, `ar_customer_id`, `ar_customer_site_id`, `description`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 2, 5, 2, NULL, NULL, 34, '2016-03-22 06:16:43', 34, '2016-03-28 16:03:39'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pm_recipe_header` +-- + +CREATE TABLE `pm_recipe_header` ( + `pm_recipe_header_id` int(12) UNSIGNED NOT NULL, + `org_id` int(12) NOT NULL, + `recipe_name` varchar(25) NOT NULL, + `pm_formula_header_id` varchar(15) DEFAULT NULL, + `pm_process_routing_header_id` int(12) DEFAULT NULL, + `revision` varchar(20) DEFAULT NULL, + `item_id_m` int(12) DEFAULT NULL, + `status` varchar(20) DEFAULT NULL, + `recipe_type` varchar(25) DEFAULT NULL, + `description` varchar(256) DEFAULT NULL, + `owner_employee_id` int(12) DEFAULT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_recipe_header` +-- + +INSERT INTO `pm_recipe_header` (`pm_recipe_header_id`, `org_id`, `recipe_name`, `pm_formula_header_id`, `pm_process_routing_header_id`, `revision`, `item_id_m`, `status`, `recipe_type`, `description`, `owner_employee_id`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 6, 'REC01', '1', 3, NULL, NULL, NULL, NULL, 'Baking Routing-Plant PR1', NULL, 34, '2016-03-22 05:38:03', 34, '2016-03-22 06:21:58'), +(2, 6, 'REC03', '1', 3, NULL, NULL, NULL, 'GENERAL', 'Baking Routing-Plant PR1', NULL, 34, '2016-03-28 16:03:38', 34, '2016-03-28 16:03:38'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pm_recipe_line` +-- + +CREATE TABLE `pm_recipe_line` ( + `pm_recipe_line_id` int(12) UNSIGNED NOT NULL, + `pm_recipe_header_id` int(12) NOT NULL, + `org_id` int(12) NOT NULL, + `org_type` varchar(25) DEFAULT NULL, + `planned_loss` decimal(15,5) DEFAULT NULL, + `fixed_loss_uom_id` int(12) DEFAULT NULL, + `fixed_loss` decimal(20,0) DEFAULT NULL, + `description` varchar(256) DEFAULT NULL, + `contiguous_cb` tinyint(1) DEFAULT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_recipe_line` +-- + +INSERT INTO `pm_recipe_line` (`pm_recipe_line_id`, `pm_recipe_header_id`, `org_id`, `org_type`, `planned_loss`, `fixed_loss_uom_id`, `fixed_loss`, `description`, `contiguous_cb`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 1, 6, 'PLANT', '30.00000', 38, '200', 'Plant 1', NULL, 34, '2016-03-22 05:38:49', 34, '2016-03-22 06:21:58'), +(2, 2, 6, 'PLANT', '30.00000', 38, '200', 'Plant 1', NULL, 34, '2016-03-28 16:03:38', 34, '2016-03-28 16:03:38'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pm_recipe_material_header` +-- + +CREATE TABLE `pm_recipe_material_header` ( + `pm_recipe_material_header_id` int(12) UNSIGNED NOT NULL, + `pm_recipe_header_id` varchar(25) NOT NULL, + `status` varchar(50) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_recipe_material_header` +-- + +INSERT INTO `pm_recipe_material_header` (`pm_recipe_material_header_id`, `pm_recipe_header_id`, `status`, `description`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, '1', 'APPROVED', 'Baking Routing-Plant PR1', 34, '2016-03-25 06:53:19', 34, '2016-03-28 10:44:58'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `pm_recipe_material_line` +-- + +CREATE TABLE `pm_recipe_material_line` ( + `pm_recipe_material_line_id` int(12) UNSIGNED NOT NULL, + `pm_recipe_material_header_id` int(12) NOT NULL, + `step` int(5) NOT NULL, + `pm_formula_ingredient_id` int(12) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `uom_id` int(12) DEFAULT NULL, + `quantity` decimal(15,5) DEFAULT NULL, + `pm_process_routing_line_id` int(12) DEFAULT NULL, + `created_by` int(12) NOT NULL, + `creation_date` datetime DEFAULT NULL, + `last_update_by` int(12) NOT NULL, + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `pm_recipe_material_line` +-- + +INSERT INTO `pm_recipe_material_line` (`pm_recipe_material_line_id`, `pm_recipe_material_header_id`, `step`, `pm_formula_ingredient_id`, `description`, `uom_id`, `quantity`, `pm_process_routing_line_id`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 1, 10, 1, NULL, 27, '5.00000', 2, 34, '2016-03-28 10:44:58', 34, '2016-03-28 10:44:58'); + +-- -------------------------------------------------------- + -- -- Table structure for table `pos_barcode_list_header` -- -CREATE TABLE IF NOT EXISTS `pos_barcode_list_header` ( - `pos_barcode_list_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `pos_barcode_list_header` ( + `pos_barcode_list_header_id` int(12) NOT NULL, `list_name` varchar(50) NOT NULL, `description` varchar(256) NOT NULL, `org_id` int(12) DEFAULT NULL, @@ -24166,10 +24025,8 @@ CREATE TABLE IF NOT EXISTS `pos_barcode_list_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`pos_barcode_list_header_id`), - UNIQUE KEY `pos_transaction_header_id` (`list_name`,`description`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `pos_barcode_list_header` @@ -24185,8 +24042,8 @@ INSERT INTO `pos_barcode_list_header` (`pos_barcode_list_header_id`, `list_name` -- Table structure for table `pos_barcode_list_line` -- -CREATE TABLE IF NOT EXISTS `pos_barcode_list_line` ( - `pos_barcode_list_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `pos_barcode_list_line` ( + `pos_barcode_list_line_id` int(12) NOT NULL, `pos_barcode_list_header_id` int(12) NOT NULL, `item_number` varchar(50) NOT NULL, `unit_price` decimal(12,2) DEFAULT NULL, @@ -24201,10 +24058,8 @@ CREATE TABLE IF NOT EXISTS `pos_barcode_list_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`pos_barcode_list_line_id`), - UNIQUE KEY `pos_transaction_header_id` (`pos_barcode_list_header_id`,`item_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `pos_barcode_list_line` @@ -24221,8 +24076,8 @@ INSERT INTO `pos_barcode_list_line` (`pos_barcode_list_line_id`, `pos_barcode_li -- Table structure for table `pos_inv_control` -- -CREATE TABLE IF NOT EXISTS `pos_inv_control` ( - `pos_inv_control_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `pos_inv_control` ( + `pos_inv_control_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `cogs_ac_id` int(12) DEFAULT NULL, `ar_transaction_type_id` int(12) DEFAULT NULL, @@ -24237,9 +24092,8 @@ CREATE TABLE IF NOT EXISTS `pos_inv_control` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`pos_inv_control_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `pos_inv_control` @@ -24254,8 +24108,8 @@ INSERT INTO `pos_inv_control` (`pos_inv_control_id`, `org_id`, `cogs_ac_id`, `ar -- Table structure for table `pos_terminal` -- -CREATE TABLE IF NOT EXISTS `pos_terminal` ( - `pos_terminal_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `pos_terminal` ( + `pos_terminal_id` int(12) NOT NULL, `sd_store_id` int(12) NOT NULL, `location_id` int(12) NOT NULL, `terminal_name` varchar(25) NOT NULL, @@ -24267,9 +24121,8 @@ CREATE TABLE IF NOT EXISTS `pos_terminal` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`pos_terminal_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `pos_terminal` @@ -24285,8 +24138,8 @@ INSERT INTO `pos_terminal` (`pos_terminal_id`, `sd_store_id`, `location_id`, `te -- Table structure for table `pos_transaction_header` -- -CREATE TABLE IF NOT EXISTS `pos_transaction_header` ( - `pos_transaction_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `pos_transaction_header` ( + `pos_transaction_header_id` int(12) NOT NULL, `terminal_name` varchar(50) NOT NULL, `currency_code` varchar(25) DEFAULT NULL, `header_amount` decimal(12,2) DEFAULT NULL, @@ -24299,9 +24152,8 @@ CREATE TABLE IF NOT EXISTS `pos_transaction_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`pos_transaction_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=29 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `pos_transaction_header` @@ -24335,7 +24187,10 @@ INSERT INTO `pos_transaction_header` (`pos_transaction_header_id`, `terminal_nam (25, 'SNG-LI-01-01-02', NULL, '1014.00', NULL, NULL, '1014.00', NULL, NULL, NULL, 34, '2015-02-06 03:40:10', 34, '2015-03-07 09:08:18'), (26, 'SNG-LI-01-01-02', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-05-05 04:50:05', 34, '2015-05-05 04:50:05'), (27, '00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-07-26 17:15:13', 34, '2015-07-26 17:15:13'), -(28, '00000', NULL, '300.00', NULL, NULL, '300.00', NULL, NULL, NULL, 34, '2015-10-05 18:03:41', 34, '2015-10-05 18:04:32'); +(28, '00000', NULL, '300.00', NULL, NULL, '300.00', NULL, NULL, NULL, 34, '2015-10-05 18:03:41', 34, '2015-10-05 18:04:32'), +(29, '00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-15 04:56:58', 34, '2016-03-15 04:56:58'), +(30, '00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-15 04:56:58', 34, '2016-03-15 04:56:58'), +(31, '00000', NULL, '2808.00', NULL, NULL, '2808.00', NULL, NULL, NULL, 34, '2016-03-15 04:59:11', 34, '2016-03-15 04:59:24'); -- -------------------------------------------------------- @@ -24343,8 +24198,8 @@ INSERT INTO `pos_transaction_header` (`pos_transaction_header_id`, `terminal_nam -- Table structure for table `pos_transaction_line` -- -CREATE TABLE IF NOT EXISTS `pos_transaction_line` ( - `pos_transaction_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `pos_transaction_line` ( + `pos_transaction_line_id` int(12) NOT NULL, `pos_transaction_header_id` int(12) NOT NULL, `item_number` varchar(50) CHARACTER SET latin1 NOT NULL, `unit_price` decimal(12,2) DEFAULT NULL, @@ -24358,10 +24213,8 @@ CREATE TABLE IF NOT EXISTS `pos_transaction_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`pos_transaction_line_id`), - UNIQUE KEY `pos_transaction_header_id` (`pos_transaction_header_id`,`item_number`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=23 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `pos_transaction_line` @@ -24386,14 +24239,15 @@ INSERT INTO `pos_transaction_line` (`pos_transaction_line_id`, `pos_transaction_ (19, 25, 'asdasd', '202.00', '1.00000', '404.00', NULL, NULL, NULL, '404.00000', NULL, 34, '2015-02-06 03:41:01', 34, '2015-03-07 09:08:19'), (20, 25, 'BIX', '210.00', '1.00000', '210.00', NULL, NULL, NULL, '210.00000', NULL, 34, '2015-03-07 09:08:19', 34, '2015-03-07 09:08:19'), (21, 28, 'sdfsd', '22.00', '12.00000', '264.00', NULL, NULL, NULL, '264.00000', NULL, 34, '2015-10-05 18:03:42', 34, '2015-10-05 18:03:42'), -(22, 28, 'dfdsf', '12.00', '3.00000', '36.00', NULL, NULL, NULL, '36.00000', NULL, 34, '2015-10-05 18:03:42', 34, '2015-10-05 18:03:42'); +(22, 28, 'dfdsf', '12.00', '3.00000', '36.00', NULL, NULL, NULL, '36.00000', NULL, 34, '2015-10-05 18:03:42', 34, '2015-10-05 18:03:42'), +(23, 31, 'sdfasdf', '234.00', '12.00000', '2808.00', NULL, NULL, NULL, '2808.00000', NULL, 34, '2016-03-15 04:59:12', 34, '2016-03-15 04:59:12'); -- -------------------------------------------------------- -- -- Stand-in structure for view `po_all_v` -- -CREATE TABLE IF NOT EXISTS `po_all_v` ( +CREATE TABLE `po_all_v` ( `po_header_id` int(12) ,`bu_org_id` int(12) ,`po_type` varchar(20) @@ -24427,8 +24281,6 @@ CREATE TABLE IF NOT EXISTS `po_all_v` ( ,`line_price` decimal(20,5) ,`gl_line_price` decimal(15,5) ,`gl_tax_amount` decimal(15,5) -,`reference_doc_type` varchar(50) -,`reference_doc_number` int(12) ,`item_number` varchar(50) ,`uom_id` int(12) ,`item_status` varchar(15) @@ -24460,14 +24312,15 @@ CREATE TABLE IF NOT EXISTS `po_all_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Table structure for table `po_asl_document` -- -CREATE TABLE IF NOT EXISTS `po_asl_document` ( - `po_asl_document_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_asl_document` ( + `po_asl_document_id` int(12) NOT NULL, `po_asl_line_id` int(12) NOT NULL, `document_type` varchar(25) NOT NULL, `document_header_id` int(12) NOT NULL, @@ -24478,9 +24331,8 @@ CREATE TABLE IF NOT EXISTS `po_asl_document` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`po_asl_document_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_asl_document` @@ -24498,8 +24350,8 @@ INSERT INTO `po_asl_document` (`po_asl_document_id`, `po_asl_line_id`, `document -- Table structure for table `po_asl_header` -- -CREATE TABLE IF NOT EXISTS `po_asl_header` ( - `po_asl_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_asl_header` ( + `po_asl_header_id` int(12) NOT NULL, `bu_org_id` int(12) DEFAULT NULL, `asl_type` varchar(25) NOT NULL, `item_id_m` int(12) DEFAULT NULL, @@ -24508,10 +24360,8 @@ CREATE TABLE IF NOT EXISTS `po_asl_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`po_asl_header_id`), - UNIQUE KEY `bu_org_id` (`bu_org_id`,`asl_type`,`item_id_m`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_asl_header` @@ -24528,8 +24378,8 @@ INSERT INTO `po_asl_header` (`po_asl_header_id`, `bu_org_id`, `asl_type`, `item_ -- Table structure for table `po_asl_line` -- -CREATE TABLE IF NOT EXISTS `po_asl_line` ( - `po_asl_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_asl_line` ( + `po_asl_line_id` int(12) NOT NULL, `po_asl_header_id` int(12) DEFAULT NULL, `supplier_id` int(12) NOT NULL, `supplier_site_id` int(12) NOT NULL, @@ -24545,9 +24395,8 @@ CREATE TABLE IF NOT EXISTS `po_asl_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`po_asl_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_asl_line` @@ -24565,7 +24414,7 @@ INSERT INTO `po_asl_line` (`po_asl_line_id`, `po_asl_header_id`, `supplier_id`, -- -- Stand-in structure for view `po_blanket_v` -- -CREATE TABLE IF NOT EXISTS `po_blanket_v` ( +CREATE TABLE `po_blanket_v` ( `po_header_id` int(12) ,`bu_org_id` int(12) ,`po_type` varchar(20) @@ -24623,12 +24472,13 @@ CREATE TABLE IF NOT EXISTS `po_blanket_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Stand-in structure for view `po_convert_requisition_v` -- -CREATE TABLE IF NOT EXISTS `po_convert_requisition_v` ( +CREATE TABLE `po_convert_requisition_v` ( `po_requisition_header_id` int(12) ,`bu_org_id` int(12) ,`po_requisition_type` varchar(50) @@ -24680,14 +24530,15 @@ CREATE TABLE IF NOT EXISTS `po_convert_requisition_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Table structure for table `po_detail` -- -CREATE TABLE IF NOT EXISTS `po_detail` ( - `po_detail_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_detail` ( + `po_detail_id` int(12) NOT NULL, `po_line_id` int(12) NOT NULL, `po_header_id` int(12) NOT NULL, `shipment_number` int(12) NOT NULL, @@ -24714,9 +24565,8 @@ CREATE TABLE IF NOT EXISTS `po_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`po_detail_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=323 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_detail` @@ -24997,59 +24847,14 @@ INSERT INTO `po_detail` (`po_detail_id`, `po_line_id`, `po_header_id`, `shipment (274, 294, 291, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-10 06:39:13', 34, '2015-09-10 06:39:13'), (275, 294, 291, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-10 06:39:14', 34, '2015-09-10 06:39:14'), (276, 297, 287, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-10 06:41:30', 34, '2015-09-10 06:54:55'), -(277, 298, 287, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-10 06:54:55', 34, '2015-09-10 06:54:55'), -(278, 299, 292, 1, NULL, NULL, NULL, NULL, NULL, NULL, '6.00000', '2015-07-11', '2015-07-11', 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:20:21', 34, '2016-01-07 10:20:21'), -(279, 299, 292, 1, NULL, NULL, NULL, NULL, NULL, NULL, '6.00000', '2015-07-11', '2015-07-11', 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:20:21', 34, '2016-01-07 10:20:21'), -(280, 299, 292, 1, NULL, NULL, NULL, NULL, NULL, NULL, '6.00000', '2015-07-11', '2015-07-11', 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:20:21', 34, '2016-01-07 10:20:21'), -(281, 299, 292, 1, NULL, NULL, NULL, NULL, NULL, NULL, '6.00000', '2015-07-11', '2015-07-11', 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:20:21', 34, '2016-01-07 10:20:21'), -(282, 300, 292, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:20:21', 34, '2016-01-07 10:20:21'), -(283, 300, 292, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:20:21', 34, '2016-01-07 10:20:21'), -(284, 300, 292, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:20:21', 34, '2016-01-07 10:20:21'), -(285, 300, 292, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:20:21', 34, '2016-01-07 10:20:21'), -(286, 300, 292, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:20:21', 34, '2016-01-07 10:20:21'), -(287, 301, 293, 1, NULL, NULL, NULL, NULL, NULL, NULL, '6.00000', '2015-07-11', '2015-07-11', 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:24:28', 34, '2016-01-07 10:24:28'), -(288, 301, 293, 1, NULL, NULL, NULL, NULL, NULL, NULL, '6.00000', '2015-07-11', '2015-07-11', 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:24:28', 34, '2016-01-07 10:24:28'), -(289, 301, 293, 1, NULL, NULL, NULL, NULL, NULL, NULL, '6.00000', '2015-07-11', '2015-07-11', 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:24:28', 34, '2016-01-07 10:24:28'), -(290, 301, 293, 1, NULL, NULL, NULL, NULL, NULL, NULL, '6.00000', '2015-07-11', '2015-07-11', 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:24:28', 34, '2016-01-07 10:24:28'), -(291, 302, 293, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:24:28', 34, '2016-01-07 10:24:28'), -(292, 302, 293, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:24:28', 34, '2016-01-07 10:24:28'), -(293, 302, 293, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:24:28', 34, '2016-01-07 10:24:28'), -(294, 302, 293, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:24:28', 34, '2016-01-07 10:24:28'), -(295, 302, 293, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:24:28', 34, '2016-01-07 10:24:28'), -(296, 307, 298, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-10', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:12:23', 34, '2016-01-10 11:13:24'), -(297, 308, 298, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-10', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:12:23', 34, '2016-01-10 11:13:23'), -(298, 309, 298, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-10', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:12:23', 34, '2016-01-10 11:13:24'), -(299, 310, 298, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-10', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:12:23', 34, '2016-01-10 11:13:24'), -(300, 311, 299, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-10', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:20:30', 34, '2016-01-10 11:20:30'), -(301, 312, 299, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-10', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:20:30', 34, '2016-01-10 11:20:30'), -(302, 313, 299, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-10', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:20:30', 34, '2016-01-10 11:20:30'), -(303, 314, 299, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-10', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:20:30', 34, '2016-01-10 11:20:30'), -(304, 315, 300, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-10', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:21:23', 34, '2016-01-10 11:21:23'), -(305, 316, 300, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-10', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:21:23', 34, '2016-01-10 11:21:23'), -(306, 317, 300, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-10', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:21:23', 34, '2016-01-10 11:21:23'), -(307, 318, 300, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-10', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:21:23', 34, '2016-01-10 11:21:23'), -(308, 331, 304, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-11', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:36:05', 34, '2016-01-11 03:36:05'), -(309, 332, 304, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-11', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:36:05', 34, '2016-01-11 03:36:05'), -(310, 333, 304, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-11', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:36:05', 34, '2016-01-11 03:36:05'), -(311, 334, 304, 1, NULL, NULL, NULL, NULL, NULL, NULL, '1.00000', '2016-01-11', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:36:05', 34, '2016-01-11 03:36:05'), -(312, 335, 305, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-15 08:38:31', 34, '2016-01-15 08:38:31'), -(313, 336, 305, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-15 08:38:31', 34, '2016-01-15 08:38:31'), -(314, 337, 305, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-15 08:38:31', 34, '2016-01-15 08:38:31'), -(315, 338, 305, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-15 08:38:31', 34, '2016-01-15 08:38:31'), -(316, 339, 306, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-18 17:31:55', 34, '2016-01-18 17:31:55'), -(317, 340, 306, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-18 17:31:55', 34, '2016-01-18 17:31:55'), -(318, 341, 306, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-18 17:31:55', 34, '2016-01-18 17:31:55'), -(319, 342, 306, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-18 17:31:55', 34, '2016-01-18 17:31:55'), -(320, 340, 306, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-18 17:31:56', 34, '2016-01-18 17:31:56'), -(321, 339, 306, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-18 17:31:56', 34, '2016-01-18 17:31:56'), -(322, 341, 306, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-18 17:31:57', 34, '2016-01-18 17:31:57'); +(277, 298, 287, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2015-09-30', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-10 06:54:55', 34, '2015-09-10 06:54:55'); -- -------------------------------------------------------- -- -- Stand-in structure for view `po_document_v` -- -CREATE TABLE IF NOT EXISTS `po_document_v` ( +CREATE TABLE `po_document_v` ( `po_header_id` int(12) ,`bu_org_id` int(12) ,`po_type` varchar(20) @@ -25104,14 +24909,15 @@ CREATE TABLE IF NOT EXISTS `po_document_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Table structure for table `po_header` -- -CREATE TABLE IF NOT EXISTS `po_header` ( - `po_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_header` ( + `po_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `ref_po_header_id` int(12) DEFAULT NULL, `release_number` int(6) DEFAULT NULL, @@ -25141,11 +24947,8 @@ CREATE TABLE IF NOT EXISTS `po_header` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime NOT NULL, `multi_bu_cb` tinyint(1) DEFAULT NULL, - `rev_number` int(12) DEFAULT NULL, - PRIMARY KEY (`po_header_id`), - UNIQUE KEY `release_number` (`release_number`,`po_number`), - UNIQUE KEY `po_header_id` (`po_header_id`,`release_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=307 ; + `rev_number` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_header` @@ -25441,22 +25244,7 @@ INSERT INTO `po_header` (`po_header_id`, `bu_org_id`, `ref_po_header_id`, `relea (288, 5, NULL, NULL, 'STANDARD', '5-287', 28, 54, NULL, NULL, NULL, 83, 80, '488.00000', '49.77600', NULL, 'USD', 'SGD', 2, NULL, NULL, 'CORP', '0.83333', NULL, 'ENTERED', 34, '2015-09-10 06:34:34', 34, '2015-09-10 06:34:34', NULL, NULL), (289, 5, NULL, NULL, 'STANDARD', '5-287', 28, 54, NULL, NULL, NULL, 83, 80, '200.00000', '20.40000', NULL, 'USD', 'SGD', 2, NULL, NULL, 'CORP', '0.83333', NULL, 'ENTERED', 34, '2015-09-10 06:34:35', 34, '2015-09-10 06:35:15', NULL, NULL), (290, 5, NULL, NULL, 'STANDARD', '5-287', 28, 54, 'Stock, Eric', 1, NULL, 83, 80, '576.00000', '58.75200', NULL, 'USD', 'SGD', 2, NULL, NULL, 'CORP', '0.83333', NULL, 'ENTERED', 34, '2015-09-10 06:37:57', 34, '2015-09-10 06:37:57', NULL, NULL), -(291, 5, NULL, NULL, 'STANDARD', '5-287', 28, 54, 'Stock, Eric', 1, NULL, 83, 80, '576.00000', '58.75200', NULL, 'USD', 'SGD', 2, NULL, NULL, 'CORP', '0.83333', NULL, 'APPROVED', 34, '2015-09-10 06:37:59', 34, '2015-12-26 04:10:18', NULL, NULL), -(292, 5, NULL, NULL, 'STANDARD', '5-292', 28, 54, 'Stock, Eric', 1, NULL, 83, 80, '576.00000', '58.75200', NULL, 'USD', 'SGD', 2, NULL, NULL, 'CORP', '0.83333', NULL, 'APPROVED', 34, '2016-01-07 10:20:20', 34, '2016-01-07 10:20:40', NULL, NULL), -(293, 5, NULL, NULL, 'STANDARD', '5-293', 28, 54, 'Stock, Eric', 1, NULL, 83, 80, '576.00000', '58.75200', NULL, 'USD', 'SGD', 2, NULL, NULL, 'CORP', '0.83333', NULL, 'APPROVED', 34, '2016-01-07 10:24:28', 34, '2016-01-07 10:24:45', NULL, NULL), -(294, 5, NULL, NULL, 'STANDARD', '5-294', 2, 21, 'inoerp inoerp', NULL, 'TEST RFQ\r\n\r\nTEST RFQ', 99, 88, '0.01000', NULL, NULL, 'USD', 'USD', 1, NULL, NULL, NULL, NULL, NULL, 'ENTERED', 34, '2016-01-10 11:08:44', 34, '2016-01-10 11:08:44', NULL, NULL), -(295, 5, NULL, NULL, 'STANDARD', '5-295', 2, 21, 'inoerp inoerp', NULL, 'TEST RFQ\r\n\r\nTEST RFQ', 99, 88, '0.01000', NULL, NULL, 'USD', 'USD', 1, NULL, NULL, NULL, NULL, NULL, 'ENTERED', 34, '2016-01-10 11:09:00', 34, '2016-01-10 11:09:00', NULL, NULL), -(296, 5, NULL, NULL, 'STANDARD', '5-296', 2, 21, 'inoerp inoerp', NULL, 'TEST RFQ\r\n\r\nTEST RFQ', 99, 88, '0.01000', NULL, NULL, 'USD', 'USD', 1, NULL, NULL, NULL, NULL, NULL, 'ENTERED', 34, '2016-01-10 11:11:05', 34, '2016-01-10 11:11:05', NULL, NULL), -(297, 5, NULL, NULL, 'STANDARD', '5-297', 2, 21, 'inoerp inoerp', NULL, 'TEST RFQ\r\n\r\nTEST RFQ', 99, 88, '0.01000', NULL, NULL, 'USD', 'USD', 1, NULL, NULL, NULL, NULL, NULL, 'ENTERED', 34, '2016-01-10 11:11:48', 34, '2016-01-10 11:11:48', NULL, NULL), -(298, 5, NULL, NULL, 'STANDARD', '5-298', 2, 21, 'inoerp inoerp', NULL, 'TEST RFQTEST RFQ', 99, 88, '500.00000', NULL, NULL, 'USD', 'USD', 1, NULL, NULL, 'CORP', '1.00000', NULL, 'ENTERED', 34, '2016-01-10 11:12:23', 34, '2016-01-10 11:13:24', NULL, NULL), -(299, 5, NULL, NULL, 'STANDARD', '5-299', 2, 21, 'inoerp inoerp', NULL, 'TEST RFQ\r\n\r\nTEST RFQ', 99, 88, '0.01000', NULL, NULL, 'USD', 'USD', 1, NULL, NULL, 'CORP', NULL, NULL, 'ENTERED', 34, '2016-01-10 11:20:30', 34, '2016-01-10 11:20:30', NULL, NULL), -(300, 5, NULL, NULL, 'STANDARD', '5-300', 2, 21, 'inoerp inoerp', NULL, 'TEST RFQ\r\n\r\nTEST RFQ', 99, 88, '0.01000', NULL, NULL, 'USD', 'USD', 1, NULL, NULL, 'CORP', NULL, NULL, 'ENTERED', 34, '2016-01-10 11:21:23', 34, '2016-01-10 11:21:23', NULL, NULL), -(301, 5, NULL, NULL, 'BLANKET', '5-301', 2, 21, 'inoerp inoerp', NULL, 'TEST RFQ\r\n\r\nTEST RFQ', 99, 88, '0.01000', NULL, NULL, 'USD', 'USD', 1, NULL, NULL, 'CORP', NULL, NULL, 'ENTERED', 34, '2016-01-11 03:31:07', 34, '2016-01-11 03:31:07', NULL, NULL), -(302, 5, NULL, NULL, 'BLANKET', '5-302', 2, 21, 'inoerp inoerp', NULL, 'TEST RFQ\r\n\r\nTEST RFQ', 99, 88, '120.00000', NULL, NULL, 'USD', 'USD', 1, NULL, NULL, 'CORP', NULL, NULL, 'ENTERED', 34, '2016-01-11 03:35:15', 34, '2016-01-11 03:35:16', NULL, NULL), -(303, 5, NULL, NULL, 'BLANKET', '5-303', 2, 21, 'inoerp inoerp', NULL, 'TEST RFQ\r\n\r\nTEST RFQ', 99, 88, '120.00000', NULL, NULL, 'USD', 'USD', 1, NULL, NULL, 'CORP', NULL, NULL, 'ENTERED', 34, '2016-01-11 03:35:47', 34, '2016-01-11 03:35:47', NULL, NULL), -(304, 5, NULL, NULL, 'STANDARD', '5-304', 2, 21, 'inoerp inoerp', NULL, 'TEST RFQ\r\n\r\nTEST RFQ', 99, 88, '650.00000', NULL, NULL, 'USD', 'USD', 1, NULL, NULL, 'CORP', NULL, NULL, 'ENTERED', 34, '2016-01-11 03:36:05', 34, '2016-01-11 03:36:05', NULL, NULL), -(305, 5, NULL, NULL, 'STANDARD', NULL, 30, 57, NULL, NULL, NULL, 83, NULL, '0.01000', NULL, NULL, 'USD', 'GBP', 2, NULL, NULL, 'CORP', NULL, NULL, 'ENTERED', 34, '2016-01-15 08:38:31', 34, '2016-01-15 08:38:31', NULL, NULL), -(306, 5, NULL, NULL, 'STANDARD', '5-306', 30, 57, NULL, NULL, NULL, 83, 84, '0.01000', NULL, NULL, 'USD', 'GBP', 2, NULL, NULL, 'CORP', '1.00000', NULL, 'APPROVED', 34, '2016-01-18 17:31:54', 34, '2016-01-18 17:32:40', NULL, NULL); +(291, 5, NULL, NULL, 'STANDARD', '5-287', 28, 54, 'Stock, Eric', 1, NULL, 83, 80, '576.00000', '58.75200', NULL, 'USD', 'SGD', 2, NULL, NULL, 'CORP', '0.83333', NULL, 'APPROVED', 34, '2015-09-10 06:37:59', 34, '2015-12-26 04:10:18', NULL, NULL); -- -------------------------------------------------------- @@ -25464,8 +25252,8 @@ INSERT INTO `po_header` (`po_header_id`, `bu_org_id`, `ref_po_header_id`, `relea -- Table structure for table `po_line` -- -CREATE TABLE IF NOT EXISTS `po_line` ( - `po_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_line` ( + `po_line_id` int(12) NOT NULL, `po_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, `bpa_line_id` int(12) DEFAULT NULL, @@ -25497,10 +25285,8 @@ CREATE TABLE IF NOT EXISTS `po_line` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime NOT NULL, `rev_enabled_cb` tinyint(1) DEFAULT NULL, - `rev_number` int(12) DEFAULT NULL, - PRIMARY KEY (`po_line_id`), - UNIQUE KEY `po_header_id` (`po_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=343 ; + `rev_number` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_line` @@ -25763,51 +25549,7 @@ INSERT INTO `po_line` (`po_line_id`, `po_header_id`, `line_number`, `bpa_line_id (294, 291, 10, NULL, 6, 10201, NULL, 'MI TEST 102', '24.00000', NULL, NULL, '12.00000', '288.00000', 1, '29.37600', '239.99904', '24.47990', NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2015-09-10 06:37:57', 34, '2015-09-10 06:39:13', NULL, NULL), (296, 290, 4, NULL, 6, 10201, NULL, 'MI TEST 102', '24.00000', NULL, NULL, '12.00000', '288.00000', 1, '29.37600', '239.99904', '24.47990', NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2015-09-10 06:38:00', 34, '2015-09-10 06:38:00', NULL, NULL), (297, 287, 15, NULL, 6, 10201, NULL, 'MI TEST 102', '24.00000', NULL, NULL, '12.00000', '288.00000', 1, '29.37600', '239.99904', '24.47990', NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2015-09-10 06:41:30', 34, '2015-09-10 06:54:55', NULL, NULL), -(298, 287, 3, NULL, 6, 10201, NULL, 'MI TEST 102', '24.00000', NULL, NULL, '12.00000', '288.00000', 1, '29.37600', '239.99904', '24.47990', NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2015-09-10 06:54:54', 34, '2015-09-10 06:54:54', NULL, NULL), -(299, 292, 1, NULL, 6, 10201, NULL, 'MI TEST 102', '24.00000', NULL, NULL, '12.00000', '288.00000', 1, '29.37600', '239.99904', '24.47990', NULL, 'po_requisition_details', 92, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:20:21', 34, '2016-01-07 10:20:21', NULL, NULL), -(300, 292, 10, NULL, 6, 10201, NULL, 'MI TEST 102', '24.00000', NULL, NULL, '12.00000', '288.00000', 1, '29.37600', '239.99904', '24.47990', NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:20:21', 34, '2016-01-07 10:20:21', NULL, NULL), -(301, 293, 1, NULL, 6, 10201, NULL, 'MI TEST 102', '24.00000', NULL, NULL, '12.00000', '288.00000', 1, '29.37600', '239.99904', '24.47990', NULL, 'po_requisition_details', 92, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:24:28', 34, '2016-01-07 10:24:28', NULL, NULL), -(302, 293, 10, NULL, 6, 10201, NULL, 'MI TEST 102', '24.00000', NULL, NULL, '12.00000', '288.00000', 1, '29.37600', '239.99904', '24.47990', NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-07 10:24:28', 34, '2016-01-07 10:24:28', NULL, NULL), -(303, 294, 1, NULL, 6, 10034, NULL, 'Desktop 01 of Model A', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:08:44', 34, '2016-01-10 11:08:44', NULL, NULL), -(304, 295, 1, NULL, 6, 10034, NULL, 'Desktop 01 of Model A', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:09:00', 34, '2016-01-10 11:09:00', NULL, NULL), -(305, 296, 1, NULL, 6, 10034, NULL, 'Desktop 01 of Model A', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:11:05', 34, '2016-01-10 11:11:05', NULL, NULL), -(306, 297, 1, NULL, 6, 10034, NULL, 'Desktop 01 of Model A', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:11:48', 34, '2016-01-10 11:11:48', NULL, NULL), -(307, 298, 1, NULL, 6, 10034, NULL, 'Desktop 01 of Model A', '1.00000', NULL, NULL, '110.00000', '110.00000', NULL, NULL, '110.00000', '0.00000', NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:12:23', 34, '2016-01-10 11:13:23', NULL, NULL), -(308, 298, 2, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, '200.00000', '200.00000', NULL, NULL, '200.00000', '0.00000', NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:12:23', 34, '2016-01-10 11:13:23', NULL, NULL), -(309, 298, 3, NULL, 6, 10042, NULL, 'MI Cabinet A 01', '1.00000', NULL, NULL, '100.00000', '100.00000', NULL, NULL, '100.00000', '0.00000', NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:12:23', 34, '2016-01-10 11:13:24', NULL, NULL), -(310, 298, 4, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, '90.00000', '90.00000', NULL, NULL, '90.00000', '0.00000', NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:12:23', 34, '2016-01-10 11:13:24', NULL, NULL), -(311, 299, 1, NULL, 6, 10034, NULL, 'Desktop 01 of Model A', '1.00000', NULL, NULL, NULL, '120.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:20:30', 34, '2016-01-10 11:20:30', NULL, NULL), -(312, 299, 2, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:20:30', 34, '2016-01-10 11:20:30', NULL, NULL), -(313, 299, 3, NULL, 6, 10042, NULL, 'MI Cabinet A 01', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:20:30', 34, '2016-01-10 11:20:30', NULL, NULL), -(314, 299, 4, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:20:30', 34, '2016-01-10 11:20:30', NULL, NULL), -(315, 300, 1, NULL, 6, 10034, NULL, 'Desktop 01 of Model A', '1.00000', NULL, NULL, '120.00000', '120.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:21:23', 34, '2016-01-10 11:21:23', NULL, NULL), -(316, 300, 2, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:21:23', 34, '2016-01-10 11:21:23', NULL, NULL), -(317, 300, 3, NULL, 6, 10042, NULL, 'MI Cabinet A 01', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:21:23', 34, '2016-01-10 11:21:23', NULL, NULL), -(318, 300, 4, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-10 11:21:23', 34, '2016-01-10 11:21:23', NULL, NULL), -(319, 301, 1, NULL, 6, 10034, NULL, 'Desktop 01 of Model A', '1.00000', NULL, NULL, '120.00000', '120.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:31:07', 34, '2016-01-11 03:31:07', NULL, NULL), -(320, 301, 2, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:31:07', 34, '2016-01-11 03:31:07', NULL, NULL), -(321, 301, 3, NULL, 6, 10042, NULL, 'MI Cabinet A 01', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:31:07', 34, '2016-01-11 03:31:07', NULL, NULL), -(322, 301, 4, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:31:07', 34, '2016-01-11 03:31:07', NULL, NULL), -(323, 302, 1, NULL, 6, 10034, NULL, 'Desktop 01 of Model A', '1.00000', NULL, NULL, '120.00000', '120.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:35:15', 34, '2016-01-11 03:35:15', NULL, NULL), -(324, 302, 2, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:35:15', 34, '2016-01-11 03:35:15', NULL, NULL), -(325, 302, 3, NULL, 6, 10042, NULL, 'MI Cabinet A 01', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:35:15', 34, '2016-01-11 03:35:15', NULL, NULL), -(326, 302, 4, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:35:15', 34, '2016-01-11 03:35:15', NULL, NULL), -(327, 303, 1, NULL, 6, 10034, NULL, 'Desktop 01 of Model A', '1.00000', NULL, NULL, '120.00000', '120.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:35:47', 34, '2016-01-11 03:35:47', NULL, NULL), -(328, 303, 2, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:35:47', 34, '2016-01-11 03:35:47', NULL, NULL), -(329, 303, 3, NULL, 6, 10042, NULL, 'MI Cabinet A 01', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:35:47', 34, '2016-01-11 03:35:47', NULL, NULL), -(330, 303, 4, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:35:47', 34, '2016-01-11 03:35:47', NULL, NULL), -(331, 304, 1, NULL, 6, 10034, NULL, 'Desktop 01 of Model A', '1.00000', NULL, NULL, '120.00000', '120.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:36:05', 34, '2016-01-11 03:36:05', NULL, NULL), -(332, 304, 2, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:36:05', 34, '2016-01-11 03:36:05', NULL, NULL), -(333, 304, 3, NULL, 6, 10042, NULL, 'MI Cabinet A 01', '1.00000', NULL, NULL, '300.00000', '300.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:36:05', 34, '2016-01-11 03:36:05', NULL, NULL), -(334, 304, 4, NULL, 6, 10137, NULL, 'MI_PUR99', '1.00000', NULL, NULL, '230.00000', '230.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-11 03:36:05', 34, '2016-01-11 03:36:05', NULL, NULL), -(335, 305, 1, NULL, 6, 10038, NULL, 'MI Monitor A 01', '9.00000', NULL, NULL, '12.00000', '108.00000', NULL, NULL, NULL, NULL, NULL, 'po_requisition_details', 101, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-15 08:38:31', 34, '2016-01-15 08:38:31', NULL, NULL), -(336, 305, 3, NULL, 6, 10038, NULL, 'MI Monitor A 01', '9.00000', NULL, NULL, '12.00000', '108.00000', NULL, NULL, NULL, NULL, NULL, 'po_requisition_details', 100, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-15 08:38:31', 34, '2016-01-15 08:38:31', NULL, NULL), -(337, 305, 5, NULL, 6, 10201, NULL, 'MI TEST 102', '12.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'po_requisition_details', 99, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-15 08:38:31', 34, '2016-01-15 08:38:31', NULL, NULL), -(338, 305, 7, NULL, 6, 10201, NULL, 'MI TEST 102', '12.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'po_requisition_details', 98, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-15 08:38:31', 34, '2016-01-15 08:38:31', NULL, NULL), -(339, 306, 1, NULL, 6, 10038, NULL, 'MI Monitor A 01', '9.00000', NULL, NULL, '12.00000', '108.00000', NULL, NULL, NULL, NULL, NULL, 'po_requisition_details', 101, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-18 17:31:55', 34, '2016-01-18 17:31:56', NULL, NULL), -(340, 306, 3, NULL, 6, 10038, NULL, 'MI Monitor A 01', '9.00000', NULL, NULL, '12.00000', '108.00000', NULL, NULL, NULL, NULL, NULL, 'po_requisition_details', 100, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-18 17:31:55', 34, '2016-01-18 17:31:56', NULL, NULL), -(341, 306, 5, NULL, 6, 10201, NULL, 'MI TEST 102', '12.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'po_requisition_details', 99, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-18 17:31:55', 34, '2016-01-18 17:31:57', NULL, NULL), -(342, 306, 7, NULL, 6, 10201, NULL, 'MI TEST 102', '12.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'po_requisition_details', 98, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2016-01-18 17:31:55', 34, '2016-01-18 17:31:55', NULL, NULL); +(298, 287, 3, NULL, 6, 10201, NULL, 'MI TEST 102', '24.00000', NULL, NULL, '12.00000', '288.00000', 1, '29.37600', '239.99904', '24.47990', NULL, NULL, NULL, 'GOODS', NULL, 27, NULL, NULL, NULL, NULL, 34, '2015-09-10 06:54:54', 34, '2015-09-10 06:54:54', NULL, NULL); -- -------------------------------------------------------- @@ -25815,8 +25557,8 @@ INSERT INTO `po_line` (`po_line_id`, `po_header_id`, `line_number`, `bpa_line_id -- Table structure for table `po_purchasing_control` -- -CREATE TABLE IF NOT EXISTS `po_purchasing_control` ( - `po_purchasing_control_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_purchasing_control` ( + `po_purchasing_control_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `payment_term_id` int(12) DEFAULT NULL, `ship_to_id` int(12) DEFAULT NULL, @@ -25824,26 +25566,23 @@ CREATE TABLE IF NOT EXISTS `po_purchasing_control` ( `po_approval_hierarchy` varchar(25) DEFAULT NULL, `req_approval_hierarchy` varchar(25) DEFAULT NULL, `tax_ac_id` int(12) NOT NULL, - `default_inv_org_id` int(12) DEFAULT NULL, - `default_line_type` varchar(25) NOT NULL, + `ef_id` int(12) DEFAULT NULL, `rev_enabled` varchar(50) DEFAULT NULL, `rev_number` int(12) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`po_purchasing_control_id`), - UNIQUE KEY `org` (`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_purchasing_control` -- -INSERT INTO `po_purchasing_control` (`po_purchasing_control_id`, `org_id`, `payment_term_id`, `ship_to_id`, `bill_to_id`, `po_approval_hierarchy`, `req_approval_hierarchy`, `tax_ac_id`, `default_inv_org_id`, `default_line_type`, `rev_enabled`, `rev_number`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES -(1, 5, 1, 88, 99, 'SUPERVISOR', 'SUPERVISOR', 127, 6, 'GOODS', NULL, 1, 0, '2014-09-07 00:00:00', 34, '2016-01-10 10:42:28'), -(5, 8, 6, 80, NULL, 'SUPERVISOR', NULL, 127, NULL, '', NULL, NULL, 0, '2014-09-07 00:00:00', 34, '2015-07-21 06:34:37'), -(6, 10, 2, 86, 86, 'SUPERVISOR', 'SUPERVISOR', 99, NULL, '', NULL, NULL, 0, '2014-09-07 00:00:00', 0, '2014-09-07 00:00:00'); +INSERT INTO `po_purchasing_control` (`po_purchasing_control_id`, `org_id`, `payment_term_id`, `ship_to_id`, `bill_to_id`, `po_approval_hierarchy`, `req_approval_hierarchy`, `tax_ac_id`, `ef_id`, `rev_enabled`, `rev_number`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 5, 1, 88, 89, 'SUPERVISOR', 'SUPERVISOR', 127, NULL, NULL, 1, 0, '2014-09-07 00:00:00', 34, '2015-02-27 13:24:01'), +(5, 8, 6, 80, NULL, 'SUPERVISOR', NULL, 127, NULL, NULL, NULL, 0, '2014-09-07 00:00:00', 34, '2015-07-21 06:34:37'), +(6, 10, 2, 86, 86, 'SUPERVISOR', 'SUPERVISOR', 99, NULL, NULL, NULL, 0, '2014-09-07 00:00:00', 0, '2014-09-07 00:00:00'); -- -------------------------------------------------------- @@ -25851,8 +25590,8 @@ INSERT INTO `po_purchasing_control` (`po_purchasing_control_id`, `org_id`, `paym -- Table structure for table `po_quote_detail` -- -CREATE TABLE IF NOT EXISTS `po_quote_detail` ( - `po_quote_detail_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_quote_detail` ( + `po_quote_detail_id` int(12) NOT NULL, `po_quote_header_id` int(12) NOT NULL, `po_quote_line_id` int(12) NOT NULL, `po_rfq_detail_id` int(12) NOT NULL, @@ -25860,10 +25599,8 @@ CREATE TABLE IF NOT EXISTS `po_quote_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`po_quote_detail_id`), - UNIQUE KEY `po_quote_line_id` (`po_quote_line_id`,`po_rfq_detail_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Storing quote details/requirements' AUTO_INCREMENT=33 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Storing quote details/requirements'; -- -- Dumping data for table `po_quote_detail` @@ -25894,14 +25631,7 @@ INSERT INTO `po_quote_detail` (`po_quote_detail_id`, `po_quote_header_id`, `po_q (22, 9, 15, 9, NULL, 34, '2016-01-06 10:13:20', 34, '2016-01-06 10:13:20'), (23, 9, 15, 10, NULL, 34, '2016-01-06 10:13:20', 34, '2016-01-06 10:13:20'), (24, 9, 15, 11, NULL, 34, '2016-01-06 10:13:20', 34, '2016-01-06 10:13:20'), -(25, 9, 16, 14, NULL, 34, '2016-01-06 10:13:20', 34, '2016-01-06 10:13:20'), -(26, 10, 17, 9, NULL, 34, '2016-01-10 05:37:01', 34, '2016-01-10 11:19:58'), -(27, 10, 17, 10, NULL, 34, '2016-01-10 05:37:01', 34, '2016-01-10 11:19:58'), -(28, 10, 17, 11, NULL, 34, '2016-01-10 05:37:01', 34, '2016-01-10 11:19:58'), -(29, 10, 18, 14, NULL, 34, '2016-01-10 05:37:01', 34, '2016-01-11 03:35:47'), -(30, 10, 19, 15, NULL, 34, '2016-01-10 05:37:01', 34, '2016-01-11 03:35:47'), -(31, 10, 20, 12, NULL, 34, '2016-01-10 05:37:01', 34, '2016-01-10 05:37:01'), -(32, 10, 20, 13, NULL, 34, '2016-01-10 05:37:01', 34, '2016-01-10 05:37:01'); +(25, 9, 16, 14, NULL, 34, '2016-01-06 10:13:20', 34, '2016-01-06 10:13:20'); -- -------------------------------------------------------- @@ -25909,9 +25639,8 @@ INSERT INTO `po_quote_detail` (`po_quote_detail_id`, `po_quote_header_id`, `po_q -- Table structure for table `po_quote_header` -- -CREATE TABLE IF NOT EXISTS `po_quote_header` ( - `po_quote_header_id` int(12) NOT NULL AUTO_INCREMENT, - `bu_org_id` int(12) NOT NULL, +CREATE TABLE `po_quote_header` ( + `po_quote_header_id` int(12) NOT NULL, `po_rfq_header_id` int(12) NOT NULL, `quote_number` int(12) DEFAULT NULL, `supplier_site_id` int(12) DEFAULT NULL, @@ -25932,25 +25661,22 @@ CREATE TABLE IF NOT EXISTS `po_quote_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`po_quote_header_id`), - UNIQUE KEY `po_rfq_header_id` (`po_rfq_header_id`,`supplier_site_id`,`supplier_id`,`active_cb`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_quote_header` -- -INSERT INTO `po_quote_header` (`po_quote_header_id`, `bu_org_id`, `po_rfq_header_id`, `quote_number`, `supplier_site_id`, `supplier_id`, `supplier_quote`, `quote_type`, `buyer`, `description`, `ship_to_id`, `bill_to_id`, `currency`, `payment_term_id`, `effective_start_date`, `effective_end_date`, `valid_date`, `quote_status`, `active_cb`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES -(1, 0, 1, 5, 52, 30, NULL, 'STANDARD', 'inoerp inoerp', NULL, 86, 86, 'USD', 1, NULL, NULL, NULL, 'INCOMLETE', NULL, 0, '2014-09-06 09:31:22', 0, '2006-09-14 09:31:22'), -(3, 0, 1, 5, 52, 30, NULL, 'STANDARD', 'inoerp inoerp', NULL, 86, 86, 'USD', 1, NULL, NULL, NULL, 'INCOMLETE', NULL, 0, '2014-09-06 13:47:58', 0, '2006-09-14 13:47:58'), -(4, 0, 1, 4, 52, 30, NULL, 'STANDARD', 'inoerp inoerp', NULL, 86, 86, 'USD', 1, NULL, NULL, '2014-09-30', 'INCOMLETE', 1, 0, '2014-09-06 13:48:07', 34, '2014-12-30 05:23:46'), -(5, 0, 1, 5, 48, 28, NULL, 'STANDARD', 'inoerp inoerp', NULL, 86, 86, 'USD', 1, NULL, NULL, NULL, 'INCOMLETE', NULL, 34, '2014-11-26 17:34:11', 34, '2014-11-26 17:34:16'), -(6, 0, 3, 21, 25, 2, NULL, 'STANDARD', 'inoerp inoerp', 'TEST RFQ', 86, 86, 'USD', 1, NULL, NULL, '2014-12-31', 'PUBLISHED', NULL, 34, '2014-11-27 16:04:07', 34, '2014-11-27 16:07:15'), -(7, 0, 3, 5, 25, 2, NULL, 'STANDARD', 'inoerp inoerp', 'TEST RFQ', 86, 86, 'USD', 1, NULL, NULL, '2014-12-31', 'INCOMLETE', NULL, 34, '2015-06-27 10:12:43', 34, '2015-06-27 10:12:47'), -(8, 0, 3, 5, 25, 2, NULL, 'STANDARD', 'inoerp inoerp', 'TEST RFQ', 86, 86, 'USD', 1, NULL, NULL, '2014-12-31', 'PUBLISHED', NULL, 34, '2015-06-27 10:14:28', 34, '2015-06-27 10:15:53'), -(9, 0, 3, 5, 19, 2, NULL, 'STANDARD', 'inoerp inoerp', 'TEST RFQ\r\n\r\nTEST RFQ', 86, 86, 'SGD', 1, NULL, NULL, NULL, 'INCOMLETE', NULL, 34, '2016-01-06 10:13:04', 34, '2016-01-06 10:13:19'), -(10, 5, 3, 5, 21, 2, NULL, 'STANDARD', 'inoerp inoerp', 'TEST RFQ\r\n\r\nTEST RFQ', 86, 86, 'USD', 1, NULL, NULL, NULL, 'ACCEPTED', NULL, 34, '2016-01-10 05:36:42', 34, '2016-01-11 03:30:23'); +INSERT INTO `po_quote_header` (`po_quote_header_id`, `po_rfq_header_id`, `quote_number`, `supplier_site_id`, `supplier_id`, `supplier_quote`, `quote_type`, `buyer`, `description`, `ship_to_id`, `bill_to_id`, `currency`, `payment_term_id`, `effective_start_date`, `effective_end_date`, `valid_date`, `quote_status`, `active_cb`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 1, 5, 52, 30, NULL, 'STANDARD', 'inoerp inoerp', NULL, 86, 86, 'USD', 1, NULL, NULL, NULL, 'INCOMLETE', NULL, 0, '2014-09-06 09:31:22', 0, '2006-09-14 09:31:22'), +(3, 1, 5, 52, 30, NULL, 'STANDARD', 'inoerp inoerp', NULL, 86, 86, 'USD', 1, NULL, NULL, NULL, 'INCOMLETE', NULL, 0, '2014-09-06 13:47:58', 0, '2006-09-14 13:47:58'), +(4, 1, 4, 52, 30, NULL, 'STANDARD', 'inoerp inoerp', NULL, 86, 86, 'USD', 1, NULL, NULL, '2014-09-30', 'INCOMLETE', 1, 0, '2014-09-06 13:48:07', 34, '2014-12-30 05:23:46'), +(5, 1, 5, 48, 28, NULL, 'STANDARD', 'inoerp inoerp', NULL, 86, 86, 'USD', 1, NULL, NULL, NULL, 'INCOMLETE', NULL, 34, '2014-11-26 17:34:11', 34, '2014-11-26 17:34:16'), +(6, 3, 21, 25, 2, NULL, 'STANDARD', 'inoerp inoerp', 'TEST RFQ', 86, 86, 'USD', 1, NULL, NULL, '2014-12-31', 'PUBLISHED', NULL, 34, '2014-11-27 16:04:07', 34, '2014-11-27 16:07:15'), +(7, 3, 5, 25, 2, NULL, 'STANDARD', 'inoerp inoerp', 'TEST RFQ', 86, 86, 'USD', 1, NULL, NULL, '2014-12-31', 'INCOMLETE', NULL, 34, '2015-06-27 10:12:43', 34, '2015-06-27 10:12:47'), +(8, 3, 5, 25, 2, NULL, 'STANDARD', 'inoerp inoerp', 'TEST RFQ', 86, 86, 'USD', 1, NULL, NULL, '2014-12-31', 'PUBLISHED', NULL, 34, '2015-06-27 10:14:28', 34, '2015-06-27 10:15:53'), +(9, 3, 5, 19, 2, NULL, 'STANDARD', 'inoerp inoerp', 'TEST RFQ\r\n\r\nTEST RFQ', 86, 86, 'SGD', 1, NULL, NULL, NULL, 'INCOMLETE', NULL, 34, '2016-01-06 10:13:04', 34, '2016-01-06 10:13:19'); -- -------------------------------------------------------- @@ -25958,8 +25684,8 @@ INSERT INTO `po_quote_header` (`po_quote_header_id`, `bu_org_id`, `po_rfq_header -- Table structure for table `po_quote_line` -- -CREATE TABLE IF NOT EXISTS `po_quote_line` ( - `po_quote_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_quote_line` ( + `po_quote_line_id` int(12) NOT NULL, `po_quote_header_id` int(12) NOT NULL, `po_rfq_line_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, @@ -25980,10 +25706,8 @@ CREATE TABLE IF NOT EXISTS `po_quote_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`po_quote_line_id`), - UNIQUE KEY `po_header_id` (`po_quote_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_quote_line` @@ -26005,18 +25729,14 @@ INSERT INTO `po_quote_line` (`po_quote_line_id`, `po_quote_header_id`, `po_rfq_l (13, 9, 7, 1, 10137, 'MI_PUR99', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 27, NULL, NULL, 34, '2016-01-06 10:13:19', 34, '2016-01-06 10:13:19'), (14, 9, 9, 4, 10137, 'MI_PUR99', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 27, NULL, NULL, 34, '2016-01-06 10:13:19', 34, '2016-01-06 10:13:19'), (15, 9, 6, 2, 10034, 'Desktop 01 of Model A', 'DELLMOD201', 'DELL', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 27, NULL, NULL, 34, '2016-01-06 10:13:20', 34, '2016-01-06 10:13:20'), -(16, 9, 8, 3, 10042, 'MI Cabinet A 01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 27, NULL, NULL, 34, '2016-01-06 10:13:20', 34, '2016-01-06 10:13:20'), -(17, 10, 6, 2, 10034, 'Desktop 01 of Model A', 'DELLMOD201', 'DELL', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 27, '120.00000', NULL, 34, '2016-01-10 05:37:01', 34, '2016-01-10 11:19:58'), -(18, 10, 8, 3, 10042, 'MI Cabinet A 01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 27, '300.00000', NULL, 34, '2016-01-10 05:37:01', 34, '2016-01-11 03:35:47'), -(19, 10, 9, 4, 10137, 'MI_PUR99', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 27, '230.00000', NULL, 34, '2016-01-10 05:37:01', 34, '2016-01-11 03:35:47'), -(20, 10, 7, 1, 10137, 'MI_PUR99', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 27, NULL, NULL, 34, '2016-01-10 05:37:01', 34, '2016-01-10 05:37:01'); +(16, 9, 8, 3, 10042, 'MI Cabinet A 01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 27, NULL, NULL, 34, '2016-01-06 10:13:20', 34, '2016-01-06 10:13:20'); -- -------------------------------------------------------- -- -- Stand-in structure for view `po_requisition_all_v` -- -CREATE TABLE IF NOT EXISTS `po_requisition_all_v` ( +CREATE TABLE `po_requisition_all_v` ( `po_requisition_header_id` int(12) ,`bu_org_id` int(12) ,`po_requisition_type` varchar(50) @@ -26067,14 +25787,15 @@ CREATE TABLE IF NOT EXISTS `po_requisition_all_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Table structure for table `po_requisition_detail` -- -CREATE TABLE IF NOT EXISTS `po_requisition_detail` ( - `po_requisition_detail_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_requisition_detail` ( + `po_requisition_detail_id` int(12) NOT NULL, `po_requisition_line_id` int(12) NOT NULL, `po_requisition_header_id` int(12) NOT NULL, `shipment_number` int(12) NOT NULL, @@ -26102,9 +25823,8 @@ CREATE TABLE IF NOT EXISTS `po_requisition_detail` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime NOT NULL, `ship_to_inventory` varchar(50) DEFAULT NULL, - `order_number` varchar(50) DEFAULT NULL, - PRIMARY KEY (`po_requisition_detail_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=102 ; + `order_number` varchar(50) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_requisition_detail` @@ -26155,11 +25875,7 @@ INSERT INTO `po_requisition_detail` (`po_requisition_detail_id`, `po_requisition (94, 105, 48, 1, NULL, NULL, NULL, NULL, NULL, '9.00000', '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-10-06 17:44:18', 34, '2015-10-06 17:44:18', NULL, NULL), (95, 103, 48, 1, NULL, NULL, NULL, NULL, NULL, '12.00000', '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-10-06 17:44:18', 34, '2015-10-06 17:44:18', NULL, NULL), (96, 103, 48, 1, NULL, NULL, NULL, NULL, NULL, '12.00000', '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-10-06 17:44:19', 34, '2015-10-06 17:44:19', NULL, NULL), -(97, 105, 48, 1, NULL, NULL, NULL, NULL, NULL, '9.00000', '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-10-06 17:44:19', 34, '2015-10-06 17:44:19', NULL, NULL), -(98, 106, 49, 1, NULL, NULL, NULL, NULL, NULL, '12.00000', '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-15 08:37:25', 34, '2016-01-15 08:38:31', NULL, '305'), -(99, 106, 49, 1, NULL, NULL, NULL, NULL, NULL, '12.00000', '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-15 08:37:25', 34, '2016-01-15 08:38:31', NULL, '305'), -(100, 107, 49, 1, NULL, NULL, NULL, NULL, NULL, '9.00000', '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-15 08:37:25', 34, '2016-01-15 08:38:31', NULL, '305'), -(101, 107, 49, 1, NULL, NULL, NULL, NULL, NULL, '9.00000', '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-15 08:37:25', 34, '2016-01-15 08:38:31', NULL, '305'); +(97, 105, 48, 1, NULL, NULL, NULL, NULL, NULL, '9.00000', '2015-10-28', NULL, 3790, 1208, NULL, 1154, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-10-06 17:44:19', 34, '2015-10-06 17:44:19', NULL, NULL); -- -------------------------------------------------------- @@ -26167,8 +25883,8 @@ INSERT INTO `po_requisition_detail` (`po_requisition_detail_id`, `po_requisition -- Table structure for table `po_requisition_header` -- -CREATE TABLE IF NOT EXISTS `po_requisition_header` ( - `po_requisition_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_requisition_header` ( + `po_requisition_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `po_requisition_type` varchar(50) NOT NULL, `po_requisition_number` varchar(50) DEFAULT NULL, @@ -26191,9 +25907,8 @@ CREATE TABLE IF NOT EXISTS `po_requisition_header` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime NOT NULL, `rev_enabled_cb` tinyint(1) DEFAULT NULL, - `rev_number` int(12) DEFAULT NULL, - PRIMARY KEY (`po_requisition_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=50 ; + `rev_number` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_requisition_header` @@ -26228,8 +25943,7 @@ INSERT INTO `po_requisition_header` (`po_requisition_header_id`, `bu_org_id`, `p (45, 5, 'EXTERNAL', '5-45', 2, NULL, NULL, NULL, 86, 86, '240.00000', 'USD', 2, 'CORP', '0.00000', NULL, NULL, 'ENTERED', 34, '2015-06-18 13:45:53', 34, '2015-06-22 16:30:36', NULL, NULL), (46, 5, 'EXTERNAL', '5-46', 2, NULL, NULL, NULL, 86, 86, '144.00000', 'USD', 2, 'CORP', '0.00000', NULL, NULL, 'APPROVED', 34, '2015-06-27 10:16:20', 34, '2015-06-27 12:52:44', NULL, NULL), (47, 5, 'EXTERNAL', '5-47', 2, NULL, NULL, 'asdasda', 86, 86, '252.00000', 'USD', 2, 'CORP', '0.00000', NULL, NULL, 'APPROVED', 34, '2015-07-10 19:17:33', 34, '2015-08-05 07:03:38', NULL, NULL), -(48, 5, 'EXTERNAL', '5-48', 2, NULL, NULL, NULL, 86, 86, '252.00000', 'USD', 2, 'CORP', '0.00000', NULL, NULL, 'ENTERED', 34, '2015-07-14 08:23:40', 34, '2015-10-06 17:44:18', NULL, NULL), -(49, 5, 'EXTERNAL', '5-49', 2, NULL, NULL, NULL, 86, 86, '252.00000', 'USD', 2, 'CORP', '0.00000', NULL, NULL, 'APPROVED', 34, '2016-01-15 08:37:25', 34, '2016-01-15 08:37:36', NULL, NULL); +(48, 5, 'EXTERNAL', '5-48', 2, NULL, NULL, NULL, 86, 86, '252.00000', 'USD', 2, 'CORP', '0.00000', NULL, NULL, 'ENTERED', 34, '2015-07-14 08:23:40', 34, '2015-10-06 17:44:18', NULL, NULL); -- -------------------------------------------------------- @@ -26237,8 +25951,8 @@ INSERT INTO `po_requisition_header` (`po_requisition_header_id`, `bu_org_id`, `p -- Table structure for table `po_requisition_interface` -- -CREATE TABLE IF NOT EXISTS `po_requisition_interface` ( - `po_requisition_interface_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_requisition_interface` ( + `po_requisition_interface_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `po_requisition_type` varchar(50) NOT NULL, `receving_org_id` int(12) DEFAULT NULL, @@ -26262,9 +25976,8 @@ CREATE TABLE IF NOT EXISTS `po_requisition_interface` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`po_requisition_interface_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=127 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_requisition_interface` @@ -26281,8 +25994,8 @@ INSERT INTO `po_requisition_interface` (`po_requisition_interface_id`, `bu_org_i -- Table structure for table `po_requisition_line` -- -CREATE TABLE IF NOT EXISTS `po_requisition_line` ( - `po_requisition_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_requisition_line` ( + `po_requisition_line_id` int(12) NOT NULL, `po_requisition_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, `receving_org_id` int(12) DEFAULT NULL, @@ -26306,9 +26019,8 @@ CREATE TABLE IF NOT EXISTS `po_requisition_line` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime NOT NULL, `rev_enabled_cb` tinyint(1) DEFAULT NULL, - `rev_number` int(12) DEFAULT NULL, - PRIMARY KEY (`po_requisition_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=108 ; + `rev_number` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_requisition_line` @@ -26356,9 +26068,7 @@ INSERT INTO `po_requisition_line` (`po_requisition_line_id`, `po_requisition_hea (102, 47, 1, 6, 10201, NULL, 'MI TEST 102', '12.00000', '12.00000', '144.00000', NULL, NULL, 2, '2015-06-30', 'GOODS', 'sadadas', 27, NULL, NULL, 34, '2015-07-10 19:17:34', 34, '2015-08-05 07:03:38', NULL, NULL), (103, 48, 1, 6, 10201, NULL, 'MI TEST 102', '12.00000', NULL, '144.00000', NULL, NULL, 2, '2015-06-30', 'GOODS', NULL, 27, NULL, NULL, 34, '2015-07-14 08:23:40', 34, '2015-10-06 17:44:19', NULL, NULL), (104, 47, 2, 6, 10034, NULL, 'Desktop 01 of Model A', '9.00000', '12.00000', '108.00000', NULL, NULL, 2, NULL, 'GOODS', NULL, 27, NULL, NULL, 34, '2015-07-14 18:45:54', 34, '2015-07-14 18:45:54', NULL, NULL), -(105, 48, 2, 6, 10038, NULL, 'MI Monitor A 01', '9.00000', '12.00000', '108.00000', NULL, NULL, 2, '2015-06-30', 'GOODS', NULL, 27, NULL, NULL, 34, '2015-10-06 17:44:18', 34, '2015-10-06 17:44:19', NULL, NULL), -(106, 49, 1, 6, 10201, NULL, 'MI TEST 102', '12.00000', NULL, '144.00000', NULL, NULL, 2, '2015-06-30', 'GOODS', NULL, 27, NULL, NULL, 34, '2016-01-15 08:37:25', 34, '2016-01-15 08:37:25', NULL, NULL), -(107, 49, 2, 6, 10038, NULL, 'MI Monitor A 01', '9.00000', '12.00000', '108.00000', NULL, NULL, 2, '2015-06-30', 'GOODS', NULL, 27, NULL, NULL, 34, '2016-01-15 08:37:25', 34, '2016-01-15 08:37:25', NULL, NULL); +(105, 48, 2, 6, 10038, NULL, 'MI Monitor A 01', '9.00000', '12.00000', '108.00000', NULL, NULL, 2, '2015-06-30', 'GOODS', NULL, 27, NULL, NULL, 34, '2015-10-06 17:44:18', 34, '2015-10-06 17:44:19', NULL, NULL); -- -------------------------------------------------------- @@ -26366,8 +26076,8 @@ INSERT INTO `po_requisition_line` (`po_requisition_line_id`, `po_requisition_hea -- Table structure for table `po_rfq_detail` -- -CREATE TABLE IF NOT EXISTS `po_rfq_detail` ( - `po_rfq_detail_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_rfq_detail` ( + `po_rfq_detail_id` int(12) NOT NULL, `po_rfq_header_id` int(11) NOT NULL, `po_rfq_line_id` int(11) NOT NULL, `reference_table` varchar(50) DEFAULT NULL, @@ -26381,9 +26091,8 @@ CREATE TABLE IF NOT EXISTS `po_rfq_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`po_rfq_detail_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_rfq_detail` @@ -26412,8 +26121,8 @@ INSERT INTO `po_rfq_detail` (`po_rfq_detail_id`, `po_rfq_header_id`, `po_rfq_lin -- Table structure for table `po_rfq_header` -- -CREATE TABLE IF NOT EXISTS `po_rfq_header` ( - `po_rfq_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_rfq_header` ( + `po_rfq_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `rfq_number` int(12) DEFAULT NULL, `rfq_name` varchar(50) NOT NULL, @@ -26436,11 +26145,8 @@ CREATE TABLE IF NOT EXISTS `po_rfq_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`po_rfq_header_id`), - UNIQUE KEY `release_number` (`security_level`,`rfq_type`), - UNIQUE KEY `po_header_id` (`po_rfq_header_id`,`security_level`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_rfq_header` @@ -26457,8 +26163,8 @@ INSERT INTO `po_rfq_header` (`po_rfq_header_id`, `bu_org_id`, `rfq_number`, `rfq -- Table structure for table `po_rfq_line` -- -CREATE TABLE IF NOT EXISTS `po_rfq_line` ( - `po_rfq_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_rfq_line` ( + `po_rfq_line_id` int(12) NOT NULL, `po_rfq_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, `mfg_part_number` varchar(50) DEFAULT NULL, @@ -26478,10 +26184,8 @@ CREATE TABLE IF NOT EXISTS `po_rfq_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`po_rfq_line_id`), - UNIQUE KEY `po_header_id` (`po_rfq_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_rfq_line` @@ -26503,17 +26207,16 @@ INSERT INTO `po_rfq_line` (`po_rfq_line_id`, `po_rfq_header_id`, `line_number`, -- Table structure for table `po_sourcing_rule_header` -- -CREATE TABLE IF NOT EXISTS `po_sourcing_rule_header` ( - `po_sourcing_rule_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_sourcing_rule_header` ( + `po_sourcing_rule_header_id` int(12) NOT NULL, `sourcing_rule` varchar(25) NOT NULL, `description` varchar(256) NOT NULL, `status` varchar(25) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`po_sourcing_rule_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_sourcing_rule_header` @@ -26531,8 +26234,8 @@ INSERT INTO `po_sourcing_rule_header` (`po_sourcing_rule_header_id`, `sourcing_r -- Table structure for table `po_sourcing_rule_line` -- -CREATE TABLE IF NOT EXISTS `po_sourcing_rule_line` ( - `po_sourcing_rule_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `po_sourcing_rule_line` ( + `po_sourcing_rule_line_id` int(12) NOT NULL, `po_sourcing_rule_header_id` int(12) NOT NULL, `sourcing_type` varchar(25) NOT NULL, `source_from_org_id` int(12) DEFAULT NULL, @@ -26544,9 +26247,8 @@ CREATE TABLE IF NOT EXISTS `po_sourcing_rule_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`po_sourcing_rule_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `po_sourcing_rule_line` @@ -26567,8 +26269,8 @@ INSERT INTO `po_sourcing_rule_line` (`po_sourcing_rule_line_id`, `po_sourcing_ru -- Table structure for table `prj_agreement_header` -- -CREATE TABLE IF NOT EXISTS `prj_agreement_header` ( - `prj_agreement_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_agreement_header` ( + `prj_agreement_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `agreement_type` varchar(25) DEFAULT NULL, `agreement_number` varchar(25) DEFAULT NULL, @@ -26590,9 +26292,8 @@ CREATE TABLE IF NOT EXISTS `prj_agreement_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`prj_agreement_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_agreement_header` @@ -26607,8 +26308,8 @@ INSERT INTO `prj_agreement_header` (`prj_agreement_header_id`, `bu_org_id`, `agr -- Table structure for table `prj_agreement_line` -- -CREATE TABLE IF NOT EXISTS `prj_agreement_line` ( - `prj_agreement_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_agreement_line` ( + `prj_agreement_line_id` int(12) NOT NULL, `prj_agreement_header_id` int(12) NOT NULL, `prj_project_header_id` int(12) NOT NULL, `prj_project_line_id` int(12) DEFAULT NULL, @@ -26619,9 +26320,8 @@ CREATE TABLE IF NOT EXISTS `prj_agreement_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`prj_agreement_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_agreement_line` @@ -26638,8 +26338,8 @@ INSERT INTO `prj_agreement_line` (`prj_agreement_line_id`, `prj_agreement_header -- Table structure for table `prj_bem` -- -CREATE TABLE IF NOT EXISTS `prj_bem` ( - `prj_bem_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_bem` ( + `prj_bem_id` int(12) UNSIGNED NOT NULL, `bem` varchar(25) NOT NULL, `description` varchar(255) DEFAULT NULL, `budget_entry_level` varchar(25) DEFAULT NULL, @@ -26655,10 +26355,8 @@ CREATE TABLE IF NOT EXISTS `prj_bem` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_bem_id`), - UNIQUE KEY `value_group` (`bem`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_bem` @@ -26678,8 +26376,8 @@ INSERT INTO `prj_bem` (`prj_bem_id`, `bem`, `description`, `budget_entry_level`, -- Table structure for table `prj_budget_detail` -- -CREATE TABLE IF NOT EXISTS `prj_budget_detail` ( - `prj_budget_detail_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_budget_detail` ( + `prj_budget_detail_id` int(12) UNSIGNED NOT NULL, `prj_budget_line_id` int(12) DEFAULT NULL, `prj_budget_header_id` int(12) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, @@ -26694,10 +26392,8 @@ CREATE TABLE IF NOT EXISTS `prj_budget_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_budget_detail_id`), - UNIQUE KEY `value_group` (`prj_budget_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -26705,8 +26401,8 @@ CREATE TABLE IF NOT EXISTS `prj_budget_detail` ( -- Table structure for table `prj_budget_header` -- -CREATE TABLE IF NOT EXISTS `prj_budget_header` ( - `prj_budget_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_budget_header` ( + `prj_budget_header_id` int(12) UNSIGNED NOT NULL, `budget_type` varchar(25) DEFAULT NULL, `prj_project_header_id` int(12) NOT NULL, `prj_project_line_id` int(12) DEFAULT NULL, @@ -26727,10 +26423,8 @@ CREATE TABLE IF NOT EXISTS `prj_budget_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_budget_header_id`), - UNIQUE KEY `budget_type` (`budget_type`,`prj_project_header_id`,`version_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_budget_header` @@ -26751,8 +26445,8 @@ INSERT INTO `prj_budget_header` (`prj_budget_header_id`, `budget_type`, `prj_pro -- Table structure for table `prj_budget_line` -- -CREATE TABLE IF NOT EXISTS `prj_budget_line` ( - `prj_budget_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_budget_line` ( + `prj_budget_line_id` int(12) UNSIGNED NOT NULL, `prj_budget_header_id` int(12) DEFAULT NULL, `prj_project_header_id` int(12) NOT NULL, `description` varchar(255) DEFAULT NULL, @@ -26767,9 +26461,8 @@ CREATE TABLE IF NOT EXISTS `prj_budget_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_budget_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_budget_line` @@ -26792,8 +26485,8 @@ INSERT INTO `prj_budget_line` (`prj_budget_line_id`, `prj_budget_header_id`, `pr -- Table structure for table `prj_budget_rev_header` -- -CREATE TABLE IF NOT EXISTS `prj_budget_rev_header` ( - `prj_budget_rev_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_budget_rev_header` ( + `prj_budget_rev_header_id` int(12) UNSIGNED NOT NULL, `prj_budget_header_id` int(12) NOT NULL, `budget_type` varchar(25) DEFAULT NULL, `prj_project_header_id` int(12) NOT NULL, @@ -26815,10 +26508,8 @@ CREATE TABLE IF NOT EXISTS `prj_budget_rev_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_budget_rev_header_id`), - UNIQUE KEY `prj_project_header_id` (`prj_project_header_id`,`version_number`,`baselined_cb`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_budget_rev_header` @@ -26833,8 +26524,8 @@ INSERT INTO `prj_budget_rev_header` (`prj_budget_rev_header_id`, `prj_budget_hea -- Table structure for table `prj_budget_rev_line` -- -CREATE TABLE IF NOT EXISTS `prj_budget_rev_line` ( - `prj_budget_rev_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_budget_rev_line` ( + `prj_budget_rev_line_id` int(12) UNSIGNED NOT NULL, `prj_budget_rev_header_id` int(12) DEFAULT NULL, `prj_budget_header_id` int(11) NOT NULL, `prj_budget_line_id` int(11) NOT NULL, @@ -26851,10 +26542,8 @@ CREATE TABLE IF NOT EXISTS `prj_budget_rev_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_budget_rev_line_id`), - UNIQUE KEY `prj_budget_header_id` (`prj_budget_rev_header_id`,`prj_project_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_budget_rev_line` @@ -26869,8 +26558,8 @@ INSERT INTO `prj_budget_rev_line` (`prj_budget_rev_line_id`, `prj_budget_rev_hea -- Table structure for table `prj_burden_costcode` -- -CREATE TABLE IF NOT EXISTS `prj_burden_costcode` ( - `prj_burden_costcode_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_burden_costcode` ( + `prj_burden_costcode_id` int(12) UNSIGNED NOT NULL, `costcode` varchar(25) NOT NULL, `description` varchar(255) DEFAULT NULL, `prj_exependiture_type_id` int(12) DEFAULT NULL, @@ -26879,10 +26568,8 @@ CREATE TABLE IF NOT EXISTS `prj_burden_costcode` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_burden_costcode_id`), - UNIQUE KEY `value_group` (`costcode`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_burden_costcode` @@ -26900,8 +26587,8 @@ INSERT INTO `prj_burden_costcode` (`prj_burden_costcode_id`, `costcode`, `descri -- Table structure for table `prj_burden_cost_base` -- -CREATE TABLE IF NOT EXISTS `prj_burden_cost_base` ( - `prj_burden_cost_base_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_burden_cost_base` ( + `prj_burden_cost_base_id` int(12) UNSIGNED NOT NULL, `cost_base` varchar(25) NOT NULL, `description` varchar(255) DEFAULT NULL, `cost_base_type` varchar(25) DEFAULT NULL, @@ -26911,10 +26598,8 @@ CREATE TABLE IF NOT EXISTS `prj_burden_cost_base` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_burden_cost_base_id`), - UNIQUE KEY `value_group` (`cost_base`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_burden_cost_base` @@ -26932,8 +26617,8 @@ INSERT INTO `prj_burden_cost_base` (`prj_burden_cost_base_id`, `cost_base`, `des -- Table structure for table `prj_burden_expenditure` -- -CREATE TABLE IF NOT EXISTS `prj_burden_expenditure` ( - `prj_burden_expenditure_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_burden_expenditure` ( + `prj_burden_expenditure_id` int(12) UNSIGNED NOT NULL, `prj_expenditure_line_id` int(12) NOT NULL, `prj_burden_cost_base_id` int(12) DEFAULT NULL, `prj_burden_costcode_id` int(12) NOT NULL, @@ -26950,10 +26635,8 @@ CREATE TABLE IF NOT EXISTS `prj_burden_expenditure` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_burden_expenditure_id`), - UNIQUE KEY `prj_expenditure_line_id` (`prj_expenditure_line_id`,`prj_burden_costcode_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=97 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_burden_expenditure` @@ -26981,7 +26664,7 @@ INSERT INTO `prj_burden_expenditure` (`prj_burden_expenditure_id`, `prj_expendit -- -- Stand-in structure for view `prj_burden_expenditure_v` -- -CREATE TABLE IF NOT EXISTS `prj_burden_expenditure_v` ( +CREATE TABLE `prj_burden_expenditure_v` ( `prj_burden_expenditure_id` int(12) unsigned ,`project_number` varchar(50) ,`costcode` varchar(25) @@ -27007,14 +26690,15 @@ CREATE TABLE IF NOT EXISTS `prj_burden_expenditure_v` ( ,`burden_value` decimal(15,5) ,`burden_amount` decimal(15,5) ); + -- -------------------------------------------------------- -- -- Table structure for table `prj_burden_list_header` -- -CREATE TABLE IF NOT EXISTS `prj_burden_list_header` ( - `prj_burden_list_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_burden_list_header` ( + `prj_burden_list_header_id` int(12) UNSIGNED NOT NULL, `burden_list` varchar(25) NOT NULL, `prj_burden_structure_header_id` int(12) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, @@ -27023,10 +26707,8 @@ CREATE TABLE IF NOT EXISTS `prj_burden_list_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_burden_list_header_id`), - UNIQUE KEY `value_group` (`burden_list`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Project burden structure header information' AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Project burden structure header information'; -- -- Dumping data for table `prj_burden_list_header` @@ -27041,8 +26723,8 @@ INSERT INTO `prj_burden_list_header` (`prj_burden_list_header_id`, `burden_list` -- Table structure for table `prj_burden_list_line` -- -CREATE TABLE IF NOT EXISTS `prj_burden_list_line` ( - `prj_burden_list_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_burden_list_line` ( + `prj_burden_list_line_id` int(12) NOT NULL, `prj_burden_list_header_id` int(12) NOT NULL, `prj_burden_costcode_id` int(12) NOT NULL, `bu_org_id` int(12) DEFAULT NULL, @@ -27054,10 +26736,8 @@ CREATE TABLE IF NOT EXISTS `prj_burden_list_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_burden_list_line_id`), - UNIQUE KEY `mdm_price_list_header_id` (`prj_burden_list_header_id`,`bu_org_id`,`multiplier`,`effective_start_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_burden_list_line` @@ -27076,8 +26756,8 @@ INSERT INTO `prj_burden_list_line` (`prj_burden_list_line_id`, `prj_burden_list_ -- Table structure for table `prj_burden_structure_costcode` -- -CREATE TABLE IF NOT EXISTS `prj_burden_structure_costcode` ( - `prj_burden_structure_costcode_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_burden_structure_costcode` ( + `prj_burden_structure_costcode_id` int(12) UNSIGNED NOT NULL, `prj_burden_structure_header_id` int(12) NOT NULL, `burden_cost_code_id` int(12) NOT NULL, `description` varchar(255) DEFAULT NULL, @@ -27086,10 +26766,8 @@ CREATE TABLE IF NOT EXISTS `prj_burden_structure_costcode` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_burden_structure_costcode_id`), - UNIQUE KEY `prj_burden_structure_header_id` (`prj_burden_structure_header_id`,`burden_cost_code_id`,`burden_cost_base_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Project burden structure cost code information' AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Project burden structure cost code information'; -- -- Dumping data for table `prj_burden_structure_costcode` @@ -27107,8 +26785,8 @@ INSERT INTO `prj_burden_structure_costcode` (`prj_burden_structure_costcode_id`, -- Table structure for table `prj_burden_structure_expendituretype` -- -CREATE TABLE IF NOT EXISTS `prj_burden_structure_expendituretype` ( - `prj_burden_structure_expendituretype_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_burden_structure_expendituretype` ( + `prj_burden_structure_expendituretype_id` int(12) UNSIGNED NOT NULL, `prj_burden_structure_header_id` int(12) NOT NULL, `prj_expenditure_type_id` int(12) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, @@ -27116,10 +26794,8 @@ CREATE TABLE IF NOT EXISTS `prj_burden_structure_expendituretype` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_burden_structure_expendituretype_id`), - UNIQUE KEY `prj_burden_structure_header_id` (`prj_burden_structure_header_id`,`prj_expenditure_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Project burden expenditure type information' AUTO_INCREMENT=13 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Project burden expenditure type information'; -- -- Dumping data for table `prj_burden_structure_expendituretype` @@ -27137,8 +26813,8 @@ INSERT INTO `prj_burden_structure_expendituretype` (`prj_burden_structure_expend -- Table structure for table `prj_burden_structure_header` -- -CREATE TABLE IF NOT EXISTS `prj_burden_structure_header` ( - `prj_burden_structure_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_burden_structure_header` ( + `prj_burden_structure_header_id` int(12) UNSIGNED NOT NULL, `structure` varchar(25) NOT NULL, `structure_type` varchar(25) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, @@ -27148,10 +26824,8 @@ CREATE TABLE IF NOT EXISTS `prj_burden_structure_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_burden_structure_header_id`), - UNIQUE KEY `value_group` (`structure`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Project burden structure header information' AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Project burden structure header information'; -- -- Dumping data for table `prj_burden_structure_header` @@ -27167,8 +26841,8 @@ INSERT INTO `prj_burden_structure_header` (`prj_burden_structure_header_id`, `st -- Table structure for table `prj_category_header` -- -CREATE TABLE IF NOT EXISTS `prj_category_header` ( - `prj_category_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_category_header` ( + `prj_category_header_id` int(12) UNSIGNED NOT NULL, `category` varchar(50) NOT NULL, `description` varchar(255) DEFAULT NULL, `mandatory_cb` tinyint(1) DEFAULT NULL, @@ -27180,10 +26854,8 @@ CREATE TABLE IF NOT EXISTS `prj_category_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_category_header_id`), - UNIQUE KEY `value_group` (`category`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_category_header` @@ -27199,8 +26871,8 @@ INSERT INTO `prj_category_header` (`prj_category_header_id`, `category`, `descri -- Table structure for table `prj_category_line` -- -CREATE TABLE IF NOT EXISTS `prj_category_line` ( - `prj_category_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_category_line` ( + `prj_category_line_id` int(12) UNSIGNED NOT NULL, `prj_category_header_id` int(12) NOT NULL, `category_code` varchar(30) DEFAULT NULL, `effective_from` date DEFAULT NULL, @@ -27209,10 +26881,8 @@ CREATE TABLE IF NOT EXISTS `prj_category_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_category_line_id`), - UNIQUE KEY `sys_catalog_header_id` (`prj_category_header_id`,`category_code`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_category_line` @@ -27236,15 +26906,13 @@ INSERT INTO `prj_category_line` (`prj_category_line_id`, `prj_category_header_id -- Table structure for table `prj_category_value` -- -CREATE TABLE IF NOT EXISTS `prj_category_value` ( - `prj_category_value_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_category_value` ( + `prj_category_value_id` int(12) UNSIGNED NOT NULL, `prj_project_header_id` int(12) NOT NULL, `prj_category_line_id` int(12) NOT NULL, `reference_table` varchar(100) DEFAULT NULL, - `reference_id` int(12) DEFAULT NULL, - PRIMARY KEY (`prj_category_value_id`), - UNIQUE KEY `sys_catalog_line_id` (`prj_project_header_id`,`reference_table`,`reference_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `reference_id` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -27252,8 +26920,8 @@ CREATE TABLE IF NOT EXISTS `prj_category_value` ( -- Table structure for table `prj_default_account` -- -CREATE TABLE IF NOT EXISTS `prj_default_account` ( - `prj_default_account_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_default_account` ( + `prj_default_account_id` int(12) UNSIGNED NOT NULL, `prj_project_type_header_id` int(12) NOT NULL, `ac_id` int(12) DEFAULT NULL, `document_type` varchar(25) DEFAULT NULL, @@ -27265,10 +26933,8 @@ CREATE TABLE IF NOT EXISTS `prj_default_account` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_default_account_id`), - UNIQUE KEY `gl_calendar_id` (`description`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_default_account` @@ -27290,8 +26956,8 @@ INSERT INTO `prj_default_account` (`prj_default_account_id`, `prj_project_type_h -- Table structure for table `prj_event_header` -- -CREATE TABLE IF NOT EXISTS `prj_event_header` ( - `prj_event_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_event_header` ( + `prj_event_header_id` int(12) UNSIGNED NOT NULL, `event_name` varchar(50) NOT NULL, `description` varchar(255) DEFAULT NULL, `prj_project_header_id` int(12) DEFAULT NULL, @@ -27301,10 +26967,8 @@ CREATE TABLE IF NOT EXISTS `prj_event_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_event_header_id`), - UNIQUE KEY `prj_project_header_id` (`prj_project_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_event_header` @@ -27319,8 +26983,8 @@ INSERT INTO `prj_event_header` (`prj_event_header_id`, `event_name`, `descriptio -- Table structure for table `prj_event_line` -- -CREATE TABLE IF NOT EXISTS `prj_event_line` ( - `prj_event_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_event_line` ( + `prj_event_line_id` int(12) UNSIGNED NOT NULL, `prj_event_header_id` int(12) DEFAULT NULL, `event_type_id` int(12) NOT NULL, `event_date` date DEFAULT NULL, @@ -27338,10 +27002,8 @@ CREATE TABLE IF NOT EXISTS `prj_event_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_event_line_id`), - UNIQUE KEY `value_group` (`event_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_event_line` @@ -27356,8 +27018,8 @@ INSERT INTO `prj_event_line` (`prj_event_line_id`, `prj_event_header_id`, `event -- Table structure for table `prj_event_type` -- -CREATE TABLE IF NOT EXISTS `prj_event_type` ( - `prj_event_type_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_event_type` ( + `prj_event_type_id` int(12) UNSIGNED NOT NULL, `event_type` varchar(25) NOT NULL, `description` varchar(255) DEFAULT NULL, `event_class` varchar(25) DEFAULT NULL, @@ -27367,10 +27029,8 @@ CREATE TABLE IF NOT EXISTS `prj_event_type` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_event_type_id`), - UNIQUE KEY `value_group` (`event_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_event_type` @@ -27387,8 +27047,8 @@ INSERT INTO `prj_event_type` (`prj_event_type_id`, `event_type`, `description`, -- Table structure for table `prj_expenditure_header` -- -CREATE TABLE IF NOT EXISTS `prj_expenditure_header` ( - `prj_expenditure_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_expenditure_header` ( + `prj_expenditure_header_id` int(12) UNSIGNED NOT NULL, `bu_org_id` int(12) DEFAULT NULL, `batch_name` varchar(50) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, @@ -27408,10 +27068,8 @@ CREATE TABLE IF NOT EXISTS `prj_expenditure_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_expenditure_header_id`), - UNIQUE KEY `value_group` (`batch_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=29 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_expenditure_header` @@ -27438,8 +27096,8 @@ INSERT INTO `prj_expenditure_header` (`prj_expenditure_header_id`, `bu_org_id`, -- Table structure for table `prj_expenditure_line` -- -CREATE TABLE IF NOT EXISTS `prj_expenditure_line` ( - `prj_expenditure_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_expenditure_line` ( + `prj_expenditure_line_id` int(12) UNSIGNED NOT NULL, `prj_expenditure_header_id` int(12) NOT NULL, `org_id` int(12) DEFAULT NULL, `hr_employee_id` int(12) DEFAULT NULL, @@ -27465,10 +27123,8 @@ CREATE TABLE IF NOT EXISTS `prj_expenditure_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_expenditure_line_id`), - UNIQUE KEY `sys_catalog_header_id` (`prj_expenditure_header_id`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=27 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_expenditure_line` @@ -27496,7 +27152,7 @@ INSERT INTO `prj_expenditure_line` (`prj_expenditure_line_id`, `prj_expenditure_ -- -- Stand-in structure for view `prj_expenditure_line_v` -- -CREATE TABLE IF NOT EXISTS `prj_expenditure_line_v` ( +CREATE TABLE `prj_expenditure_line_v` ( `prj_expenditure_line_id` int(12) unsigned ,`prj_expenditure_header_id` int(12) ,`org_id` int(12) @@ -27521,14 +27177,15 @@ CREATE TABLE IF NOT EXISTS `prj_expenditure_line_v` ( ,`bu_org_id` int(12) ,`task_number` varchar(25) ); + -- -------------------------------------------------------- -- -- Table structure for table `prj_expenditure_type_header` -- -CREATE TABLE IF NOT EXISTS `prj_expenditure_type_header` ( - `prj_expenditure_type_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_expenditure_type_header` ( + `prj_expenditure_type_header_id` int(12) UNSIGNED NOT NULL, `expenditure_type` varchar(25) NOT NULL, `description` varchar(255) DEFAULT NULL, `expenditure_category` varchar(25) DEFAULT NULL, @@ -27548,10 +27205,8 @@ CREATE TABLE IF NOT EXISTS `prj_expenditure_type_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_expenditure_type_header_id`), - UNIQUE KEY `value_group` (`expenditure_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_expenditure_type_header` @@ -27568,8 +27223,8 @@ INSERT INTO `prj_expenditure_type_header` (`prj_expenditure_type_header_id`, `ex -- Table structure for table `prj_expenditure_type_line` -- -CREATE TABLE IF NOT EXISTS `prj_expenditure_type_line` ( - `prj_expenditure_type_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_expenditure_type_line` ( + `prj_expenditure_type_line_id` int(12) UNSIGNED NOT NULL, `prj_expenditure_type_header_id` int(12) NOT NULL, `bu_org_id` int(12) DEFAULT NULL, `effective_from` date DEFAULT NULL, @@ -27581,10 +27236,8 @@ CREATE TABLE IF NOT EXISTS `prj_expenditure_type_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_expenditure_type_line_id`), - UNIQUE KEY `sys_catalog_header_id` (`prj_expenditure_type_header_id`,`bu_org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_expenditure_type_line` @@ -27604,8 +27257,8 @@ INSERT INTO `prj_expenditure_type_line` (`prj_expenditure_type_line_id`, `prj_ex -- Table structure for table `prj_invoice_header` -- -CREATE TABLE IF NOT EXISTS `prj_invoice_header` ( - `prj_invoice_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_invoice_header` ( + `prj_invoice_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `invoice_status` varchar(15) NOT NULL, `unearned_coa_id` int(12) DEFAULT NULL, @@ -27638,10 +27291,8 @@ CREATE TABLE IF NOT EXISTS `prj_invoice_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_invoice_header_id`), - UNIQUE KEY `transaction_number` (`unbilled_coa_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -27649,8 +27300,8 @@ CREATE TABLE IF NOT EXISTS `prj_invoice_header` ( -- Table structure for table `prj_invoice_line` -- -CREATE TABLE IF NOT EXISTS `prj_invoice_line` ( - `prj_invoice_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_invoice_line` ( + `prj_invoice_line_id` int(12) NOT NULL, `prj_invoice_header_id` int(12) NOT NULL, `prj_project_line_id` int(12) DEFAULT NULL, `revenue_category` varchar(25) DEFAULT NULL, @@ -27670,10 +27321,8 @@ CREATE TABLE IF NOT EXISTS `prj_invoice_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_invoice_line_id`), - UNIQUE KEY `transaction_number` (`revenue_source`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -27681,8 +27330,8 @@ CREATE TABLE IF NOT EXISTS `prj_invoice_line` ( -- Table structure for table `prj_milestone` -- -CREATE TABLE IF NOT EXISTS `prj_milestone` ( - `prj_milestone_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_milestone` ( + `prj_milestone_id` int(12) UNSIGNED NOT NULL, `prj_project_header_id` int(12) NOT NULL, `prj_project_line_id` int(12) NOT NULL, `status` varchar(25) DEFAULT NULL, @@ -27693,10 +27342,8 @@ CREATE TABLE IF NOT EXISTS `prj_milestone` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_milestone_id`), - UNIQUE KEY `prj_project_line_id` (`prj_project_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_milestone` @@ -27713,8 +27360,8 @@ INSERT INTO `prj_milestone` (`prj_milestone_id`, `prj_project_header_id`, `prj_p -- Table structure for table `prj_nlr_header` -- -CREATE TABLE IF NOT EXISTS `prj_nlr_header` ( - `prj_nlr_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_nlr_header` ( + `prj_nlr_header_id` int(12) UNSIGNED NOT NULL, `resource_name` varchar(50) NOT NULL, `prj_expenditure_type_id` int(12) NOT NULL, `description` varchar(255) DEFAULT NULL, @@ -27724,10 +27371,8 @@ CREATE TABLE IF NOT EXISTS `prj_nlr_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_nlr_header_id`), - UNIQUE KEY `value_group` (`resource_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Non Labor Resources For Projects' AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Non Labor Resources For Projects'; -- -- Dumping data for table `prj_nlr_header` @@ -27742,8 +27387,8 @@ INSERT INTO `prj_nlr_header` (`prj_nlr_header_id`, `resource_name`, `prj_expendi -- Table structure for table `prj_nlr_line` -- -CREATE TABLE IF NOT EXISTS `prj_nlr_line` ( - `prj_nlr_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_nlr_line` ( + `prj_nlr_line_id` int(12) UNSIGNED NOT NULL, `prj_nlr_header_id` int(12) NOT NULL, `bu_org_id` int(12) DEFAULT NULL, `effective_from` date DEFAULT NULL, @@ -27755,10 +27400,8 @@ CREATE TABLE IF NOT EXISTS `prj_nlr_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_nlr_line_id`), - UNIQUE KEY `sys_catalog_header_id` (`prj_nlr_header_id`,`bu_org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Non Labor Resources Lines For Projects' AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Non Labor Resources Lines For Projects'; -- -- Dumping data for table `prj_nlr_line` @@ -27772,7 +27415,7 @@ INSERT INTO `prj_nlr_line` (`prj_nlr_line_id`, `prj_nlr_header_id`, `bu_org_id`, -- -- Stand-in structure for view `prj_percent_all_v` -- -CREATE TABLE IF NOT EXISTS `prj_percent_all_v` ( +CREATE TABLE `prj_percent_all_v` ( `prj_percent_header_id` int(12) unsigned ,`percent` decimal(8,4) ,`description` varchar(255) @@ -27786,14 +27429,15 @@ CREATE TABLE IF NOT EXISTS `prj_percent_all_v` ( ,`project_description` varchar(256) ,`prj_project_header_id` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `prj_percent_header` -- -CREATE TABLE IF NOT EXISTS `prj_percent_header` ( - `prj_percent_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_percent_header` ( + `prj_percent_header_id` int(12) UNSIGNED NOT NULL, `prj_project_header_id` int(12) NOT NULL, `percent` decimal(8,4) NOT NULL, `description` varchar(255) DEFAULT NULL, @@ -27802,10 +27446,8 @@ CREATE TABLE IF NOT EXISTS `prj_percent_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_percent_header_id`), - UNIQUE KEY `value_group` (`percent`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_percent_header` @@ -27823,8 +27465,8 @@ INSERT INTO `prj_percent_header` (`prj_percent_header_id`, `prj_project_header_i -- Table structure for table `prj_percent_headerrev` -- -CREATE TABLE IF NOT EXISTS `prj_percent_headerrev` ( - `prj_percent_headerrev_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_percent_headerrev` ( + `prj_percent_headerrev_id` int(12) UNSIGNED NOT NULL, `prj_percent_header_id` int(12) NOT NULL, `prj_project_header_id` int(12) NOT NULL, `percent` decimal(8,4) NOT NULL, @@ -27834,10 +27476,8 @@ CREATE TABLE IF NOT EXISTS `prj_percent_headerrev` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_percent_headerrev_id`), - UNIQUE KEY `value_group` (`percent`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_percent_headerrev` @@ -27865,8 +27505,8 @@ INSERT INTO `prj_percent_headerrev` (`prj_percent_headerrev_id`, `prj_percent_he -- Table structure for table `prj_percent_line` -- -CREATE TABLE IF NOT EXISTS `prj_percent_line` ( - `prj_percent_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_percent_line` ( + `prj_percent_line_id` int(12) UNSIGNED NOT NULL, `prj_percent_header_id` int(12) NOT NULL, `prj_project_header_id` int(12) NOT NULL, `description` varchar(255) DEFAULT NULL, @@ -27877,10 +27517,8 @@ CREATE TABLE IF NOT EXISTS `prj_percent_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_percent_line_id`), - UNIQUE KEY `value_group` (`prj_project_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_percent_line` @@ -27897,7 +27535,7 @@ INSERT INTO `prj_percent_line` (`prj_percent_line_id`, `prj_percent_header_id`, -- -- Stand-in structure for view `prj_percent_line_v` -- -CREATE TABLE IF NOT EXISTS `prj_percent_line_v` ( +CREATE TABLE `prj_percent_line_v` ( `prj_percent_line_id` int(12) unsigned ,`prj_percent_header_id` int(12) ,`percent` decimal(8,4) @@ -27915,12 +27553,13 @@ CREATE TABLE IF NOT EXISTS `prj_percent_line_v` ( ,`parent_prj_task_num` varchar(25) ,`description` varchar(256) ); + -- -------------------------------------------------------- -- -- Stand-in structure for view `prj_project_all_lowesttask_v` -- -CREATE TABLE IF NOT EXISTS `prj_project_all_lowesttask_v` ( +CREATE TABLE `prj_project_all_lowesttask_v` ( `org` varchar(50) ,`project_number` varchar(50) ,`description` varchar(256) @@ -27951,12 +27590,13 @@ CREATE TABLE IF NOT EXISTS `prj_project_all_lowesttask_v` ( ,`completion_date` date ,`header_amount` decimal(20,5) ); + -- -------------------------------------------------------- -- -- Stand-in structure for view `prj_project_all_v` -- -CREATE TABLE IF NOT EXISTS `prj_project_all_v` ( +CREATE TABLE `prj_project_all_v` ( `org` varchar(50) ,`project_number` varchar(50) ,`description` varchar(256) @@ -27987,14 +27627,15 @@ CREATE TABLE IF NOT EXISTS `prj_project_all_v` ( ,`completion_date` date ,`header_amount` decimal(20,5) ); + -- -------------------------------------------------------- -- -- Table structure for table `prj_project_control` -- -CREATE TABLE IF NOT EXISTS `prj_project_control` ( - `prj_project_control_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_project_control` ( + `prj_project_control_id` int(12) NOT NULL, `prj_project_header_id` int(12) NOT NULL, `prj_expenditure_type_id` int(12) DEFAULT NULL, `prj_expenditure_category_code` varchar(25) DEFAULT NULL, @@ -28009,9 +27650,8 @@ CREATE TABLE IF NOT EXISTS `prj_project_control` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`prj_project_control_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_project_control` @@ -28027,8 +27667,8 @@ INSERT INTO `prj_project_control` (`prj_project_control_id`, `prj_project_header -- Table structure for table `prj_project_header` -- -CREATE TABLE IF NOT EXISTS `prj_project_header` ( - `prj_project_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_project_header` ( + `prj_project_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `prj_project_type_id` int(12) NOT NULL, `project_number` varchar(50) DEFAULT NULL, @@ -28083,9 +27723,8 @@ CREATE TABLE IF NOT EXISTS `prj_project_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`prj_project_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_project_header` @@ -28109,8 +27748,8 @@ INSERT INTO `prj_project_header` (`prj_project_header_id`, `bu_org_id`, `prj_pro -- Table structure for table `prj_project_line` -- -CREATE TABLE IF NOT EXISTS `prj_project_line` ( - `prj_project_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_project_line` ( + `prj_project_line_id` int(12) NOT NULL, `prj_project_header_id` int(12) NOT NULL, `task_number` varchar(25) NOT NULL, `task_level_weight` int(12) NOT NULL, @@ -28134,9 +27773,8 @@ CREATE TABLE IF NOT EXISTS `prj_project_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`prj_project_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=84 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_project_line` @@ -28233,8 +27871,8 @@ INSERT INTO `prj_project_line` (`prj_project_line_id`, `prj_project_header_id`, -- Table structure for table `prj_project_member` -- -CREATE TABLE IF NOT EXISTS `prj_project_member` ( - `prj_project_member_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_project_member` ( + `prj_project_member_id` int(12) NOT NULL, `prj_project_header_id` int(12) NOT NULL, `user_id` int(12) NOT NULL, `prj_role_id` int(12) NOT NULL, @@ -28244,9 +27882,8 @@ CREATE TABLE IF NOT EXISTS `prj_project_member` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`prj_project_member_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_project_member` @@ -28261,8 +27898,8 @@ INSERT INTO `prj_project_member` (`prj_project_member_id`, `prj_project_header_i -- Table structure for table `prj_project_type_billing` -- -CREATE TABLE IF NOT EXISTS `prj_project_type_billing` ( - `prj_project_type_billing_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_project_type_billing` ( + `prj_project_type_billing_id` int(12) UNSIGNED NOT NULL, `prj_project_type_header_id` int(12) NOT NULL, `prj_billing_extn_id` int(12) NOT NULL, `currency` varchar(15) DEFAULT NULL, @@ -28272,9 +27909,8 @@ CREATE TABLE IF NOT EXISTS `prj_project_type_billing` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_project_type_billing_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -28282,8 +27918,8 @@ CREATE TABLE IF NOT EXISTS `prj_project_type_billing` ( -- Table structure for table `prj_project_type_header` -- -CREATE TABLE IF NOT EXISTS `prj_project_type_header` ( - `prj_project_type_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_project_type_header` ( + `prj_project_type_header_id` int(12) UNSIGNED NOT NULL, `bu_org_id` int(12) NOT NULL, `project_class` varchar(15) NOT NULL, `project_type` varchar(50) NOT NULL, @@ -28327,10 +27963,8 @@ CREATE TABLE IF NOT EXISTS `prj_project_type_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_project_type_header_id`), - UNIQUE KEY `value_group` (`project_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_project_type_header` @@ -28345,17 +27979,16 @@ INSERT INTO `prj_project_type_header` (`prj_project_type_header_id`, `bu_org_id` -- Table structure for table `prj_project_type_line` -- -CREATE TABLE IF NOT EXISTS `prj_project_type_line` ( - `prj_project_type_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_project_type_line` ( + `prj_project_type_line_id` int(12) UNSIGNED NOT NULL, `prj_project_type_header_id` int(12) NOT NULL, `prj_category_header_id` int(12) NOT NULL, `required_cb` tinyint(1) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_project_type_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_project_type_line` @@ -28370,8 +28003,8 @@ INSERT INTO `prj_project_type_line` (`prj_project_type_line_id`, `prj_project_ty -- Table structure for table `prj_rate_schedule_header` -- -CREATE TABLE IF NOT EXISTS `prj_rate_schedule_header` ( - `prj_rate_schedule_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_rate_schedule_header` ( + `prj_rate_schedule_header_id` int(12) UNSIGNED NOT NULL, `bu_org_id` int(12) NOT NULL, `rate_type` varchar(25) NOT NULL, `schedule_name` varchar(50) NOT NULL, @@ -28381,10 +28014,8 @@ CREATE TABLE IF NOT EXISTS `prj_rate_schedule_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_rate_schedule_header_id`), - UNIQUE KEY `value_group` (`schedule_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_rate_schedule_header` @@ -28402,14 +28033,14 @@ INSERT INTO `prj_rate_schedule_header` (`prj_rate_schedule_header_id`, `bu_org_i -- Table structure for table `prj_rate_schedule_line` -- -CREATE TABLE IF NOT EXISTS `prj_rate_schedule_line` ( - `prj_rate_schedule_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_rate_schedule_line` ( + `prj_rate_schedule_line_id` int(12) UNSIGNED NOT NULL, `prj_rate_schedule_header_id` int(12) NOT NULL, `reference_key_name` varchar(100) DEFAULT NULL, `effective_from` date DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `effective_to` date DEFAULT NULL, - `reference_key_value` int(12) unsigned DEFAULT NULL, + `reference_key_value` int(12) UNSIGNED DEFAULT NULL, `uom_id` int(12) DEFAULT NULL, `rate` decimal(15,5) DEFAULT NULL, `mark_up_percentage` int(4) DEFAULT NULL, @@ -28417,10 +28048,8 @@ CREATE TABLE IF NOT EXISTS `prj_rate_schedule_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_rate_schedule_line_id`), - UNIQUE KEY `sys_catalog_header_id` (`prj_rate_schedule_header_id`,`reference_key_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_rate_schedule_line` @@ -28437,8 +28066,8 @@ INSERT INTO `prj_rate_schedule_line` (`prj_rate_schedule_line_id`, `prj_rate_sch -- Table structure for table `prj_resource_list_header` -- -CREATE TABLE IF NOT EXISTS `prj_resource_list_header` ( - `prj_resource_list_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_resource_list_header` ( + `prj_resource_list_header_id` int(12) UNSIGNED NOT NULL, `list_name` varchar(50) NOT NULL, `description` varchar(255) DEFAULT NULL, `effective_from` date DEFAULT NULL, @@ -28446,10 +28075,8 @@ CREATE TABLE IF NOT EXISTS `prj_resource_list_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_resource_list_header_id`), - UNIQUE KEY `value_group` (`list_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_resource_list_header` @@ -28464,8 +28091,8 @@ INSERT INTO `prj_resource_list_header` (`prj_resource_list_header_id`, `list_nam -- Table structure for table `prj_resource_list_line` -- -CREATE TABLE IF NOT EXISTS `prj_resource_list_line` ( - `prj_resource_list_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_resource_list_line` ( + `prj_resource_list_line_id` int(12) UNSIGNED NOT NULL, `prj_resource_list_header_id` int(12) NOT NULL, `resource_type` varchar(25) DEFAULT NULL, `effective_from` date DEFAULT NULL, @@ -28480,10 +28107,8 @@ CREATE TABLE IF NOT EXISTS `prj_resource_list_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_resource_list_line_id`), - UNIQUE KEY `sys_catalog_header_id` (`prj_resource_list_header_id`,`resource_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_resource_list_line` @@ -28499,8 +28124,8 @@ INSERT INTO `prj_resource_list_line` (`prj_resource_list_line_id`, `prj_resource -- Table structure for table `prj_revenue_header` -- -CREATE TABLE IF NOT EXISTS `prj_revenue_header` ( - `prj_revenue_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_revenue_header` ( + `prj_revenue_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `revenue_status` varchar(15) NOT NULL, `unearned_coa_id` int(12) DEFAULT NULL, @@ -28532,9 +28157,8 @@ CREATE TABLE IF NOT EXISTS `prj_revenue_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_revenue_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_revenue_header` @@ -28552,8 +28176,8 @@ INSERT INTO `prj_revenue_header` (`prj_revenue_header_id`, `bu_org_id`, `revenue -- Table structure for table `prj_revenue_line` -- -CREATE TABLE IF NOT EXISTS `prj_revenue_line` ( - `prj_revenue_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_revenue_line` ( + `prj_revenue_line_id` int(12) NOT NULL, `prj_revenue_header_id` int(12) NOT NULL, `prj_project_line_id` int(12) DEFAULT NULL, `revenue_category` varchar(25) DEFAULT NULL, @@ -28573,10 +28197,8 @@ CREATE TABLE IF NOT EXISTS `prj_revenue_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_revenue_line_id`), - UNIQUE KEY `prj_revenue_header_id` (`prj_revenue_header_id`,`line_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_revenue_line` @@ -28609,8 +28231,8 @@ INSERT INTO `prj_revenue_line` (`prj_revenue_line_id`, `prj_revenue_header_id`, -- Table structure for table `prj_role` -- -CREATE TABLE IF NOT EXISTS `prj_role` ( - `prj_role_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_role` ( + `prj_role_id` int(12) UNSIGNED NOT NULL, `role_name` varchar(25) NOT NULL, `description` varchar(255) DEFAULT NULL, `user_role` varchar(25) DEFAULT NULL, @@ -28627,10 +28249,8 @@ CREATE TABLE IF NOT EXISTS `prj_role` ( `created_by` int(12) NOT NULL, `creation_date` datetime(1) DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_role_id`), - UNIQUE KEY `value_group` (`role_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_role` @@ -28647,8 +28267,8 @@ INSERT INTO `prj_role` (`prj_role_id`, `role_name`, `description`, `user_role`, -- Table structure for table `prj_status_header` -- -CREATE TABLE IF NOT EXISTS `prj_status_header` ( - `prj_status_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_status_header` ( + `prj_status_header_id` int(12) NOT NULL, `user_status` varchar(25) NOT NULL, `system_status` varchar(25) NOT NULL, `description` varchar(255) DEFAULT NULL, @@ -28661,9 +28281,8 @@ CREATE TABLE IF NOT EXISTS `prj_status_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`prj_status_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -28671,8 +28290,8 @@ CREATE TABLE IF NOT EXISTS `prj_status_header` ( -- Table structure for table `prj_status_line` -- -CREATE TABLE IF NOT EXISTS `prj_status_line` ( - `prj_status_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_status_line` ( + `prj_status_line_id` int(12) NOT NULL, `prj_status_header_id` int(12) NOT NULL, `action_code` varchar(25) NOT NULL, `allow_cb` tinyint(1) DEFAULT NULL, @@ -28680,11 +28299,8 @@ CREATE TABLE IF NOT EXISTS `prj_status_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`prj_status_line_id`), - UNIQUE KEY `sd_so_header_id_2` (`prj_status_header_id`,`action_code`), - UNIQUE KEY `sd_so_header_id` (`prj_status_header_id`,`default_cb`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -28692,18 +28308,15 @@ CREATE TABLE IF NOT EXISTS `prj_status_line` ( -- Table structure for table `prj_status_next` -- -CREATE TABLE IF NOT EXISTS `prj_status_next` ( - `prj_status_next_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_status_next` ( + `prj_status_next_id` int(12) NOT NULL, `prj_status_header_id` int(12) NOT NULL, `status_name` varchar(25) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`prj_status_next_id`), - UNIQUE KEY `sd_so_header_id_2` (`prj_status_header_id`,`status_name`), - UNIQUE KEY `sd_so_header_id` (`prj_status_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -28711,8 +28324,8 @@ CREATE TABLE IF NOT EXISTS `prj_status_next` ( -- Table structure for table `prj_work_type` -- -CREATE TABLE IF NOT EXISTS `prj_work_type` ( - `prj_work_type_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `prj_work_type` ( + `prj_work_type_id` int(12) UNSIGNED NOT NULL, `work_type` varchar(25) NOT NULL, `description` varchar(255) DEFAULT NULL, `billable_cb` tinyint(1) DEFAULT NULL, @@ -28729,10 +28342,8 @@ CREATE TABLE IF NOT EXISTS `prj_work_type` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`prj_work_type_id`), - UNIQUE KEY `value_group` (`work_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prj_work_type` @@ -28750,13 +28361,12 @@ INSERT INTO `prj_work_type` (`prj_work_type_id`, `work_type`, `description`, `bi -- Table structure for table `product` -- -CREATE TABLE IF NOT EXISTS `product` ( +CREATE TABLE `product` ( `content_id` int(12) NOT NULL, `field_name` varchar(50) DEFAULT NULL, `field_image` varchar(100) DEFAULT NULL, `field_price` int(10) DEFAULT NULL, - `field_description` varchar(256) DEFAULT NULL, - PRIMARY KEY (`content_id`) + `field_description` varchar(256) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -28765,8 +28375,8 @@ CREATE TABLE IF NOT EXISTS `product` ( -- Table structure for table `qa_ce_action_type` -- -CREATE TABLE IF NOT EXISTS `qa_ce_action_type` ( - `qa_ce_action_type_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_ce_action_type` ( + `qa_ce_action_type_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -28776,10 +28386,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_action_type` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `qa_ce_action_type_value` varchar(10) DEFAULT NULL, - PRIMARY KEY (`qa_ce_action_type_id`), - UNIQUE KEY `colletion_element_value` (`qa_ce_action_type_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `qa_ce_action_type_value` varchar(10) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `qa_ce_action_type` @@ -28795,8 +28403,8 @@ INSERT INTO `qa_ce_action_type` (`qa_ce_action_type_id`, `reference_type`, `refe -- Table structure for table `qa_ce_bgm_calibration_reading` -- -CREATE TABLE IF NOT EXISTS `qa_ce_bgm_calibration_reading` ( - `qa_ce_bgm_calibration_reading_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_ce_bgm_calibration_reading` ( + `qa_ce_bgm_calibration_reading_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -28806,10 +28414,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_bgm_calibration_reading` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `qa_ce_bgm_calibration_reading_value` varchar(10) DEFAULT NULL, - PRIMARY KEY (`qa_ce_bgm_calibration_reading_id`), - UNIQUE KEY `colletion_element_value` (`qa_ce_bgm_calibration_reading_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `qa_ce_bgm_calibration_reading_value` varchar(10) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -28817,8 +28423,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_bgm_calibration_reading` ( -- Table structure for table `qa_ce_enc_rating` -- -CREATE TABLE IF NOT EXISTS `qa_ce_enc_rating` ( - `qa_ce_enc_rating_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_ce_enc_rating` ( + `qa_ce_enc_rating_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -28828,10 +28434,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_enc_rating` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `qa_ce_enc_rating_value` varchar(256) DEFAULT NULL, - PRIMARY KEY (`qa_ce_enc_rating_id`), - UNIQUE KEY `colletion_element_value` (`qa_ce_enc_rating_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `qa_ce_enc_rating_value` varchar(256) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -28839,8 +28443,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_enc_rating` ( -- Table structure for table `qa_ce_higher_bandwidth1` -- -CREATE TABLE IF NOT EXISTS `qa_ce_higher_bandwidth1` ( - `qa_ce_higher_bandwidth1_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_ce_higher_bandwidth1` ( + `qa_ce_higher_bandwidth1_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -28850,10 +28454,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_higher_bandwidth1` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `qa_ce_higher_bandwidth1_value` varchar(10) DEFAULT NULL, - PRIMARY KEY (`qa_ce_higher_bandwidth1_id`), - UNIQUE KEY `colletion_element_value` (`qa_ce_higher_bandwidth1_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `qa_ce_higher_bandwidth1_value` varchar(10) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -28861,8 +28463,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_higher_bandwidth1` ( -- Table structure for table `qa_ce_lower_bandwidth1` -- -CREATE TABLE IF NOT EXISTS `qa_ce_lower_bandwidth1` ( - `qa_ce_lower_bandwidth1_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_ce_lower_bandwidth1` ( + `qa_ce_lower_bandwidth1_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -28872,10 +28474,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_lower_bandwidth1` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `qa_ce_lower_bandwidth1_value` varchar(10) DEFAULT NULL, - PRIMARY KEY (`qa_ce_lower_bandwidth1_id`), - UNIQUE KEY `colletion_element_value` (`qa_ce_lower_bandwidth1_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `qa_ce_lower_bandwidth1_value` varchar(10) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -28883,8 +28483,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_lower_bandwidth1` ( -- Table structure for table `qa_ce_lower_bandwidth2` -- -CREATE TABLE IF NOT EXISTS `qa_ce_lower_bandwidth2` ( - `qa_ce_lower_bandwidth2_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_ce_lower_bandwidth2` ( + `qa_ce_lower_bandwidth2_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -28894,10 +28494,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_lower_bandwidth2` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `qa_ce_lower_bandwidth2_value` varchar(10) DEFAULT NULL, - PRIMARY KEY (`qa_ce_lower_bandwidth2_id`), - UNIQUE KEY `colletion_element_value` (`qa_ce_lower_bandwidth2_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `qa_ce_lower_bandwidth2_value` varchar(10) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -28905,8 +28503,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_lower_bandwidth2` ( -- Table structure for table `qa_ce_quality_rating` -- -CREATE TABLE IF NOT EXISTS `qa_ce_quality_rating` ( - `qa_ce_quality_rating_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_ce_quality_rating` ( + `qa_ce_quality_rating_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -28916,10 +28514,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_quality_rating` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `qa_ce_quality_rating_value` varchar(10) DEFAULT NULL, - PRIMARY KEY (`qa_ce_quality_rating_id`), - UNIQUE KEY `colletion_element_value` (`qa_ce_quality_rating_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `qa_ce_quality_rating_value` varchar(10) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `qa_ce_quality_rating` @@ -28935,8 +28531,8 @@ INSERT INTO `qa_ce_quality_rating` (`qa_ce_quality_rating_id`, `reference_type`, -- Table structure for table `qa_ce_spectra_reading` -- -CREATE TABLE IF NOT EXISTS `qa_ce_spectra_reading` ( - `qa_ce_spectra_reading_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_ce_spectra_reading` ( + `qa_ce_spectra_reading_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -28946,10 +28542,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_spectra_reading` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `qa_ce_spectra_reading_value` varchar(10) DEFAULT NULL, - PRIMARY KEY (`qa_ce_spectra_reading_id`), - UNIQUE KEY `colletion_element_value` (`qa_ce_spectra_reading_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `qa_ce_spectra_reading_value` varchar(10) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `qa_ce_spectra_reading` @@ -28965,8 +28559,8 @@ INSERT INTO `qa_ce_spectra_reading` (`qa_ce_spectra_reading_id`, `reference_type -- Table structure for table `qa_ce_spectrum_range` -- -CREATE TABLE IF NOT EXISTS `qa_ce_spectrum_range` ( - `qa_ce_spectrum_range_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_ce_spectrum_range` ( + `qa_ce_spectrum_range_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -28976,10 +28570,8 @@ CREATE TABLE IF NOT EXISTS `qa_ce_spectrum_range` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `qa_ce_spectrum_range_value` varchar(256) DEFAULT NULL, - PRIMARY KEY (`qa_ce_spectrum_range_id`), - UNIQUE KEY `colletion_element_value` (`qa_ce_spectrum_range_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `qa_ce_spectrum_range_value` varchar(256) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `qa_ce_spectrum_range` @@ -28995,8 +28587,8 @@ INSERT INTO `qa_ce_spectrum_range` (`qa_ce_spectrum_range_id`, `reference_type`, -- Table structure for table `qa_collection_element_action` -- -CREATE TABLE IF NOT EXISTS `qa_collection_element_action` ( - `qa_collection_element_action_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_collection_element_action` ( + `qa_collection_element_action_id` int(12) NOT NULL, `qa_collection_element_header_id` int(12) NOT NULL, `action_condition` varchar(5) NOT NULL, `comparison` varchar(10) DEFAULT NULL, @@ -29009,9 +28601,8 @@ CREATE TABLE IF NOT EXISTS `qa_collection_element_action` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`qa_collection_element_action_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `qa_collection_element_action` @@ -29026,8 +28617,8 @@ INSERT INTO `qa_collection_element_action` (`qa_collection_element_action_id`, ` -- Table structure for table `qa_collection_element_header` -- -CREATE TABLE IF NOT EXISTS `qa_collection_element_header` ( - `qa_collection_element_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_collection_element_header` ( + `qa_collection_element_header_id` int(12) NOT NULL, `element_name` varchar(50) NOT NULL, `sys_element_name` varchar(50) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -29052,11 +28643,8 @@ CREATE TABLE IF NOT EXISTS `qa_collection_element_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`qa_collection_element_header_id`), - UNIQUE KEY `element_name` (`element_name`), - UNIQUE KEY `sys_element_name` (`sys_element_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `qa_collection_element_header` @@ -29078,8 +28666,8 @@ INSERT INTO `qa_collection_element_header` (`qa_collection_element_header_id`, ` -- Table structure for table `qa_collection_element_line` -- -CREATE TABLE IF NOT EXISTS `qa_collection_element_line` ( - `qa_collection_element_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_collection_element_line` ( + `qa_collection_element_line_id` int(12) NOT NULL, `qa_collection_element_header_id` int(12) NOT NULL, `element_value` varchar(50) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -29087,9 +28675,8 @@ CREATE TABLE IF NOT EXISTS `qa_collection_element_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`qa_collection_element_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `qa_collection_element_line` @@ -29107,8 +28694,8 @@ INSERT INTO `qa_collection_element_line` (`qa_collection_element_line_id`, `qa_c -- Table structure for table `qa_cp_assignment_header` -- -CREATE TABLE IF NOT EXISTS `qa_cp_assignment_header` ( - `qa_cp_assignment_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_cp_assignment_header` ( + `qa_cp_assignment_header_id` int(12) NOT NULL, `qa_cp_header_id` int(12) NOT NULL, `inv_transaction_id` int(12) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -29119,9 +28706,8 @@ CREATE TABLE IF NOT EXISTS `qa_cp_assignment_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`qa_cp_assignment_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `qa_cp_assignment_header` @@ -29136,8 +28722,8 @@ INSERT INTO `qa_cp_assignment_header` (`qa_cp_assignment_header_id`, `qa_cp_head -- Table structure for table `qa_cp_assignment_line` -- -CREATE TABLE IF NOT EXISTS `qa_cp_assignment_line` ( - `qa_cp_assignment_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_cp_assignment_line` ( + `qa_cp_assignment_line_id` int(12) NOT NULL, `qa_cp_assignment_header_id` int(12) NOT NULL, `qa_cp_header_id` int(12) NOT NULL, `trigger_name` varchar(25) NOT NULL, @@ -29149,9 +28735,8 @@ CREATE TABLE IF NOT EXISTS `qa_cp_assignment_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`qa_cp_assignment_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `qa_cp_assignment_line` @@ -29166,8 +28751,8 @@ INSERT INTO `qa_cp_assignment_line` (`qa_cp_assignment_line_id`, `qa_cp_assignme -- Table structure for table `qa_cp_header` -- -CREATE TABLE IF NOT EXISTS `qa_cp_header` ( - `qa_cp_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_cp_header` ( + `qa_cp_header_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `plan_name` varchar(50) NOT NULL, `effective_from` date NOT NULL, @@ -29179,9 +28764,8 @@ CREATE TABLE IF NOT EXISTS `qa_cp_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`qa_cp_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `qa_cp_header` @@ -29197,8 +28781,8 @@ INSERT INTO `qa_cp_header` (`qa_cp_header_id`, `org_id`, `plan_name`, `effective -- Table structure for table `qa_cp_line` -- -CREATE TABLE IF NOT EXISTS `qa_cp_line` ( - `qa_cp_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_cp_line` ( + `qa_cp_line_id` int(12) NOT NULL, `qa_cp_header_id` int(12) NOT NULL, `qa_collection_element_header_id` int(12) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -29213,9 +28797,8 @@ CREATE TABLE IF NOT EXISTS `qa_cp_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`qa_cp_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `qa_cp_line` @@ -29243,8 +28826,8 @@ INSERT INTO `qa_cp_line` (`qa_cp_line_id`, `qa_cp_header_id`, `qa_collection_ele -- Table structure for table `qa_specification_header` -- -CREATE TABLE IF NOT EXISTS `qa_specification_header` ( - `qa_specification_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_specification_header` ( + `qa_specification_header_id` int(12) NOT NULL, `specification_name` varchar(50) NOT NULL, `effective_from` date NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -29257,9 +28840,8 @@ CREATE TABLE IF NOT EXISTS `qa_specification_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`qa_specification_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -29267,8 +28849,8 @@ CREATE TABLE IF NOT EXISTS `qa_specification_header` ( -- Table structure for table `qa_specification_line` -- -CREATE TABLE IF NOT EXISTS `qa_specification_line` ( - `qa_specification_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `qa_specification_line` ( + `qa_specification_line_id` int(12) NOT NULL, `qa_specification_header_id` int(12) NOT NULL, `qa_collection_element_header_id` int(12) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -29286,9 +28868,8 @@ CREATE TABLE IF NOT EXISTS `qa_specification_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`qa_specification_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -29296,17 +28877,16 @@ CREATE TABLE IF NOT EXISTS `qa_specification_line` ( -- Table structure for table `role_access` -- -CREATE TABLE IF NOT EXISTS `role_access` ( - `role_access_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `role_access` ( + `role_access_id` int(12) NOT NULL, `role_code` varchar(25) NOT NULL, `obj_class_name` varchar(100) NOT NULL, `access_level` int(5) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`role_access_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=68 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `role_access` @@ -29370,16 +28950,15 @@ INSERT INTO `role_access` (`role_access_id`, `role_code`, `obj_class_name`, `acc -- Table structure for table `role_path` -- -CREATE TABLE IF NOT EXISTS `role_path` ( - `role_path_id` int(12) unsigned NOT NULL AUTO_INCREMENT, - `role_id` int(12) unsigned NOT NULL, - `path_id` int(12) unsigned DEFAULT NULL, +CREATE TABLE `role_path` ( + `role_path_id` int(12) UNSIGNED NOT NULL, + `role_id` int(12) UNSIGNED NOT NULL, + `path_id` int(12) UNSIGNED DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`role_path_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `role_path` @@ -29408,7 +28987,7 @@ INSERT INTO `role_path` (`role_path_id`, `role_id`, `path_id`, `created_by`, `cr -- -- Stand-in structure for view `sd_delivery_all_v` -- -CREATE TABLE IF NOT EXISTS `sd_delivery_all_v` ( +CREATE TABLE `sd_delivery_all_v` ( `sd_delivery_header_id` int(12) ,`delivery_number` varchar(25) ,`carrier` varchar(256) @@ -29476,14 +29055,15 @@ CREATE TABLE IF NOT EXISTS `sd_delivery_all_v` ( ,`website_b` varchar(200) ,`sales_person` varchar(102) ); + -- -------------------------------------------------------- -- -- Table structure for table `sd_delivery_header` -- -CREATE TABLE IF NOT EXISTS `sd_delivery_header` ( - `sd_delivery_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_delivery_header` ( + `sd_delivery_header_id` int(12) NOT NULL, `delivery_number` varchar(25) DEFAULT NULL, `comment` varchar(256) DEFAULT NULL, `shipping_org_id` int(12) NOT NULL, @@ -29504,9 +29084,8 @@ CREATE TABLE IF NOT EXISTS `sd_delivery_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`sd_delivery_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=254 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_delivery_header` @@ -29697,8 +29276,8 @@ INSERT INTO `sd_delivery_header` (`sd_delivery_header_id`, `delivery_number`, `c -- Table structure for table `sd_delivery_line` -- -CREATE TABLE IF NOT EXISTS `sd_delivery_line` ( - `sd_delivery_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_delivery_line` ( + `sd_delivery_line_id` int(12) NOT NULL, `sd_delivery_header_id` int(12) DEFAULT NULL, `sd_so_header_id` int(12) NOT NULL, `sd_so_line_id` int(12) NOT NULL, @@ -29722,9 +29301,8 @@ CREATE TABLE IF NOT EXISTS `sd_delivery_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`sd_delivery_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=250 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_delivery_line` @@ -29905,8 +29483,8 @@ INSERT INTO `sd_delivery_line` (`sd_delivery_line_id`, `sd_delivery_header_id`, -- Table structure for table `sd_document_relation` -- -CREATE TABLE IF NOT EXISTS `sd_document_relation` ( - `mdm_price_list_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_document_relation` ( + `mdm_price_list_header_id` int(12) NOT NULL, `price_list` varchar(25) NOT NULL, `module_name` enum('PO','SD','','') NOT NULL, `currency_code` varchar(25) NOT NULL, @@ -29917,11 +29495,8 @@ CREATE TABLE IF NOT EXISTS `sd_document_relation` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`mdm_price_list_header_id`), - UNIQUE KEY `org_id` (`module_name`,`currency_code`), - UNIQUE KEY `price_list` (`price_list`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -29929,8 +29504,8 @@ CREATE TABLE IF NOT EXISTS `sd_document_relation` ( -- Table structure for table `sd_document_type` -- -CREATE TABLE IF NOT EXISTS `sd_document_type` ( - `sd_document_type_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_document_type` ( + `sd_document_type_id` int(12) NOT NULL, `document_type_name` varchar(25) NOT NULL, `bu_org_id_r` int(12) DEFAULT NULL, `level` enum('HEADER','LINE','','') NOT NULL, @@ -29948,10 +29523,8 @@ CREATE TABLE IF NOT EXISTS `sd_document_type` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sd_document_type_id`), - UNIQUE KEY `document_type_name` (`document_type_name`,`bu_org_id_r`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_document_type` @@ -29970,8 +29543,8 @@ INSERT INTO `sd_document_type` (`sd_document_type_id`, `document_type_name`, `bu -- Table structure for table `sd_lead` -- -CREATE TABLE IF NOT EXISTS `sd_lead` ( - `sd_lead_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_lead` ( + `sd_lead_id` int(12) UNSIGNED NOT NULL, `lead_number` varchar(25) NOT NULL, `primary_contact_id` int(12) DEFAULT NULL, `subject` varchar(256) NOT NULL, @@ -30003,13 +29576,8 @@ CREATE TABLE IF NOT EXISTS `sd_lead` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sd_lead_id`), - UNIQUE KEY `job_code` (`lead_number`), - UNIQUE KEY `job_code_2` (`lead_number`), - UNIQUE KEY `job_name` (`last_name`), - UNIQUE KEY `job_name_2` (`last_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_lead` @@ -30029,8 +29597,8 @@ INSERT INTO `sd_lead` (`sd_lead_id`, `lead_number`, `primary_contact_id`, `subje -- Table structure for table `sd_opportunity` -- -CREATE TABLE IF NOT EXISTS `sd_opportunity` ( - `sd_opportunity_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_opportunity` ( + `sd_opportunity_id` int(12) UNSIGNED NOT NULL, `sd_lead_id` int(12) DEFAULT NULL, `bu_org_id` int(12) DEFAULT NULL, `opportunity_number` varchar(25) DEFAULT NULL, @@ -30069,13 +29637,8 @@ CREATE TABLE IF NOT EXISTS `sd_opportunity` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sd_opportunity_id`), - UNIQUE KEY `job_code` (`opportunity_number`), - UNIQUE KEY `job_code_2` (`opportunity_number`), - UNIQUE KEY `job_name` (`last_name`), - UNIQUE KEY `job_name_2` (`last_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_opportunity` @@ -30087,7 +29650,7 @@ INSERT INTO `sd_opportunity` (`sd_opportunity_id`, `sd_lead_id`, `bu_org_id`, `o (3, 2, NULL, '2-2', NULL, 'TEST lead 01 - As in Lead ', NULL, 'ATEST 01', 'ENTERED', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 80, NULL, NULL, NULL, NULL, 1, NULL, 2, NULL, NULL, '1', 'Lead id 2', 'CAMPUS_VISIT', NULL, NULL, NULL, NULL, 34, '2014-12-09 11:05:29', 34, '2014-12-29 09:06:32'), (4, 2, NULL, '11', NULL, 'TEST lead 01 - As in Lead ', NULL, 'ATEST 01 - As in Lead ', 'ENTERED', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 88, NULL, NULL, NULL, NULL, 1, NULL, 2, NULL, '121', '1', 'Lead Id', 'CAMPUS_VISIT', NULL, NULL, NULL, NULL, 34, '2014-12-09 11:11:02', 34, '2015-06-22 16:38:44'), (5, 7, NULL, NULL, NULL, 'LD101', NULL, ' - As in Lead ', 'ENTERED', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Lead id 7', 'ALMUNI_VISIT', NULL, NULL, NULL, NULL, 34, '2015-07-16 09:22:03', 34, '2015-07-16 09:22:03'), -(6, 7, 5, 'OP100', NULL, 'LD101', NULL, ' - As in Lead ', 'CONVERTED_OPPORTUNITY', 0, 'USD', '0.00000', '0000-00-00', '', '', '', '', '', '', 87, '', '', '', '', 1, 3, 0, 0, '', '', 'Lead id 7', 'ALMUNI_VISIT', NULL, NULL, NULL, '', 34, '2015-07-16 09:23:45', 34, '2016-01-12 02:41:02'), +(6, 7, NULL, NULL, NULL, 'LD101', NULL, ' - As in Lead ', 'ENTERED', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Lead id 7', 'ALMUNI_VISIT', NULL, NULL, NULL, NULL, 34, '2015-07-16 09:23:45', 34, '2015-07-16 09:23:45'), (7, 7, 5, 'OP001', NULL, 'LD101', NULL, ' - As in Lead ', 'CONVERTED_OPPORTUNITY', 0, '', '0.00000', '0000-00-00', 'das11', 'Nishit', '', '', '', '', 104, '', '', '', '', 1, 3, 4, 0, '', '', 'Lead id 7', 'ALMUNI_VISIT', NULL, NULL, NULL, '', 34, '2015-07-16 09:23:49', 34, '2016-01-05 10:02:05'); -- -------------------------------------------------------- @@ -30095,7 +29658,7 @@ INSERT INTO `sd_opportunity` (`sd_opportunity_id`, `sd_lead_id`, `bu_org_id`, `o -- -- Stand-in structure for view `sd_pick_list_v` -- -CREATE TABLE IF NOT EXISTS `sd_pick_list_v` ( +CREATE TABLE `sd_pick_list_v` ( `sd_so_header_id` int(12) ,`bu_org_id` int(12) ,`document_type` int(12) @@ -30150,14 +29713,15 @@ CREATE TABLE IF NOT EXISTS `sd_pick_list_v` ( ,`last_update_by` int(12) ,`last_update_date` datetime ); + -- -------------------------------------------------------- -- -- Table structure for table `sd_quote_header` -- -CREATE TABLE IF NOT EXISTS `sd_quote_header` ( - `sd_quote_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_quote_header` ( + `sd_quote_header_id` int(12) NOT NULL, `bu_org_id` int(12) DEFAULT NULL, `quote_number` varchar(50) DEFAULT NULL, `sd_lead_id` int(12) DEFAULT NULL, @@ -30190,9 +29754,8 @@ CREATE TABLE IF NOT EXISTS `sd_quote_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`sd_quote_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_quote_header` @@ -30203,8 +29766,7 @@ INSERT INTO `sd_quote_header` (`sd_quote_header_id`, `bu_org_id`, `quote_number` (2, NULL, '2', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, 88, 87, NULL, NULL, NULL, 'SGD', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2014-12-29 09:20:03', 34, '2015-03-09 15:26:45'), (3, NULL, '3', 7, 7, NULL, NULL, 1, 3, NULL, 'ENTERED', NULL, 'LD101', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'sd_opportunity_id', 7, NULL, NULL, 34, '2015-07-17 07:30:04', 34, '2015-07-17 07:30:04'), (4, NULL, '4', NULL, 7, NULL, NULL, 1, 3, 4, NULL, NULL, 'LD101', 103, 89, NULL, NULL, NULL, 'DZD', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-05 10:02:05', 34, '2016-01-05 10:08:55'), -(5, NULL, '5', 7, 6, NULL, NULL, 1, 3, NULL, 'ENTERED', NULL, 'LD101', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'sd_opportunity_id', 6, NULL, NULL, 34, '2016-01-12 02:40:20', 34, '2016-01-12 02:40:20'), -(6, NULL, '6', NULL, 6, NULL, NULL, 1, 3, NULL, NULL, NULL, 'LD101', 102, 99, NULL, NULL, NULL, 'STD', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-12 02:41:02', 34, '2016-01-12 08:01:37'); +(5, NULL, '5', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, 103, 88, NULL, NULL, NULL, 'USD', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-02-19 07:30:38', 34, '2016-02-19 07:30:38'); -- -------------------------------------------------------- @@ -30212,8 +29774,8 @@ INSERT INTO `sd_quote_header` (`sd_quote_header_id`, `bu_org_id`, `quote_number` -- Table structure for table `sd_quote_line` -- -CREATE TABLE IF NOT EXISTS `sd_quote_line` ( - `sd_quote_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_quote_line` ( + `sd_quote_line_id` int(12) NOT NULL, `sd_quote_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, `shipping_org_id` int(12) NOT NULL, @@ -30231,8 +29793,8 @@ CREATE TABLE IF NOT EXISTS `sd_quote_line` ( `promise_date` date DEFAULT NULL, `reference_doc_type` int(12) DEFAULT NULL, `reference_doc_number` int(12) DEFAULT NULL, - `sd_so_header_id` int(12) unsigned DEFAULT NULL, - `sd_so_line_id` int(12) unsigned DEFAULT NULL, + `sd_so_header_id` int(12) UNSIGNED DEFAULT NULL, + `sd_so_line_id` int(12) UNSIGNED DEFAULT NULL, `line_type` varchar(25) DEFAULT NULL, `destination_type` varchar(25) DEFAULT NULL, `line_description` varchar(256) DEFAULT NULL, @@ -30244,9 +29806,8 @@ CREATE TABLE IF NOT EXISTS `sd_quote_line` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime NOT NULL, `rev_enabled_cb` tinyint(1) DEFAULT NULL, - `rev_number` int(12) DEFAULT NULL, - PRIMARY KEY (`sd_quote_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `rev_number` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_quote_line` @@ -30256,7 +29817,7 @@ INSERT INTO `sd_quote_line` (`sd_quote_line_id`, `sd_quote_header_id`, `line_num (1, 1, 1, 6, 10038, 'MI Monitor A 01', '12.00000', NULL, '2014-12-17', '100.00000', '1200.00000', '122.40000', 3, 'ENTERED', '2014-12-10', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '27', NULL, NULL, 1, '2014-12-09 17:06:05', 1, '2014-12-09 17:06:05', NULL, NULL), (2, 2, 1, 6, 10038, 'MI Monitor A 01', '12.00000', NULL, NULL, '99.00000', '1.00000', '121.17600', 3, 'ENTERED', '2015-03-09', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '27', NULL, NULL, 34, '2014-12-29 09:20:27', 34, '2015-03-09 15:26:45', NULL, NULL), (3, 4, 1, 6, 10036, 'MI CPU A 01', '12.00000', NULL, '2016-01-13', '200.00000', '2400.00000', '242.40000', 3, 'ENTERED', '2016-01-05', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '27', NULL, NULL, 34, '2016-01-05 10:08:55', 34, '2016-01-05 10:08:55', NULL, NULL), -(5, 6, 1, 6, 10048, 'MI Level 4 A TEST01', '100.00000', NULL, NULL, '12.00000', '1.00000', '121.20000', 3, 'ENTERED', '2016-01-12', '2016-01-27', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '27', NULL, NULL, 34, '2016-01-12 03:00:13', 34, '2016-01-12 03:03:28', NULL, NULL); +(4, 5, 1, 6, 10036, 'MI CPU A 01', '20.00000', NULL, NULL, '100.00000', '2000.00000', '202.00000', 3, 'ENTERED', '2016-02-19', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '27', NULL, NULL, 34, '2016-02-19 07:31:00', 34, '2016-02-19 07:31:00', NULL, NULL); -- -------------------------------------------------------- @@ -30264,8 +29825,8 @@ INSERT INTO `sd_quote_line` (`sd_quote_line_id`, `sd_quote_header_id`, `line_num -- Table structure for table `sd_sales_control` -- -CREATE TABLE IF NOT EXISTS `sd_sales_control` ( - `sd_sales_control_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_sales_control` ( + `sd_sales_control_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `ar_transaction_type_id` int(12) DEFAULT NULL, `mdm_price_list_header_id` int(12) DEFAULT NULL, @@ -30273,28 +29834,25 @@ CREATE TABLE IF NOT EXISTS `sd_sales_control` ( `default_requested_date_cb` tinyint(1) DEFAULT NULL, `default_schedule_ship_date_cb` tinyint(1) DEFAULT NULL, `default_promise_date_cb` tinyint(1) DEFAULT NULL, - `h_default_document_type_id` int(12) DEFAULT NULL, - `l_default_document_type_id` int(12) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sd_sales_control_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_sales_control` -- -INSERT INTO `sd_sales_control` (`sd_sales_control_id`, `org_id`, `ar_transaction_type_id`, `mdm_price_list_header_id`, `deffer_invoicing_cb`, `default_requested_date_cb`, `default_schedule_ship_date_cb`, `default_promise_date_cb`, `h_default_document_type_id`, `l_default_document_type_id`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES -(1, 5, NULL, 2, NULL, 1, 1, 1, 1, 2, 34, '2015-02-20 10:14:47', 34, '2016-01-12 03:35:52'); +INSERT INTO `sd_sales_control` (`sd_sales_control_id`, `org_id`, `ar_transaction_type_id`, `mdm_price_list_header_id`, `deffer_invoicing_cb`, `default_requested_date_cb`, `default_schedule_ship_date_cb`, `default_promise_date_cb`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(1, 5, NULL, 2, NULL, 1, 1, 1, 34, '2015-02-20 10:14:47', 34, '2015-02-27 18:35:28'); -- -------------------------------------------------------- -- -- Stand-in structure for view `sd_sales_documents_v` -- -CREATE TABLE IF NOT EXISTS `sd_sales_documents_v` ( +CREATE TABLE `sd_sales_documents_v` ( `document_id` int(12) unsigned ,`docuemnt_number` varchar(50) ,`sales_team` varchar(25) @@ -30302,14 +29860,15 @@ CREATE TABLE IF NOT EXISTS `sd_sales_documents_v` ( ,`document_type` varchar(11) ,`status` varchar(25) ); + -- -------------------------------------------------------- -- -- Table structure for table `sd_shipping_control` -- -CREATE TABLE IF NOT EXISTS `sd_shipping_control` ( - `sd_shipping_control_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_shipping_control` ( + `sd_shipping_control_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `ef_id` int(12) DEFAULT NULL, `rev_enabled` enum('enabled','disabled','','') DEFAULT NULL, @@ -30326,16 +29885,15 @@ CREATE TABLE IF NOT EXISTS `sd_shipping_control` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sd_shipping_control_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_shipping_control` -- INSERT INTO `sd_shipping_control` (`sd_shipping_control_id`, `org_id`, `ef_id`, `rev_enabled`, `rev_number`, `staging_subinventory_id`, `staging_locator_id`, `default_picking_rule_id`, `delivery_onpicking_cb`, `autosplit_onpicking_cb`, `deffer_invoicing_cb`, `default_requested_date_cb`, `default_schedule_ship_date_cb`, `default_promise_date_cb`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES -(4, 6, NULL, NULL, 11, 1, 1, NULL, 1, NULL, NULL, 1, 1, 1, 0, '2014-07-10 00:00:00', 34, '2016-01-12 03:31:13'), +(4, 6, NULL, NULL, 11, 1, 1, NULL, 1, NULL, NULL, 1, 1, 1, 0, '2014-07-10 00:00:00', 34, '2015-06-23 04:07:33'), (5, 9, NULL, NULL, NULL, 38, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-07-10 00:00:00', 0, '2014-07-10 00:00:00'); -- -------------------------------------------------------- @@ -30343,7 +29901,7 @@ INSERT INTO `sd_shipping_control` (`sd_shipping_control_id`, `org_id`, `ef_id`, -- -- Stand-in structure for view `sd_so_all_v` -- -CREATE TABLE IF NOT EXISTS `sd_so_all_v` ( +CREATE TABLE `sd_so_all_v` ( `sd_so_header_id` int(12) ,`bu_org_id` int(12) ,`document_type` int(12) @@ -30397,14 +29955,15 @@ CREATE TABLE IF NOT EXISTS `sd_so_all_v` ( ,`last_update_date` datetime ,`sales_person` varchar(102) ); + -- -------------------------------------------------------- -- -- Table structure for table `sd_so_header` -- -CREATE TABLE IF NOT EXISTS `sd_so_header` ( - `sd_so_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_so_header` ( + `sd_so_header_id` int(12) NOT NULL, `bu_org_id` int(12) NOT NULL, `document_type` int(12) NOT NULL, `so_number` varchar(50) DEFAULT NULL, @@ -30442,10 +30001,8 @@ CREATE TABLE IF NOT EXISTS `sd_so_header` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime NOT NULL, `rev_enabled_cb` tinyint(1) DEFAULT NULL, - `rev_number` int(12) DEFAULT NULL, - PRIMARY KEY (`sd_so_header_id`), - UNIQUE KEY `order_reference_table` (`order_reference_table`,`order_reference_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=138 ; + `rev_number` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_so_header` @@ -30555,18 +30112,7 @@ INSERT INTO `sd_so_header` (`sd_so_header_id`, `bu_org_id`, `document_type`, `so (123, 5, 1, '5-123', 8, NULL, NULL, NULL, 103, 103, NULL, '70.00000', NULL, NULL, 'USD', NULL, NULL, NULL, 2, '2015-09-23', NULL, NULL, 'CORP', NULL, NULL, 'ECOMMERCE', 'ec_confirm_order', 19, 'ENTERED', NULL, NULL, NULL, NULL, -99, '2015-09-23 05:32:12', -99, '2015-09-23 05:32:12', NULL, NULL), (124, 5, 1, '5-124', 8, NULL, NULL, NULL, 103, 103, NULL, '80.00000', NULL, NULL, 'USD', NULL, NULL, NULL, 2, '2015-09-23', NULL, NULL, 'CORP', NULL, NULL, 'ECOMMERCE', 'ec_confirm_order', 20, 'ENTERED', NULL, NULL, NULL, NULL, -99, '2015-09-23 05:32:12', -99, '2015-09-23 05:32:12', NULL, NULL), (125, 5, 1, '5-125', 8, NULL, NULL, NULL, 103, 103, NULL, '70.00000', NULL, NULL, 'USD', NULL, NULL, 'USD', 2, '2015-09-23', NULL, NULL, 'CORP', NULL, NULL, 'ECOMMERCE', 'ec_confirm_order', 21, 'BOOKED', NULL, NULL, NULL, NULL, -99, '2015-09-23 05:46:53', 34, '2015-09-23 05:48:21', NULL, NULL), -(126, 5, 1, '5-126', 2, 4, NULL, NULL, 86, 83, NULL, NULL, NULL, NULL, 'USD', NULL, NULL, 'USD', 2, '2015-09-23', NULL, NULL, 'CORP', '1.00000', NULL, 'MANUAL', NULL, NULL, 'BOOKED', NULL, NULL, NULL, NULL, 34, '2015-09-23 09:37:48', 34, '2015-09-23 09:38:15', NULL, NULL), -(127, 5, 1, '5-127', 2, 4, NULL, NULL, 86, 83, NULL, NULL, NULL, NULL, 'USD', NULL, NULL, 'USD', 2, '2015-09-23', NULL, NULL, 'CORP', '1.00000', NULL, 'MANUAL', NULL, NULL, 'ENTERED', NULL, NULL, NULL, NULL, 34, '2016-01-07 13:34:11', 34, '2016-01-07 13:34:49', NULL, NULL), -(128, 5, 1, '5-128', 2, 4, NULL, NULL, 86, 83, NULL, NULL, NULL, NULL, 'USD', NULL, NULL, 'USD', 2, '2015-09-23', NULL, NULL, 'CORP', '1.00000', NULL, 'MANUAL', NULL, NULL, 'ENTERED', NULL, NULL, NULL, NULL, 34, '2016-01-07 13:37:40', 34, '2016-01-07 13:37:40', NULL, NULL), -(129, 5, 1, '5-129', 2, 4, NULL, NULL, 86, 83, NULL, NULL, NULL, NULL, 'USD', NULL, NULL, 'USD', 2, '2015-09-23', NULL, NULL, 'CORP', '1.00000', NULL, 'MANUAL', NULL, NULL, 'ENTERED', NULL, NULL, NULL, NULL, 34, '2016-01-07 13:37:40', 34, '2016-01-07 13:37:40', NULL, NULL), -(130, 5, 1, '5-130', 2, 4, NULL, NULL, 86, 83, NULL, NULL, NULL, NULL, 'USD', NULL, NULL, 'USD', 2, '2015-09-23', NULL, NULL, 'CORP', '1.00000', NULL, 'MANUAL', NULL, NULL, 'ENTERED', NULL, NULL, NULL, NULL, 34, '2016-01-07 13:37:40', 34, '2016-01-07 13:37:40', NULL, NULL), -(131, 5, 1, '5-131', 2, 4, NULL, NULL, 86, 83, NULL, NULL, NULL, NULL, 'USD', NULL, NULL, 'USD', 2, '2015-09-23', NULL, NULL, 'CORP', '1.00000', NULL, 'MANUAL', NULL, NULL, 'ENTERED', NULL, NULL, NULL, NULL, 34, '2016-01-07 13:37:40', 34, '2016-01-07 13:37:40', NULL, NULL), -(132, 5, 1, '5-132', 2, 4, NULL, NULL, 86, 83, NULL, NULL, NULL, NULL, 'USD', NULL, NULL, 'USD', 2, '2015-09-23', NULL, NULL, 'CORP', '1.00000', NULL, 'MANUAL', NULL, NULL, 'ENTERED', NULL, NULL, NULL, NULL, 34, '2016-01-07 13:37:41', 34, '2016-01-07 13:37:41', NULL, NULL), -(133, 5, 1, '5-133', 2, 4, NULL, NULL, 86, 83, NULL, NULL, NULL, NULL, 'USD', NULL, NULL, 'USD', 2, '2015-09-23', NULL, NULL, 'CORP', '1.00000', NULL, 'MANUAL', NULL, NULL, 'BOOKED', NULL, NULL, NULL, NULL, 34, '2016-01-07 13:39:22', 34, '2016-01-07 13:41:59', NULL, NULL), -(134, 5, 1, '5-134', 1, 3, NULL, 'LD101', 102, 99, NULL, '0.01000', NULL, NULL, 'STD', NULL, NULL, 'USD', 1, NULL, NULL, NULL, 'CORP', NULL, NULL, 'QUOTE', NULL, NULL, 'ENTERED', NULL, NULL, NULL, NULL, 34, '2016-01-12 07:59:12', 34, '2016-01-12 07:59:12', NULL, NULL), -(135, 5, 1, '5-135', 1, 3, NULL, 'LD101', 102, 99, NULL, '0.01000', NULL, NULL, 'STD', NULL, NULL, 'USD', 1, NULL, NULL, NULL, 'CORP', NULL, NULL, 'QUOTE', NULL, NULL, 'ENTERED', NULL, NULL, NULL, NULL, 34, '2016-01-12 08:00:00', 34, '2016-01-12 08:00:00', NULL, NULL), -(136, 5, 1, '5-136', 1, 3, NULL, 'LD101', 102, 99, NULL, '0.01000', NULL, NULL, 'STD', NULL, NULL, 'USD', 1, NULL, NULL, NULL, 'CORP', NULL, NULL, 'QUOTE', NULL, NULL, 'ENTERED', NULL, NULL, NULL, NULL, 34, '2016-01-12 08:00:29', 34, '2016-01-12 08:00:29', NULL, NULL), -(137, 5, 1, '5-137', 1, 3, 0, 'LD101', 102, 99, 0, '1.00000', NULL, '0.00000', 'STD', NULL, NULL, 'USD', 1, NULL, NULL, NULL, 'CORP', '0.00000', NULL, 'QUOTE', NULL, NULL, 'ENTERED', NULL, NULL, NULL, NULL, 34, '2016-01-12 08:01:37', 34, '2016-01-12 08:01:37', 0, 0); +(126, 5, 1, '5-126', 2, 4, NULL, NULL, 86, 83, NULL, NULL, NULL, NULL, 'USD', NULL, NULL, 'USD', 2, '2015-09-23', NULL, NULL, 'CORP', '1.00000', NULL, 'MANUAL', NULL, NULL, 'BOOKED', NULL, NULL, NULL, NULL, 34, '2015-09-23 09:37:48', 34, '2015-09-23 09:38:15', NULL, NULL); -- -------------------------------------------------------- @@ -30574,8 +30120,8 @@ INSERT INTO `sd_so_header` (`sd_so_header_id`, `bu_org_id`, `document_type`, `so -- Table structure for table `sd_so_line` -- -CREATE TABLE IF NOT EXISTS `sd_so_line` ( - `sd_so_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_so_line` ( + `sd_so_line_id` int(12) NOT NULL, `sd_so_header_id` int(12) NOT NULL, `line_number` int(12) NOT NULL, `shipping_org_id` int(12) NOT NULL, @@ -30600,8 +30146,8 @@ CREATE TABLE IF NOT EXISTS `sd_so_line` ( `actual_ship_date` date DEFAULT NULL, `reference_doc_type` int(12) DEFAULT NULL, `reference_doc_number` int(12) DEFAULT NULL, - `ar_transaction_header_id` int(12) unsigned DEFAULT NULL, - `ar_transaction_line_id` int(12) unsigned DEFAULT NULL, + `ar_transaction_header_id` int(12) UNSIGNED DEFAULT NULL, + `ar_transaction_line_id` int(12) UNSIGNED DEFAULT NULL, `line_type` varchar(25) DEFAULT NULL, `supply_source` varchar(25) DEFAULT NULL, `destination_type` varchar(25) DEFAULT NULL, @@ -30616,11 +30162,8 @@ CREATE TABLE IF NOT EXISTS `sd_so_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`sd_so_line_id`), - UNIQUE KEY `sd_so_header_id_2` (`sd_so_header_id`,`line_number`), - UNIQUE KEY `sd_so_header_id` (`sd_so_header_id`,`item_id_m`,`requested_date`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=208 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_so_line` @@ -30770,18 +30313,7 @@ INSERT INTO `sd_so_line` (`sd_so_line_id`, `sd_so_header_id`, `line_number`, `sh (191, 124, 1, 6, 10191, 'Lenovo G50 15.6-Inch Laptop (80E501B2US) Black', '1.00000', NULL, NULL, NULL, NULL, NULL, '80.00000', '80.00000', NULL, NULL, NULL, 0, 'ENTERED', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2', 'INV', NULL, 'product_name : 1', '27', NULL, NULL, NULL, NULL, NULL, NULL, -99, '2015-09-23 05:32:12', -99, '2015-09-23 05:32:12'); INSERT INTO `sd_so_line` (`sd_so_line_id`, `sd_so_header_id`, `line_number`, `shipping_org_id`, `item_id_m`, `item_description`, `line_quantity`, `picked_quantity`, `shipped_quantity`, `invoiced_quantity`, `price_list_header_id`, `price_date`, `unit_price`, `line_price`, `tax_amount`, `gl_line_price`, `gl_tax_amount`, `tax_code_id`, `line_status`, `requested_date`, `promise_date`, `schedule_ship_date`, `actual_ship_date`, `reference_doc_type`, `reference_doc_number`, `ar_transaction_header_id`, `ar_transaction_line_id`, `line_type`, `supply_source`, `destination_type`, `line_description`, `uom_id`, `kit_cb`, `kit_configured_cb`, `bom_config_header_id`, `wip_wo_header_id`, `so_status`, `sys_spd_header_id`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES (192, 125, 1, 6, 10197, 'Lenovo G70 17.3-Inch Laptop (80HW000WUS) Black', '1.00000', NULL, NULL, NULL, 1, '2015-09-23', '70.00000', '70.00000', NULL, NULL, NULL, NULL, 'AWAITING_PICKING', '2015-09-23', '2015-09-23', '2015-09-23', NULL, NULL, NULL, NULL, NULL, '2', 'INV', 'EXTERNAL', 'product_name : 1', '27', NULL, NULL, NULL, NULL, NULL, NULL, -99, '2015-09-23 05:46:53', 34, '2015-09-23 05:48:21'), -(193, 126, 2, 6, 10240, 'MI_T1_FG01', '1.00000', '1.00000', '1.00000', '1.00000', 1, '2015-09-23', '121.00000', '121.00000', NULL, '121.00000', NULL, NULL, 'CLOSED', '2015-09-23', '2015-09-23', '2015-09-23', '2015-09-23', NULL, NULL, 77, 82, '2', 'INV', 'EXTERNAL', NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-23 09:37:49', 34, '2015-09-23 10:31:20'), -(194, 127, 2, 6, 10240, 'MI_T1_FG01', '1.00000', NULL, NULL, NULL, 1, '2015-09-23', '121.00000', '121.00000', NULL, '121.00000', NULL, NULL, 'AWAITING_PICKING', '2015-09-23', '2015-09-23', '2016-01-07', NULL, NULL, NULL, NULL, NULL, '2', 'INV', 'EXTERNAL', NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 13:34:11', 34, '2016-01-07 13:34:49'), -(195, 128, 2, 6, 10240, 'MI_T1_FG01', '1.00000', NULL, NULL, NULL, 1, '2015-09-23', '121.00000', '121.00000', NULL, '121.00000', NULL, NULL, 'ENTERED', '2015-09-23', '2015-09-23', NULL, NULL, NULL, NULL, NULL, NULL, '2', 'INV', 'EXTERNAL', NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 13:37:41', 34, '2016-01-07 13:37:41'), -(196, 129, 2, 6, 10240, 'MI_T1_FG01', '1.00000', NULL, NULL, NULL, 1, '2015-09-23', '121.00000', '121.00000', NULL, '121.00000', NULL, NULL, 'ENTERED', '2015-09-23', '2015-09-23', NULL, NULL, NULL, NULL, NULL, NULL, '2', 'INV', 'EXTERNAL', NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 13:37:41', 34, '2016-01-07 13:37:41'), -(197, 130, 2, 6, 10240, 'MI_T1_FG01', '1.00000', NULL, NULL, NULL, 1, '2015-09-23', '121.00000', '121.00000', NULL, '121.00000', NULL, NULL, 'ENTERED', '2015-09-23', '2015-09-23', NULL, NULL, NULL, NULL, NULL, NULL, '2', 'INV', 'EXTERNAL', NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 13:37:41', 34, '2016-01-07 13:37:41'), -(198, 131, 2, 6, 10240, 'MI_T1_FG01', '1.00000', NULL, NULL, NULL, 1, '2015-09-23', '121.00000', '121.00000', NULL, '121.00000', NULL, NULL, 'ENTERED', '2015-09-23', '2015-09-23', NULL, NULL, NULL, NULL, NULL, NULL, '2', 'INV', 'EXTERNAL', NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 13:37:41', 34, '2016-01-07 13:37:41'), -(199, 132, 2, 6, 10240, 'MI_T1_FG01', '1.00000', NULL, NULL, NULL, 1, '2015-09-23', '121.00000', '121.00000', NULL, '121.00000', NULL, NULL, 'ENTERED', '2015-09-23', '2015-09-23', NULL, NULL, NULL, NULL, NULL, NULL, '2', 'INV', 'EXTERNAL', NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 13:37:42', 34, '2016-01-07 13:37:42'), -(200, 133, 2, 6, 10240, 'MI_T1_FG01', '1.00000', NULL, NULL, NULL, 1, '2015-09-23', '121.00000', '121.00000', NULL, '121.00000', NULL, NULL, 'AWAITING_PICKING', '2015-09-23', '2015-09-23', '2016-01-08', NULL, NULL, NULL, NULL, NULL, '2', 'INV', 'EXTERNAL', NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-07 13:39:23', 34, '2016-01-07 13:39:47'), -(201, 134, 1, 6, 10048, 'MI Level 4 A TEST01', '100.00000', NULL, NULL, NULL, NULL, NULL, '12.00000', '1.00000', '121.20000', NULL, NULL, 3, 'ENTERED', '2016-01-12', '2016-01-27', NULL, NULL, 0, NULL, NULL, NULL, '2', 'INV', NULL, NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-12 07:59:13', 34, '2016-01-12 07:59:13'), -(203, 135, 1, 6, 10048, 'MI Level 4 A TEST01', '100.00000', NULL, NULL, NULL, NULL, NULL, '12.00000', '1200.00000', '121.20000', NULL, NULL, 3, 'ENTERED', '2016-01-12', '2016-01-27', NULL, NULL, 0, NULL, NULL, NULL, '2', 'INV', NULL, NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-12 08:00:00', 34, '2016-01-12 08:00:00'), -(205, 136, 1, 6, 10048, 'MI Level 4 A TEST01', '100.00000', NULL, NULL, NULL, NULL, NULL, '12.00000', '1200.00000', '121.20000', NULL, NULL, 3, 'ENTERED', '2016-01-12', '2016-01-27', NULL, NULL, 0, NULL, NULL, NULL, '2', 'INV', NULL, NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-12 08:00:29', 34, '2016-01-12 08:00:29'), -(207, 137, 1, 6, 10048, 'MI Level 4 A TEST01', '100.00000', NULL, NULL, NULL, NULL, NULL, '12.00000', '1.00000', '121.20000', NULL, NULL, 3, 'ENTERED', '2016-01-12', '2016-01-27', NULL, NULL, 0, NULL, NULL, NULL, '2', 'INV', NULL, NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-01-12 08:01:37', 34, '2016-01-12 08:01:37'); +(193, 126, 2, 6, 10240, 'MI_T1_FG01', '1.00000', '1.00000', '1.00000', '1.00000', 1, '2015-09-23', '121.00000', '121.00000', NULL, '121.00000', NULL, NULL, 'CLOSED', '2015-09-23', '2015-09-23', '2015-09-23', '2015-09-23', NULL, NULL, 77, 82, '2', 'INV', 'EXTERNAL', NULL, '27', NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-09-23 09:37:49', 34, '2015-09-23 10:31:20'); -- -------------------------------------------------------- @@ -30789,9 +30321,9 @@ INSERT INTO `sd_so_line` (`sd_so_line_id`, `sd_so_header_id`, `line_number`, `sh -- Table structure for table `sd_store` -- -CREATE TABLE IF NOT EXISTS `sd_store` ( - `sd_store_id` int(12) unsigned NOT NULL AUTO_INCREMENT, - `org_id` int(12) unsigned DEFAULT NULL, +CREATE TABLE `sd_store` ( + `sd_store_id` int(12) UNSIGNED NOT NULL, + `org_id` int(12) UNSIGNED DEFAULT NULL, `store_name` varchar(100) NOT NULL, `code` varchar(25) NOT NULL, `type` varchar(50) DEFAULT NULL, @@ -30805,12 +30337,8 @@ CREATE TABLE IF NOT EXISTS `sd_store` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sd_store_id`), - UNIQUE KEY `org` (`store_name`), - UNIQUE KEY `code` (`code`), - KEY `inventory_id` (`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_store` @@ -30825,8 +30353,8 @@ INSERT INTO `sd_store` (`sd_store_id`, `org_id`, `store_name`, `code`, `type`, ` -- Table structure for table `sd_store_subinventory` -- -CREATE TABLE IF NOT EXISTS `sd_store_subinventory` ( - `sd_store_subinventory_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sd_store_subinventory` ( + `sd_store_subinventory_id` int(12) UNSIGNED NOT NULL, `sd_store_id` int(12) NOT NULL, `subinventory_id` int(12) NOT NULL, `floor_number` varchar(10) DEFAULT NULL, @@ -30837,10 +30365,8 @@ CREATE TABLE IF NOT EXISTS `sd_store_subinventory` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sd_store_subinventory_id`), - UNIQUE KEY `sd_store_id` (`sd_store_id`,`subinventory_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sd_store_subinventory` @@ -30857,7 +30383,7 @@ INSERT INTO `sd_store_subinventory` (`sd_store_subinventory_id`, `sd_store_id`, -- Table structure for table `session` -- -CREATE TABLE IF NOT EXISTS `session` ( +CREATE TABLE `session` ( `user_id` int(12) NOT NULL, `session_id` varchar(128) NOT NULL, `session_data` longblob, @@ -30871,8 +30397,8 @@ CREATE TABLE IF NOT EXISTS `session` ( -- Table structure for table `sf_item_file1` -- -CREATE TABLE IF NOT EXISTS `sf_item_file1` ( - `sf_item_file1_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sf_item_file1` ( + `sf_item_file1_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -30881,10 +30407,8 @@ CREATE TABLE IF NOT EXISTS `sf_item_file1` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `sf_item_file1_value` int(12) DEFAULT NULL, - PRIMARY KEY (`sf_item_file1_id`), - UNIQUE KEY `secondary_field_value` (`sf_item_file1_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `sf_item_file1_value` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sf_item_file1` @@ -30899,8 +30423,8 @@ INSERT INTO `sf_item_file1` (`sf_item_file1_id`, `reference_type`, `reference_en -- Table structure for table `sf_item_image1` -- -CREATE TABLE IF NOT EXISTS `sf_item_image1` ( - `sf_item_image1_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sf_item_image1` ( + `sf_item_image1_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -30909,10 +30433,8 @@ CREATE TABLE IF NOT EXISTS `sf_item_image1` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `sf_item_image1_value` int(12) DEFAULT NULL, - PRIMARY KEY (`sf_item_image1_id`), - UNIQUE KEY `secondary_field_value` (`sf_item_image1_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `sf_item_image1_value` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sf_item_image1` @@ -30927,8 +30449,8 @@ INSERT INTO `sf_item_image1` (`sf_item_image1_id`, `reference_type`, `reference_ -- Table structure for table `sf_item_image2` -- -CREATE TABLE IF NOT EXISTS `sf_item_image2` ( - `sf_item_image2_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sf_item_image2` ( + `sf_item_image2_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -30937,10 +30459,8 @@ CREATE TABLE IF NOT EXISTS `sf_item_image2` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `sf_item_image2_value` int(12) DEFAULT NULL, - PRIMARY KEY (`sf_item_image2_id`), - UNIQUE KEY `secondary_field_value` (`sf_item_image2_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=64 ; + `sf_item_image2_value` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sf_item_image2` @@ -31006,7 +30526,7 @@ INSERT INTO `sf_item_image2` (`sf_item_image2_id`, `reference_type`, `reference_ (59, 'table', NULL, 'item', 10238, 'inoerp', '2015-09-20', 'inoerp', '2015-09-20', 0), (60, 'table', NULL, 'item', 10239, 'inoerp', '2015-09-20', 'inoerp', '2015-09-20', 0), (61, 'table', NULL, 'item', 10240, 'inoerp', '2015-09-20', 'inoerp', '2015-09-20', 0), -(62, 'table', NULL, 'item', 10241, 'inoerp', '2015-09-20', 'inoerp', '2016-01-13', 0), +(62, 'table', NULL, 'item', 10241, 'inoerp', '2015-09-20', 'inoerp', '2015-10-26', 0), (63, 'table', NULL, 'item', 10035, 'inoerp', '2015-11-15', 'inoerp', '2015-11-15', 0); -- -------------------------------------------------------- @@ -31015,8 +30535,8 @@ INSERT INTO `sf_item_image2` (`sf_item_image2_id`, `reference_type`, `reference_ -- Table structure for table `sf_item_inv_category` -- -CREATE TABLE IF NOT EXISTS `sf_item_inv_category` ( - `sf_item_inv_category_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sf_item_inv_category` ( + `sf_item_inv_category_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -31025,10 +30545,8 @@ CREATE TABLE IF NOT EXISTS `sf_item_inv_category` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `sf_item_inv_category_value` varchar(25) DEFAULT NULL, - PRIMARY KEY (`sf_item_inv_category_id`), - UNIQUE KEY `secondary_field_value` (`sf_item_inv_category_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=99 ; + `sf_item_inv_category_value` varchar(25) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sf_item_inv_category` @@ -31129,8 +30647,8 @@ INSERT INTO `sf_item_inv_category` (`sf_item_inv_category_id`, `reference_type`, -- Table structure for table `sf_item_pur_category` -- -CREATE TABLE IF NOT EXISTS `sf_item_pur_category` ( - `sf_item_pur_category_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sf_item_pur_category` ( + `sf_item_pur_category_id` int(12) NOT NULL, `reference_type` varchar(30) DEFAULT NULL, `reference_entity` varchar(50) DEFAULT NULL, `reference_key_name` varchar(50) DEFAULT NULL, @@ -31139,10 +30657,8 @@ CREATE TABLE IF NOT EXISTS `sf_item_pur_category` ( `creation_date` date NOT NULL, `last_update_by` varchar(256) NOT NULL, `last_update_date` date NOT NULL, - `sf_item_pur_category_value` varchar(25) DEFAULT NULL, - PRIMARY KEY (`sf_item_pur_category_id`), - UNIQUE KEY `secondary_field_value` (`sf_item_pur_category_value`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=99 ; + `sf_item_pur_category_value` varchar(25) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sf_item_pur_category` @@ -31243,7 +30759,7 @@ INSERT INTO `sf_item_pur_category` (`sf_item_pur_category_id`, `reference_type`, -- Table structure for table `site_info` -- -CREATE TABLE IF NOT EXISTS `site_info` ( +CREATE TABLE `site_info` ( `default_home_page` varchar(50) NOT NULL, `site_name` varchar(256) NOT NULL, `maintenance_cb` tinyint(1) DEFAULT NULL, @@ -31262,8 +30778,7 @@ CREATE TABLE IF NOT EXISTS `site_info` ( `basic_user_role` varchar(50) DEFAULT NULL, `move_line_wo_header` varchar(25) DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - UNIQUE KEY `name` (`site_name`) + `last_update_date` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- @@ -31279,8 +30794,8 @@ INSERT INTO `site_info` (`default_home_page`, `site_name`, `maintenance_cb`, `ma -- Table structure for table `subinventory` -- -CREATE TABLE IF NOT EXISTS `subinventory` ( - `subinventory_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `subinventory` ( + `subinventory_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `type` varchar(25) NOT NULL, `subinventory` varchar(25) DEFAULT NULL, @@ -31302,9 +30817,8 @@ CREATE TABLE IF NOT EXISTS `subinventory` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`subinventory_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=42 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `subinventory` @@ -31335,8 +30849,8 @@ INSERT INTO `subinventory` (`subinventory_id`, `org_id`, `type`, `subinventory`, -- Table structure for table `supplier` -- -CREATE TABLE IF NOT EXISTS `supplier` ( - `supplier_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `supplier` ( + `supplier_id` int(12) NOT NULL, `supplier_number` int(12) NOT NULL, `supplier_name` varchar(60) NOT NULL, `ar_customer_id` int(12) DEFAULT NULL, @@ -31351,11 +30865,8 @@ CREATE TABLE IF NOT EXISTS `supplier` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`supplier_id`), - UNIQUE KEY `supplier_number` (`supplier_number`), - UNIQUE KEY `supplier_name` (`supplier_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=34 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `supplier` @@ -31398,7 +30909,7 @@ INSERT INTO `supplier` (`supplier_id`, `supplier_number`, `supplier_name`, `ar_c -- -- Stand-in structure for view `supplier_all_v` -- -CREATE TABLE IF NOT EXISTS `supplier_all_v` ( +CREATE TABLE `supplier_all_v` ( `supplier_id` int(12) ,`supplier_number` int(12) ,`supplier_name` varchar(60) @@ -31425,14 +30936,15 @@ CREATE TABLE IF NOT EXISTS `supplier_all_v` ( ,`currency` varchar(12) ,`payment_term_id` int(12) ); + -- -------------------------------------------------------- -- -- Table structure for table `supplier_bu` -- -CREATE TABLE IF NOT EXISTS `supplier_bu` ( - `supplier_bu_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `supplier_bu` ( + `supplier_bu_id` int(12) UNSIGNED NOT NULL, `new_pos_cb` tinyint(1) DEFAULT NULL, `all_invoices_cb` tinyint(1) DEFAULT NULL, `unmatched_invoices_cb` tinyint(1) DEFAULT NULL, @@ -31477,10 +30989,8 @@ CREATE TABLE IF NOT EXISTS `supplier_bu` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, `rev_enabled_cb` tinyint(1) DEFAULT NULL, - `rev_number` int(11) DEFAULT NULL, - PRIMARY KEY (`supplier_bu_id`), - UNIQUE KEY `supplier_id` (`supplier_id`,`org_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ; + `rev_number` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `supplier_bu` @@ -31505,8 +31015,8 @@ INSERT INTO `supplier_bu` (`supplier_bu_id`, `new_pos_cb`, `all_invoices_cb`, `u -- Table structure for table `supplier_site` -- -CREATE TABLE IF NOT EXISTS `supplier_site` ( - `supplier_site_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `supplier_site` ( + `supplier_site_id` int(12) NOT NULL, `supplier_id` int(12) NOT NULL, `supplier_site_number` int(12) NOT NULL, `supplier_site_name` varchar(60) NOT NULL DEFAULT '', @@ -31531,7 +31041,7 @@ CREATE TABLE IF NOT EXISTS `supplier_site` ( `ap_invoice_match_level` varchar(50) DEFAULT NULL, `receipt_routing` varchar(50) DEFAULT NULL, `ship_to_location_variance` varchar(50) DEFAULT NULL, - `positive_qty_tolerance` int(12) unsigned DEFAULT NULL, + `positive_qty_tolerance` int(12) UNSIGNED DEFAULT NULL, `negative_qty_tolerance` int(12) DEFAULT NULL, `qty_variance` varchar(50) DEFAULT NULL, `positive_receipt_days_tolerance` int(12) DEFAULT NULL, @@ -31548,11 +31058,8 @@ CREATE TABLE IF NOT EXISTS `supplier_site` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, `rev_enabled_cb` tinyint(1) DEFAULT NULL, - `rev_number` int(11) DEFAULT NULL, - PRIMARY KEY (`supplier_site_id`), - UNIQUE KEY `supplier_site_number` (`supplier_site_number`), - KEY `supplier_site_ref` (`supplier_site_ref`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=64 ; + `rev_number` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `supplier_site` @@ -31622,8 +31129,8 @@ INSERT INTO `supplier_site` (`supplier_site_id`, `supplier_id`, `supplier_site_n -- Table structure for table `system_path` -- -CREATE TABLE IF NOT EXISTS `system_path` ( - `path_id` int(11) NOT NULL AUTO_INCREMENT, +CREATE TABLE `system_path` ( + `path_id` int(11) NOT NULL, `path_name` varchar(50) NOT NULL, `path_description` varchar(50) DEFAULT NULL, `path_value` varchar(100) DEFAULT NULL, @@ -31633,9 +31140,8 @@ CREATE TABLE IF NOT EXISTS `system_path` ( `path_creation_date` datetime DEFAULT NULL, `path_created_by` varchar(100) DEFAULT NULL, `path_last_update_date` datetime DEFAULT NULL, - `path_last_updated_by` varchar(100) DEFAULT NULL, - PRIMARY KEY (`path_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `path_last_updated_by` varchar(100) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `system_path` @@ -31652,8 +31158,8 @@ INSERT INTO `system_path` (`path_id`, `path_name`, `path_description`, `path_val -- Table structure for table `sys_catalog_header` -- -CREATE TABLE IF NOT EXISTS `sys_catalog_header` ( - `sys_catalog_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_catalog_header` ( + `sys_catalog_header_id` int(12) UNSIGNED NOT NULL, `catalog` varchar(50) NOT NULL, `description` varchar(255) DEFAULT NULL, `parent_catalog_header_id` int(12) DEFAULT NULL, @@ -31661,10 +31167,8 @@ CREATE TABLE IF NOT EXISTS `sys_catalog_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_catalog_header_id`), - UNIQUE KEY `value_group` (`catalog`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_catalog_header` @@ -31681,8 +31185,8 @@ INSERT INTO `sys_catalog_header` (`sys_catalog_header_id`, `catalog`, `descripti -- Table structure for table `sys_catalog_line` -- -CREATE TABLE IF NOT EXISTS `sys_catalog_line` ( - `sys_catalog_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_catalog_line` ( + `sys_catalog_line_id` int(12) UNSIGNED NOT NULL, `sys_catalog_header_id` int(12) NOT NULL, `line_name` varchar(50) DEFAULT NULL, `sys_value_group_header_id` int(12) DEFAULT NULL, @@ -31691,10 +31195,8 @@ CREATE TABLE IF NOT EXISTS `sys_catalog_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_catalog_line_id`), - UNIQUE KEY `sys_catalog_header_id` (`sys_catalog_header_id`,`line_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=26 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_catalog_line` @@ -31728,16 +31230,14 @@ INSERT INTO `sys_catalog_line` (`sys_catalog_line_id`, `sys_catalog_header_id`, -- Table structure for table `sys_catalog_value` -- -CREATE TABLE IF NOT EXISTS `sys_catalog_value` ( - `sys_catalog_value_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_catalog_value` ( + `sys_catalog_value_id` int(12) UNSIGNED NOT NULL, `sys_catalog_line_id` int(12) NOT NULL, `sys_catalog_header_id` int(12) NOT NULL, `line_value` varchar(255) NOT NULL, `reference_table` varchar(100) NOT NULL, - `reference_id` int(12) NOT NULL, - PRIMARY KEY (`sys_catalog_value_id`), - UNIQUE KEY `sys_catalog_line_id` (`sys_catalog_line_id`,`reference_table`,`reference_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=60 ; + `reference_id` int(12) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_catalog_value` @@ -31808,8 +31308,8 @@ INSERT INTO `sys_catalog_value` (`sys_catalog_value_id`, `sys_catalog_line_id`, -- Table structure for table `sys_document_sequence` -- -CREATE TABLE IF NOT EXISTS `sys_document_sequence` ( - `sys_document_sequence_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_document_sequence` ( + `sys_document_sequence_id` int(12) UNSIGNED NOT NULL, `bu_org_id` int(12) NOT NULL, `entry_type` varchar(25) NOT NULL, `pre_fix` varchar(25) DEFAULT NULL, @@ -31821,10 +31321,8 @@ CREATE TABLE IF NOT EXISTS `sys_document_sequence` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_document_sequence_id`), - UNIQUE KEY `org_id` (`bu_org_id`,`next_number`,`document_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_document_sequence` @@ -31840,18 +31338,16 @@ INSERT INTO `sys_document_sequence` (`sys_document_sequence_id`, `bu_org_id`, `e -- Table structure for table `sys_dynamic_block_header` -- -CREATE TABLE IF NOT EXISTS `sys_dynamic_block_header` ( - `sys_dynamic_block_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_dynamic_block_header` ( + `sys_dynamic_block_header_id` int(12) UNSIGNED NOT NULL, `block_id` int(12) DEFAULT NULL, `name` varchar(50) DEFAULT NULL, `description` varchar(256) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_dynamic_block_header_id`), - UNIQUE KEY `reference_table` (`block_id`,`name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -31859,8 +31355,8 @@ CREATE TABLE IF NOT EXISTS `sys_dynamic_block_header` ( -- Table structure for table `sys_dynamic_block_line` -- -CREATE TABLE IF NOT EXISTS `sys_dynamic_block_line` ( - `sys_dynamic_block_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_dynamic_block_line` ( + `sys_dynamic_block_line_id` int(12) UNSIGNED NOT NULL, `dynamic_block_header_id` int(12) NOT NULL, `content_type` varchar(50) DEFAULT NULL, `reference_table` varchar(256) DEFAULT NULL, @@ -31870,10 +31366,8 @@ CREATE TABLE IF NOT EXISTS `sys_dynamic_block_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_dynamic_block_line_id`), - UNIQUE KEY `reference_table` (`dynamic_block_header_id`,`content_type`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -31881,8 +31375,8 @@ CREATE TABLE IF NOT EXISTS `sys_dynamic_block_line` ( -- Table structure for table `sys_extra_field` -- -CREATE TABLE IF NOT EXISTS `sys_extra_field` ( - `sys_extra_field_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_extra_field` ( + `sys_extra_field_id` int(12) NOT NULL, `field_name` varchar(50) NOT NULL, `sys_field_name` varchar(50) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -31893,9 +31387,8 @@ CREATE TABLE IF NOT EXISTS `sys_extra_field` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_extra_field_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_extra_field` @@ -31915,8 +31408,8 @@ INSERT INTO `sys_extra_field` (`sys_extra_field_id`, `field_name`, `sys_field_na -- Table structure for table `sys_extra_field_instance` -- -CREATE TABLE IF NOT EXISTS `sys_extra_field_instance` ( - `sys_extra_field_instance_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_extra_field_instance` ( + `sys_extra_field_instance_id` int(12) NOT NULL, `sys_extra_field_id` int(12) NOT NULL, `reference_type` varchar(25) DEFAULT NULL, `referece_entity` varchar(25) DEFAULT NULL, @@ -31935,10 +31428,8 @@ CREATE TABLE IF NOT EXISTS `sys_extra_field_instance` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_extra_field_instance_id`), - UNIQUE KEY `sys_extra_field_id` (`sys_extra_field_id`,`reference_type`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=54 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_extra_field_instance` @@ -32004,8 +31495,8 @@ INSERT INTO `sys_extra_field_instance` (`sys_extra_field_instance_id`, `sys_extr -- Table structure for table `sys_hold` -- -CREATE TABLE IF NOT EXISTS `sys_hold` ( - `sys_hold_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_hold` ( + `sys_hold_id` int(12) UNSIGNED NOT NULL, `hold_code` varchar(50) NOT NULL, `hold_name` varchar(50) NOT NULL, `hold_type` varchar(50) NOT NULL, @@ -32016,13 +31507,8 @@ CREATE TABLE IF NOT EXISTS `sys_hold` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_hold_id`), - UNIQUE KEY `job_code` (`hold_code`), - UNIQUE KEY `job_name` (`hold_name`), - UNIQUE KEY `job_code_2` (`hold_code`), - UNIQUE KEY `job_name_2` (`hold_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_hold` @@ -32038,8 +31524,8 @@ INSERT INTO `sys_hold` (`sys_hold_id`, `hold_code`, `hold_name`, `hold_type`, `m -- Table structure for table `sys_hold_reference` -- -CREATE TABLE IF NOT EXISTS `sys_hold_reference` ( - `sys_hold_reference_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_hold_reference` ( + `sys_hold_reference_id` int(12) UNSIGNED NOT NULL, `hold_code` varchar(50) NOT NULL, `reference_table` varchar(50) NOT NULL, `reference_id` int(12) NOT NULL, @@ -32049,10 +31535,8 @@ CREATE TABLE IF NOT EXISTS `sys_hold_reference` ( `hold_removed_by` varchar(50) DEFAULT NULL, `hold_removed_on` date DEFAULT NULL, `removal_reason` varchar(256) DEFAULT NULL, - `hold_count` int(12) DEFAULT NULL, - PRIMARY KEY (`sys_hold_reference_id`), - UNIQUE KEY `hold_code` (`hold_code`,`reference_table`,`reference_id`,`hold_count`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ; + `hold_count` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_hold_reference` @@ -32080,8 +31564,8 @@ INSERT INTO `sys_hold_reference` (`sys_hold_reference_id`, `hold_code`, `referen -- Table structure for table `sys_message_format` -- -CREATE TABLE IF NOT EXISTS `sys_message_format` ( - `sys_message_format_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_message_format` ( + `sys_message_format_id` int(12) UNSIGNED NOT NULL, `format_name` varchar(50) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `message_subject` varchar(255) DEFAULT NULL, @@ -32096,9 +31580,8 @@ CREATE TABLE IF NOT EXISTS `sys_message_format` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`sys_message_format_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_message_format` @@ -32113,8 +31596,8 @@ INSERT INTO `sys_message_format` (`sys_message_format_id`, `format_name`, `descr -- Table structure for table `sys_notification` -- -CREATE TABLE IF NOT EXISTS `sys_notification` ( - `sys_notification_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_notification` ( + `sys_notification_id` int(12) UNSIGNED NOT NULL, `notification_type` varchar(12) NOT NULL, `notification_name` varchar(256) NOT NULL, `from_user_id` int(12) NOT NULL, @@ -32144,9 +31627,8 @@ CREATE TABLE IF NOT EXISTS `sys_notification` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, `notification_group_id` int(12) DEFAULT NULL, - `notification_group_seq` int(12) DEFAULT NULL, - PRIMARY KEY (`sys_notification_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=109 ; + `notification_group_seq` int(12) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_notification` @@ -32249,8 +31731,8 @@ INSERT INTO `sys_notification` (`sys_notification_id`, `notification_type`, `not -- Table structure for table `sys_notification_group` -- -CREATE TABLE IF NOT EXISTS `sys_notification_group` ( - `sys_notification_group_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_notification_group` ( + `sys_notification_group_id` int(12) UNSIGNED NOT NULL, `start_sys_notification_id` int(12) NOT NULL, `notification_name` varchar(256) NOT NULL, `reference_key_name` varchar(100) DEFAULT NULL, @@ -32260,10 +31742,8 @@ CREATE TABLE IF NOT EXISTS `sys_notification_group` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_notification_group_id`), - UNIQUE KEY `user_name` (`notification_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -32271,8 +31751,8 @@ CREATE TABLE IF NOT EXISTS `sys_notification_group` ( -- Table structure for table `sys_pd_header` -- -CREATE TABLE IF NOT EXISTS `sys_pd_header` ( - `sys_pd_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_pd_header` ( + `sys_pd_header_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `document_number` varchar(20) DEFAULT NULL, `status` varchar(25) DEFAULT NULL, @@ -32298,11 +31778,8 @@ CREATE TABLE IF NOT EXISTS `sys_pd_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`sys_pd_header_id`), - UNIQUE KEY `release_number` (`security_level`,`change_type`), - UNIQUE KEY `po_header_id` (`sys_pd_header_id`,`security_level`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_pd_header` @@ -32319,8 +31796,8 @@ INSERT INTO `sys_pd_header` (`sys_pd_header_id`, `org_id`, `document_number`, `s -- Table structure for table `sys_pd_process_flow_action` -- -CREATE TABLE IF NOT EXISTS `sys_pd_process_flow_action` ( - `sys_pd_process_flow_action_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_pd_process_flow_action` ( + `sys_pd_process_flow_action_id` int(12) NOT NULL, `sys_pd_header_id` int(12) NOT NULL, `sys_process_flow_line_id` int(12) NOT NULL, `action_number` mediumint(6) NOT NULL, @@ -32337,10 +31814,8 @@ CREATE TABLE IF NOT EXISTS `sys_pd_process_flow_action` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_pd_process_flow_action_id`), - UNIQUE KEY `sys_pd_header_id` (`sys_pd_header_id`,`sys_process_flow_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_pd_process_flow_action` @@ -32358,8 +31833,8 @@ INSERT INTO `sys_pd_process_flow_action` (`sys_pd_process_flow_action_id`, `sys_ -- Table structure for table `sys_pd_process_flow_action_value` -- -CREATE TABLE IF NOT EXISTS `sys_pd_process_flow_action_value` ( - `sys_pd_process_flow_action_value_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_pd_process_flow_action_value` ( + `sys_pd_process_flow_action_value_id` int(12) NOT NULL, `sys_process_flow_action_id` int(12) NOT NULL, `value` varchar(256) NOT NULL, `comment` varchar(256) DEFAULT NULL, @@ -32368,10 +31843,8 @@ CREATE TABLE IF NOT EXISTS `sys_pd_process_flow_action_value` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_pd_process_flow_action_value_id`), - UNIQUE KEY `document_type_name` (`sys_process_flow_action_id`,`comment`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -32379,18 +31852,16 @@ CREATE TABLE IF NOT EXISTS `sys_pd_process_flow_action_value` ( -- Table structure for table `sys_permission` -- -CREATE TABLE IF NOT EXISTS `sys_permission` ( - `sys_permission_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_permission` ( + `sys_permission_id` int(12) UNSIGNED NOT NULL, `permision` varchar(50) NOT NULL, `description` varchar(256) DEFAULT NULL, `class` varchar(100) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_permission_id`), - UNIQUE KEY `permision` (`permision`,`class`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -32398,8 +31869,8 @@ CREATE TABLE IF NOT EXISTS `sys_permission` ( -- Table structure for table `sys_printer` -- -CREATE TABLE IF NOT EXISTS `sys_printer` ( - `sys_printer_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_printer` ( + `sys_printer_id` int(12) UNSIGNED NOT NULL, `printer_name` varchar(50) NOT NULL, `printer_type` varchar(100) DEFAULT NULL, `manufacturer` varchar(100) DEFAULT NULL, @@ -32410,10 +31881,8 @@ CREATE TABLE IF NOT EXISTS `sys_printer` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_printer_id`), - UNIQUE KEY `printer_name` (`printer_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_printer` @@ -32429,8 +31898,8 @@ INSERT INTO `sys_printer` (`sys_printer_id`, `printer_name`, `printer_type`, `ma -- Table structure for table `sys_process_flow_action` -- -CREATE TABLE IF NOT EXISTS `sys_process_flow_action` ( - `sys_process_flow_action_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_process_flow_action` ( + `sys_process_flow_action_id` int(12) NOT NULL, `sys_process_flow_line_id` int(12) NOT NULL, `action_number` mediumint(6) NOT NULL, `role_code` varchar(25) DEFAULT NULL, @@ -32442,12 +31911,8 @@ CREATE TABLE IF NOT EXISTS `sys_process_flow_action` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_process_flow_action_id`), - UNIQUE KEY `document_type_name` (`sys_process_flow_line_id`,`role_code`), - UNIQUE KEY `sys_process_flow_line_id` (`sys_process_flow_line_id`,`role_code`), - UNIQUE KEY `sys_process_flow_line_id_2` (`sys_process_flow_line_id`,`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_process_flow_action` @@ -32468,8 +31933,8 @@ INSERT INTO `sys_process_flow_action` (`sys_process_flow_action_id`, `sys_proces -- Table structure for table `sys_process_flow_action_value` -- -CREATE TABLE IF NOT EXISTS `sys_process_flow_action_value` ( - `sys_process_flow_action_value_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_process_flow_action_value` ( + `sys_process_flow_action_value_id` int(12) NOT NULL, `sys_process_flow_action_id` int(12) NOT NULL, `value` varchar(256) NOT NULL, `comment` varchar(256) DEFAULT NULL, @@ -32478,10 +31943,8 @@ CREATE TABLE IF NOT EXISTS `sys_process_flow_action_value` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_process_flow_action_value_id`), - UNIQUE KEY `document_type_name` (`sys_process_flow_action_id`,`comment`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -32489,8 +31952,8 @@ CREATE TABLE IF NOT EXISTS `sys_process_flow_action_value` ( -- Table structure for table `sys_process_flow_header` -- -CREATE TABLE IF NOT EXISTS `sys_process_flow_header` ( - `sys_process_flow_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_process_flow_header` ( + `sys_process_flow_header_id` int(12) NOT NULL, `process_flow` varchar(25) NOT NULL, `module_name` varchar(25) NOT NULL, `type` varchar(25) NOT NULL, @@ -32499,10 +31962,8 @@ CREATE TABLE IF NOT EXISTS `sys_process_flow_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_process_flow_header_id`), - UNIQUE KEY `document_type_name` (`process_flow`,`module_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_process_flow_header` @@ -32520,8 +31981,8 @@ INSERT INTO `sys_process_flow_header` (`sys_process_flow_header_id`, `process_fl -- Table structure for table `sys_process_flow_line` -- -CREATE TABLE IF NOT EXISTS `sys_process_flow_line` ( - `sys_process_flow_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_process_flow_line` ( + `sys_process_flow_line_id` int(12) NOT NULL, `sys_process_flow_header_id` varchar(25) NOT NULL, `line_number` mediumint(6) NOT NULL, `line_name` varchar(25) NOT NULL, @@ -32536,10 +31997,8 @@ CREATE TABLE IF NOT EXISTS `sys_process_flow_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_process_flow_line_id`), - UNIQUE KEY `document_type_name` (`sys_process_flow_header_id`,`line_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=44 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_process_flow_line` @@ -32587,26 +32046,23 @@ INSERT INTO `sys_process_flow_line` (`sys_process_flow_line_id`, `sys_process_fl -- Table structure for table `sys_profile_header` -- -CREATE TABLE IF NOT EXISTS `sys_profile_header` ( - `sys_profile_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_profile_header` ( + `sys_profile_header_id` int(12) UNSIGNED NOT NULL, `access_level` enum('SYS','USER','BOTH','') DEFAULT NULL, `profile_name` varchar(50) NOT NULL, - `class_name` varchar(256) NOT NULL, + `profile_class_name` varchar(256) NOT NULL, `description` varchar(200) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_profile_header_id`), - UNIQUE KEY `value_group` (`profile_name`), - UNIQUE KEY `profile_name` (`profile_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=20 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_profile_header` -- -INSERT INTO `sys_profile_header` (`sys_profile_header_id`, `access_level`, `profile_name`, `class_name`, `description`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +INSERT INTO `sys_profile_header` (`sys_profile_header_id`, `access_level`, `profile_name`, `profile_class_name`, `description`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES (1, 'BOTH', 'mdm_price_list_org', 'mdm_price_list_header', 'Validation Org For Price List', 0, '2014-08-04 04:53:07', 0, '2004-08-14 04:53:07'), (2, 'BOTH', 'gl_currency_conversion_type', 'gl_currency_conversion', 'Currency Conversion Type', 0, '2014-08-04 04:49:05', 0, '2004-08-14 04:49:05'), (3, 'BOTH', 'org_bu_name_default', 'business', NULL, 0, '2014-08-29 10:35:29', 0, '2029-08-14 10:35:29'), @@ -32633,19 +32089,17 @@ INSERT INTO `sys_profile_header` (`sys_profile_header_id`, `access_level`, `prof -- Table structure for table `sys_profile_line` -- -CREATE TABLE IF NOT EXISTS `sys_profile_line` ( - `sys_profile_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, - `sys_profile_header_id` int(12) unsigned NOT NULL, +CREATE TABLE `sys_profile_line` ( + `sys_profile_line_id` int(12) UNSIGNED NOT NULL, + `sys_profile_header_id` int(12) UNSIGNED NOT NULL, `profile_level` enum('SITE','BUSINESS','INVENTORY','USER') NOT NULL, `level_name` varchar(256) NOT NULL, `level_value` varchar(256) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_profile_line_id`), - UNIQUE KEY `sys_profile_header_id_2` (`sys_profile_header_id`,`profile_level`,`level_name`,`level_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=31 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_profile_line` @@ -32686,8 +32140,8 @@ INSERT INTO `sys_profile_line` (`sys_profile_line_id`, `sys_profile_header_id`, -- Table structure for table `sys_program` -- -CREATE TABLE IF NOT EXISTS `sys_program` ( - `sys_program_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_program` ( + `sys_program_id` int(12) NOT NULL, `program_name` varchar(100) DEFAULT NULL, `description` varchar(256) DEFAULT NULL, `message` text, @@ -32704,9 +32158,8 @@ CREATE TABLE IF NOT EXISTS `sys_program` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_program_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=885 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_program` @@ -33547,8 +33000,8 @@ INSERT INTO `sys_program` (`sys_program_id`, `program_name`, `description`, `mes -- Table structure for table `sys_program_schedule` -- -CREATE TABLE IF NOT EXISTS `sys_program_schedule` ( - `sys_program_schedule_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_program_schedule` ( + `sys_program_schedule_id` int(12) NOT NULL, `frequency_uom` varchar(25) DEFAULT NULL, `frequency_value` int(5) DEFAULT NULL, `one_time_cb` tinyint(1) DEFAULT NULL, @@ -33568,9 +33021,8 @@ CREATE TABLE IF NOT EXISTS `sys_program_schedule` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_program_schedule_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_program_schedule` @@ -33585,11 +33037,10 @@ INSERT INTO `sys_program_schedule` (`sys_program_schedule_id`, `frequency_uom`, -- Table structure for table `sys_program_status` -- -CREATE TABLE IF NOT EXISTS `sys_program_status` ( - `sys_program_status_id` int(12) NOT NULL AUTO_INCREMENT, - `status` varchar(50) DEFAULT NULL, - PRIMARY KEY (`sys_program_status_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; +CREATE TABLE `sys_program_status` ( + `sys_program_status_id` int(12) NOT NULL, + `status` varchar(50) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_program_status` @@ -33604,8 +33055,8 @@ INSERT INTO `sys_program_status` (`sys_program_status_id`, `status`) VALUES -- Table structure for table `sys_rfid_interface` -- -CREATE TABLE IF NOT EXISTS `sys_rfid_interface` ( - `sys_rfid_interface_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_rfid_interface` ( + `sys_rfid_interface_id` int(12) UNSIGNED NOT NULL, `epc` varchar(255) NOT NULL, `tag_number` varchar(255) DEFAULT NULL, `antena_number` varchar(100) DEFAULT NULL, @@ -33625,10 +33076,8 @@ CREATE TABLE IF NOT EXISTS `sys_rfid_interface` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_rfid_interface_id`), - UNIQUE KEY `tag_number` (`tag_number`,`antena_number`,`time_stamp`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=93 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_rfid_interface` @@ -33662,16 +33111,15 @@ INSERT INTO `sys_rfid_interface` (`sys_rfid_interface_id`, `epc`, `tag_number`, -- Table structure for table `sys_role_permission` -- -CREATE TABLE IF NOT EXISTS `sys_role_permission` ( - `sys_role_permission_id` int(12) unsigned NOT NULL AUTO_INCREMENT, - `role_id` int(12) unsigned NOT NULL, - `permission_id` int(12) unsigned NOT NULL, +CREATE TABLE `sys_role_permission` ( + `sys_role_permission_id` int(12) UNSIGNED NOT NULL, + `role_id` int(12) UNSIGNED NOT NULL, + `permission_id` int(12) UNSIGNED NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_role_permission_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -33679,8 +33127,8 @@ CREATE TABLE IF NOT EXISTS `sys_role_permission` ( -- Table structure for table `sys_secondary_field` -- -CREATE TABLE IF NOT EXISTS `sys_secondary_field` ( - `sys_secondary_field_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_secondary_field` ( + `sys_secondary_field_id` int(12) NOT NULL, `field_name` varchar(50) NOT NULL, `sys_field_name` varchar(50) NOT NULL, `description` varchar(256) DEFAULT NULL, @@ -33691,9 +33139,8 @@ CREATE TABLE IF NOT EXISTS `sys_secondary_field` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_secondary_field_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_secondary_field` @@ -33712,8 +33159,8 @@ INSERT INTO `sys_secondary_field` (`sys_secondary_field_id`, `field_name`, `sys_ -- Table structure for table `sys_secondary_field_instance` -- -CREATE TABLE IF NOT EXISTS `sys_secondary_field_instance` ( - `sys_secondary_field_instance_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_secondary_field_instance` ( + `sys_secondary_field_instance_id` int(12) NOT NULL, `sys_secondary_field_id` int(12) NOT NULL, `reference_type` varchar(25) DEFAULT NULL, `referece_entity` varchar(25) DEFAULT NULL, @@ -33732,10 +33179,8 @@ CREATE TABLE IF NOT EXISTS `sys_secondary_field_instance` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_secondary_field_instance_id`), - UNIQUE KEY `sys_extra_field_id` (`sys_secondary_field_id`,`reference_type`,`reference_key_name`,`reference_key_value`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_secondary_field_instance` @@ -33753,8 +33198,8 @@ INSERT INTO `sys_secondary_field_instance` (`sys_secondary_field_instance_id`, ` -- Table structure for table `sys_spd_header` -- -CREATE TABLE IF NOT EXISTS `sys_spd_header` ( - `sys_spd_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_spd_header` ( + `sys_spd_header_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `document_number` varchar(20) DEFAULT NULL, `status` varchar(25) DEFAULT NULL, @@ -33780,12 +33225,8 @@ CREATE TABLE IF NOT EXISTS `sys_spd_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`sys_spd_header_id`), - UNIQUE KEY `release_number` (`security_level`,`change_type`), - UNIQUE KEY `po_header_id` (`sys_spd_header_id`,`security_level`), - UNIQUE KEY `primary_document` (`primary_document`,`primary_document_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_spd_header` @@ -33808,8 +33249,8 @@ INSERT INTO `sys_spd_header` (`sys_spd_header_id`, `org_id`, `document_number`, -- Table structure for table `sys_spd_process_flow_action` -- -CREATE TABLE IF NOT EXISTS `sys_spd_process_flow_action` ( - `sys_spd_process_flow_action_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_spd_process_flow_action` ( + `sys_spd_process_flow_action_id` int(12) NOT NULL, `sys_spd_header_id` int(12) NOT NULL, `sys_process_flow_line_id` int(12) NOT NULL, `action_number` mediumint(6) NOT NULL, @@ -33826,10 +33267,8 @@ CREATE TABLE IF NOT EXISTS `sys_spd_process_flow_action` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_spd_process_flow_action_id`), - UNIQUE KEY `sys_pd_header_id` (`sys_spd_header_id`,`sys_process_flow_line_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -33837,8 +33276,8 @@ CREATE TABLE IF NOT EXISTS `sys_spd_process_flow_action` ( -- Table structure for table `sys_value_group_header` -- -CREATE TABLE IF NOT EXISTS `sys_value_group_header` ( - `sys_value_group_header_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `sys_value_group_header` ( + `sys_value_group_header_id` int(12) UNSIGNED NOT NULL, `access_level` varchar(20) NOT NULL DEFAULT 'both', `value_group` varchar(50) NOT NULL, `description` varchar(200) DEFAULT NULL, @@ -33859,10 +33298,8 @@ CREATE TABLE IF NOT EXISTS `sys_value_group_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_value_group_header_id`), - UNIQUE KEY `value_group` (`value_group`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_value_group_header` @@ -33891,9 +33328,9 @@ INSERT INTO `sys_value_group_header` (`sys_value_group_header_id`, `access_level -- Table structure for table `sys_value_group_line` -- -CREATE TABLE IF NOT EXISTS `sys_value_group_line` ( - `sys_value_group_line_id` int(12) unsigned NOT NULL AUTO_INCREMENT, - `sys_value_group_header_id` int(12) unsigned NOT NULL, +CREATE TABLE `sys_value_group_line` ( + `sys_value_group_line_id` int(12) UNSIGNED NOT NULL, + `sys_value_group_header_id` int(12) UNSIGNED NOT NULL, `code` varchar(50) NOT NULL, `code_value` varchar(50) NOT NULL, `description` varchar(256) NOT NULL, @@ -33908,11 +33345,8 @@ CREATE TABLE IF NOT EXISTS `sys_value_group_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`sys_value_group_line_id`), - UNIQUE KEY `sys_value_group_header_id` (`sys_value_group_header_id`,`code`), - KEY `option_header_id` (`sys_value_group_header_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1950 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_value_group_line` @@ -35654,8 +35088,8 @@ INSERT INTO `sys_value_group_line` (`sys_value_group_line_id`, `sys_value_group_ -- Table structure for table `transaction_type` -- -CREATE TABLE IF NOT EXISTS `transaction_type` ( - `transaction_type_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `transaction_type` ( + `transaction_type_id` int(12) NOT NULL, `transaction_type_number` int(12) NOT NULL, `transaction_type` varchar(40) NOT NULL, `type_class` varchar(50) NOT NULL, @@ -35670,9 +35104,8 @@ CREATE TABLE IF NOT EXISTS `transaction_type` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`transaction_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=29 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `transaction_type` @@ -35714,8 +35147,8 @@ INSERT INTO `transaction_type` (`transaction_type_id`, `transaction_type_number` -- Table structure for table `uom` -- -CREATE TABLE IF NOT EXISTS `uom` ( - `uom_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `uom` ( + `uom_id` int(12) UNSIGNED NOT NULL, `class` varchar(25) NOT NULL, `uom_name` varchar(25) DEFAULT NULL, `description` varchar(200) DEFAULT NULL, @@ -35729,10 +35162,8 @@ CREATE TABLE IF NOT EXISTS `uom` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`uom_id`), - UNIQUE KEY `name` (`uom_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=47 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `uom` @@ -35766,8 +35197,8 @@ INSERT INTO `uom` (`uom_id`, `class`, `uom_name`, `description`, `primary_cb`, ` -- Table structure for table `user` -- -CREATE TABLE IF NOT EXISTS `user` ( - `user_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `user` ( + `user_id` int(12) UNSIGNED NOT NULL, `person_id` int(12) DEFAULT NULL, `username` varchar(256) DEFAULT NULL, `password` varchar(256) NOT NULL DEFAULT '', @@ -35805,11 +35236,8 @@ CREATE TABLE IF NOT EXISTS `user` ( `last_update_by` int(12) NOT NULL, `last_update_date` datetime DEFAULT NULL, `revision_enabled` char(1) DEFAULT 'N', - `revision_number` int(11) DEFAULT NULL, - PRIMARY KEY (`user_id`), - UNIQUE KEY `email` (`email`), - UNIQUE KEY `user_name` (`username`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=111 ; + `revision_number` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user` @@ -35817,7 +35245,7 @@ CREATE TABLE IF NOT EXISTS `user` ( INSERT INTO `user` (`user_id`, `person_id`, `username`, `password`, `first_name`, `last_name`, `assigned_ip`, `phone`, `email`, `user_language`, `date_format`, `hr_employee_id`, `block_notif_count`, `supplier_id`, `default_theme`, `use_personal_db_cb`, `ar_customer_id`, `prices_dec`, `qty_dec`, `rates_dec`, `percent_dec`, `show_gl`, `show_codes`, `show_hints`, `last_visit_date`, `query_size`, `image_file_id`, `pos`, `print_profile`, `rep_popup`, `auth_provider_name`, `auth_provider_id`, `status`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`, `revision_enabled`, `revision_number`) VALUES (1, NULL, 'admin', '$2y$10$/WO8Ymjdlqi9EkCwFsacTecUTcANOPmDJF4D6hQwxhnvWXIGNibUu', 'Admin', 'Admin', NULL, NULL, 'admin@thissite.com', NULL, 0, NULL, NULL, NULL, 'default', NULL, NULL, 2, 2, 4, 1, 1, 0, 0, NULL, 10, 1, 1, '1', 1, '0', NULL, 1, 0, '2014-09-13 19:16:52', 34, '2015-09-23 06:57:13', 'N', NULL), -(34, NULL, 'inoerp', '$2y$10$3JUPAxEZlXCilIXNFYw8E.gpZo5DTBPANCDcJ8FchR2ua9DI/cFNq', 'inoerp', 'inoerp', NULL, '34543543', 'inoerp@no-site.com', 'hi_IN', 0, 1, 4, NULL, 'default', NULL, 8, 2, 2, 4, 1, 1, 0, 0, NULL, 10, 594, 1, '1', 1, '0', '', 0, 0, '2014-08-26 12:51:31', 34, '2016-01-18 14:11:35', 'N', NULL), +(34, NULL, 'inoerp', '$2y$10$3JUPAxEZlXCilIXNFYw8E.gpZo5DTBPANCDcJ8FchR2ua9DI/cFNq', 'inoerp', 'inoerp', NULL, '34543543', 'inoerp@no-site.com', 'en_US', 0, 1, 4, NULL, 'default', NULL, 8, 2, 2, 4, 1, 1, 0, 0, NULL, 10, 594, 1, '1', 1, '0', '', 0, 0, '2014-08-26 12:51:31', 34, '2016-01-07 05:26:13', 'N', NULL), (88, NULL, 'nishit50', '4ff9b53ce51baaf9d925877d359599b5e60f0dcfa75016c3c8922fe24659b284', 'Nishit', 'das11', NULL, NULL, 'nishitdas@outlook.com', NULL, 0, 4, NULL, NULL, 'default', NULL, NULL, 2, 2, 4, 1, 1, 0, 0, NULL, 10, 1, 1, '1', 1, '0', NULL, 1, 0, '2014-08-20 09:48:07', 34, '2015-08-27 15:50:20', 'N', NULL), (91, NULL, 'nishit', '$2y$10$Inw8dAyU/3wxAUN1EqDE8ewhlQRASbIg/OBofgris1/KXH1eVJFMy', 'Nishit', 'das', NULL, NULL, 'nishitdas@yahoo.co.in', NULL, 0, NULL, NULL, NULL, 'default', NULL, NULL, 2, 2, 4, 1, 1, 0, 0, NULL, 10, 1, 1, '1', 1, '0', NULL, 1, 0, '2014-08-24 12:12:37', 34, '2015-10-19 14:16:25', 'N', NULL), (93, NULL, 'ino_supp', 'fd2063e7246ed74534e2cec236276fe594c98a9f83ea4e4fa9caf46e26b7ccdb', 'ino', 'supp', NULL, NULL, 'ino_supp@inoerp.com', NULL, 0, NULL, NULL, 0, 'default', NULL, 0, 2, 2, 4, 1, 1, 0, 0, NULL, 10, 1, 1, '1', 1, '0', NULL, 1, 0, '2014-09-04 15:26:43', 0, '2004-09-14 15:26:43', 'N', NULL), @@ -35836,7 +35264,7 @@ INSERT INTO `user` (`user_id`, `person_id`, `username`, `password`, `first_name` (107, NULL, 'asd', '$2y$10$krFOkInMaARaZMFbJSRqVOmWId36PNPKFn28nnj2X3MjX0y7HRPFS', 'asdas', 'asd', NULL, NULL, 'asda', NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 2, 2, 4, 1, 1, 0, 0, NULL, 10, NULL, 1, '1', 1, NULL, NULL, 1, -99, '2015-10-15 19:13:14', -99, '2015-10-15 19:13:14', 'N', NULL), (108, NULL, 'sdfsdfsdfsd', '$2y$10$Nj9TnykeLOPjF/PyiKv0jekTA9WXkRTFxZVyH9ug/FA/krZasNxEq', 'xvxvds', 'dsfsdfsdf', NULL, NULL, 'sdfsdfsfsdf@sdff.com', NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 2, 2, 4, 1, 1, 0, 0, NULL, 10, NULL, 1, '1', 1, NULL, NULL, 1, -99, '2015-10-15 19:29:22', -99, '2015-10-15 19:29:22', 'N', NULL), (109, NULL, 'heklosdf', '$2y$10$xB70h9NYi9bzkIFHuOhkt.Lwu.Bq3.u.tu01wpnRh3NqEo1lwnGvG', 'heklosdf', 'heklosdf', NULL, NULL, 'heklosdf', NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 2, 2, 4, 1, 1, 0, 0, NULL, 10, NULL, 1, '1', 1, NULL, NULL, 1, -99, '2015-10-15 19:29:48', -99, '2015-10-15 19:29:48', 'N', NULL), -(110, NULL, 'sdfsd', '$2y$10$6tqtEgN6.GwqahomUmONKeNppDuZ7PFlE1Q44hZWQj4MOCTYvQJ7a', 'sdfdsf', 'asdfsdf', NULL, NULL, 'asfas@asfas', NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 2, 2, 4, 1, 1, 0, 0, NULL, 10, NULL, 1, '1', 1, NULL, NULL, 1, -99, '2015-10-16 04:31:00', -99, '2015-10-16 04:31:00', 'N', NULL); +(110, NULL, 'sdfsd', '$2y$10$6tqtEgN6.GwqahomUmONKeNppDuZ7PFlE1Q44hZWQj4MOCTYvQJ7a', 'sdfdsf', 'asdfsdf', NULL, NULL, 'asfas@asfas', NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 2, 2, 4, 1, 1, 0, 0, NULL, 10, NULL, 1, '1', 1, NULL, NULL, 1, -99, '2015-10-16 04:31:00', 34, '2016-02-18 03:15:27', 'N', NULL); -- -------------------------------------------------------- @@ -35844,8 +35272,8 @@ INSERT INTO `user` (`user_id`, `person_id`, `username`, `password`, `first_name` -- Table structure for table `user_dashboard_config` -- -CREATE TABLE IF NOT EXISTS `user_dashboard_config` ( - `user_dashboard_config_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `user_dashboard_config` ( + `user_dashboard_config_id` int(12) NOT NULL, `config_level` varchar(25) DEFAULT NULL, `report_label` varchar(40) NOT NULL, `user_role` varchar(50) DEFAULT NULL, @@ -35857,9 +35285,8 @@ CREATE TABLE IF NOT EXISTS `user_dashboard_config` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`user_dashboard_config_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_dashboard_config` @@ -35880,8 +35307,8 @@ INSERT INTO `user_dashboard_config` (`user_dashboard_config_id`, `config_level`, -- Table structure for table `user_favourite` -- -CREATE TABLE IF NOT EXISTS `user_favourite` ( - `user_favourite_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `user_favourite` ( + `user_favourite_id` int(12) NOT NULL, `user_id` int(12) NOT NULL, `path_id` int(12) DEFAULT NULL, `external_link` varchar(256) DEFAULT NULL, @@ -35891,9 +35318,8 @@ CREATE TABLE IF NOT EXISTS `user_favourite` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`user_favourite_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_favourite` @@ -35914,17 +35340,15 @@ INSERT INTO `user_favourite` (`user_favourite_id`, `user_id`, `path_id`, `extern -- Table structure for table `user_group` -- -CREATE TABLE IF NOT EXISTS `user_group` ( - `user_group_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `user_group` ( + `user_group_id` int(12) UNSIGNED NOT NULL, `user_group_code` varchar(25) NOT NULL, - `user_id` int(12) unsigned NOT NULL, + `user_id` int(12) UNSIGNED NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`user_group_id`), - UNIQUE KEY `user_group_code` (`user_group_code`,`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_group` @@ -35943,18 +35367,16 @@ INSERT INTO `user_group` (`user_group_id`, `user_group_code`, `user_id`, `create -- Table structure for table `user_group_access` -- -CREATE TABLE IF NOT EXISTS `user_group_access` ( - `user_group_access_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `user_group_access` ( + `user_group_access_id` int(12) NOT NULL, `user_group_code` varchar(25) NOT NULL, `org_id` int(12) NOT NULL, `access_level` int(5) NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`user_group_access_id`), - UNIQUE KEY `user_group_code` (`user_group_code`,`org_id`,`access_level`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=20 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_group_access` @@ -35985,17 +35407,16 @@ INSERT INTO `user_group_access` (`user_group_access_id`, `user_group_code`, `org -- Table structure for table `user_password_reset` -- -CREATE TABLE IF NOT EXISTS `user_password_reset` ( - `user_password_reset_id` int(12) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(12) unsigned NOT NULL, +CREATE TABLE `user_password_reset` ( + `user_password_reset_id` int(12) UNSIGNED NOT NULL, + `user_id` int(12) UNSIGNED NOT NULL, `code` varchar(256) NOT NULL, `status` float DEFAULT NULL, `creation_date` datetime NOT NULL, `created_by` varchar(50) DEFAULT NULL, `last_update_by` int(12) DEFAULT NULL, - `last_update_date` varchar(50) DEFAULT NULL, - PRIMARY KEY (`user_password_reset_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=25 ; + `last_update_date` varchar(50) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_password_reset` @@ -36016,16 +35437,15 @@ INSERT INTO `user_password_reset` (`user_password_reset_id`, `user_id`, `code`, -- Table structure for table `user_role` -- -CREATE TABLE IF NOT EXISTS `user_role` ( - `user_role_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `user_role` ( + `user_role_id` int(12) UNSIGNED NOT NULL, `role_code` varchar(25) NOT NULL, - `user_id` int(12) unsigned NOT NULL, + `user_id` int(12) UNSIGNED NOT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`user_role_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=51 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_role` @@ -36076,8 +35496,7 @@ INSERT INTO `user_role` (`user_role_id`, `role_code`, `user_id`, `created_by`, ` (46, 'BASIC', 106, -99, '2015-10-15 19:10:20', -99, '2015-10-15 19:10:20'), (47, 'BASIC', 107, -99, '2015-10-15 19:13:14', -99, '2015-10-15 19:13:14'), (48, 'BASIC', 108, -99, '2015-10-15 19:29:23', -99, '2015-10-15 19:29:23'), -(49, 'BASIC', 109, -99, '2015-10-15 19:29:48', -99, '2015-10-15 19:29:48'), -(50, 'BASIC', 110, -99, '2015-10-16 04:31:01', -99, '2015-10-16 04:31:01'); +(49, 'BASIC', 109, -99, '2015-10-15 19:29:48', -99, '2015-10-15 19:29:48'); -- -------------------------------------------------------- @@ -36085,17 +35504,16 @@ INSERT INTO `user_role` (`user_role_id`, `role_code`, `user_id`, `created_by`, ` -- Table structure for table `user_supplier` -- -CREATE TABLE IF NOT EXISTS `user_supplier` ( - `user_supplier_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `user_supplier` ( + `user_supplier_id` int(12) UNSIGNED NOT NULL, `user_id` int(12) NOT NULL, - `supplier_id` int(12) unsigned NOT NULL, + `supplier_id` int(12) UNSIGNED NOT NULL, `supplier_site_id` int(12) DEFAULT NULL, `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`user_supplier_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_supplier` @@ -36110,8 +35528,8 @@ INSERT INTO `user_supplier` (`user_supplier_id`, `user_id`, `supplier_id`, `supp -- Table structure for table `view` -- -CREATE TABLE IF NOT EXISTS `view` ( - `view_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `view` ( + `view_id` int(12) UNSIGNED NOT NULL, `view_name` varchar(256) NOT NULL, `description` varchar(255) DEFAULT NULL, `custom_div_class` varchar(256) DEFAULT NULL, @@ -36152,10 +35570,8 @@ CREATE TABLE IF NOT EXISTS `view` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`view_id`), - UNIQUE KEY `name` (`view_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `view` @@ -36177,15 +35593,13 @@ INSERT INTO `view` (`view_id`, `view_name`, `description`, `custom_div_class`, ` -- Table structure for table `view_path` -- -CREATE TABLE IF NOT EXISTS `view_path` ( - `view_path_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `view_path` ( + `view_path_id` int(12) NOT NULL, `view_id` int(12) NOT NULL, `column_name` varchar(100) NOT NULL, `path` varchar(256) NOT NULL, - `description` varchar(256) DEFAULT NULL, - PRIMARY KEY (`view_path_id`), - UNIQUE KEY `view_id` (`view_id`,`column_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; + `description` varchar(256) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `view_path` @@ -36205,8 +35619,8 @@ INSERT INTO `view_path` (`view_path_id`, `view_id`, `column_name`, `path`, `desc -- Table structure for table `wip_accounting_group` -- -CREATE TABLE IF NOT EXISTS `wip_accounting_group` ( - `wip_accounting_group_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `wip_accounting_group` ( + `wip_accounting_group_id` int(12) NOT NULL, `org_id` int(12) NOT NULL, `wo_type` varchar(50) NOT NULL, `wip_accounting_group` varchar(50) NOT NULL, @@ -36228,10 +35642,8 @@ CREATE TABLE IF NOT EXISTS `wip_accounting_group` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`wip_accounting_group_id`), - UNIQUE KEY `org_id` (`org_id`,`wip_accounting_group`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `wip_accounting_group` @@ -36246,8 +35658,8 @@ INSERT INTO `wip_accounting_group` (`wip_accounting_group_id`, `org_id`, `wo_typ -- Table structure for table `wip_control` -- -CREATE TABLE IF NOT EXISTS `wip_control` ( - `wip_control_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `wip_control` ( + `wip_control_id` int(12) UNSIGNED NOT NULL, `org_id` int(12) NOT NULL, `default_accounting_group` int(12) DEFAULT NULL, `wo_number_type` varchar(25) DEFAULT NULL, @@ -36261,9 +35673,8 @@ CREATE TABLE IF NOT EXISTS `wip_control` ( `created_by` int(12) NOT NULL, `creation_date` datetime DEFAULT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime DEFAULT NULL, - PRIMARY KEY (`wip_control_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + `last_update_date` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -36271,12 +35682,12 @@ CREATE TABLE IF NOT EXISTS `wip_control` ( -- Table structure for table `wip_move_transaction` -- -CREATE TABLE IF NOT EXISTS `wip_move_transaction` ( - `wip_move_transaction_id` int(12) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `wip_move_transaction` ( + `wip_move_transaction_id` int(12) UNSIGNED NOT NULL, `wip_wo_header_id` int(12) DEFAULT NULL, - `wo_routing_line_id` int(12) unsigned NOT NULL, - `wo_routing_detail_id` int(12) unsigned NOT NULL, - `org_id` int(12) unsigned NOT NULL, + `wo_routing_line_id` int(12) UNSIGNED NOT NULL, + `wo_routing_detail_id` int(12) UNSIGNED NOT NULL, + `org_id` int(12) UNSIGNED NOT NULL, `wo_number` varchar(50) DEFAULT NULL, `item_id_m` int(12) NOT NULL, `item_number` varchar(50) DEFAULT NULL, @@ -36295,9 +35706,8 @@ CREATE TABLE IF NOT EXISTS `wip_move_transaction` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`wip_move_transaction_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=165 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `wip_move_transaction` @@ -36465,12 +35875,12 @@ INSERT INTO `wip_move_transaction` (`wip_move_transaction_id`, `wip_wo_header_id -- Table structure for table `wip_resource_transaction` -- -CREATE TABLE IF NOT EXISTS `wip_resource_transaction` ( - `wip_resource_transaction_id` int(12) NOT NULL AUTO_INCREMENT, - `wip_wo_header_id` int(12) unsigned NOT NULL, - `wip_wo_routing_line_id` int(12) unsigned NOT NULL, - `wip_wo_routing_detail_id` int(12) unsigned NOT NULL, - `org_id` int(12) unsigned NOT NULL, +CREATE TABLE `wip_resource_transaction` ( + `wip_resource_transaction_id` int(12) NOT NULL, + `wip_wo_header_id` int(12) UNSIGNED NOT NULL, + `wip_wo_routing_line_id` int(12) UNSIGNED NOT NULL, + `wip_wo_routing_detail_id` int(12) UNSIGNED NOT NULL, + `org_id` int(12) UNSIGNED NOT NULL, `transaction_type` varchar(50) NOT NULL, `transaction_date` date NOT NULL, `transaction_quantity` decimal(20,5) NOT NULL, @@ -36483,9 +35893,8 @@ CREATE TABLE IF NOT EXISTS `wip_resource_transaction` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`wip_resource_transaction_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=275 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `wip_resource_transaction` @@ -36756,8 +36165,8 @@ INSERT INTO `wip_resource_transaction` (`wip_resource_transaction_id`, `wip_wo_h -- Table structure for table `wip_wol_transaction` -- -CREATE TABLE IF NOT EXISTS `wip_wol_transaction` ( - `wip_wol_transaction_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `wip_wol_transaction` ( + `wip_wol_transaction_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `description` varchar(256) DEFAULT NULL, `revision_name` varchar(10) DEFAULT NULL, @@ -36775,10 +36184,8 @@ CREATE TABLE IF NOT EXISTS `wip_wol_transaction` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`wip_wol_transaction_id`), - UNIQUE KEY `wo_number` (`description`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=79 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `wip_wol_transaction` @@ -36869,10 +36276,10 @@ INSERT INTO `wip_wol_transaction` (`wip_wol_transaction_id`, `item_id_m`, `descr -- Table structure for table `wip_wo_bom` -- -CREATE TABLE IF NOT EXISTS `wip_wo_bom` ( - `wip_wo_bom_id` int(12) unsigned NOT NULL AUTO_INCREMENT, - `wip_wo_header_id` int(12) unsigned NOT NULL, - `bom_sequence` int(10) unsigned NOT NULL, +CREATE TABLE `wip_wo_bom` ( + `wip_wo_bom_id` int(12) UNSIGNED NOT NULL, + `wip_wo_header_id` int(12) UNSIGNED NOT NULL, + `bom_sequence` int(10) UNSIGNED NOT NULL, `routing_sequence` int(12) DEFAULT NULL, `component_item_id_m` int(12) NOT NULL, `component_revision` varchar(10) DEFAULT NULL, @@ -36895,11 +36302,8 @@ CREATE TABLE IF NOT EXISTS `wip_wo_bom` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`wip_wo_bom_id`), - UNIQUE KEY `bom_header_id` (`wip_wo_header_id`,`bom_sequence`), - UNIQUE KEY `bom_header_id_2` (`wip_wo_header_id`,`routing_sequence`,`component_item_id_m`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=298 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `wip_wo_bom` @@ -37167,6 +36571,11 @@ INSERT INTO `wip_wo_bom` (`wip_wo_bom_id`, `wip_wo_header_id`, `bom_sequence`, ` (295, 154, 10, 10, 10169, NULL, 'ITEM', '1.25000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'OPERATION_PULL', 2, 5, 13, 3, NULL, 34, '2015-02-08 08:55:42', 34, '2015-02-08 09:14:50'), (296, 155, 10, 10, 10234, NULL, 'ITEM', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, 34, '2015-09-22 16:29:13', 34, '2015-09-22 16:29:13'), (297, 156, 10, 10, 10234, NULL, 'ITEM', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 34, '2015-09-23 07:11:24', 34, '2015-09-23 07:11:24'); +INSERT INTO `wip_wo_bom` (`wip_wo_bom_id`, `wip_wo_header_id`, `bom_sequence`, `routing_sequence`, `component_item_id_m`, `component_revision`, `usage_basis`, `usage_quantity`, `auto_request_material_cb`, `effective_start_date`, `effective_end_date`, `eco_number`, `eco_implemented_cb`, `planning_percentage`, `yield`, `include_in_cost_rollup_cb`, `wip_supply_type`, `supply_sub_inventory`, `supply_locator`, `required_quantity`, `issued_quantity`, `ef_id`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES +(298, 2, 10, 9, 10036, NULL, 'ITEM', '10.00000', NULL, NULL, NULL, NULL, NULL, NULL, '0.000000', NULL, 'PUSH', 2, 5, 40, NULL, NULL, 34, '2016-03-08 08:52:34', 34, '2016-03-08 08:52:34'), +(299, 2, 40, 7, 10042, NULL, 'ITEM', '20.00000', NULL, NULL, NULL, NULL, NULL, NULL, '0.000000', NULL, 'OPERATION_PULL', 2, 5, 80, NULL, NULL, 34, '2016-03-08 08:52:34', 34, '2016-03-08 08:52:34'), +(300, 2, 50, 9, 10046, NULL, 'ITEM', '5.00000', NULL, NULL, NULL, NULL, NULL, NULL, '0.000000', NULL, 'ASSEMBLY_PULL', 3, 9, 20, NULL, NULL, 34, '2016-03-08 08:52:34', 34, '2016-03-08 08:52:34'), +(301, 2, 30, 7, 10058, NULL, 'ITEM', '20.00000', NULL, NULL, NULL, NULL, NULL, NULL, '0.000000', NULL, 'OPERATION_PULL', 2, 5, 80, NULL, NULL, 34, '2016-03-08 08:52:34', 34, '2016-03-08 08:52:34'); -- -------------------------------------------------------- @@ -37174,8 +36583,8 @@ INSERT INTO `wip_wo_bom` (`wip_wo_bom_id`, `wip_wo_header_id`, `bom_sequence`, ` -- Table structure for table `wip_wo_header` -- -CREATE TABLE IF NOT EXISTS `wip_wo_header` ( - `wip_wo_header_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `wip_wo_header` ( + `wip_wo_header_id` int(12) NOT NULL, `item_id_m` int(12) NOT NULL, `wo_number` varchar(50) DEFAULT NULL, `revision_name` varchar(10) DEFAULT NULL, @@ -37207,21 +36616,19 @@ CREATE TABLE IF NOT EXISTS `wip_wo_header` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`wip_wo_header_id`), - UNIQUE KEY `wo_number` (`wo_number`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=157 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `wip_wo_header` -- INSERT INTO `wip_wo_header` (`wip_wo_header_id`, `item_id_m`, `wo_number`, `revision_name`, `org_id`, `wip_accounting_group_id`, `wo_type`, `wo_status`, `start_date`, `completion_date`, `quantity`, `nettable_quantity`, `reference_bom_item_id_m`, `bom_exploded_cb`, `routing_exploded_cb`, `reference_routing_item_id_m`, `completion_sub_inventory`, `completion_locator`, `completed_quantity`, `scrapped_quantity`, `released_date`, `first_unit_completed_date`, `last_unit_completed_date`, `schedule_group`, `build_sequence`, `line`, `scheduling_priority`, `closed_date`, `ef_id`, `created_by`, `creation_date`, `last_update_by`, `last_update_date`) VALUES -(1, 10043, 'WO001', NULL, 6, 0, 368, NULL, '2014-01-14', '2014-01-16', '2.00000', '2.00000', NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-01-03 04:13:10', 0, '2014-01-03 04:13:10'), -(2, 10035, 'WO002', NULL, 6, 0, 368, NULL, '2014-01-15', '2014-01-15', '1.00000', '1.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-01-02 07:35:56', 0, '2014-01-02 07:35:56'), -(3, 10039, 'WO003', NULL, 6, 0, 368, NULL, '2014-01-29', '2014-01-31', '2.00000', '2.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-01-02 08:09:37', 0, '2014-01-02 08:09:37'), -(4, 10057, 'WO005', NULL, 6, 1, 368, '', '2014-01-22', '2014-01-24', '6.00000', '6.00000', 0, 1, 1, 0, 0, 0, '0.00000', '0.00000', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, '', 0, NULL, NULL, 0, '2014-05-10 14:35:49', 0, '2010-05-14 14:35:49'), -(5, 10053, 'WO007', NULL, 6, 0, 368, NULL, '2014-01-22', '2014-01-24', '2.00000', '2.00000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-02-12', '2014-02-14', '2014-02-21', NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-02-12 01:26:40', 12, '0000-00-00 00:00:00'), +(1, 10043, 'WO001', '', 6, 0, 368, '', '0000-00-00', '0000-00-00', '4.00000', '2.00000', 0, 0, 1, 0, 0, 0, '0.00000', '0.00000', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, '', 0, '0000-00-00', NULL, 0, '2014-01-03 04:13:10', 34, '2016-03-08 08:52:34'), +(2, 10035, 'WO002', '', 6, 0, 368, '', '0000-00-00', '0000-00-00', '4.00000', '1.00000', 0, 1, 1, 0, 0, 0, '0.00000', '0.00000', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, '', 0, '0000-00-00', NULL, 0, '2014-01-02 07:35:56', 34, '2016-03-08 08:52:34'), +(3, 10039, 'WO003', '', 6, 0, 368, '', '0000-00-00', '0000-00-00', '4.00000', '2.00000', 0, 0, 1, 0, 0, 0, '0.00000', '0.00000', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, '', 0, '0000-00-00', NULL, 0, '2014-01-02 08:09:37', 34, '2016-03-08 08:52:34'), +(4, 10057, 'WO005', '', 6, 1, 368, '', '0000-00-00', '0000-00-00', '4.00000', '6.00000', 0, 1, 1, 0, 0, 0, '0.00000', '0.00000', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, '', 0, '0000-00-00', NULL, 0, '2014-05-10 14:35:49', 34, '2016-03-08 08:52:34'), +(5, 10053, 'WO007', '', 6, 0, 368, '', '0000-00-00', '0000-00-00', '4.00000', '2.00000', 0, 0, 1, 0, 0, 0, '0.00000', '0.00000', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, '', 0, '0000-00-00', NULL, 0, '2014-02-12 01:26:40', 34, '2016-03-08 08:52:34'), (6, 10043, 'WO009', NULL, 6, 0, 368, '0', '2014-01-21', '2014-01-22', '2.00000', '2.00000', NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-01-03 03:32:52', 0, '2014-01-03 03:32:52'), (7, 10043, 'WO010', NULL, 6, 0, 368, 'Released', '2014-01-14', '2014-01-22', '3.00000', '3.00000', NULL, 1, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2014-01-03 08:12:47', 0, '2014-01-03 08:12:47'), (8, 10043, 'WO011', NULL, 6, 1, 0, '', '2014-01-08', '2014-01-10', '3.00000', '3.00000', 0, 1, 1, 0, 0, 0, '0.00000', '0.00000', '0000-00-00', '0000-00-00', '0000-00-00', '', 0, '', 0, NULL, NULL, 0, '2014-05-22 08:40:10', 0, '2022-05-14 08:40:10'), @@ -37370,8 +36777,8 @@ INSERT INTO `wip_wo_header` (`wip_wo_header_id`, `item_id_m`, `wo_number`, `revi -- Table structure for table `wip_wo_routing_detail` -- -CREATE TABLE IF NOT EXISTS `wip_wo_routing_detail` ( - `wip_wo_routing_detail_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `wip_wo_routing_detail` ( + `wip_wo_routing_detail_id` int(12) NOT NULL, `wip_wo_routing_line_id` int(12) NOT NULL, `wip_wo_header_id` int(12) NOT NULL, `resource_sequence` int(12) NOT NULL, @@ -37387,10 +36794,8 @@ CREATE TABLE IF NOT EXISTS `wip_wo_routing_detail` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`wip_wo_routing_detail_id`), - UNIQUE KEY `wip_wo_routing_line_id` (`wip_wo_routing_line_id`,`resource_sequence`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=274 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `wip_wo_routing_detail` @@ -37654,7 +37059,12 @@ INSERT INTO `wip_wo_routing_detail` (`wip_wo_routing_detail_id`, `wip_wo_routing (270, 255, 153, 10, 'ITEM', 1, '1.00000', 'YES', NULL, '10.00000', NULL, 'WIP_MOVE', NULL, 34, '2015-02-08 08:43:18', 34, '2015-02-08 08:43:18'), (271, 256, 154, 10, 'ITEM', 1, '1', 'YES', NULL, '10.00000', '2.00000', 'WIP_MOVE', NULL, 34, '2015-02-08 08:55:42', 34, '2015-03-11 13:42:42'), (272, 257, 155, 10, 'ITEM', 1, '2.00000', 'NEXT', NULL, '4.00000', '2.00000', 'WIP_MOVE', NULL, 34, '2015-09-22 16:29:13', 34, '2015-09-22 16:35:38'), -(273, 258, 156, 10, 'ITEM', 1, '2.00000', 'NEXT', NULL, '2.00000', '2.00000', 'WIP_MOVE', NULL, 34, '2015-09-23 07:11:24', 34, '2015-09-23 07:12:56'); +(273, 258, 156, 10, 'ITEM', 1, '2.00000', 'NEXT', NULL, '2.00000', '2.00000', 'WIP_MOVE', NULL, 34, '2015-09-23 07:11:24', 34, '2015-09-23 07:12:56'), +(274, 259, 1, 10, 'ITEM', 1, '1.00000', 'YES', 1, '4.00000', NULL, 'WIP_MOVE', 1, 34, '2016-03-08 08:52:34', 34, '2016-03-08 08:52:34'), +(275, 259, 1, 20, 'ITEM', 2, '1.00000', 'YES', 1, '4.00000', NULL, 'WIP_MOVE', 1, 34, '2016-03-08 08:52:34', 34, '2016-03-08 08:52:34'), +(276, 260, 1, 10, 'ITEM', 3, '1.00000', 'NO', 1, '4.00000', NULL, 'WIP_MOVE', 1, 34, '2016-03-08 08:52:34', 34, '2016-03-08 08:52:34'), +(277, 261, 1, 15, 'ITEM', 1, '1.00000', 'YES', 1, '4.00000', NULL, 'WIP_MOVE', 1, 34, '2016-03-08 08:52:34', 34, '2016-03-08 08:52:34'), +(278, 261, 1, 25, 'ITEM', 2, '1.00000', 'YES', 1, '4.00000', NULL, 'WIP_MOVE', 1, 34, '2016-03-08 08:52:34', 34, '2016-03-08 08:52:34'); -- -------------------------------------------------------- @@ -37662,8 +37072,8 @@ INSERT INTO `wip_wo_routing_detail` (`wip_wo_routing_detail_id`, `wip_wo_routing -- Table structure for table `wip_wo_routing_line` -- -CREATE TABLE IF NOT EXISTS `wip_wo_routing_line` ( - `wip_wo_routing_line_id` int(12) NOT NULL AUTO_INCREMENT, +CREATE TABLE `wip_wo_routing_line` ( + `wip_wo_routing_line_id` int(12) NOT NULL, `wip_wo_header_id` int(12) NOT NULL, `routing_sequence` int(12) NOT NULL DEFAULT '1', `standard_operation_id` int(12) DEFAULT NULL, @@ -37686,10 +37096,8 @@ CREATE TABLE IF NOT EXISTS `wip_wo_routing_line` ( `created_by` int(12) NOT NULL, `creation_date` datetime NOT NULL, `last_update_by` int(12) NOT NULL, - `last_update_date` datetime NOT NULL, - PRIMARY KEY (`wip_wo_routing_line_id`), - UNIQUE KEY `bom_header_id` (`wip_wo_header_id`,`routing_sequence`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=259 ; + `last_update_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `wip_wo_routing_line` @@ -37924,14 +37332,17 @@ INSERT INTO `wip_wo_routing_line` (`wip_wo_routing_line_id`, `wip_wo_header_id`, (255, 153, 10, NULL, 1, NULL, NULL, 1, 1, NULL, 10, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-02-08 08:43:18', 34, '2015-02-08 08:43:18'), (256, 154, 10, NULL, 1, NULL, NULL, 1, 1, NULL, 8, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2015-02-08 08:55:42', 34, '2015-03-11 13:42:42'), (257, 155, 10, NULL, 1, NULL, NULL, 1, 1, NULL, 1, NULL, NULL, 1, NULL, NULL, NULL, 0, NULL, NULL, 34, '2015-09-22 16:29:13', 34, '2015-09-22 16:39:16'), -(258, 156, 10, NULL, 1, NULL, NULL, 1, 1, NULL, 0, NULL, NULL, 1, NULL, NULL, NULL, 0, NULL, NULL, 34, '2015-09-23 07:11:24', 34, '2015-09-23 07:50:10'); +(258, 156, 10, NULL, 1, NULL, NULL, 1, 1, NULL, 0, NULL, NULL, 1, NULL, NULL, NULL, 0, NULL, NULL, 34, '2015-09-23 07:11:24', 34, '2015-09-23 07:50:10'), +(259, 1, 10, NULL, 1, '10 Manuall Assmbly', NULL, 1, 1, NULL, 4, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-08 08:52:34', 34, '2016-03-08 08:52:34'), +(260, 1, 20, NULL, 2, 'Cleaning', NULL, 1, 1, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, 34, '2016-03-08 08:52:34', 34, '2016-03-08 08:52:34'), +(261, 1, 30, NULL, 1, '20 Second Assembly', NULL, 1, 1, NULL, NULL, NULL, NULL, 1, NULL, NULL, 10, NULL, NULL, NULL, 34, '2016-03-08 08:52:34', 34, '2016-03-08 08:52:34'); -- -------------------------------------------------------- -- -- Stand-in structure for view `wip_wo_routing_v` -- -CREATE TABLE IF NOT EXISTS `wip_wo_routing_v` ( +CREATE TABLE `wip_wo_routing_v` ( `item_number` varchar(50) ,`item_description` varchar(256) ,`uom_id` int(12) @@ -37954,6 +37365,7 @@ CREATE TABLE IF NOT EXISTS `wip_wo_routing_v` ( ,`applied_quantity` decimal(20,5) ,`charge_type` varchar(50) ); + -- -------------------------------------------------------- -- @@ -37961,7 +37373,7 @@ CREATE TABLE IF NOT EXISTS `wip_wo_routing_v` ( -- DROP TABLE IF EXISTS `ap_import_claim_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ap_import_claim_v` AS select `eh`.`claim_number` AS `claim_number`,`eh`.`hr_expense_header_id` AS `hr_expense_header_id`,`eh`.`bu_org_id` AS `bu_org_id`,`eh`.`hr_employee_id` AS `hr_employee_id`,`eh`.`claim_date` AS `claim_date`,`eh`.`status` AS `status`,`eh`.`purpose` AS `purpose`,`eh`.`doc_currency` AS `doc_currency`,`eh`.`department_id` AS `department_id`,`eh`.`reason` AS `reason`,`eh`.`currency` AS `currency`,`eh`.`exchange_rate_type` AS `exchange_rate_type`,`eh`.`exchange_rate` AS `exchange_rate`,`eh`.`header_amount` AS `header_amount`,`user`.`supplier_id` AS `supplier_id`,`he`.`first_name` AS `first_name`,`he`.`last_name` AS `last_name`,`he`.`identification_id` AS `identification_id` from ((`hr_expense_header` `eh` join `user`) join `hr_employee` `he`) where ((`eh`.`status` = 'APPROVED') and (`user`.`hr_employee_id` = `eh`.`hr_employee_id`) and (`he`.`hr_employee_id` = `eh`.`hr_employee_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ap_import_claim_v` AS select `eh`.`claim_number` AS `claim_number`,`eh`.`hr_expense_header_id` AS `hr_expense_header_id`,`eh`.`bu_org_id` AS `bu_org_id`,`eh`.`hr_employee_id` AS `hr_employee_id`,`eh`.`claim_date` AS `claim_date`,`eh`.`status` AS `status`,`eh`.`purpose` AS `purpose`,`eh`.`doc_currency` AS `doc_currency`,`eh`.`department_id` AS `department_id`,`eh`.`reason` AS `reason`,`eh`.`currency` AS `currency`,`eh`.`exchange_rate_type` AS `exchange_rate_type`,`eh`.`exchange_rate` AS `exchange_rate`,`eh`.`header_amount` AS `header_amount`,`user`.`supplier_id` AS `supplier_id`,`he`.`first_name` AS `first_name`,`he`.`last_name` AS `last_name`,`he`.`identification_id` AS `identification_id` from ((`hr_expense_header` `eh` join `user`) join `hr_employee` `he`) where ((`eh`.`status` = 'APPROVED') and (`user`.`hr_employee_id` = `eh`.`hr_employee_id`) and (`he`.`hr_employee_id` = `eh`.`hr_employee_id`)) ; -- -------------------------------------------------------- @@ -37970,7 +37382,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ap_import_claim_v` AS sel -- DROP TABLE IF EXISTS `ap_payment_all_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ap_payment_all_v` AS select `apph`.`ap_payment_header_id` AS `ap_payment_header_id`,`apph`.`bu_org_id` AS `bu_org_id`,`apph`.`payment_type` AS `payment_type`,`apph`.`payment_number` AS `payment_number`,`apph`.`supplier_id` AS `supplier_id`,`apph`.`supplier_site_id` AS `supplier_site_id`,`apph`.`from_bank_header_id` AS `from_bank_header_id`,`apph`.`header_amount` AS `header_amount`,`apph`.`currency` AS `currency`,`apph`.`document_number` AS `document_number`,`apph`.`payment_status` AS `payment_status`,`apph`.`gl_journal_header_id` AS `gl_journal_header_id`,`appl`.`ap_payment_line_id` AS `ap_payment_line_id`,`appl`.`line_number` AS `line_number`,`appl`.`amount` AS `amount`,`appl`.`line_description` AS `line_description`,`apth`.`ap_transaction_header_id` AS `ap_transaction_header_id`,`apth`.`transaction_type` AS `transaction_type`,`apth`.`transaction_number` AS `transaction_number`,`apth`.`hr_employee_id` AS `hr_employee_id`,`apth`.`currency` AS `apth_currency`,`apth`.`header_amount` AS `apth_header_amount`,`apth`.`transaction_status` AS `transaction_status`,`apth`.`paid_amount` AS `paid_amount`,`apth`.`payment_status` AS `apth_payment_status`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number` from ((((`ap_payment_header` `apph` join `ap_payment_line` `appl`) join `ap_transaction_header` `apth`) join `supplier`) join `supplier_site`) where ((`apph`.`ap_payment_header_id` = `appl`.`ap_payment_header_id`) and (`appl`.`ap_transaction_header_id` = `apth`.`ap_transaction_header_id`) and (`apph`.`supplier_id` = `supplier`.`supplier_id`) and (`apph`.`supplier_site_id` = `supplier_site`.`supplier_site_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ap_payment_all_v` AS select `apph`.`ap_payment_header_id` AS `ap_payment_header_id`,`apph`.`bu_org_id` AS `bu_org_id`,`apph`.`payment_type` AS `payment_type`,`apph`.`payment_number` AS `payment_number`,`apph`.`supplier_id` AS `supplier_id`,`apph`.`supplier_site_id` AS `supplier_site_id`,`apph`.`from_bank_header_id` AS `from_bank_header_id`,`apph`.`header_amount` AS `header_amount`,`apph`.`currency` AS `currency`,`apph`.`document_number` AS `document_number`,`apph`.`payment_status` AS `payment_status`,`apph`.`gl_journal_header_id` AS `gl_journal_header_id`,`appl`.`ap_payment_line_id` AS `ap_payment_line_id`,`appl`.`line_number` AS `line_number`,`appl`.`amount` AS `amount`,`appl`.`line_description` AS `line_description`,`apth`.`ap_transaction_header_id` AS `ap_transaction_header_id`,`apth`.`transaction_type` AS `transaction_type`,`apth`.`transaction_number` AS `transaction_number`,`apth`.`hr_employee_id` AS `hr_employee_id`,`apth`.`currency` AS `apth_currency`,`apth`.`header_amount` AS `apth_header_amount`,`apth`.`transaction_status` AS `transaction_status`,`apth`.`paid_amount` AS `paid_amount`,`apth`.`payment_status` AS `apth_payment_status`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number` from ((((`ap_payment_header` `apph` join `ap_payment_line` `appl`) join `ap_transaction_header` `apth`) join `supplier`) join `supplier_site`) where ((`apph`.`ap_payment_header_id` = `appl`.`ap_payment_header_id`) and (`appl`.`ap_transaction_header_id` = `apth`.`ap_transaction_header_id`) and (`apph`.`supplier_id` = `supplier`.`supplier_id`) and (`apph`.`supplier_site_id` = `supplier_site`.`supplier_site_id`)) ; -- -------------------------------------------------------- @@ -37979,7 +37391,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ap_payment_all_v` AS sele -- DROP TABLE IF EXISTS `ap_payment_trnx_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ap_payment_trnx_v` AS select `ap_transaction_header`.`ap_transaction_header_id` AS `ap_transaction_header_id`,`ap_transaction_header`.`bu_org_id` AS `bu_org_id`,`ap_transaction_header`.`transaction_type` AS `transaction_type`,`ap_transaction_header`.`transaction_number` AS `transaction_number`,`ap_transaction_header`.`supplier_id` AS `supplier_id`,`ap_transaction_header`.`supplier_site_id` AS `supplier_site_id`,`ap_transaction_header`.`exchange_rate` AS `exchange_rate`,`ap_transaction_header`.`hr_employee_id` AS `hr_employee_id`,`ap_transaction_header`.`currency` AS `currency`,`ap_transaction_header`.`header_amount` AS `header_amount`,`ap_transaction_header`.`transaction_status` AS `transaction_status`,`ap_transaction_header`.`payment_term_id` AS `payment_term_id`,`ap_transaction_header`.`paid_amount` AS `paid_amount`,`ap_transaction_header`.`payment_status` AS `payment_status`,`ap_transaction_header`.`ledger_id` AS `ledger_id`,`ap_transaction_header`.`period_id` AS `period_id`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`ph`.`po_number` AS `po_number`,`ph`.`po_type` AS `po_type`,`ph`.`buyer` AS `buyer`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `description`,`ap_transaction_line`.`ap_transaction_line_id` AS `ap_transaction_line_id`,`ap_transaction_line`.`line_type` AS `line_type`,`ap_transaction_line`.`line_number` AS `line_number`,`ap_transaction_line`.`item_id_m` AS `item_id_m`,`ap_transaction_line`.`item_description` AS `item_description`,`ap_transaction_line`.`line_description` AS `line_description`,`ap_transaction_line`.`inv_line_quantity` AS `inv_line_quantity`,`ap_transaction_line`.`inv_unit_price` AS `inv_unit_price`,`ap_transaction_line`.`inv_line_price` AS `inv_line_price`,`ap_transaction_line`.`gl_inv_line_price` AS `gl_inv_line_price`,`ap_transaction_line`.`po_header_id` AS `po_header_id`,`ap_transaction_line`.`po_line_id` AS `po_line_id`,`ap_transaction_line`.`po_detail_id` AS `po_detail_id`,`ap_transaction_line`.`ref_transaction_header_id` AS `ref_transaction_header_id`,`ap_transaction_line`.`ref_transaction_line_id` AS `ref_transaction_line_id`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`ap_transaction_header`.`created_by` AS `created_by`,`ap_transaction_header`.`creation_date` AS `creation_date`,`ap_transaction_header`.`last_update_by` AS `last_update_by`,`ap_transaction_header`.`last_update_date` AS `last_update_date` from ((((((`ap_transaction_header` left join `supplier` on((`ap_transaction_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`ap_transaction_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`ap_transaction_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `ap_transaction_line` on((`ap_transaction_header`.`ap_transaction_header_id` = `ap_transaction_line`.`ap_transaction_header_id`))) left join `item` on(((`ap_transaction_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`item_id_m` = `item`.`item_id`)))) left join `po_header` `ph` on((`ph`.`po_header_id` = `ap_transaction_line`.`po_header_id`))) where ((ifnull(`ap_transaction_header`.`paid_amount`,0) < `ap_transaction_header`.`header_amount`) and (isnull(`ap_transaction_header`.`payment_status`) or (`ap_transaction_header`.`payment_status` <> 'FULLY_PAID'))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ap_payment_trnx_v` AS select `ap_transaction_header`.`ap_transaction_header_id` AS `ap_transaction_header_id`,`ap_transaction_header`.`bu_org_id` AS `bu_org_id`,`ap_transaction_header`.`transaction_type` AS `transaction_type`,`ap_transaction_header`.`transaction_number` AS `transaction_number`,`ap_transaction_header`.`supplier_id` AS `supplier_id`,`ap_transaction_header`.`supplier_site_id` AS `supplier_site_id`,`ap_transaction_header`.`exchange_rate` AS `exchange_rate`,`ap_transaction_header`.`hr_employee_id` AS `hr_employee_id`,`ap_transaction_header`.`currency` AS `currency`,`ap_transaction_header`.`header_amount` AS `header_amount`,`ap_transaction_header`.`transaction_status` AS `transaction_status`,`ap_transaction_header`.`payment_term_id` AS `payment_term_id`,`ap_transaction_header`.`paid_amount` AS `paid_amount`,`ap_transaction_header`.`payment_status` AS `payment_status`,`ap_transaction_header`.`ledger_id` AS `ledger_id`,`ap_transaction_header`.`period_id` AS `period_id`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`ph`.`po_number` AS `po_number`,`ph`.`po_type` AS `po_type`,`ph`.`buyer` AS `buyer`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `description`,`ap_transaction_line`.`ap_transaction_line_id` AS `ap_transaction_line_id`,`ap_transaction_line`.`line_type` AS `line_type`,`ap_transaction_line`.`line_number` AS `line_number`,`ap_transaction_line`.`item_id_m` AS `item_id_m`,`ap_transaction_line`.`item_description` AS `item_description`,`ap_transaction_line`.`line_description` AS `line_description`,`ap_transaction_line`.`inv_line_quantity` AS `inv_line_quantity`,`ap_transaction_line`.`inv_unit_price` AS `inv_unit_price`,`ap_transaction_line`.`inv_line_price` AS `inv_line_price`,`ap_transaction_line`.`gl_inv_line_price` AS `gl_inv_line_price`,`ap_transaction_line`.`po_header_id` AS `po_header_id`,`ap_transaction_line`.`po_line_id` AS `po_line_id`,`ap_transaction_line`.`po_detail_id` AS `po_detail_id`,`ap_transaction_line`.`ref_transaction_header_id` AS `ref_transaction_header_id`,`ap_transaction_line`.`ref_transaction_line_id` AS `ref_transaction_line_id`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`ap_transaction_header`.`created_by` AS `created_by`,`ap_transaction_header`.`creation_date` AS `creation_date`,`ap_transaction_header`.`last_update_by` AS `last_update_by`,`ap_transaction_header`.`last_update_date` AS `last_update_date` from ((((((`ap_transaction_header` left join `supplier` on((`ap_transaction_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`ap_transaction_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`ap_transaction_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `ap_transaction_line` on((`ap_transaction_header`.`ap_transaction_header_id` = `ap_transaction_line`.`ap_transaction_header_id`))) left join `item` on(((`ap_transaction_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`item_id_m` = `item`.`item_id`)))) left join `po_header` `ph` on((`ph`.`po_header_id` = `ap_transaction_line`.`po_header_id`))) where ((ifnull(`ap_transaction_header`.`paid_amount`,0) < `ap_transaction_header`.`header_amount`) and (isnull(`ap_transaction_header`.`payment_status`) or (`ap_transaction_header`.`payment_status` <> 'FULLY_PAID'))) ; -- -------------------------------------------------------- @@ -37988,7 +37400,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ap_payment_trnx_v` AS sel -- DROP TABLE IF EXISTS `ap_po_matching_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ap_po_matching_v` AS select `po_header`.`po_header_id` AS `po_header_id`,`po_header`.`bu_org_id` AS `bu_org_id`,`po_header`.`po_type` AS `po_type`,`po_header`.`po_number` AS `po_number`,`po_header`.`supplier_id` AS `supplier_id`,`po_header`.`supplier_site_id` AS `supplier_site_id`,`po_header`.`buyer` AS `buyer`,`po_header`.`currency` AS `currency`,`po_header`.`doc_currency` AS `doc_currency`,`po_header`.`header_amount` AS `header_amount`,`po_header`.`po_status` AS `po_status`,`po_header`.`payment_term_id` AS `payment_term_id`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`po_line`.`po_line_id` AS `po_line_id`,`po_line`.`line_type` AS `line_type`,`po_line`.`line_number` AS `po_line_number`,`po_line`.`item_id_m` AS `item_id_m`,`po_line`.`item_description` AS `item_description`,`po_line`.`line_description` AS `line_description`,`po_line`.`line_quantity` AS `line_quantity`,`po_line`.`unit_price` AS `unit_price`,`po_line`.`line_price` AS `line_price`,`po_line`.`gl_line_price` AS `gl_line_price`,`po_line`.`gl_tax_amount` AS `gl_tax_amount`,`po_line`.`tax_amount` AS `tax_amount`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`po_detail`.`po_detail_id` AS `po_detail_id`,`po_detail`.`shipment_number` AS `shipment_number`,`po_line`.`receving_org_id` AS `receving_org_id`,`po_detail`.`subinventory_id` AS `subinventory_id`,`po_detail`.`locator_id` AS `locator_id`,`po_detail`.`requestor` AS `requestor`,`po_detail`.`quantity` AS `quantity`,ifnull(`po_detail`.`received_quantity`,0) AS `received_quantity`,(`po_detail`.`quantity` - ifnull(`po_detail`.`received_quantity`,0)) AS `receiving_open_quantity`,`po_detail`.`need_by_date` AS `need_by_date`,`po_detail`.`promise_date` AS `promise_date`,`po_detail`.`accepted_quantity` AS `accepted_quantity`,`po_detail`.`delivered_quantity` AS `delivered_quantity`,`po_detail`.`invoiced_quantity` AS `invoiced_quantity`,`po_detail`.`paid_quantity` AS `paid_quantity`,(case `po_detail`.`invoice_match_type` when 'THREE_WAY' then (ifnull(`po_detail`.`received_quantity`,0) - ifnull(`po_detail`.`invoiced_quantity`,0)) else (`po_detail`.`quantity` - ifnull(`po_detail`.`invoiced_quantity`,0)) end) AS `invoicing_open_quantity`,`po_detail`.`charge_ac_id` AS `charge_ac_id`,`po_detail`.`accrual_ac_id` AS `accrual_ac_id`,`po_detail`.`budget_ac_id` AS `budget_ac_id`,`po_detail`.`ppv_ac_id` AS `ppv_ac_id`,`org`.`org` AS `receving_org`,`po_header`.`created_by` AS `created_by`,`po_header`.`creation_date` AS `creation_date`,`po_header`.`last_update_by` AS `last_update_by`,`po_header`.`last_update_date` AS `last_update_date` from (((((((`po_header` left join `supplier` on((`po_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`po_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`po_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `po_line` on((`po_header`.`po_header_id` = `po_line`.`po_header_id`))) left join `item` on(((`po_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `po_line`.`receving_org_id`)))) left join `org` on((`po_line`.`receving_org_id` = `org`.`org_id`))) join `po_detail`) where ((`po_header`.`po_status` = 'APPROVED') and (`po_header`.`po_type` in ('BLANKET_RELEASE','STANDARD')) and (`po_line`.`po_line_id` = `po_detail`.`po_line_id`) and (((ifnull(`po_detail`.`invoiced_quantity`,0) < `po_detail`.`quantity`) and ((`po_detail`.`invoice_match_type` = 'TWO_WAY') or isnull(`po_detail`.`invoice_match_type`))) or ((ifnull(`po_detail`.`invoiced_quantity`,0) < ifnull(`po_detail`.`received_quantity`,0)) and (`po_detail`.`invoice_match_type` = 'THREE_WAY'))) and (`po_detail`.`po_detail_id` is not null)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ap_po_matching_v` AS select `po_header`.`po_header_id` AS `po_header_id`,`po_header`.`bu_org_id` AS `bu_org_id`,`po_header`.`po_type` AS `po_type`,`po_header`.`po_number` AS `po_number`,`po_header`.`supplier_id` AS `supplier_id`,`po_header`.`supplier_site_id` AS `supplier_site_id`,`po_header`.`buyer` AS `buyer`,`po_header`.`currency` AS `currency`,`po_header`.`doc_currency` AS `doc_currency`,`po_header`.`header_amount` AS `header_amount`,`po_header`.`po_status` AS `po_status`,`po_header`.`payment_term_id` AS `payment_term_id`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`po_line`.`po_line_id` AS `po_line_id`,`po_line`.`line_type` AS `line_type`,`po_line`.`line_number` AS `po_line_number`,`po_line`.`item_id_m` AS `item_id_m`,`po_line`.`item_description` AS `item_description`,`po_line`.`line_description` AS `line_description`,`po_line`.`line_quantity` AS `line_quantity`,`po_line`.`unit_price` AS `unit_price`,`po_line`.`line_price` AS `line_price`,`po_line`.`gl_line_price` AS `gl_line_price`,`po_line`.`gl_tax_amount` AS `gl_tax_amount`,`po_line`.`tax_amount` AS `tax_amount`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`po_detail`.`po_detail_id` AS `po_detail_id`,`po_detail`.`shipment_number` AS `shipment_number`,`po_line`.`receving_org_id` AS `receving_org_id`,`po_detail`.`subinventory_id` AS `subinventory_id`,`po_detail`.`locator_id` AS `locator_id`,`po_detail`.`requestor` AS `requestor`,`po_detail`.`quantity` AS `quantity`,ifnull(`po_detail`.`received_quantity`,0) AS `received_quantity`,(`po_detail`.`quantity` - ifnull(`po_detail`.`received_quantity`,0)) AS `receiving_open_quantity`,`po_detail`.`need_by_date` AS `need_by_date`,`po_detail`.`promise_date` AS `promise_date`,`po_detail`.`accepted_quantity` AS `accepted_quantity`,`po_detail`.`delivered_quantity` AS `delivered_quantity`,`po_detail`.`invoiced_quantity` AS `invoiced_quantity`,`po_detail`.`paid_quantity` AS `paid_quantity`,(case `po_detail`.`invoice_match_type` when 'THREE_WAY' then (ifnull(`po_detail`.`received_quantity`,0) - ifnull(`po_detail`.`invoiced_quantity`,0)) else (`po_detail`.`quantity` - ifnull(`po_detail`.`invoiced_quantity`,0)) end) AS `invoicing_open_quantity`,`po_detail`.`charge_ac_id` AS `charge_ac_id`,`po_detail`.`accrual_ac_id` AS `accrual_ac_id`,`po_detail`.`budget_ac_id` AS `budget_ac_id`,`po_detail`.`ppv_ac_id` AS `ppv_ac_id`,`org`.`org` AS `receving_org`,`po_header`.`created_by` AS `created_by`,`po_header`.`creation_date` AS `creation_date`,`po_header`.`last_update_by` AS `last_update_by`,`po_header`.`last_update_date` AS `last_update_date` from (((((((`po_header` left join `supplier` on((`po_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`po_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`po_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `po_line` on((`po_header`.`po_header_id` = `po_line`.`po_header_id`))) left join `item` on(((`po_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `po_line`.`receving_org_id`)))) left join `org` on((`po_line`.`receving_org_id` = `org`.`org_id`))) join `po_detail`) where ((`po_header`.`po_status` = 'APPROVED') and (`po_header`.`po_type` in ('BLANKET_RELEASE','STANDARD')) and (`po_line`.`po_line_id` = `po_detail`.`po_line_id`) and (((ifnull(`po_detail`.`invoiced_quantity`,0) < `po_detail`.`quantity`) and ((`po_detail`.`invoice_match_type` = 'TWO_WAY') or isnull(`po_detail`.`invoice_match_type`))) or ((ifnull(`po_detail`.`invoiced_quantity`,0) < ifnull(`po_detail`.`received_quantity`,0)) and (`po_detail`.`invoice_match_type` = 'THREE_WAY'))) and (`po_detail`.`po_detail_id` is not null)) ; -- -------------------------------------------------------- @@ -37997,7 +37409,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ap_po_matching_v` AS sele -- DROP TABLE IF EXISTS `ap_transaction_all_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ap_transaction_all_v` AS select `ap_transaction_header`.`ap_transaction_header_id` AS `ap_transaction_header_id`,`ap_transaction_header`.`bu_org_id` AS `bu_org_id`,`ap_transaction_header`.`transaction_type` AS `transaction_type`,`ap_transaction_header`.`transaction_number` AS `transaction_number`,`ap_transaction_header`.`supplier_id` AS `supplier_id`,`ap_transaction_header`.`supplier_site_id` AS `supplier_site_id`,`ap_transaction_header`.`hr_employee_id` AS `hr_employee_id`,`ap_transaction_header`.`currency` AS `currency`,`ap_transaction_header`.`header_amount` AS `header_amount`,`ap_transaction_header`.`transaction_status` AS `transaction_status`,`ap_transaction_header`.`payment_term_id` AS `payment_term_id`,`ap_transaction_header`.`paid_amount` AS `paid_amount`,`ap_transaction_header`.`payment_status` AS `payment_status`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`ph`.`po_number` AS `po_number`,`ph`.`po_type` AS `po_type`,`ph`.`buyer` AS `buyer`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`ap_transaction_line`.`ap_transaction_line_id` AS `ap_transaction_line_id`,`ap_transaction_line`.`line_type` AS `line_type`,`ap_transaction_line`.`line_number` AS `line_number`,`ap_transaction_line`.`item_id_m` AS `item_id_m`,`ap_transaction_line`.`item_description` AS `item_description`,`ap_transaction_line`.`line_description` AS `line_description`,`ap_transaction_line`.`inv_line_quantity` AS `inv_line_quantity`,`ap_transaction_line`.`inv_unit_price` AS `inv_unit_price`,`ap_transaction_line`.`inv_line_price` AS `inv_line_price`,`ap_transaction_line`.`po_header_id` AS `po_header_id`,`ap_transaction_line`.`po_line_id` AS `po_line_id`,`ap_transaction_line`.`po_detail_id` AS `po_detail_id`,`ap_transaction_line`.`ref_transaction_header_id` AS `ref_transaction_header_id`,`ap_transaction_line`.`ref_transaction_line_id` AS `ref_transaction_line_id`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`ap_transaction_detail`.`ap_transaction_detail_id` AS `ap_transaction_detail_id`,`ap_transaction_detail`.`account_type` AS `account_type`,`ap_transaction_detail`.`description` AS `detail_description`,`ap_transaction_detail`.`amount` AS `amount`,`ap_transaction_detail`.`detail_ac_id` AS `detail_ac_id`,`ap_transaction_header`.`created_by` AS `created_by`,`ap_transaction_header`.`creation_date` AS `creation_date`,`ap_transaction_header`.`last_update_by` AS `last_update_by`,`ap_transaction_header`.`last_update_date` AS `last_update_date` from (((((((`ap_transaction_header` left join `supplier` on((`ap_transaction_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`ap_transaction_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`ap_transaction_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `ap_transaction_line` on((`ap_transaction_header`.`ap_transaction_header_id` = `ap_transaction_line`.`ap_transaction_header_id`))) left join `item` on(((`ap_transaction_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`item_id_m` = `item`.`item_id`)))) left join `ap_transaction_detail` on((`ap_transaction_line`.`ap_transaction_line_id` = `ap_transaction_detail`.`ap_transaction_line_id`))) left join `po_header` `ph` on((`ph`.`po_header_id` = `ap_transaction_line`.`po_header_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ap_transaction_all_v` AS select `ap_transaction_header`.`ap_transaction_header_id` AS `ap_transaction_header_id`,`ap_transaction_header`.`bu_org_id` AS `bu_org_id`,`ap_transaction_header`.`transaction_type` AS `transaction_type`,`ap_transaction_header`.`transaction_number` AS `transaction_number`,`ap_transaction_header`.`supplier_id` AS `supplier_id`,`ap_transaction_header`.`supplier_site_id` AS `supplier_site_id`,`ap_transaction_header`.`hr_employee_id` AS `hr_employee_id`,`ap_transaction_header`.`currency` AS `currency`,`ap_transaction_header`.`header_amount` AS `header_amount`,`ap_transaction_header`.`transaction_status` AS `transaction_status`,`ap_transaction_header`.`payment_term_id` AS `payment_term_id`,`ap_transaction_header`.`paid_amount` AS `paid_amount`,`ap_transaction_header`.`payment_status` AS `payment_status`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`ph`.`po_number` AS `po_number`,`ph`.`po_type` AS `po_type`,`ph`.`buyer` AS `buyer`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`ap_transaction_line`.`ap_transaction_line_id` AS `ap_transaction_line_id`,`ap_transaction_line`.`line_type` AS `line_type`,`ap_transaction_line`.`line_number` AS `line_number`,`ap_transaction_line`.`item_id_m` AS `item_id_m`,`ap_transaction_line`.`item_description` AS `item_description`,`ap_transaction_line`.`line_description` AS `line_description`,`ap_transaction_line`.`inv_line_quantity` AS `inv_line_quantity`,`ap_transaction_line`.`inv_unit_price` AS `inv_unit_price`,`ap_transaction_line`.`inv_line_price` AS `inv_line_price`,`ap_transaction_line`.`po_header_id` AS `po_header_id`,`ap_transaction_line`.`po_line_id` AS `po_line_id`,`ap_transaction_line`.`po_detail_id` AS `po_detail_id`,`ap_transaction_line`.`ref_transaction_header_id` AS `ref_transaction_header_id`,`ap_transaction_line`.`ref_transaction_line_id` AS `ref_transaction_line_id`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`ap_transaction_detail`.`ap_transaction_detail_id` AS `ap_transaction_detail_id`,`ap_transaction_detail`.`account_type` AS `account_type`,`ap_transaction_detail`.`description` AS `detail_description`,`ap_transaction_detail`.`amount` AS `amount`,`ap_transaction_detail`.`detail_ac_id` AS `detail_ac_id`,`ap_transaction_header`.`created_by` AS `created_by`,`ap_transaction_header`.`creation_date` AS `creation_date`,`ap_transaction_header`.`last_update_by` AS `last_update_by`,`ap_transaction_header`.`last_update_date` AS `last_update_date` from (((((((`ap_transaction_header` left join `supplier` on((`ap_transaction_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`ap_transaction_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`ap_transaction_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `ap_transaction_line` on((`ap_transaction_header`.`ap_transaction_header_id` = `ap_transaction_line`.`ap_transaction_header_id`))) left join `item` on(((`ap_transaction_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`item_id_m` = `item`.`item_id`)))) left join `ap_transaction_detail` on((`ap_transaction_line`.`ap_transaction_line_id` = `ap_transaction_detail`.`ap_transaction_line_id`))) left join `po_header` `ph` on((`ph`.`po_header_id` = `ap_transaction_line`.`po_header_id`))) ; -- -------------------------------------------------------- @@ -38006,7 +37418,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ap_transaction_all_v` AS -- DROP TABLE IF EXISTS `ar_customer_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ar_customer_v` AS select `ac`.`ar_customer_id` AS `ar_customer_id`,`ac`.`customer_number` AS `customer_number`,`ac`.`customer_name` AS `customer_name`,`acs`.`ar_customer_site_id` AS `ar_customer_site_id`,`acs`.`customer_site_number` AS `customer_site_number`,`acs`.`customer_site_name` AS `customer_site_name`,`ac`.`status` AS `status`,`ac`.`creation_date` AS `creation_date`,`ac`.`last_update_by` AS `last_update_by`,`ac`.`last_update_date` AS `last_update_date`,`acs`.`site_tax_country` AS `site_tax_country`,`acs`.`site_tax_reg_no` AS `site_tax_reg_no`,`acs`.`status` AS `site_status`,`acs`.`currency` AS `currency`,`acs`.`payment_term_id` AS `payment_term_id` from (`ar_customer` `ac` left join `ar_customer_site` `acs` on((`acs`.`ar_customer_id` = `ac`.`ar_customer_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ar_customer_v` AS select `ac`.`ar_customer_id` AS `ar_customer_id`,`ac`.`customer_number` AS `customer_number`,`ac`.`customer_name` AS `customer_name`,`acs`.`ar_customer_site_id` AS `ar_customer_site_id`,`acs`.`customer_site_number` AS `customer_site_number`,`acs`.`customer_site_name` AS `customer_site_name`,`ac`.`status` AS `status`,`ac`.`creation_date` AS `creation_date`,`ac`.`last_update_by` AS `last_update_by`,`ac`.`last_update_date` AS `last_update_date`,`acs`.`site_tax_country` AS `site_tax_country`,`acs`.`site_tax_reg_no` AS `site_tax_reg_no`,`acs`.`status` AS `site_status`,`acs`.`currency` AS `currency`,`acs`.`payment_term_id` AS `payment_term_id` from (`ar_customer` `ac` left join `ar_customer_site` `acs` on((`acs`.`ar_customer_id` = `ac`.`ar_customer_id`))) ; -- -------------------------------------------------------- @@ -38015,7 +37427,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ar_customer_v` AS select -- DROP TABLE IF EXISTS `ar_transaction_all_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ar_transaction_all_v` AS select `ath`.`ar_transaction_header_id` AS `ar_transaction_header_id`,`ath`.`bu_org_id` AS `bu_org_id`,`ath`.`transaction_type` AS `transaction_type`,`ath`.`transaction_class` AS `transaction_class`,`ath`.`transaction_number` AS `transaction_number`,`ath`.`ar_customer_id` AS `ar_customer_id`,`ath`.`ar_customer_site_id` AS `ar_customer_site_id`,`ath`.`document_owner` AS `document_owner`,`ath`.`description` AS `description`,`ath`.`ship_to_id` AS `ship_to_id`,`ath`.`bill_to_id` AS `bill_to_id`,`ath`.`header_amount` AS `header_amount`,`ath`.`receipt_amount` AS `receipt_amount`,`ath`.`tax_amount` AS `tax_amount`,`ath`.`currency` AS `currency`,`ath`.`doc_currency` AS `doc_currency`,`ath`.`receivable_ac_id` AS `receivable_ac_id`,`ath`.`payment_term_id` AS `payment_term_id`,`ath`.`exchange_rate_type` AS `exchange_rate_type`,`ath`.`exchange_rate` AS `exchange_rate`,`ath`.`transaction_status` AS `transaction_status`,`ath`.`document_date` AS `document_date`,`ath`.`document_number` AS `document_number`,`ath`.`ledger_id` AS `ledger_id`,`ath`.`period_id` AS `trnx_period_id`,`ath`.`payment_term_date` AS `payment_term_date`,`ath`.`sales_person` AS `sales_person`,`ath`.`receipt_method` AS `receipt_method`,`ath`.`approval_status` AS `approval_status`,`ath`.`receipt_status` AS `receipt_status`,`ath`.`reference_type` AS `trnx_reference_type`,`ath`.`reference_key_name` AS `trnx_reference_key_name`,`ath`.`reference_key_value` AS `trnx_reference_key_value`,`ath`.`sd_so_header_id` AS `trnx_sd_so_header_id`,`atl`.`ar_transaction_line_id` AS `ar_transaction_line_id`,`atl`.`line_number` AS `line_number`,`atl`.`item_id_m` AS `item_id_m`,`atl`.`item_description` AS `item_description`,`atl`.`inv_line_quantity` AS `inv_line_quantity`,`atl`.`inv_unit_price` AS `inv_unit_price`,`atl`.`tax_code_id` AS `tax_code_id`,`atl`.`tax_amount` AS `so_tax_amount`,`atl`.`gl_inv_line_price` AS `gl_inv_line_price`,`atl`.`gl_tax_amount` AS `gl_tax_amount`,`atl`.`inv_line_price` AS `inv_line_price`,`atl`.`line_type` AS `trnx_line_type`,`atl`.`line_description` AS `line_description`,`atl`.`asset_cb` AS `asset_cb`,`atl`.`uom_id` AS `uom_id`,`atl`.`status` AS `status`,`atl`.`line_source` AS `line_source`,`atl`.`sd_so_header_id` AS `sd_so_header_id`,`atl`.`sd_so_line_id` AS `trnx_sd_so_line_id`,`atl`.`sd_so_detail_id` AS `sd_so_detail_id`,`atl`.`period_id` AS `period_id`,`atl`.`reference_type` AS `reference_type`,`atl`.`reference_key_name` AS `reference_key_name`,`atl`.`reference_key_value` AS `reference_key_value`,`ar_customer`.`customer_name` AS `customer_name`,`ar_customer`.`customer_number` AS `customer_number`,`ar_customer_site`.`customer_site_name` AS `customer_site_name`,`ar_customer_site`.`customer_site_number` AS `customer_site_number`,`sdsl`.`sd_so_line_id` AS `sd_so_line_id`,`sdsl`.`line_type` AS `line_type`,`sdsl`.`line_number` AS `so_line_number`,`sdsl`.`kit_cb` AS `kit_cb`,`sdsl`.`kit_configured_cb` AS `kit_configured_cb`,`sdsl`.`bom_config_header_id` AS `bom_config_header_id`,`sdsl`.`wip_wo_header_id` AS `wip_wo_header_id`,`sdsl`.`line_quantity` AS `line_quantity`,`sdsl`.`picked_quantity` AS `picked_quantity`,`sdsl`.`shipped_quantity` AS `shipped_quantity`,`sdsl`.`unit_price` AS `unit_price`,`sdsl`.`line_price` AS `line_price`,`sdsl`.`line_status` AS `line_status`,`sdsl`.`requested_date` AS `requested_date`,`sdsl`.`promise_date` AS `promise_date`,`sdsl`.`schedule_ship_date` AS `schedule_ship_date`,`sdsl`.`actual_ship_date` AS `actual_ship_date`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `item_uom_id`,`item`.`item_status` AS `item_status`,`org`.`org` AS `org`,`sdsl`.`shipping_org_id` AS `shipping_org_id`,`sdsl`.`created_by` AS `created_by`,`sdsl`.`creation_date` AS `creation_date`,`sdsl`.`last_update_by` AS `last_update_by`,`sdsl`.`last_update_date` AS `last_update_date`,`ship_address`.`address` AS `address`,`ship_address`.`country` AS `country`,`ship_address`.`postal_code` AS `postal_code`,`ship_address`.`phone` AS `phone`,`ship_address`.`email` AS `email`,`ship_address`.`website` AS `website`,`bill_address`.`address` AS `address_b`,`bill_address`.`country` AS `country_b`,`bill_address`.`postal_code` AS `postal_code_b`,`bill_address`.`phone` AS `phone_b`,`bill_address`.`email` AS `email_b`,`bill_address`.`website` AS `website_b`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description` from (((`ar_customer` join `address` `ship_address`) join `address` `bill_address`) join (((((((`ar_transaction_line` `atl` left join `ar_transaction_header` `ath` on((`ath`.`ar_transaction_header_id` = `atl`.`ar_transaction_header_id`))) left join `ar_customer_site` on((`ath`.`ar_customer_site_id` = `ar_customer_site`.`ar_customer_site_id`))) left join `payment_term` on((`ath`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `sd_so_line` `sdsl` on((`atl`.`sd_so_line_id` = `sdsl`.`sd_so_line_id`))) left join `sd_so_header` `sdsh` on((`sdsh`.`sd_so_header_id` = `sdsl`.`sd_so_header_id`))) left join `org` on((`sdsl`.`shipping_org_id` = `org`.`org_id`))) left join `item` on(((`sdsl`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `sdsl`.`shipping_org_id`))))) where ((`ath`.`ar_customer_id` = `ar_customer`.`ar_customer_id`) and (`ship_address`.`address_id` = `ath`.`ship_to_id`) and (`bill_address`.`address_id` = `ath`.`bill_to_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ar_transaction_all_v` AS select `ath`.`ar_transaction_header_id` AS `ar_transaction_header_id`,`ath`.`bu_org_id` AS `bu_org_id`,`ath`.`transaction_type` AS `transaction_type`,`ath`.`transaction_class` AS `transaction_class`,`ath`.`transaction_number` AS `transaction_number`,`ath`.`ar_customer_id` AS `ar_customer_id`,`ath`.`ar_customer_site_id` AS `ar_customer_site_id`,`ath`.`document_owner` AS `document_owner`,`ath`.`description` AS `description`,`ath`.`ship_to_id` AS `ship_to_id`,`ath`.`bill_to_id` AS `bill_to_id`,`ath`.`header_amount` AS `header_amount`,`ath`.`receipt_amount` AS `receipt_amount`,`ath`.`tax_amount` AS `tax_amount`,`ath`.`currency` AS `currency`,`ath`.`doc_currency` AS `doc_currency`,`ath`.`receivable_ac_id` AS `receivable_ac_id`,`ath`.`payment_term_id` AS `payment_term_id`,`ath`.`exchange_rate_type` AS `exchange_rate_type`,`ath`.`exchange_rate` AS `exchange_rate`,`ath`.`transaction_status` AS `transaction_status`,`ath`.`document_date` AS `document_date`,`ath`.`document_number` AS `document_number`,`ath`.`ledger_id` AS `ledger_id`,`ath`.`period_id` AS `trnx_period_id`,`ath`.`payment_term_date` AS `payment_term_date`,`ath`.`sales_person` AS `sales_person`,`ath`.`receipt_method` AS `receipt_method`,`ath`.`approval_status` AS `approval_status`,`ath`.`receipt_status` AS `receipt_status`,`ath`.`reference_type` AS `trnx_reference_type`,`ath`.`reference_key_name` AS `trnx_reference_key_name`,`ath`.`reference_key_value` AS `trnx_reference_key_value`,`ath`.`sd_so_header_id` AS `trnx_sd_so_header_id`,`atl`.`ar_transaction_line_id` AS `ar_transaction_line_id`,`atl`.`line_number` AS `line_number`,`atl`.`item_id_m` AS `item_id_m`,`atl`.`item_description` AS `item_description`,`atl`.`inv_line_quantity` AS `inv_line_quantity`,`atl`.`inv_unit_price` AS `inv_unit_price`,`atl`.`tax_code_id` AS `tax_code_id`,`atl`.`tax_amount` AS `so_tax_amount`,`atl`.`gl_inv_line_price` AS `gl_inv_line_price`,`atl`.`gl_tax_amount` AS `gl_tax_amount`,`atl`.`inv_line_price` AS `inv_line_price`,`atl`.`line_type` AS `trnx_line_type`,`atl`.`line_description` AS `line_description`,`atl`.`asset_cb` AS `asset_cb`,`atl`.`uom_id` AS `uom_id`,`atl`.`status` AS `status`,`atl`.`line_source` AS `line_source`,`atl`.`sd_so_header_id` AS `sd_so_header_id`,`atl`.`sd_so_line_id` AS `trnx_sd_so_line_id`,`atl`.`sd_so_detail_id` AS `sd_so_detail_id`,`atl`.`period_id` AS `period_id`,`atl`.`reference_type` AS `reference_type`,`atl`.`reference_key_name` AS `reference_key_name`,`atl`.`reference_key_value` AS `reference_key_value`,`ar_customer`.`customer_name` AS `customer_name`,`ar_customer`.`customer_number` AS `customer_number`,`ar_customer_site`.`customer_site_name` AS `customer_site_name`,`ar_customer_site`.`customer_site_number` AS `customer_site_number`,`sdsl`.`sd_so_line_id` AS `sd_so_line_id`,`sdsl`.`line_type` AS `line_type`,`sdsl`.`line_number` AS `so_line_number`,`sdsl`.`kit_cb` AS `kit_cb`,`sdsl`.`kit_configured_cb` AS `kit_configured_cb`,`sdsl`.`bom_config_header_id` AS `bom_config_header_id`,`sdsl`.`wip_wo_header_id` AS `wip_wo_header_id`,`sdsl`.`line_quantity` AS `line_quantity`,`sdsl`.`picked_quantity` AS `picked_quantity`,`sdsl`.`shipped_quantity` AS `shipped_quantity`,`sdsl`.`unit_price` AS `unit_price`,`sdsl`.`line_price` AS `line_price`,`sdsl`.`line_status` AS `line_status`,`sdsl`.`requested_date` AS `requested_date`,`sdsl`.`promise_date` AS `promise_date`,`sdsl`.`schedule_ship_date` AS `schedule_ship_date`,`sdsl`.`actual_ship_date` AS `actual_ship_date`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `item_uom_id`,`item`.`item_status` AS `item_status`,`org`.`org` AS `org`,`sdsl`.`shipping_org_id` AS `shipping_org_id`,`sdsl`.`created_by` AS `created_by`,`sdsl`.`creation_date` AS `creation_date`,`sdsl`.`last_update_by` AS `last_update_by`,`sdsl`.`last_update_date` AS `last_update_date`,`ship_address`.`address` AS `address`,`ship_address`.`country` AS `country`,`ship_address`.`postal_code` AS `postal_code`,`ship_address`.`phone` AS `phone`,`ship_address`.`email` AS `email`,`ship_address`.`website` AS `website`,`bill_address`.`address` AS `address_b`,`bill_address`.`country` AS `country_b`,`bill_address`.`postal_code` AS `postal_code_b`,`bill_address`.`phone` AS `phone_b`,`bill_address`.`email` AS `email_b`,`bill_address`.`website` AS `website_b`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description` from (((`ar_customer` join `address` `ship_address`) join `address` `bill_address`) join (((((((`ar_transaction_line` `atl` left join `ar_transaction_header` `ath` on((`ath`.`ar_transaction_header_id` = `atl`.`ar_transaction_header_id`))) left join `ar_customer_site` on((`ath`.`ar_customer_site_id` = `ar_customer_site`.`ar_customer_site_id`))) left join `payment_term` on((`ath`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `sd_so_line` `sdsl` on((`atl`.`sd_so_line_id` = `sdsl`.`sd_so_line_id`))) left join `sd_so_header` `sdsh` on((`sdsh`.`sd_so_header_id` = `sdsl`.`sd_so_header_id`))) left join `org` on((`sdsl`.`shipping_org_id` = `org`.`org_id`))) left join `item` on(((`sdsl`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `sdsl`.`shipping_org_id`))))) where ((`ath`.`ar_customer_id` = `ar_customer`.`ar_customer_id`) and (`ship_address`.`address_id` = `ath`.`ship_to_id`) and (`bill_address`.`address_id` = `ath`.`bill_to_id`)) ; -- -------------------------------------------------------- @@ -38024,7 +37436,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ar_transaction_all_v` AS -- DROP TABLE IF EXISTS `ar_unpaid_transaction_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ar_unpaid_transaction_v` AS select `arth`.`ar_transaction_header_id` AS `ar_transaction_header_id`,`arth`.`bu_org_id` AS `bu_org_id`,`arth`.`transaction_class` AS `transaction_class`,`arth`.`transaction_number` AS `transaction_number`,`arth`.`header_amount` AS `header_amount`,`arth`.`tax_amount` AS `tax_amount`,`arth`.`exchange_rate` AS `receipt_amount`,`arth`.`receipt_amount` AS `exchange_rate`,(ifnull(`arth`.`header_amount`,0) - ifnull(`arth`.`receipt_amount`,0)) AS `remaing_amount`,`arth`.`currency` AS `currency`,`arth`.`doc_currency` AS `doc_currency`,`arth`.`document_date` AS `document_date`,`arth`.`document_number` AS `document_number`,`arth`.`gl_journal_header_id` AS `gl_journal_header_id`,`arth`.`ledger_id` AS `ledger_id`,`arth`.`sd_so_header_id` AS `sd_so_header_id`,`arth`.`ar_customer_id` AS `ar_customer_id`,`arth`.`ar_customer_site_id` AS `ar_customer_site_id`,`arc`.`customer_name` AS `customer_name`,`arc`.`customer_number` AS `customer_number`,`arcs`.`customer_site_name` AS `customer_site_name`,`arcs`.`customer_site_number` AS `customer_site_number`,`sosh`.`so_number` AS `so_number`,`org`.`org` AS `org` from ((((`ar_transaction_header` `arth` left join `sd_so_header` `sosh` on((`arth`.`sd_so_header_id` = `sosh`.`sd_so_header_id`))) join `ar_customer` `arc`) join `ar_customer_site` `arcs`) join `org`) where ((`arth`.`ar_customer_id` = `arc`.`ar_customer_id`) and (`arth`.`ar_customer_site_id` = `arcs`.`ar_customer_site_id`) and (`arth`.`ar_customer_id` = `arcs`.`ar_customer_id`) and (`org`.`org_id` = `arth`.`bu_org_id`) and (ifnull(`arth`.`header_amount`,0) > ifnull(`arth`.`receipt_amount`,0)) and (`arth`.`transaction_class` in ('INVOICE','DEPOSIT','CHARGE_BACK','PREPAYMENT','DEBIT_MEMO'))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ar_unpaid_transaction_v` AS select `arth`.`ar_transaction_header_id` AS `ar_transaction_header_id`,`arth`.`bu_org_id` AS `bu_org_id`,`arth`.`transaction_class` AS `transaction_class`,`arth`.`transaction_number` AS `transaction_number`,`arth`.`header_amount` AS `header_amount`,`arth`.`tax_amount` AS `tax_amount`,`arth`.`exchange_rate` AS `receipt_amount`,`arth`.`receipt_amount` AS `exchange_rate`,(ifnull(`arth`.`header_amount`,0) - ifnull(`arth`.`receipt_amount`,0)) AS `remaing_amount`,`arth`.`currency` AS `currency`,`arth`.`doc_currency` AS `doc_currency`,`arth`.`document_date` AS `document_date`,`arth`.`document_number` AS `document_number`,`arth`.`gl_journal_header_id` AS `gl_journal_header_id`,`arth`.`ledger_id` AS `ledger_id`,`arth`.`sd_so_header_id` AS `sd_so_header_id`,`arth`.`ar_customer_id` AS `ar_customer_id`,`arth`.`ar_customer_site_id` AS `ar_customer_site_id`,`arc`.`customer_name` AS `customer_name`,`arc`.`customer_number` AS `customer_number`,`arcs`.`customer_site_name` AS `customer_site_name`,`arcs`.`customer_site_number` AS `customer_site_number`,`sosh`.`so_number` AS `so_number`,`org`.`org` AS `org` from ((((`ar_transaction_header` `arth` left join `sd_so_header` `sosh` on((`arth`.`sd_so_header_id` = `sosh`.`sd_so_header_id`))) join `ar_customer` `arc`) join `ar_customer_site` `arcs`) join `org`) where ((`arth`.`ar_customer_id` = `arc`.`ar_customer_id`) and (`arth`.`ar_customer_site_id` = `arcs`.`ar_customer_site_id`) and (`arth`.`ar_customer_id` = `arcs`.`ar_customer_id`) and (`org`.`org_id` = `arth`.`bu_org_id`) and (ifnull(`arth`.`header_amount`,0) > ifnull(`arth`.`receipt_amount`,0)) and (`arth`.`transaction_class` in ('INVOICE','DEPOSIT','CHARGE_BACK','PREPAYMENT','DEBIT_MEMO'))) ; -- -------------------------------------------------------- @@ -38033,7 +37445,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ar_unpaid_transaction_v` -- DROP TABLE IF EXISTS `bom_all_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `bom_all_v` AS select `bh`.`bom_header_id` AS `bom_header_id`,`bh`.`item_id_m` AS `item_id_m`,`bh`.`alternate_bom` AS `alternate_bom`,`bh`.`org_id` AS `org_id`,`bh`.`bom_revision` AS `bom_revision`,`bh`.`effective_date` AS `effective_date`,`bh`.`common_bom_item_id_m` AS `common_bom_item_id_m`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`uom_id` AS `uom_id`,`item`.`item_type` AS `item_type`,`item`.`item_status` AS `item_status`,`item`.`bom_type` AS `bom_type`,`item`.`costing_enabled_cb` AS `costing_enabled_cb`,`item`.`make_buy` AS `make_buy`,`org`.`org` AS `org`,`org`.`type` AS `org_type`,`org`.`status` AS `org_status`,`org`.`description` AS `org_description`,`org`.`code` AS `org_code` from ((`bom_header` `bh` left join `item` on(((`item`.`item_id_m` = `bh`.`item_id_m`) and (`item`.`org_id` = `bh`.`org_id`)))) left join `org` on((`org`.`org_id` = `bh`.`org_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bom_all_v` AS select `bh`.`bom_header_id` AS `bom_header_id`,`bh`.`item_id_m` AS `item_id_m`,`bh`.`alternate_bom` AS `alternate_bom`,`bh`.`org_id` AS `org_id`,`bh`.`bom_revision` AS `bom_revision`,`bh`.`effective_date` AS `effective_date`,`bh`.`common_bom_item_id_m` AS `common_bom_item_id_m`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`uom_id` AS `uom_id`,`item`.`item_type` AS `item_type`,`item`.`item_status` AS `item_status`,`item`.`bom_type` AS `bom_type`,`item`.`costing_enabled_cb` AS `costing_enabled_cb`,`item`.`make_buy` AS `make_buy`,`org`.`org` AS `org`,`org`.`type` AS `org_type`,`org`.`status` AS `org_status`,`org`.`description` AS `org_description`,`org`.`code` AS `org_code` from ((`bom_header` `bh` left join `item` on(((`item`.`item_id_m` = `bh`.`item_id_m`) and (`item`.`org_id` = `bh`.`org_id`)))) left join `org` on((`org`.`org_id` = `bh`.`org_id`))) ; -- -------------------------------------------------------- @@ -38042,7 +37454,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `bom_all_v` AS select `bh` -- DROP TABLE IF EXISTS `bom_line_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `bom_line_v` AS select `bh`.`bom_header_id` AS `bom_header_id_h`,`bh`.`item_id_m` AS `item_id_m`,`bh`.`org_id` AS `org_id`,`bh`.`alternate_bom` AS `alternate_bom`,`bh`.`effective_date` AS `effective_date`,`bh`.`common_bom_item_id_m` AS `common_bom_item_id_m`,`bh`.`common_bom_org_id` AS `common_bom_org_id`,`bh`.`created_by` AS `h_created_by`,`bh`.`creation_date` AS `h_creation_date`,`bh`.`last_update_by` AS `h_last_update_by`,`bh`.`last_update_date` AS `h_last_update_date`,`bl`.`bom_header_id` AS `bom_header_id`,`bl`.`bom_line_id` AS `bom_line_id`,`bl`.`bom_sequence` AS `bom_sequence`,`bl`.`routing_sequence` AS `routing_sequence`,`bl`.`component_item_id_m` AS `component_item_id_m`,`bl`.`usage_basis` AS `usage_basis`,`bl`.`usage_quantity` AS `usage_quantity`,`bl`.`auto_request_material_cb` AS `auto_request_material_cb`,`bl`.`effective_start_date` AS `effective_start_date`,`bl`.`effective_end_date` AS `effective_end_date`,`bl`.`eco_number` AS `eco_number`,`bl`.`eco_implemented_cb` AS `eco_implemented_cb`,`bl`.`planning_percentage` AS `planning_percentage`,`bl`.`yield` AS `yield`,`bl`.`include_in_cost_rollup_cb` AS `include_in_cost_rollup_cb`,(case coalesce(`bl`.`wip_supply_type`,0) when '0' then (select `item`.`wip_supply_type` from `item` where ((`item`.`item_id_m` = `bl`.`component_item_id_m`) and (`item`.`org_id` = `bh`.`org_id`))) else `bl`.`wip_supply_type` end) AS `wip_supply_type`,(case coalesce(`bl`.`supply_sub_inventory`,0) when '0' then (select `item`.`wip_supply_subinventory` from `item` where ((`item`.`item_id_m` = `bl`.`component_item_id_m`) and (`item`.`org_id` = `bh`.`org_id`))) else `bl`.`supply_sub_inventory` end) AS `supply_sub_inventory`,(case coalesce(`bl`.`supply_locator`,0) when '0' then (select `item`.`wip_supply_locator` from `item` where ((`item`.`item_id_m` = `bl`.`component_item_id_m`) and (`item`.`org_id` = `bh`.`org_id`))) else `bl`.`supply_locator` end) AS `supply_locator`,`bl`.`created_by` AS `created_by`,`bl`.`creation_date` AS `creation_date`,`bl`.`last_update_by` AS `last_update_by`,`bl`.`last_update_date` AS `last_update_date` from (`bom_line` `bl` join `bom_header` `bh`) where ((`bh`.`bom_header_id` = `bl`.`bom_header_id`) and (isnull(`bh`.`common_bom_item_id_m`) or (`bh`.`common_bom_item_id_m` = 0))) union select `bh`.`bom_header_id` AS `bom_header_id_h`,`bhc`.`item_id_m` AS `item_id_m`,`bhc`.`org_id` AS `org_id`,`bhc`.`alternate_bom` AS `alternate_bom`,`bhc`.`effective_date` AS `effective_date`,`bhc`.`common_bom_item_id_m` AS `common_bom_item_id_m`,`bhc`.`common_bom_org_id` AS `common_bom_org_id`,`bh`.`created_by` AS `h_created_by`,`bh`.`creation_date` AS `h_creation_date`,`bh`.`last_update_by` AS `h_last_update_by`,`bh`.`last_update_date` AS `h_last_update_date`,`bl`.`bom_header_id` AS `bom_header_id`,`bl`.`bom_line_id` AS `bom_line_id`,`bl`.`bom_sequence` AS `bom_sequence`,`bl`.`routing_sequence` AS `routing_sequence`,`bl`.`component_item_id_m` AS `component_item_id_m`,`bl`.`usage_basis` AS `usage_basis`,`bl`.`usage_quantity` AS `usage_quantity`,`bl`.`auto_request_material_cb` AS `auto_request_material_cb`,`bl`.`effective_start_date` AS `effective_start_date`,`bl`.`effective_end_date` AS `effective_end_date`,`bl`.`eco_number` AS `eco_number`,`bl`.`eco_implemented_cb` AS `eco_implemented_cb`,`bl`.`planning_percentage` AS `planning_percentage`,`bl`.`yield` AS `yield`,`bl`.`include_in_cost_rollup_cb` AS `include_in_cost_rollup_cb`,(case coalesce(`bl`.`wip_supply_type`,0) when '0' then (select `item`.`wip_supply_type` from `item` where ((`item`.`item_id_m` = `bl`.`component_item_id_m`) and (`item`.`org_id` = `bh`.`org_id`))) else `bl`.`wip_supply_type` end) AS `wip_supply_type`,(case coalesce(`bl`.`supply_sub_inventory`,0) when '0' then (select `item`.`wip_supply_subinventory` from `item` where ((`item`.`item_id_m` = `bl`.`component_item_id_m`) and (`item`.`org_id` = `bh`.`org_id`))) else `bl`.`supply_sub_inventory` end) AS `supply_sub_inventory`,(case coalesce(`bl`.`supply_locator`,0) when '0' then (select `item`.`wip_supply_locator` from `item` where ((`item`.`item_id_m` = `bl`.`component_item_id_m`) and (`item`.`org_id` = `bh`.`org_id`))) else `bl`.`supply_locator` end) AS `supply_locator`,`bl`.`created_by` AS `created_by`,`bl`.`creation_date` AS `creation_date`,`bl`.`last_update_by` AS `last_update_by`,`bl`.`last_update_date` AS `last_update_date` from ((`bom_line` `bl` join `bom_header` `bh`) join `bom_header` `bhc`) where ((`bh`.`bom_header_id` = `bl`.`bom_header_id`) and ((`bhc`.`common_bom_item_id_m` is not null) or (`bhc`.`common_bom_item_id_m` = 0)) and (`bhc`.`common_bom_item_id_m` = `bh`.`item_id_m`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bom_line_v` AS select `bh`.`bom_header_id` AS `bom_header_id_h`,`bh`.`item_id_m` AS `item_id_m`,`bh`.`org_id` AS `org_id`,`bh`.`alternate_bom` AS `alternate_bom`,`bh`.`effective_date` AS `effective_date`,`bh`.`common_bom_item_id_m` AS `common_bom_item_id_m`,`bh`.`common_bom_org_id` AS `common_bom_org_id`,`bh`.`created_by` AS `h_created_by`,`bh`.`creation_date` AS `h_creation_date`,`bh`.`last_update_by` AS `h_last_update_by`,`bh`.`last_update_date` AS `h_last_update_date`,`bl`.`bom_header_id` AS `bom_header_id`,`bl`.`bom_line_id` AS `bom_line_id`,`bl`.`bom_sequence` AS `bom_sequence`,`bl`.`routing_sequence` AS `routing_sequence`,`bl`.`component_item_id_m` AS `component_item_id_m`,`bl`.`usage_basis` AS `usage_basis`,`bl`.`usage_quantity` AS `usage_quantity`,`bl`.`auto_request_material_cb` AS `auto_request_material_cb`,`bl`.`effective_start_date` AS `effective_start_date`,`bl`.`effective_end_date` AS `effective_end_date`,`bl`.`eco_number` AS `eco_number`,`bl`.`eco_implemented_cb` AS `eco_implemented_cb`,`bl`.`planning_percentage` AS `planning_percentage`,`bl`.`yield` AS `yield`,`bl`.`include_in_cost_rollup_cb` AS `include_in_cost_rollup_cb`,(case coalesce(`bl`.`wip_supply_type`,0) when '0' then (select `item`.`wip_supply_type` from `item` where ((`item`.`item_id_m` = `bl`.`component_item_id_m`) and (`item`.`org_id` = `bh`.`org_id`))) else `bl`.`wip_supply_type` end) AS `wip_supply_type`,(case coalesce(`bl`.`supply_sub_inventory`,0) when '0' then (select `item`.`wip_supply_subinventory` from `item` where ((`item`.`item_id_m` = `bl`.`component_item_id_m`) and (`item`.`org_id` = `bh`.`org_id`))) else `bl`.`supply_sub_inventory` end) AS `supply_sub_inventory`,(case coalesce(`bl`.`supply_locator`,0) when '0' then (select `item`.`wip_supply_locator` from `item` where ((`item`.`item_id_m` = `bl`.`component_item_id_m`) and (`item`.`org_id` = `bh`.`org_id`))) else `bl`.`supply_locator` end) AS `supply_locator`,`bl`.`created_by` AS `created_by`,`bl`.`creation_date` AS `creation_date`,`bl`.`last_update_by` AS `last_update_by`,`bl`.`last_update_date` AS `last_update_date` from (`bom_line` `bl` join `bom_header` `bh`) where ((`bh`.`bom_header_id` = `bl`.`bom_header_id`) and (isnull(`bh`.`common_bom_item_id_m`) or (`bh`.`common_bom_item_id_m` = 0))) union select `bh`.`bom_header_id` AS `bom_header_id_h`,`bhc`.`item_id_m` AS `item_id_m`,`bhc`.`org_id` AS `org_id`,`bhc`.`alternate_bom` AS `alternate_bom`,`bhc`.`effective_date` AS `effective_date`,`bhc`.`common_bom_item_id_m` AS `common_bom_item_id_m`,`bhc`.`common_bom_org_id` AS `common_bom_org_id`,`bh`.`created_by` AS `h_created_by`,`bh`.`creation_date` AS `h_creation_date`,`bh`.`last_update_by` AS `h_last_update_by`,`bh`.`last_update_date` AS `h_last_update_date`,`bl`.`bom_header_id` AS `bom_header_id`,`bl`.`bom_line_id` AS `bom_line_id`,`bl`.`bom_sequence` AS `bom_sequence`,`bl`.`routing_sequence` AS `routing_sequence`,`bl`.`component_item_id_m` AS `component_item_id_m`,`bl`.`usage_basis` AS `usage_basis`,`bl`.`usage_quantity` AS `usage_quantity`,`bl`.`auto_request_material_cb` AS `auto_request_material_cb`,`bl`.`effective_start_date` AS `effective_start_date`,`bl`.`effective_end_date` AS `effective_end_date`,`bl`.`eco_number` AS `eco_number`,`bl`.`eco_implemented_cb` AS `eco_implemented_cb`,`bl`.`planning_percentage` AS `planning_percentage`,`bl`.`yield` AS `yield`,`bl`.`include_in_cost_rollup_cb` AS `include_in_cost_rollup_cb`,(case coalesce(`bl`.`wip_supply_type`,0) when '0' then (select `item`.`wip_supply_type` from `item` where ((`item`.`item_id_m` = `bl`.`component_item_id_m`) and (`item`.`org_id` = `bh`.`org_id`))) else `bl`.`wip_supply_type` end) AS `wip_supply_type`,(case coalesce(`bl`.`supply_sub_inventory`,0) when '0' then (select `item`.`wip_supply_subinventory` from `item` where ((`item`.`item_id_m` = `bl`.`component_item_id_m`) and (`item`.`org_id` = `bh`.`org_id`))) else `bl`.`supply_sub_inventory` end) AS `supply_sub_inventory`,(case coalesce(`bl`.`supply_locator`,0) when '0' then (select `item`.`wip_supply_locator` from `item` where ((`item`.`item_id_m` = `bl`.`component_item_id_m`) and (`item`.`org_id` = `bh`.`org_id`))) else `bl`.`supply_locator` end) AS `supply_locator`,`bl`.`created_by` AS `created_by`,`bl`.`creation_date` AS `creation_date`,`bl`.`last_update_by` AS `last_update_by`,`bl`.`last_update_date` AS `last_update_date` from ((`bom_line` `bl` join `bom_header` `bh`) join `bom_header` `bhc`) where ((`bh`.`bom_header_id` = `bl`.`bom_header_id`) and ((`bhc`.`common_bom_item_id_m` is not null) or (`bhc`.`common_bom_item_id_m` = 0)) and (`bhc`.`common_bom_item_id_m` = `bh`.`item_id_m`)) ; -- -------------------------------------------------------- @@ -38051,7 +37463,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `bom_line_v` AS select `bh -- DROP TABLE IF EXISTS `bom_overhead_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `bom_overhead_v` AS select `res`.`bom_overhead_resource_assignment_id` AS `bom_overhead_resource_assignment_id`,`res`.`bom_cost_type` AS `resource_bom_cost_type`,`res`.`resource_id` AS `resource_id`,`ora`.`bom_overhead_rate_assignment_id` AS `bom_overhead_rate_assignment_id`,`ora`.`bom_overhead_id` AS `bom_overhead_id`,`ora`.`bom_cost_type` AS `rate_bom_cost_type`,`ora`.`default_basis` AS `default_basis`,`ora`.`rate` AS `rate`,`bo`.`overhead` AS `overhead`,`bo`.`description` AS `description`,`bo`.`org_id` AS `org_id`,`bo`.`overhead_type` AS `overhead_type`,`bo`.`absorption_ac_id` AS `absorption_ac_id` from ((`bom_overhead_rate_assignment` `ora` left join `bom_overhead` `bo` on((`bo`.`bom_overhead_id` = `ora`.`bom_overhead_id`))) left join `bom_overhead_resource_assignment` `res` on((`res`.`bom_overhead_id` = `ora`.`bom_overhead_id`))) where (`res`.`bom_cost_type` = `ora`.`bom_cost_type`); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bom_overhead_v` AS select `res`.`bom_overhead_resource_assignment_id` AS `bom_overhead_resource_assignment_id`,`res`.`bom_cost_type` AS `resource_bom_cost_type`,`res`.`resource_id` AS `resource_id`,`ora`.`bom_overhead_rate_assignment_id` AS `bom_overhead_rate_assignment_id`,`ora`.`bom_overhead_id` AS `bom_overhead_id`,`ora`.`bom_cost_type` AS `rate_bom_cost_type`,`ora`.`default_basis` AS `default_basis`,`ora`.`rate` AS `rate`,`bo`.`overhead` AS `overhead`,`bo`.`description` AS `description`,`bo`.`org_id` AS `org_id`,`bo`.`overhead_type` AS `overhead_type`,`bo`.`absorption_ac_id` AS `absorption_ac_id` from ((`bom_overhead_rate_assignment` `ora` left join `bom_overhead` `bo` on((`bo`.`bom_overhead_id` = `ora`.`bom_overhead_id`))) left join `bom_overhead_resource_assignment` `res` on((`res`.`bom_overhead_id` = `ora`.`bom_overhead_id`))) where (`res`.`bom_cost_type` = `ora`.`bom_cost_type`) ; -- -------------------------------------------------------- @@ -38060,7 +37472,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `bom_overhead_v` AS select -- DROP TABLE IF EXISTS `bom_routing_line_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `bom_routing_line_v` AS select `brh`.`bom_routing_header_id` AS `bom_routing_header_id_h`,`brh`.`item_id_m` AS `item_id_m`,`brh`.`alternate_routing` AS `alternate_routing`,`brh`.`org_id` AS `org_id`,`brh`.`routing_revision` AS `routing_revision`,`brh`.`effective_date` AS `effective_date`,`brh`.`common_routing_item_id_m` AS `common_routing_item_id_m`,`brh`.`description` AS `description_h`,`brh`.`completion_subinventory` AS `completion_subinventory`,`brh`.`completion_locator` AS `completion_locator`,`brl`.`bom_routing_line_id` AS `bom_routing_line_id`,`brl`.`bom_routing_header_id` AS `bom_routing_header_id`,`brl`.`routing_sequence` AS `routing_sequence`,`brl`.`standard_operation_id` AS `standard_operation_id`,`brl`.`department_id` AS `department_id`,`brl`.`description` AS `description`,`brl`.`count_point_cb` AS `count_point_cb`,`brl`.`auto_charge_cb` AS `auto_charge_cb`,`brl`.`backflush_cb` AS `backflush_cb`,`brl`.`minimum_transfer_quantity` AS `minimum_transfer_quantity`,`brl`.`lead_time_percentage` AS `lead_time_percentage`,`brl`.`effective_start_date` AS `effective_start_date`,`brl`.`effective_end_date` AS `effective_end_date`,`brl`.`eco_number` AS `eco_number`,`brl`.`eco_implemented_cb` AS `eco_implemented_cb`,`brl`.`include_in_rollup_cb` AS `include_in_rollup_cb`,`brl`.`referenced_cb` AS `referenced_cb`,`brl`.`yield` AS `yield`,`brl`.`cumm_yield` AS `cumm_yield` from (`bom_routing_header` `brh` join `bom_routing_line` `brl`) where ((`brh`.`bom_routing_header_id` = `brl`.`bom_routing_header_id`) and (isnull(`brh`.`common_routing_item_id_m`) or (`brh`.`common_routing_item_id_m` = 0))) union select `brhc`.`bom_routing_header_id` AS `bom_routing_header_id_h`,`brhc`.`item_id_m` AS `item_id_m`,`brhc`.`alternate_routing` AS `alternate_routing`,`brhc`.`org_id` AS `org_id`,`brhc`.`routing_revision` AS `routing_revision`,`brhc`.`effective_date` AS `effective_date`,`brhc`.`common_routing_item_id_m` AS `common_routing_item_id_m`,`brhc`.`description` AS `description_h`,`brhc`.`completion_subinventory` AS `completion_subinventory`,`brhc`.`completion_locator` AS `completion_locator`,`brl`.`bom_routing_line_id` AS `bom_routing_line_id`,`brl`.`bom_routing_header_id` AS `bom_routing_header_id`,`brl`.`routing_sequence` AS `routing_sequence`,`brl`.`standard_operation_id` AS `standard_operation_id`,`brl`.`department_id` AS `department_id`,`brl`.`description` AS `description`,`brl`.`count_point_cb` AS `count_point_cb`,`brl`.`auto_charge_cb` AS `auto_charge_cb`,`brl`.`backflush_cb` AS `backflush_cb`,`brl`.`minimum_transfer_quantity` AS `minimum_transfer_quantity`,`brl`.`lead_time_percentage` AS `lead_time_percentage`,`brl`.`effective_start_date` AS `effective_start_date`,`brl`.`effective_end_date` AS `effective_end_date`,`brl`.`eco_number` AS `eco_number`,`brl`.`eco_implemented_cb` AS `eco_implemented_cb`,`brl`.`include_in_rollup_cb` AS `include_in_rollup_cb`,`brl`.`referenced_cb` AS `referenced_cb`,`brl`.`yield` AS `yield`,`brl`.`cumm_yield` AS `cumm_yield` from ((`bom_routing_header` `brh` join `bom_routing_header` `brhc`) join `bom_routing_line` `brl`) where ((`brh`.`bom_routing_header_id` = `brl`.`bom_routing_header_id`) and ((`brhc`.`common_routing_item_id_m` is not null) or (`brhc`.`common_routing_item_id_m` = 0)) and (`brhc`.`common_routing_item_id_m` = `brh`.`item_id_m`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bom_routing_line_v` AS select `brh`.`bom_routing_header_id` AS `bom_routing_header_id_h`,`brh`.`item_id_m` AS `item_id_m`,`brh`.`alternate_routing` AS `alternate_routing`,`brh`.`org_id` AS `org_id`,`brh`.`routing_revision` AS `routing_revision`,`brh`.`effective_date` AS `effective_date`,`brh`.`common_routing_item_id_m` AS `common_routing_item_id_m`,`brh`.`description` AS `description_h`,`brh`.`completion_subinventory` AS `completion_subinventory`,`brh`.`completion_locator` AS `completion_locator`,`brl`.`bom_routing_line_id` AS `bom_routing_line_id`,`brl`.`bom_routing_header_id` AS `bom_routing_header_id`,`brl`.`routing_sequence` AS `routing_sequence`,`brl`.`standard_operation_id` AS `standard_operation_id`,`brl`.`department_id` AS `department_id`,`brl`.`description` AS `description`,`brl`.`count_point_cb` AS `count_point_cb`,`brl`.`auto_charge_cb` AS `auto_charge_cb`,`brl`.`backflush_cb` AS `backflush_cb`,`brl`.`minimum_transfer_quantity` AS `minimum_transfer_quantity`,`brl`.`lead_time_percentage` AS `lead_time_percentage`,`brl`.`effective_start_date` AS `effective_start_date`,`brl`.`effective_end_date` AS `effective_end_date`,`brl`.`eco_number` AS `eco_number`,`brl`.`eco_implemented_cb` AS `eco_implemented_cb`,`brl`.`include_in_rollup_cb` AS `include_in_rollup_cb`,`brl`.`referenced_cb` AS `referenced_cb`,`brl`.`yield` AS `yield`,`brl`.`cumm_yield` AS `cumm_yield` from (`bom_routing_header` `brh` join `bom_routing_line` `brl`) where ((`brh`.`bom_routing_header_id` = `brl`.`bom_routing_header_id`) and (isnull(`brh`.`common_routing_item_id_m`) or (`brh`.`common_routing_item_id_m` = 0))) union select `brhc`.`bom_routing_header_id` AS `bom_routing_header_id_h`,`brhc`.`item_id_m` AS `item_id_m`,`brhc`.`alternate_routing` AS `alternate_routing`,`brhc`.`org_id` AS `org_id`,`brhc`.`routing_revision` AS `routing_revision`,`brhc`.`effective_date` AS `effective_date`,`brhc`.`common_routing_item_id_m` AS `common_routing_item_id_m`,`brhc`.`description` AS `description_h`,`brhc`.`completion_subinventory` AS `completion_subinventory`,`brhc`.`completion_locator` AS `completion_locator`,`brl`.`bom_routing_line_id` AS `bom_routing_line_id`,`brl`.`bom_routing_header_id` AS `bom_routing_header_id`,`brl`.`routing_sequence` AS `routing_sequence`,`brl`.`standard_operation_id` AS `standard_operation_id`,`brl`.`department_id` AS `department_id`,`brl`.`description` AS `description`,`brl`.`count_point_cb` AS `count_point_cb`,`brl`.`auto_charge_cb` AS `auto_charge_cb`,`brl`.`backflush_cb` AS `backflush_cb`,`brl`.`minimum_transfer_quantity` AS `minimum_transfer_quantity`,`brl`.`lead_time_percentage` AS `lead_time_percentage`,`brl`.`effective_start_date` AS `effective_start_date`,`brl`.`effective_end_date` AS `effective_end_date`,`brl`.`eco_number` AS `eco_number`,`brl`.`eco_implemented_cb` AS `eco_implemented_cb`,`brl`.`include_in_rollup_cb` AS `include_in_rollup_cb`,`brl`.`referenced_cb` AS `referenced_cb`,`brl`.`yield` AS `yield`,`brl`.`cumm_yield` AS `cumm_yield` from ((`bom_routing_header` `brh` join `bom_routing_header` `brhc`) join `bom_routing_line` `brl`) where ((`brh`.`bom_routing_header_id` = `brl`.`bom_routing_header_id`) and ((`brhc`.`common_routing_item_id_m` is not null) or (`brhc`.`common_routing_item_id_m` = 0)) and (`brhc`.`common_routing_item_id_m` = `brh`.`item_id_m`)) ; -- -------------------------------------------------------- @@ -38069,7 +37481,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `bom_routing_line_v` AS se -- DROP TABLE IF EXISTS `bom_routing_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `bom_routing_v` AS select `brh`.`bom_routing_header_id` AS `bom_routing_header_id`,`brh`.`item_id_m` AS `item_id_m`,`brh`.`alternate_routing` AS `alternate_routing`,`brh`.`org_id` AS `org_id`,`brh`.`routing_revision` AS `routing_revision`,`brh`.`effective_date` AS `effective_date`,`brh`.`common_routing_item_id_m` AS `common_routing_item_id_m`,`brh`.`description` AS `description`,`brh`.`completion_subinventory` AS `completion_subinventory`,`brh`.`completion_locator` AS `completion_locator`,`brh`.`ef_id` AS `ef_id`,`brh`.`created_by` AS `created_by`,`brh`.`creation_date` AS `creation_date`,`brh`.`last_update_by` AS `last_update_by`,`brh`.`last_update_date` AS `last_update_date`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`uom_id` AS `uom_id`,`item`.`item_type` AS `item_type`,`item`.`item_status` AS `item_status`,`item`.`bom_type` AS `bom_type`,`item`.`costing_enabled_cb` AS `costing_enabled_cb`,`item`.`make_buy` AS `make_buy`,`org`.`org` AS `org`,`org`.`type` AS `type`,`org`.`status` AS `status`,`org`.`description` AS `org_description`,`org`.`code` AS `code`,`sub`.`subinventory` AS `subinventory`,`loc`.`locator` AS `locator` from ((((`bom_routing_header` `brh` left join `item` on(((`item`.`item_id_m` = `brh`.`item_id_m`) and (`item`.`org_id` = `brh`.`org_id`)))) left join `org` on((`org`.`org_id` = `brh`.`org_id`))) left join `subinventory` `sub` on((`sub`.`subinventory_id` = `brh`.`completion_subinventory`))) left join `locator` `loc` on((`loc`.`locator_id` = `brh`.`completion_locator`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bom_routing_v` AS select `brh`.`bom_routing_header_id` AS `bom_routing_header_id`,`brh`.`item_id_m` AS `item_id_m`,`brh`.`alternate_routing` AS `alternate_routing`,`brh`.`org_id` AS `org_id`,`brh`.`routing_revision` AS `routing_revision`,`brh`.`effective_date` AS `effective_date`,`brh`.`common_routing_item_id_m` AS `common_routing_item_id_m`,`brh`.`description` AS `description`,`brh`.`completion_subinventory` AS `completion_subinventory`,`brh`.`completion_locator` AS `completion_locator`,`brh`.`ef_id` AS `ef_id`,`brh`.`created_by` AS `created_by`,`brh`.`creation_date` AS `creation_date`,`brh`.`last_update_by` AS `last_update_by`,`brh`.`last_update_date` AS `last_update_date`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`uom_id` AS `uom_id`,`item`.`item_type` AS `item_type`,`item`.`item_status` AS `item_status`,`item`.`bom_type` AS `bom_type`,`item`.`costing_enabled_cb` AS `costing_enabled_cb`,`item`.`make_buy` AS `make_buy`,`org`.`org` AS `org`,`org`.`type` AS `type`,`org`.`status` AS `status`,`org`.`description` AS `org_description`,`org`.`code` AS `code`,`sub`.`subinventory` AS `subinventory`,`loc`.`locator` AS `locator` from ((((`bom_routing_header` `brh` left join `item` on(((`item`.`item_id_m` = `brh`.`item_id_m`) and (`item`.`org_id` = `brh`.`org_id`)))) left join `org` on((`org`.`org_id` = `brh`.`org_id`))) left join `subinventory` `sub` on((`sub`.`subinventory_id` = `brh`.`completion_subinventory`))) left join `locator` `loc` on((`loc`.`locator_id` = `brh`.`completion_locator`))) ; -- -------------------------------------------------------- @@ -38078,7 +37490,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `bom_routing_v` AS select -- DROP TABLE IF EXISTS `cst_gross_margin_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `cst_gross_margin_v` AS select `ath`.`ar_transaction_header_id` AS `ar_transaction_header_id`,`ath`.`bu_org_id` AS `bu_org_id`,`ath`.`transaction_type` AS `transaction_type`,`ath`.`transaction_class` AS `transaction_class`,`ath`.`transaction_number` AS `transaction_number`,`ath`.`ar_customer_id` AS `ar_customer_id`,`ath`.`ar_customer_site_id` AS `ar_customer_site_id`,`ath`.`document_owner` AS `document_owner`,`ath`.`description` AS `description`,`ath`.`ship_to_id` AS `ship_to_id`,`ath`.`bill_to_id` AS `bill_to_id`,`ath`.`header_amount` AS `header_amount`,`ath`.`currency` AS `currency`,`ath`.`exchange_rate` AS `exchange_rate`,`ath`.`doc_currency` AS `doc_currency`,`ath`.`document_number` AS `document_number`,`ath`.`ledger_id` AS `ledger_id`,`ath`.`period_id` AS `period_id`,`gp`.`period_name` AS `period_name`,`ath`.`sales_person` AS `sales_person`,`ath`.`reference_key_name` AS `reference_key_name_ath`,`ath`.`reference_key_value` AS `reference_key_value_ath`,`ath`.`sd_so_header_id` AS `sd_so_header_id_ath`,`atl`.`ar_transaction_line_id` AS `ar_transaction_line_id`,`atl`.`line_number` AS `line_number`,`atl`.`item_id_m` AS `item_id_m`,`atl`.`ar_transaction_header_id` AS `ar_transaction_header_id_atl`,`atl`.`item_description` AS `item_description`,`atl`.`inv_line_quantity` AS `inv_line_quantity`,`atl`.`inv_unit_price` AS `inv_unit_price`,`atl`.`line_type` AS `line_type`,`atl`.`line_description` AS `line_description`,`atl`.`sd_so_header_id` AS `sd_so_header_id`,`atl`.`reference_key_name` AS `reference_key_name`,`atl`.`reference_key_value` AS `reference_key_value`,`ar_customer`.`customer_name` AS `customer_name`,`ar_customer`.`customer_number` AS `customer_number`,`ar_customer_site`.`customer_site_name` AS `customer_site_name`,`ar_customer_site`.`customer_site_number` AS `customer_site_number`,`sdsl`.`sd_so_line_id` AS `sd_so_line_id`,`sdsl`.`line_type` AS `line_type_so_line`,`sdsl`.`unit_price` AS `unit_price`,`item`.`item_number` AS `item_number`,`org`.`org` AS `org`,`sdsl`.`shipping_org_id` AS `shipping_org_id`,(`atl`.`inv_unit_price` * `ath`.`exchange_rate`) AS `inv_unit_price_ledgc`,`ship_address`.`address` AS `address`,`ship_address`.`country` AS `country`,`cich`.`cst_item_cost_header_id` AS `cst_item_cost_header_id`,sum(`cicl`.`amount`) AS `frozen_cost`,(ifnull((`atl`.`inv_unit_price` * `ath`.`exchange_rate`),0) - ifnull(sum(`cicl`.`amount`),0)) AS `gross_profit`,(round(((ifnull((`atl`.`inv_unit_price` * `ath`.`exchange_rate`),0) - ifnull(sum(`cicl`.`amount`),0)) / ifnull((`atl`.`inv_unit_price` * `ath`.`exchange_rate`),1)),5) * 100) AS `gross_margin` from (((`ar_customer` join `address` `ship_address`) join `gl_period` `gp`) join ((((((((`ar_transaction_line` `atl` left join `ar_transaction_header` `ath` on((`ath`.`ar_transaction_header_id` = `atl`.`ar_transaction_header_id`))) left join `ar_customer_site` on((`ath`.`ar_customer_site_id` = `ar_customer_site`.`ar_customer_site_id`))) left join `sd_so_line` `sdsl` on((`atl`.`sd_so_line_id` = `sdsl`.`sd_so_line_id`))) left join `sd_so_header` `sdsh` on((`sdsh`.`sd_so_header_id` = `sdsl`.`sd_so_header_id`))) left join `org` on((`sdsl`.`shipping_org_id` = `org`.`org_id`))) left join `item` on(((`sdsl`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `sdsl`.`shipping_org_id`)))) left join `cst_item_cost_header` `cich` on(((`cich`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `cich`.`org_id`) and (`cich`.`bom_cost_type` = 'FROZEN')))) left join `cst_item_cost_line` `cicl` on((`cicl`.`cst_item_cost_header_id` = `cich`.`cst_item_cost_header_id`)))) where ((`ath`.`ar_customer_id` = `ar_customer`.`ar_customer_id`) and (`ship_address`.`address_id` = `ath`.`ship_to_id`) and (`gp`.`gl_period_id` = `ath`.`period_id`)) group by `cich`.`cst_item_cost_header_id`,`atl`.`ar_transaction_line_id`; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `cst_gross_margin_v` AS select `ath`.`ar_transaction_header_id` AS `ar_transaction_header_id`,`ath`.`bu_org_id` AS `bu_org_id`,`ath`.`transaction_type` AS `transaction_type`,`ath`.`transaction_class` AS `transaction_class`,`ath`.`transaction_number` AS `transaction_number`,`ath`.`ar_customer_id` AS `ar_customer_id`,`ath`.`ar_customer_site_id` AS `ar_customer_site_id`,`ath`.`document_owner` AS `document_owner`,`ath`.`description` AS `description`,`ath`.`ship_to_id` AS `ship_to_id`,`ath`.`bill_to_id` AS `bill_to_id`,`ath`.`header_amount` AS `header_amount`,`ath`.`currency` AS `currency`,`ath`.`exchange_rate` AS `exchange_rate`,`ath`.`doc_currency` AS `doc_currency`,`ath`.`document_number` AS `document_number`,`ath`.`ledger_id` AS `ledger_id`,`ath`.`period_id` AS `period_id`,`gp`.`period_name` AS `period_name`,`ath`.`sales_person` AS `sales_person`,`ath`.`reference_key_name` AS `reference_key_name_ath`,`ath`.`reference_key_value` AS `reference_key_value_ath`,`ath`.`sd_so_header_id` AS `sd_so_header_id_ath`,`atl`.`ar_transaction_line_id` AS `ar_transaction_line_id`,`atl`.`line_number` AS `line_number`,`atl`.`item_id_m` AS `item_id_m`,`atl`.`ar_transaction_header_id` AS `ar_transaction_header_id_atl`,`atl`.`item_description` AS `item_description`,`atl`.`inv_line_quantity` AS `inv_line_quantity`,`atl`.`inv_unit_price` AS `inv_unit_price`,`atl`.`line_type` AS `line_type`,`atl`.`line_description` AS `line_description`,`atl`.`sd_so_header_id` AS `sd_so_header_id`,`atl`.`reference_key_name` AS `reference_key_name`,`atl`.`reference_key_value` AS `reference_key_value`,`ar_customer`.`customer_name` AS `customer_name`,`ar_customer`.`customer_number` AS `customer_number`,`ar_customer_site`.`customer_site_name` AS `customer_site_name`,`ar_customer_site`.`customer_site_number` AS `customer_site_number`,`sdsl`.`sd_so_line_id` AS `sd_so_line_id`,`sdsl`.`line_type` AS `line_type_so_line`,`sdsl`.`unit_price` AS `unit_price`,`item`.`item_number` AS `item_number`,`org`.`org` AS `org`,`sdsl`.`shipping_org_id` AS `shipping_org_id`,(`atl`.`inv_unit_price` * `ath`.`exchange_rate`) AS `inv_unit_price_ledgc`,`ship_address`.`address` AS `address`,`ship_address`.`country` AS `country`,`cich`.`cst_item_cost_header_id` AS `cst_item_cost_header_id`,sum(`cicl`.`amount`) AS `frozen_cost`,(ifnull((`atl`.`inv_unit_price` * `ath`.`exchange_rate`),0) - ifnull(sum(`cicl`.`amount`),0)) AS `gross_profit`,(round(((ifnull((`atl`.`inv_unit_price` * `ath`.`exchange_rate`),0) - ifnull(sum(`cicl`.`amount`),0)) / ifnull((`atl`.`inv_unit_price` * `ath`.`exchange_rate`),1)),5) * 100) AS `gross_margin` from (((`ar_customer` join `address` `ship_address`) join `gl_period` `gp`) join ((((((((`ar_transaction_line` `atl` left join `ar_transaction_header` `ath` on((`ath`.`ar_transaction_header_id` = `atl`.`ar_transaction_header_id`))) left join `ar_customer_site` on((`ath`.`ar_customer_site_id` = `ar_customer_site`.`ar_customer_site_id`))) left join `sd_so_line` `sdsl` on((`atl`.`sd_so_line_id` = `sdsl`.`sd_so_line_id`))) left join `sd_so_header` `sdsh` on((`sdsh`.`sd_so_header_id` = `sdsl`.`sd_so_header_id`))) left join `org` on((`sdsl`.`shipping_org_id` = `org`.`org_id`))) left join `item` on(((`sdsl`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `sdsl`.`shipping_org_id`)))) left join `cst_item_cost_header` `cich` on(((`cich`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `cich`.`org_id`) and (`cich`.`bom_cost_type` = 'FROZEN')))) left join `cst_item_cost_line` `cicl` on((`cicl`.`cst_item_cost_header_id` = `cich`.`cst_item_cost_header_id`)))) where ((`ath`.`ar_customer_id` = `ar_customer`.`ar_customer_id`) and (`ship_address`.`address_id` = `ath`.`ship_to_id`) and (`gp`.`gl_period_id` = `ath`.`period_id`)) group by `cich`.`cst_item_cost_header_id`,`atl`.`ar_transaction_line_id` ; -- -------------------------------------------------------- @@ -38087,7 +37499,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `cst_gross_margin_v` AS se -- DROP TABLE IF EXISTS `cst_item_cost_sum_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `cst_item_cost_sum_v` AS select `ich`.`cst_item_cost_header_id` AS `cst_item_cost_header_id`,sum(`icl`.`amount`) AS `standard_cost` from (`cst_item_cost_header` `ich` join `cst_item_cost_line` `icl`) where (`icl`.`cst_item_cost_header_id` = `ich`.`cst_item_cost_header_id`) group by `ich`.`cst_item_cost_header_id`; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `cst_item_cost_sum_v` AS select `ich`.`cst_item_cost_header_id` AS `cst_item_cost_header_id`,sum(`icl`.`amount`) AS `standard_cost` from (`cst_item_cost_header` `ich` join `cst_item_cost_line` `icl`) where (`icl`.`cst_item_cost_header_id` = `ich`.`cst_item_cost_header_id`) group by `ich`.`cst_item_cost_header_id` ; -- -------------------------------------------------------- @@ -38096,7 +37508,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `cst_item_cost_sum_v` AS s -- DROP TABLE IF EXISTS `cst_item_cost_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `cst_item_cost_v` AS select `item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`cich`.`item_id_m` AS `item_id_m`,`cich`.`org_id` AS `org_id`,`org`.`org` AS `org`,`cich`.`sales_price` AS `sales_price`,`cich`.`purchase_price` AS `purchase_price`,`cich`.`cst_item_cost_header_id` AS `cst_item_cost_header_id`,`cich`.`bom_cost_type` AS `bom_cost_type`,`icsv`.`standard_cost` AS `standard_cost` from (((`cst_item_cost_header` `cich` join `cst_item_cost_sum_v` `icsv`) join `item`) join `org`) where ((`icsv`.`cst_item_cost_header_id` = `cich`.`cst_item_cost_header_id`) and (`item`.`item_id_m` = `cich`.`item_id_m`) and (`item`.`org_id` = `cich`.`org_id`) and (`org`.`org_id` = `cich`.`org_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `cst_item_cost_v` AS select `item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`cich`.`item_id_m` AS `item_id_m`,`cich`.`org_id` AS `org_id`,`org`.`org` AS `org`,`cich`.`sales_price` AS `sales_price`,`cich`.`purchase_price` AS `purchase_price`,`cich`.`cst_item_cost_header_id` AS `cst_item_cost_header_id`,`cich`.`bom_cost_type` AS `bom_cost_type`,`icsv`.`standard_cost` AS `standard_cost` from (((`cst_item_cost_header` `cich` join `cst_item_cost_sum_v` `icsv`) join `item`) join `org`) where ((`icsv`.`cst_item_cost_header_id` = `cich`.`cst_item_cost_header_id`) and (`item`.`item_id_m` = `cich`.`item_id_m`) and (`item`.`org_id` = `cich`.`org_id`) and (`org`.`org_id` = `cich`.`org_id`)) ; -- -------------------------------------------------------- @@ -38105,7 +37517,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `cst_item_cost_v` AS selec -- DROP TABLE IF EXISTS `fp_forecast_line_date_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_forecast_line_date_v` AS select `fld`.`fp_forecast_line_date_id` AS `fp_forecast_line_date_id`,`fld`.`fp_forecast_line_id` AS `fp_forecast_line_id`,`fh`.`forecast` AS `forecast`,`fg`.`forecast_group` AS `forecast_group`,`org`.`org` AS `org`,`item`.`item_number` AS `item_number`,`uom`.`uom_name` AS `uom_name`,`item`.`item_description` AS `item_description`,`fld`.`forecast_date` AS `forecast_date`,`fl`.`bucket_type` AS `bucket_type`,`fld`.`original_quantity` AS `original_quantity`,`fld`.`current_quantity` AS `current_quantity`,`fld`.`source` AS `source`,`fl`.`item_id_m` AS `item_id_m`,`item`.`uom_id` AS `uom_id` from ((((`fp_forecast_line_date` `fld` join `fp_forecast_line` `fl`) join `org`) join (`fp_forecast_header` `fh` left join `fp_forecast_group` `fg` on((`fg`.`fp_forecast_group_id` = `fh`.`forecast_group_id`)))) join (`item` left join `uom` on((`uom`.`uom_id` = `item`.`uom_id`)))) where ((`fl`.`fp_forecast_line_id` = `fld`.`fp_forecast_line_id`) and (`fl`.`fp_forecast_header_id` = `fh`.`fp_forecast_header_id`) and (`item`.`item_id_m` = `fl`.`item_id_m`) and (`item`.`org_id` = `fh`.`org_id`) and (`org`.`org_id` = `fh`.`org_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `fp_forecast_line_date_v` AS select `fld`.`fp_forecast_line_date_id` AS `fp_forecast_line_date_id`,`fld`.`fp_forecast_line_id` AS `fp_forecast_line_id`,`fh`.`forecast` AS `forecast`,`fg`.`forecast_group` AS `forecast_group`,`org`.`org` AS `org`,`item`.`item_number` AS `item_number`,`uom`.`uom_name` AS `uom_name`,`item`.`item_description` AS `item_description`,`fld`.`forecast_date` AS `forecast_date`,`fl`.`bucket_type` AS `bucket_type`,`fld`.`original_quantity` AS `original_quantity`,`fld`.`current_quantity` AS `current_quantity`,`fld`.`source` AS `source`,`fl`.`item_id_m` AS `item_id_m`,`item`.`uom_id` AS `uom_id` from ((((`fp_forecast_line_date` `fld` join `fp_forecast_line` `fl`) join `org`) join (`fp_forecast_header` `fh` left join `fp_forecast_group` `fg` on((`fg`.`fp_forecast_group_id` = `fh`.`forecast_group_id`)))) join (`item` left join `uom` on((`uom`.`uom_id` = `item`.`uom_id`)))) where ((`fl`.`fp_forecast_line_id` = `fld`.`fp_forecast_line_id`) and (`fl`.`fp_forecast_header_id` = `fh`.`fp_forecast_header_id`) and (`item`.`item_id_m` = `fl`.`item_id_m`) and (`item`.`org_id` = `fh`.`org_id`) and (`org`.`org_id` = `fh`.`org_id`)) ; -- -------------------------------------------------------- @@ -38114,7 +37526,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_forecast_line_date_v` -- DROP TABLE IF EXISTS `fp_forecast_over_consumption_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_forecast_over_consumption_v` AS select `fg`.`forecast_group` AS `forecast_group`,`org`.`org` AS `org`,`sosh`.`so_number` AS `so_number`,`sosl`.`line_number` AS `line_number`,`item`.`item_number` AS `item_number`,`uom`.`uom_name` AS `uom_name`,`item`.`item_description` AS `item_description`,`sosl`.`schedule_ship_date` AS `schedule_ship_date`,`foc`.`quantity` AS `quantity`,`sosl`.`item_id_m` AS `item_id_m`,`item`.`uom_id` AS `uom_id`,`foc`.`fp_forecast_consumption_id` AS `fp_forecast_consumption_id`,`foc`.`sd_so_line_id` AS `sd_so_line_id`,`sosl`.`sd_so_header_id` AS `sd_so_header_id` from (((((`fp_forecast_consumption` `foc` join `fp_forecast_group` `fg`) join `sd_so_line` `sosl`) join `sd_so_header` `sosh`) join `org`) join (`item` left join `uom` on((`uom`.`uom_id` = `item`.`uom_id`)))) where ((`foc`.`sd_so_line_id` = `sosl`.`sd_so_line_id`) and (`fg`.`fp_forecast_group_id` = `foc`.`fp_forecast_group_id`) and (`item`.`item_id_m` = `sosl`.`item_id_m`) and (`item`.`org_id` = `sosl`.`shipping_org_id`) and (`org`.`org_id` = `sosl`.`shipping_org_id`) and (`sosh`.`sd_so_header_id` = `sosl`.`sd_so_header_id`) and (`foc`.`quantity` < 0)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `fp_forecast_over_consumption_v` AS select `fg`.`forecast_group` AS `forecast_group`,`org`.`org` AS `org`,`sosh`.`so_number` AS `so_number`,`sosl`.`line_number` AS `line_number`,`item`.`item_number` AS `item_number`,`uom`.`uom_name` AS `uom_name`,`item`.`item_description` AS `item_description`,`sosl`.`schedule_ship_date` AS `schedule_ship_date`,`foc`.`quantity` AS `quantity`,`sosl`.`item_id_m` AS `item_id_m`,`item`.`uom_id` AS `uom_id`,`foc`.`fp_forecast_consumption_id` AS `fp_forecast_consumption_id`,`foc`.`sd_so_line_id` AS `sd_so_line_id`,`sosl`.`sd_so_header_id` AS `sd_so_header_id` from (((((`fp_forecast_consumption` `foc` join `fp_forecast_group` `fg`) join `sd_so_line` `sosl`) join `sd_so_header` `sosh`) join `org`) join (`item` left join `uom` on((`uom`.`uom_id` = `item`.`uom_id`)))) where ((`foc`.`sd_so_line_id` = `sosl`.`sd_so_line_id`) and (`fg`.`fp_forecast_group_id` = `foc`.`fp_forecast_group_id`) and (`item`.`item_id_m` = `sosl`.`item_id_m`) and (`item`.`org_id` = `sosl`.`shipping_org_id`) and (`org`.`org_id` = `sosl`.`shipping_org_id`) and (`sosh`.`sd_so_header_id` = `sosl`.`sd_so_header_id`) and (`foc`.`quantity` < 0)) ; -- -------------------------------------------------------- @@ -38123,7 +37535,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_forecast_over_consumpt -- DROP TABLE IF EXISTS `fp_kanban_demand_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_kanban_demand_v` AS select `mmh`.`plan_name` AS `plan_name`,`mmh`.`org_id` AS `org_id`,`mmh`.`planning_horizon_days` AS `planning_horizon_days`,`org`.`org` AS `org`,`fh`.`forecast` AS `forecast`,`fh`.`description` AS `forecast_description`,`fmd`.`fp_kanban_demand_id` AS `fp_kanban_demand_id`,`fmd`.`plan_id` AS `plan_id`,`fmd`.`item_id_m` AS `item_id_m`,`fmd`.`quantity` AS `quantity`,`fmd`.`demand_item_id_m` AS `demand_item_id_m`,`fmd`.`toplevel_demand_item_id_m` AS `toplevel_demand_item_id_m`,`fmd`.`demand_type` AS `demand_type`,`fmd`.`source` AS `source`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item2`.`item_number` AS `top_level_item_number`,`item2`.`item_description` AS `top_level_item_description`,`item3`.`item_number` AS `demand_item_number`,`item3`.`item_description` AS `demand_item_description`,`fmd`.`created_by` AS `created_by`,`fmd`.`creation_date` AS `creation_date`,`fmd`.`last_update_by` AS `last_update_by`,`fmd`.`last_update_date` AS `last_update_date` from ((((((`fp_kanban_demand` `fmd` left join `fp_kanban_planner_header` `mmh` on((`mmh`.`fp_kanban_planner_header_id` = `fmd`.`plan_id`))) left join `fp_forecast_header` `fh` on((`fh`.`fp_forecast_header_id` = `fmd`.`source`))) left join `item` on((`item`.`item_id_m` = `fmd`.`item_id_m`))) left join `item` `item2` on((`item2`.`item_id_m` = `fmd`.`toplevel_demand_item_id_m`))) left join `item` `item3` on((`item3`.`item_id_m` = `fmd`.`demand_item_id_m`))) left join `org` on((`org`.`org_id` = `mmh`.`org_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `fp_kanban_demand_v` AS select `mmh`.`plan_name` AS `plan_name`,`mmh`.`org_id` AS `org_id`,`mmh`.`planning_horizon_days` AS `planning_horizon_days`,`org`.`org` AS `org`,`fh`.`forecast` AS `forecast`,`fh`.`description` AS `forecast_description`,`fmd`.`fp_kanban_demand_id` AS `fp_kanban_demand_id`,`fmd`.`plan_id` AS `plan_id`,`fmd`.`item_id_m` AS `item_id_m`,`fmd`.`quantity` AS `quantity`,`fmd`.`demand_item_id_m` AS `demand_item_id_m`,`fmd`.`toplevel_demand_item_id_m` AS `toplevel_demand_item_id_m`,`fmd`.`demand_type` AS `demand_type`,`fmd`.`source` AS `source`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item2`.`item_number` AS `top_level_item_number`,`item2`.`item_description` AS `top_level_item_description`,`item3`.`item_number` AS `demand_item_number`,`item3`.`item_description` AS `demand_item_description`,`fmd`.`created_by` AS `created_by`,`fmd`.`creation_date` AS `creation_date`,`fmd`.`last_update_by` AS `last_update_by`,`fmd`.`last_update_date` AS `last_update_date` from ((((((`fp_kanban_demand` `fmd` left join `fp_kanban_planner_header` `mmh` on((`mmh`.`fp_kanban_planner_header_id` = `fmd`.`plan_id`))) left join `fp_forecast_header` `fh` on((`fh`.`fp_forecast_header_id` = `fmd`.`source`))) left join `item` on((`item`.`item_id_m` = `fmd`.`item_id_m`))) left join `item` `item2` on((`item2`.`item_id_m` = `fmd`.`toplevel_demand_item_id_m`))) left join `item` `item3` on((`item3`.`item_id_m` = `fmd`.`demand_item_id_m`))) left join `org` on((`org`.`org_id` = `mmh`.`org_id`))) ; -- -------------------------------------------------------- @@ -38132,7 +37544,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_kanban_demand_v` AS se -- DROP TABLE IF EXISTS `fp_kanban_line_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_kanban_line_v` AS select `kbl`.`fp_kanban_line_id` AS `fp_kanban_line_id`,`kbl`.`fp_kanban_header_id` AS `fp_kanban_header_id`,`kbl`.`description` AS `description`,`kbl`.`card_number` AS `card_number`,`kbl`.`card_status` AS `card_status`,`kbl`.`supply_status` AS `supply_status`,`kbl`.`kanban_size` AS `kanban_size`,`kbl`.`card_type` AS `card_type`,`kbh`.`org_id` AS `org_id`,`kbh`.`description` AS `kbh_description`,`kbh`.`item_id_m` AS `item_id_m`,`kbh`.`effective_from` AS `effective_from`,`kbh`.`effective_to` AS `effective_to`,`kbh`.`subinventory_id` AS `subinventory_id`,`kbh`.`locator_id` AS `locator_id`,`kbh`.`source_type` AS `source_type`,`kbh`.`supplier_id` AS `supplier_id`,`kbh`.`supplier_site_id` AS `supplier_site_id`,`kbh`.`from_org_id` AS `from_org_id`,`kbh`.`from_subinventory_id` AS `from_subinventory_id`,`kbh`.`from_locator_id` AS `from_locator_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`uom_id` AS `uom_id`,`item`.`list_price` AS `list_price`,`item`.`sourcing_rule_id` AS `sourcing_rule_id`,(ifnull(`item`.`pre_processing_lt`,0) + ifnull(`item`.`processing_lt`,0)) AS `lead_time`,`sub`.`subinventory` AS `subinventory`,`locator`.`locator` AS `locator`,`org`.`org` AS `org`,`org`.`business_org_id` AS `bu_org_id` from ((((`fp_kanban_line` `kbl` join `item`) join `subinventory` `sub`) join `org`) join (`fp_kanban_header` `kbh` left join `locator` on((`locator`.`locator_id` = `kbh`.`locator_id`)))) where ((`kbh`.`fp_kanban_header_id` = `kbl`.`fp_kanban_header_id`) and (`item`.`item_id_m` = `kbh`.`item_id_m`) and (`item`.`org_id` = `kbh`.`org_id`) and (`org`.`org_id` = `kbh`.`org_id`) and (`sub`.`subinventory_id` = `kbh`.`subinventory_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `fp_kanban_line_v` AS select `kbl`.`fp_kanban_line_id` AS `fp_kanban_line_id`,`kbl`.`fp_kanban_header_id` AS `fp_kanban_header_id`,`kbl`.`description` AS `description`,`kbl`.`card_number` AS `card_number`,`kbl`.`card_status` AS `card_status`,`kbl`.`supply_status` AS `supply_status`,`kbl`.`kanban_size` AS `kanban_size`,`kbl`.`card_type` AS `card_type`,`kbh`.`org_id` AS `org_id`,`kbh`.`description` AS `kbh_description`,`kbh`.`item_id_m` AS `item_id_m`,`kbh`.`effective_from` AS `effective_from`,`kbh`.`effective_to` AS `effective_to`,`kbh`.`subinventory_id` AS `subinventory_id`,`kbh`.`locator_id` AS `locator_id`,`kbh`.`source_type` AS `source_type`,`kbh`.`supplier_id` AS `supplier_id`,`kbh`.`supplier_site_id` AS `supplier_site_id`,`kbh`.`from_org_id` AS `from_org_id`,`kbh`.`from_subinventory_id` AS `from_subinventory_id`,`kbh`.`from_locator_id` AS `from_locator_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`uom_id` AS `uom_id`,`item`.`list_price` AS `list_price`,`item`.`sourcing_rule_id` AS `sourcing_rule_id`,(ifnull(`item`.`pre_processing_lt`,0) + ifnull(`item`.`processing_lt`,0)) AS `lead_time`,`sub`.`subinventory` AS `subinventory`,`locator`.`locator` AS `locator`,`org`.`org` AS `org`,`org`.`business_org_id` AS `bu_org_id` from ((((`fp_kanban_line` `kbl` join `item`) join `subinventory` `sub`) join `org`) join (`fp_kanban_header` `kbh` left join `locator` on((`locator`.`locator_id` = `kbh`.`locator_id`)))) where ((`kbh`.`fp_kanban_header_id` = `kbl`.`fp_kanban_header_id`) and (`item`.`item_id_m` = `kbh`.`item_id_m`) and (`item`.`org_id` = `kbh`.`org_id`) and (`org`.`org_id` = `kbh`.`org_id`) and (`sub`.`subinventory_id` = `kbh`.`subinventory_id`)) ; -- -------------------------------------------------------- @@ -38141,7 +37553,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_kanban_line_v` AS sele -- DROP TABLE IF EXISTS `fp_kanban_suggestion_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_kanban_suggestion_v` AS select `mmh`.`plan_name` AS `plan_name`,`mmh`.`org_id` AS `org_id`,`mmh`.`planning_horizon_days` AS `planning_horizon_days`,`org`.`org` AS `org`,`fmd`.`item_id_m` AS `item_id_m`,`item`.`item_number` AS `item_number`,sum(`fmd`.`quantity`) AS `total_demand`,(sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`) AS `avg_daily_demand`,`item`.`saftey_stock_quantity` AS `saftey_stock_quantity`,((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) AS `lead_time`,`item`.`saftey_stock_days` AS `saftey_stock_days`,(((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) AS `minimum_quantity`,`item`.`fix_days_supply` AS `fix_days_supply`,if(((`item`.`fix_days_supply` * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) > (((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0))),(`item`.`fix_days_supply` * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)),((((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * 1.5) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0))) AS `maximum_quantity`,ifnull(`item`.`fix_days_supply`,30) AS `multibin_fix_days_supply`,ifnull(ifnull(`kh`.`noof_card`,(ceiling(((((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) / `kh`.`card_size`)) + 1)),2) AS `kanban_multibin_number`,ifnull(`kh`.`card_size`,((((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) / ifnull(`kh`.`noof_card`,ceiling((ifnull(((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`),0) / ifnull(`item`.`fix_days_supply`,30)))))) AS `kanban_multibin_size`,(((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) AS `kanban_twobin_size`,`fh`.`forecast` AS `forecast`,`fh`.`description` AS `forecast_description`,`fmd`.`fp_kanban_demand_id` AS `fp_kanban_demand_id`,`fmd`.`plan_id` AS `plan_id`,`fmd`.`demand_item_id_m` AS `demand_item_id_m`,`fmd`.`toplevel_demand_item_id_m` AS `toplevel_demand_item_id_m`,`fmd`.`demand_type` AS `demand_type`,`fmd`.`source` AS `source`,`item`.`item_description` AS `item_description`,`item2`.`item_number` AS `top_level_item_number`,`item2`.`item_description` AS `top_level_item_description`,`item3`.`item_number` AS `demand_item_number`,`item3`.`item_description` AS `demand_item_description`,`fmd`.`created_by` AS `created_by`,`fmd`.`creation_date` AS `creation_date`,`fmd`.`last_update_by` AS `last_update_by`,`fmd`.`last_update_date` AS `last_update_date`,`kh`.`fp_kanban_header_id` AS `fp_kanban_header_id` from (((((((`fp_kanban_demand` `fmd` left join `fp_kanban_planner_header` `mmh` on((`mmh`.`fp_kanban_planner_header_id` = `fmd`.`plan_id`))) left join `fp_forecast_header` `fh` on((`fh`.`fp_forecast_header_id` = `fmd`.`source`))) left join `item` on((`item`.`item_id_m` = `fmd`.`item_id_m`))) left join `item` `item2` on((`item2`.`item_id_m` = `fmd`.`toplevel_demand_item_id_m`))) left join `item` `item3` on((`item3`.`item_id_m` = `fmd`.`demand_item_id_m`))) left join `org` on((`org`.`org_id` = `mmh`.`org_id`))) left join `fp_kanban_header` `kh` on(((`kh`.`org_id` = `mmh`.`org_id`) and (`kh`.`item_id_m` = `fmd`.`item_id_m`)))) group by `fmd`.`item_id_m`; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `fp_kanban_suggestion_v` AS select `mmh`.`plan_name` AS `plan_name`,`mmh`.`org_id` AS `org_id`,`mmh`.`planning_horizon_days` AS `planning_horizon_days`,`org`.`org` AS `org`,`fmd`.`item_id_m` AS `item_id_m`,`item`.`item_number` AS `item_number`,sum(`fmd`.`quantity`) AS `total_demand`,(sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`) AS `avg_daily_demand`,`item`.`saftey_stock_quantity` AS `saftey_stock_quantity`,((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) AS `lead_time`,`item`.`saftey_stock_days` AS `saftey_stock_days`,(((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) AS `minimum_quantity`,`item`.`fix_days_supply` AS `fix_days_supply`,if(((`item`.`fix_days_supply` * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) > (((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0))),(`item`.`fix_days_supply` * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)),((((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * 1.5) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0))) AS `maximum_quantity`,ifnull(`item`.`fix_days_supply`,30) AS `multibin_fix_days_supply`,ifnull(ifnull(`kh`.`noof_card`,(ceiling(((((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) / `kh`.`card_size`)) + 1)),2) AS `kanban_multibin_number`,ifnull(`kh`.`card_size`,((((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) / ifnull(`kh`.`noof_card`,ceiling((ifnull(((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`),0) / ifnull(`item`.`fix_days_supply`,30)))))) AS `kanban_multibin_size`,(((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) AS `kanban_twobin_size`,`fh`.`forecast` AS `forecast`,`fh`.`description` AS `forecast_description`,`fmd`.`fp_kanban_demand_id` AS `fp_kanban_demand_id`,`fmd`.`plan_id` AS `plan_id`,`fmd`.`demand_item_id_m` AS `demand_item_id_m`,`fmd`.`toplevel_demand_item_id_m` AS `toplevel_demand_item_id_m`,`fmd`.`demand_type` AS `demand_type`,`fmd`.`source` AS `source`,`item`.`item_description` AS `item_description`,`item2`.`item_number` AS `top_level_item_number`,`item2`.`item_description` AS `top_level_item_description`,`item3`.`item_number` AS `demand_item_number`,`item3`.`item_description` AS `demand_item_description`,`fmd`.`created_by` AS `created_by`,`fmd`.`creation_date` AS `creation_date`,`fmd`.`last_update_by` AS `last_update_by`,`fmd`.`last_update_date` AS `last_update_date`,`kh`.`fp_kanban_header_id` AS `fp_kanban_header_id` from (((((((`fp_kanban_demand` `fmd` left join `fp_kanban_planner_header` `mmh` on((`mmh`.`fp_kanban_planner_header_id` = `fmd`.`plan_id`))) left join `fp_forecast_header` `fh` on((`fh`.`fp_forecast_header_id` = `fmd`.`source`))) left join `item` on((`item`.`item_id_m` = `fmd`.`item_id_m`))) left join `item` `item2` on((`item2`.`item_id_m` = `fmd`.`toplevel_demand_item_id_m`))) left join `item` `item3` on((`item3`.`item_id_m` = `fmd`.`demand_item_id_m`))) left join `org` on((`org`.`org_id` = `mmh`.`org_id`))) left join `fp_kanban_header` `kh` on(((`kh`.`org_id` = `mmh`.`org_id`) and (`kh`.`item_id_m` = `fmd`.`item_id_m`)))) group by `fmd`.`item_id_m` ; -- -------------------------------------------------------- @@ -38150,7 +37562,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_kanban_suggestion_v` A -- DROP TABLE IF EXISTS `fp_minmax_demand_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_minmax_demand_v` AS select `mmh`.`plan_name` AS `plan_name`,`mmh`.`org_id` AS `org_id`,`mmh`.`planning_horizon_days` AS `planning_horizon_days`,`org`.`org` AS `org`,`fh`.`forecast` AS `forecast`,`fh`.`description` AS `forecast_description`,`fmd`.`fp_minmax_demand_id` AS `fp_minmax_demand_id`,`fmd`.`plan_id` AS `plan_id`,`fmd`.`item_id_m` AS `item_id_m`,`fmd`.`quantity` AS `quantity`,`fmd`.`demand_item_id_m` AS `demand_item_id_m`,`fmd`.`toplevel_demand_item_id_m` AS `toplevel_demand_item_id_m`,`fmd`.`demand_type` AS `demand_type`,`fmd`.`source` AS `source`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item2`.`item_number` AS `top_level_item_number`,`item2`.`item_description` AS `top_level_item_description`,`item3`.`item_number` AS `demand_item_number`,`item3`.`item_description` AS `demand_item_description`,`fmd`.`created_by` AS `created_by`,`fmd`.`creation_date` AS `creation_date`,`fmd`.`last_update_by` AS `last_update_by`,`fmd`.`last_update_date` AS `last_update_date` from ((((((`fp_minmax_demand` `fmd` left join `fp_minmax_header` `mmh` on((`mmh`.`fp_minmax_header_id` = `fmd`.`plan_id`))) left join `fp_forecast_header` `fh` on((`fh`.`fp_forecast_header_id` = `fmd`.`source`))) left join `item` on((`item`.`item_id_m` = `fmd`.`item_id_m`))) left join `item` `item2` on((`item2`.`item_id_m` = `fmd`.`toplevel_demand_item_id_m`))) left join `item` `item3` on((`item3`.`item_id_m` = `fmd`.`demand_item_id_m`))) left join `org` on((`org`.`org_id` = `mmh`.`org_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `fp_minmax_demand_v` AS select `mmh`.`plan_name` AS `plan_name`,`mmh`.`org_id` AS `org_id`,`mmh`.`planning_horizon_days` AS `planning_horizon_days`,`org`.`org` AS `org`,`fh`.`forecast` AS `forecast`,`fh`.`description` AS `forecast_description`,`fmd`.`fp_minmax_demand_id` AS `fp_minmax_demand_id`,`fmd`.`plan_id` AS `plan_id`,`fmd`.`item_id_m` AS `item_id_m`,`fmd`.`quantity` AS `quantity`,`fmd`.`demand_item_id_m` AS `demand_item_id_m`,`fmd`.`toplevel_demand_item_id_m` AS `toplevel_demand_item_id_m`,`fmd`.`demand_type` AS `demand_type`,`fmd`.`source` AS `source`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item2`.`item_number` AS `top_level_item_number`,`item2`.`item_description` AS `top_level_item_description`,`item3`.`item_number` AS `demand_item_number`,`item3`.`item_description` AS `demand_item_description`,`fmd`.`created_by` AS `created_by`,`fmd`.`creation_date` AS `creation_date`,`fmd`.`last_update_by` AS `last_update_by`,`fmd`.`last_update_date` AS `last_update_date` from ((((((`fp_minmax_demand` `fmd` left join `fp_minmax_header` `mmh` on((`mmh`.`fp_minmax_header_id` = `fmd`.`plan_id`))) left join `fp_forecast_header` `fh` on((`fh`.`fp_forecast_header_id` = `fmd`.`source`))) left join `item` on((`item`.`item_id_m` = `fmd`.`item_id_m`))) left join `item` `item2` on((`item2`.`item_id_m` = `fmd`.`toplevel_demand_item_id_m`))) left join `item` `item3` on((`item3`.`item_id_m` = `fmd`.`demand_item_id_m`))) left join `org` on((`org`.`org_id` = `mmh`.`org_id`))) ; -- -------------------------------------------------------- @@ -38159,7 +37571,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_minmax_demand_v` AS se -- DROP TABLE IF EXISTS `fp_minmax_suggestion_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_minmax_suggestion_v` AS select `mmh`.`plan_name` AS `plan_name`,`mmh`.`org_id` AS `org_id`,`mmh`.`planning_horizon_days` AS `planning_horizon_days`,`org`.`org` AS `org`,`fmd`.`item_id_m` AS `item_id_m`,`item`.`item_number` AS `item_number`,sum(`fmd`.`quantity`) AS `total_demand`,(sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`) AS `avg_daily_demand`,`item`.`saftey_stock_quantity` AS `saftey_stock_quantity`,((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) AS `lead_time`,`item`.`saftey_stock_days` AS `saftey_stock_days`,(((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) AS `minimum_quantity`,`item`.`fix_days_supply` AS `fix_days_supply`,if(((`item`.`fix_days_supply` * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) > (((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0))),(`item`.`fix_days_supply` * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)),((((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * 1.5) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0))) AS `maximum_quantity`,ifnull(`item`.`fix_days_supply`,30) AS `multibin_fix_days_supply`,(ceiling((ifnull(((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`),0) / ifnull(`item`.`fix_days_supply`,30))) + 1) AS `minmax_multibin_number`,((((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) / ceiling((ifnull(((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`),0) / ifnull(`item`.`fix_days_supply`,30)))) AS `minmax_multibin_size`,((((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) + 1) AS `multibin_minmax_quantity`,`fh`.`forecast` AS `forecast`,`fh`.`description` AS `forecast_description`,`fmd`.`fp_minmax_demand_id` AS `fp_minmax_demand_id`,`fmd`.`plan_id` AS `plan_id`,`fmd`.`demand_item_id_m` AS `demand_item_id_m`,`fmd`.`toplevel_demand_item_id_m` AS `toplevel_demand_item_id_m`,`fmd`.`demand_type` AS `demand_type`,`fmd`.`source` AS `source`,`item`.`item_description` AS `item_description`,`item2`.`item_number` AS `top_level_item_number`,`item2`.`item_description` AS `top_level_item_description`,`item3`.`item_number` AS `demand_item_number`,`item3`.`item_description` AS `demand_item_description`,`fmd`.`created_by` AS `created_by`,`fmd`.`creation_date` AS `creation_date`,`fmd`.`last_update_by` AS `last_update_by`,`fmd`.`last_update_date` AS `last_update_date` from ((((((`fp_minmax_demand` `fmd` left join `fp_minmax_header` `mmh` on((`mmh`.`fp_minmax_header_id` = `fmd`.`plan_id`))) left join `fp_forecast_header` `fh` on((`fh`.`fp_forecast_header_id` = `fmd`.`source`))) left join `item` on((`item`.`item_id_m` = `fmd`.`item_id_m`))) left join `item` `item2` on((`item2`.`item_id_m` = `fmd`.`toplevel_demand_item_id_m`))) left join `item` `item3` on((`item3`.`item_id_m` = `fmd`.`demand_item_id_m`))) left join `org` on((`org`.`org_id` = `mmh`.`org_id`))) group by `fmd`.`item_id_m`; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `fp_minmax_suggestion_v` AS select `mmh`.`plan_name` AS `plan_name`,`mmh`.`org_id` AS `org_id`,`mmh`.`planning_horizon_days` AS `planning_horizon_days`,`org`.`org` AS `org`,`fmd`.`item_id_m` AS `item_id_m`,`item`.`item_number` AS `item_number`,sum(`fmd`.`quantity`) AS `total_demand`,(sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`) AS `avg_daily_demand`,`item`.`saftey_stock_quantity` AS `saftey_stock_quantity`,((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) AS `lead_time`,`item`.`saftey_stock_days` AS `saftey_stock_days`,(((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) AS `minimum_quantity`,`item`.`fix_days_supply` AS `fix_days_supply`,if(((`item`.`fix_days_supply` * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) > (((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0))),(`item`.`fix_days_supply` * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)),((((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * 1.5) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0))) AS `maximum_quantity`,ifnull(`item`.`fix_days_supply`,30) AS `multibin_fix_days_supply`,(ceiling((ifnull(((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`),0) / ifnull(`item`.`fix_days_supply`,30))) + 1) AS `minmax_multibin_number`,((((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) / ceiling((ifnull(((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`),0) / ifnull(`item`.`fix_days_supply`,30)))) AS `minmax_multibin_size`,((((((`item`.`pre_processing_lt` + `item`.`post_processing_lt`) + `item`.`processing_lt`) + ifnull(`item`.`saftey_stock_days`,0)) * (sum(`fmd`.`quantity`) / `mmh`.`planning_horizon_days`)) + ifnull(`item`.`saftey_stock_quantity`,0)) + 1) AS `multibin_minmax_quantity`,`fh`.`forecast` AS `forecast`,`fh`.`description` AS `forecast_description`,`fmd`.`fp_minmax_demand_id` AS `fp_minmax_demand_id`,`fmd`.`plan_id` AS `plan_id`,`fmd`.`demand_item_id_m` AS `demand_item_id_m`,`fmd`.`toplevel_demand_item_id_m` AS `toplevel_demand_item_id_m`,`fmd`.`demand_type` AS `demand_type`,`fmd`.`source` AS `source`,`item`.`item_description` AS `item_description`,`item2`.`item_number` AS `top_level_item_number`,`item2`.`item_description` AS `top_level_item_description`,`item3`.`item_number` AS `demand_item_number`,`item3`.`item_description` AS `demand_item_description`,`fmd`.`created_by` AS `created_by`,`fmd`.`creation_date` AS `creation_date`,`fmd`.`last_update_by` AS `last_update_by`,`fmd`.`last_update_date` AS `last_update_date` from ((((((`fp_minmax_demand` `fmd` left join `fp_minmax_header` `mmh` on((`mmh`.`fp_minmax_header_id` = `fmd`.`plan_id`))) left join `fp_forecast_header` `fh` on((`fh`.`fp_forecast_header_id` = `fmd`.`source`))) left join `item` on((`item`.`item_id_m` = `fmd`.`item_id_m`))) left join `item` `item2` on((`item2`.`item_id_m` = `fmd`.`toplevel_demand_item_id_m`))) left join `item` `item3` on((`item3`.`item_id_m` = `fmd`.`demand_item_id_m`))) left join `org` on((`org`.`org_id` = `mmh`.`org_id`))) group by `fmd`.`item_id_m` ; -- -------------------------------------------------------- @@ -38168,7 +37580,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_minmax_suggestion_v` A -- DROP TABLE IF EXISTS `fp_mrp_demand_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_mrp_demand_v` AS select `fmd`.`fp_mrp_demand_id` AS `fp_mrp_demand_id`,`fmd`.`fp_mrp_header_id` AS `fp_mrp_header_id`,`fmh`.`mrp_name` AS `mrp_name`,`fmd`.`org_id` AS `org_id`,`fmd`.`item_id_m` AS `item_id_m`,`fmd`.`demand_date` AS `demand_date`,`fmd`.`quantity` AS `quantity`,`fmd`.`demand_item_id_m` AS `demand_item_id_m`,`fmd`.`toplevel_demand_item_id_m` AS `toplevel_demand_item_id_m`,`fmd`.`source_type` AS `source_type`,`fmd`.`primary_source_type` AS `primary_source_type`,`fmd`.`source_header_id` AS `source_header_id`,`fmd`.`source_line_id` AS `source_line_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`planner` AS `planner`,`item`.`product_line` AS `product_line`,`cic`.`standard_cost` AS `standard_cost`,`cic`.`sales_price` AS `sales_price`,`cic`.`purchase_price` AS `purchase_price` from (((`fp_mrp_demand` `fmd` left join `item` on(((`item`.`item_id_m` = `fmd`.`item_id_m`) and (`item`.`org_id` = `fmd`.`org_id`)))) left join `cst_item_cost_v` `cic` on(((`cic`.`item_id_m` = `fmd`.`item_id_m`) and (`cic`.`org_id` = `cic`.`org_id`) and (`cic`.`bom_cost_type` = 'FROZEN')))) join `fp_mrp_header` `fmh`) where (`fmh`.`fp_mrp_header_id` = `fmd`.`fp_mrp_header_id`); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `fp_mrp_demand_v` AS select `fmd`.`fp_mrp_demand_id` AS `fp_mrp_demand_id`,`fmd`.`fp_mrp_header_id` AS `fp_mrp_header_id`,`fmh`.`mrp_name` AS `mrp_name`,`fmd`.`org_id` AS `org_id`,`fmd`.`item_id_m` AS `item_id_m`,`fmd`.`demand_date` AS `demand_date`,`fmd`.`quantity` AS `quantity`,`fmd`.`demand_item_id_m` AS `demand_item_id_m`,`fmd`.`toplevel_demand_item_id_m` AS `toplevel_demand_item_id_m`,`fmd`.`source_type` AS `source_type`,`fmd`.`primary_source_type` AS `primary_source_type`,`fmd`.`source_header_id` AS `source_header_id`,`fmd`.`source_line_id` AS `source_line_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`planner` AS `planner`,`item`.`product_line` AS `product_line`,`cic`.`standard_cost` AS `standard_cost`,`cic`.`sales_price` AS `sales_price`,`cic`.`purchase_price` AS `purchase_price` from (((`fp_mrp_demand` `fmd` left join `item` on(((`item`.`item_id_m` = `fmd`.`item_id_m`) and (`item`.`org_id` = `fmd`.`org_id`)))) left join `cst_item_cost_v` `cic` on(((`cic`.`item_id_m` = `fmd`.`item_id_m`) and (`cic`.`org_id` = `cic`.`org_id`) and (`cic`.`bom_cost_type` = 'FROZEN')))) join `fp_mrp_header` `fmh`) where (`fmh`.`fp_mrp_header_id` = `fmd`.`fp_mrp_header_id`) ; -- -------------------------------------------------------- @@ -38177,7 +37589,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_mrp_demand_v` AS selec -- DROP TABLE IF EXISTS `fp_mrp_existing_supply_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_mrp_existing_supply_v` AS select `item`.`item_id_m` AS `item_id_m`,'PO' AS `document_type`,(`pd`.`quantity` - `pd`.`received_quantity`) AS `quantity`,ifnull(`pd`.`promise_date`,`pd`.`need_by_date`) AS `supply_date`,`pd`.`po_detail_id` AS `document_id` from (((`item` join `po_line` `pl`) join `po_detail` `pd`) join `po_header` `ph`) where ((`pl`.`item_id_m` = `item`.`item_id_m`) and (`pd`.`po_line_id` = `pl`.`po_line_id`) and (`pd`.`po_header_id` = `ph`.`po_header_id`)) union select `item`.`item_id_m` AS `item_id_m`,'Requisition' AS `document_type`,`prd`.`quantity` AS `quantity`,ifnull(`prd`.`promise_date`,`prd`.`need_by_date`) AS `supply_date`,`prd`.`po_requisition_detail_id` AS `document_id` from (((`item` join `po_requisition_line` `prl`) join `po_requisition_detail` `prd`) join `po_requisition_header` `prh`) where ((`prl`.`item_id_m` = `item`.`item_id_m`) and (`prd`.`po_requisition_line_id` = `prl`.`po_requisition_line_id`) and (`prd`.`po_requisition_header_id` = `prh`.`po_requisition_header_id`) and isnull(`prd`.`order_number`)) union select `item`.`item_id_m` AS `item_id_m`,'Onhand' AS `document_type`,sum(`oh`.`onhand`) AS `quantity`,curdate() AS `supply_date`,`oh`.`onhand_id` AS `document_id` from (`onhand` `oh` join `item`) where (`oh`.`item_id_m` = `item`.`item_id_m`) group by `oh`.`item_id_m` union select `item`.`item_id_m` AS `item_id_m`,'WO' AS `document_type`,((`wwh`.`nettable_quantity` - ifnull(`wwh`.`completed_quantity`,0)) - ifnull(`wwh`.`scrapped_quantity`,0)) AS `quantity`,`wwh`.`completion_date` AS `supply_date`,`wwh`.`wip_wo_header_id` AS `document_id` from (`wip_wo_header` `wwh` join `item`) where (`wwh`.`item_id_m` = `item`.`item_id_m`); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `fp_mrp_existing_supply_v` AS select `item`.`item_id_m` AS `item_id_m`,'PO' AS `document_type`,(`pd`.`quantity` - `pd`.`received_quantity`) AS `quantity`,ifnull(`pd`.`promise_date`,`pd`.`need_by_date`) AS `supply_date`,`pd`.`po_detail_id` AS `document_id` from (((`item` join `po_line` `pl`) join `po_detail` `pd`) join `po_header` `ph`) where ((`pl`.`item_id_m` = `item`.`item_id_m`) and (`pd`.`po_line_id` = `pl`.`po_line_id`) and (`pd`.`po_header_id` = `ph`.`po_header_id`)) union select `item`.`item_id_m` AS `item_id_m`,'Requisition' AS `document_type`,`prd`.`quantity` AS `quantity`,ifnull(`prd`.`promise_date`,`prd`.`need_by_date`) AS `supply_date`,`prd`.`po_requisition_detail_id` AS `document_id` from (((`item` join `po_requisition_line` `prl`) join `po_requisition_detail` `prd`) join `po_requisition_header` `prh`) where ((`prl`.`item_id_m` = `item`.`item_id_m`) and (`prd`.`po_requisition_line_id` = `prl`.`po_requisition_line_id`) and (`prd`.`po_requisition_header_id` = `prh`.`po_requisition_header_id`) and isnull(`prd`.`order_number`)) union select `item`.`item_id_m` AS `item_id_m`,'Onhand' AS `document_type`,sum(`oh`.`onhand`) AS `quantity`,curdate() AS `supply_date`,`oh`.`onhand_id` AS `document_id` from (`onhand` `oh` join `item`) where (`oh`.`item_id_m` = `item`.`item_id_m`) group by `oh`.`item_id_m` union select `item`.`item_id_m` AS `item_id_m`,'WO' AS `document_type`,((`wwh`.`nettable_quantity` - ifnull(`wwh`.`completed_quantity`,0)) - ifnull(`wwh`.`scrapped_quantity`,0)) AS `quantity`,`wwh`.`completion_date` AS `supply_date`,`wwh`.`wip_wo_header_id` AS `document_id` from (`wip_wo_header` `wwh` join `item`) where (`wwh`.`item_id_m` = `item`.`item_id_m`) ; -- -------------------------------------------------------- @@ -38186,7 +37598,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_mrp_existing_supply_v` -- DROP TABLE IF EXISTS `fp_mrp_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_mrp_v` AS select `fmh`.`mrp_name` AS `mrp_name`,`fmh`.`org_id` AS `org_id`,`org`.`org` AS `org`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item2`.`item_number` AS `demand_item_number`,`item2`.`item_description` AS `demand_item_description`,`item3`.`item_number` AS `toplevel_demand_item_number`,`item3`.`item_description` AS `toplevel_demand_item_description`,`item`.`sourcing_rule_id` AS `sourcing_rule_id`,`fmd`.`fp_mrp_planned_order_id` AS `fp_mrp_planned_order_id`,`fmd`.`fp_mrp_header_id` AS `fp_mrp_header_id`,`fmd`.`order_type` AS `order_type`,`fmd`.`order_action` AS `order_action`,`fmd`.`item_id_m` AS `item_id_m`,`fmd`.`quantity` AS `quantity`,`fmd`.`need_by_date` AS `need_by_date`,`fmd`.`supplier_id` AS `supplier_id`,`fmd`.`supplier_site_id` AS `supplier_site_id`,`fmd`.`demand_item_id_m` AS `demand_item_id_m`,`fmd`.`toplevel_demand_item_id_m` AS `toplevel_demand_item_id_m`,`fmd`.`source_type` AS `source_type`,`fmd`.`primary_source_type` AS `primary_source_type`,`fmd`.`source_header_id` AS `source_header_id`,`fmd`.`source_line_id` AS `source_line_id`,`ssh`.`so_number` AS `so_number`,`ffh`.`forecast` AS `forecast`,`soline`.`line_number` AS `sales_order_line` from ((((((((`fp_mrp_planned_order` `fmd` left join `fp_mrp_header` `fmh` on((`fmh`.`fp_mrp_header_id` = `fmd`.`fp_mrp_header_id`))) left join `item` on((`item`.`item_id_m` = `fmd`.`item_id_m`))) left join `item` `item2` on((`item2`.`item_id_m` = `fmd`.`demand_item_id_m`))) left join `item` `item3` on((`item3`.`item_id_m` = `fmd`.`toplevel_demand_item_id_m`))) left join `sd_so_header` `ssh` on(((`ssh`.`sd_so_header_id` = `fmd`.`source_header_id`) and (`fmd`.`primary_source_type` = 'Sales_Order')))) left join `fp_forecast_header` `ffh` on(((`ffh`.`fp_forecast_header_id` = `fmd`.`source_header_id`) and (`fmd`.`primary_source_type` = 'Forecast')))) left join `sd_so_line` `soline` on(((`soline`.`sd_so_line_id` = `fmd`.`source_line_id`) and (`fmd`.`primary_source_type` = 'Sales_Order')))) left join `org` on((`org`.`org_id` = `fmh`.`org_id`))) order by `item`.`item_number`,`fmd`.`need_by_date`; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `fp_mrp_v` AS select `fmh`.`mrp_name` AS `mrp_name`,`fmh`.`org_id` AS `org_id`,`org`.`org` AS `org`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item2`.`item_number` AS `demand_item_number`,`item2`.`item_description` AS `demand_item_description`,`item3`.`item_number` AS `toplevel_demand_item_number`,`item3`.`item_description` AS `toplevel_demand_item_description`,`item`.`sourcing_rule_id` AS `sourcing_rule_id`,`fmd`.`fp_mrp_planned_order_id` AS `fp_mrp_planned_order_id`,`fmd`.`fp_mrp_header_id` AS `fp_mrp_header_id`,`fmd`.`order_type` AS `order_type`,`fmd`.`order_action` AS `order_action`,`fmd`.`item_id_m` AS `item_id_m`,`fmd`.`quantity` AS `quantity`,`fmd`.`need_by_date` AS `need_by_date`,`fmd`.`supplier_id` AS `supplier_id`,`fmd`.`supplier_site_id` AS `supplier_site_id`,`fmd`.`demand_item_id_m` AS `demand_item_id_m`,`fmd`.`toplevel_demand_item_id_m` AS `toplevel_demand_item_id_m`,`fmd`.`source_type` AS `source_type`,`fmd`.`primary_source_type` AS `primary_source_type`,`fmd`.`source_header_id` AS `source_header_id`,`fmd`.`source_line_id` AS `source_line_id`,`ssh`.`so_number` AS `so_number`,`ffh`.`forecast` AS `forecast`,`soline`.`line_number` AS `sales_order_line` from ((((((((`fp_mrp_planned_order` `fmd` left join `fp_mrp_header` `fmh` on((`fmh`.`fp_mrp_header_id` = `fmd`.`fp_mrp_header_id`))) left join `item` on((`item`.`item_id_m` = `fmd`.`item_id_m`))) left join `item` `item2` on((`item2`.`item_id_m` = `fmd`.`demand_item_id_m`))) left join `item` `item3` on((`item3`.`item_id_m` = `fmd`.`toplevel_demand_item_id_m`))) left join `sd_so_header` `ssh` on(((`ssh`.`sd_so_header_id` = `fmd`.`source_header_id`) and (`fmd`.`primary_source_type` = 'Sales_Order')))) left join `fp_forecast_header` `ffh` on(((`ffh`.`fp_forecast_header_id` = `fmd`.`source_header_id`) and (`fmd`.`primary_source_type` = 'Forecast')))) left join `sd_so_line` `soline` on(((`soline`.`sd_so_line_id` = `fmd`.`source_line_id`) and (`fmd`.`primary_source_type` = 'Sales_Order')))) left join `org` on((`org`.`org_id` = `fmh`.`org_id`))) order by `item`.`item_number`,`fmd`.`need_by_date` ; -- -------------------------------------------------------- @@ -38195,7 +37607,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `fp_mrp_v` AS select `fmh` -- DROP TABLE IF EXISTS `gl_balance_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `gl_balance_v` AS select `gp`.`period_name` AS `period_name`,`gp`.`gl_period_id` AS `gl_period_id`,`cc`.`combination` AS `combination`,`cc`.`description` AS `description`,`gb`.`gl_balance_id` AS `gl_balance_id`,`gb`.`ledger_id` AS `ledger_id`,`gb`.`coa_combination_id` AS `coa_combination_id`,`gb`.`period_id` AS `period_id`,`gb`.`balance_type` AS `balance_type`,`gb`.`period_net_dr` AS `period_net_dr`,`gb`.`period_net_cr` AS `period_net_cr`,`gb`.`begin_balance_dr` AS `begin_balance_dr`,`gb`.`begin_balance_cr` AS `begin_balance_cr`,`gb`.`last_update_by` AS `last_update_by`,`gb`.`last_update_date` AS `last_update_date`,`cc`.`field1` AS `field1`,`cc`.`field2` AS `field2`,`cc`.`field3` AS `field3`,`cc`.`field4` AS `field4`,`cc`.`field5` AS `field5`,`cc`.`field6` AS `field6`,`cc`.`field7` AS `field7`,`cc`.`field8` AS `field8` from ((`gl_balance` `gb` left join `gl_period` `gp` on((`gp`.`gl_period_id` = `gb`.`period_id`))) left join `coa_combination` `cc` on((`cc`.`coa_combination_id` = `gb`.`coa_combination_id`))) order by `gp`.`gl_period_id` desc; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `gl_balance_v` AS select `gp`.`period_name` AS `period_name`,`gp`.`gl_period_id` AS `gl_period_id`,`cc`.`combination` AS `combination`,`cc`.`description` AS `description`,`gb`.`gl_balance_id` AS `gl_balance_id`,`gb`.`ledger_id` AS `ledger_id`,`gb`.`coa_combination_id` AS `coa_combination_id`,`gb`.`period_id` AS `period_id`,`gb`.`balance_type` AS `balance_type`,`gb`.`period_net_dr` AS `period_net_dr`,`gb`.`period_net_cr` AS `period_net_cr`,`gb`.`begin_balance_dr` AS `begin_balance_dr`,`gb`.`begin_balance_cr` AS `begin_balance_cr`,`gb`.`last_update_by` AS `last_update_by`,`gb`.`last_update_date` AS `last_update_date`,`cc`.`field1` AS `field1`,`cc`.`field2` AS `field2`,`cc`.`field3` AS `field3`,`cc`.`field4` AS `field4`,`cc`.`field5` AS `field5`,`cc`.`field6` AS `field6`,`cc`.`field7` AS `field7`,`cc`.`field8` AS `field8` from ((`gl_balance` `gb` left join `gl_period` `gp` on((`gp`.`gl_period_id` = `gb`.`period_id`))) left join `coa_combination` `cc` on((`cc`.`coa_combination_id` = `gb`.`coa_combination_id`))) order by `gp`.`gl_period_id` desc ; -- -------------------------------------------------------- @@ -38204,7 +37616,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `gl_balance_v` AS select ` -- DROP TABLE IF EXISTS `gl_journal_line_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `gl_journal_line_v` AS select `cc`.`combination` AS `combination`,`gjl`.`code_combination_id` AS `code_combination_id`,`gp`.`period_name` AS `period_name`,`gjl`.`total_cr` AS `total_cr`,`gjl`.`total_dr` AS `total_dr`,`gjl`.`total_ac_dr` AS `total_ac_dr`,`gjl`.`total_ac_cr` AS `total_ac_cr`,`cc`.`coa_id` AS `coa_id`,`gjh`.`ledger_id` AS `ledger_id`,`cc`.`description` AS `combination_description`,`gjl`.`gl_journal_line_id` AS `gl_journal_line_id`,`gjl`.`status` AS `status`,`gjl`.`gl_journal_header_id` AS `gl_journal_header_id`,`gjl`.`line_num` AS `line_num`,`gjl`.`line_type` AS `line_type`,`gjl`.`description` AS `line_description`,`gjl`.`reference_type` AS `reference_type`,`gjl`.`reference_key_name` AS `reference_key_name`,`gjl`.`reference_key_value` AS `reference_key_value`,`cc`.`coa_structure_id` AS `coa_structure_id`,`cc`.`field1` AS `field1`,`cc`.`field2` AS `field2`,`cc`.`field3` AS `field3`,`cc`.`field4` AS `field4`,`cc`.`field5` AS `field5`,`cc`.`field6` AS `field6`,`cc`.`field7` AS `field7`,`cc`.`field8` AS `field8`,`gjh`.`balance_type` AS `balance_type`,`gjh`.`post_date` AS `post_date`,`gp`.`gl_period_id` AS `gl_period_id`,`gjl`.`created_by` AS `created_by`,`gjl`.`creation_date` AS `creation_date`,`gjl`.`last_update_by` AS `last_update_by`,`gjl`.`last_update_date` AS `last_update_date`,`gjh`.`reference_key_name` AS `reference_key_name_h`,`gjh`.`reference_key_value` AS `reference_key_value_h` from (((`gl_journal_line` `gjl` left join `gl_journal_header` `gjh` on((`gjl`.`gl_journal_header_id` = `gjh`.`gl_journal_header_id`))) left join `gl_period` `gp` on((`gp`.`gl_period_id` = `gjh`.`period_id`))) left join `coa_combination` `cc` on((`gjl`.`code_combination_id` = `cc`.`coa_combination_id`))) order by `gp`.`gl_period_id` desc,`cc`.`combination` desc; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `gl_journal_line_v` AS select `cc`.`combination` AS `combination`,`gjl`.`code_combination_id` AS `code_combination_id`,`gp`.`period_name` AS `period_name`,`gjl`.`total_cr` AS `total_cr`,`gjl`.`total_dr` AS `total_dr`,`gjl`.`total_ac_dr` AS `total_ac_dr`,`gjl`.`total_ac_cr` AS `total_ac_cr`,`cc`.`coa_id` AS `coa_id`,`gjh`.`ledger_id` AS `ledger_id`,`cc`.`description` AS `combination_description`,`gjl`.`gl_journal_line_id` AS `gl_journal_line_id`,`gjl`.`status` AS `status`,`gjl`.`gl_journal_header_id` AS `gl_journal_header_id`,`gjl`.`line_num` AS `line_num`,`gjl`.`line_type` AS `line_type`,`gjl`.`description` AS `line_description`,`gjl`.`reference_type` AS `reference_type`,`gjl`.`reference_key_name` AS `reference_key_name`,`gjl`.`reference_key_value` AS `reference_key_value`,`cc`.`coa_structure_id` AS `coa_structure_id`,`cc`.`field1` AS `field1`,`cc`.`field2` AS `field2`,`cc`.`field3` AS `field3`,`cc`.`field4` AS `field4`,`cc`.`field5` AS `field5`,`cc`.`field6` AS `field6`,`cc`.`field7` AS `field7`,`cc`.`field8` AS `field8`,`gjh`.`balance_type` AS `balance_type`,`gjh`.`post_date` AS `post_date`,`gp`.`gl_period_id` AS `gl_period_id`,`gjl`.`created_by` AS `created_by`,`gjl`.`creation_date` AS `creation_date`,`gjl`.`last_update_by` AS `last_update_by`,`gjl`.`last_update_date` AS `last_update_date`,`gjh`.`reference_key_name` AS `reference_key_name_h`,`gjh`.`reference_key_value` AS `reference_key_value_h` from (((`gl_journal_line` `gjl` left join `gl_journal_header` `gjh` on((`gjl`.`gl_journal_header_id` = `gjh`.`gl_journal_header_id`))) left join `gl_period` `gp` on((`gp`.`gl_period_id` = `gjh`.`period_id`))) left join `coa_combination` `cc` on((`gjl`.`code_combination_id` = `cc`.`coa_combination_id`))) order by `gp`.`gl_period_id` desc,`cc`.`combination` desc ; -- -------------------------------------------------------- @@ -38213,7 +37625,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `gl_journal_line_v` AS sel -- DROP TABLE IF EXISTS `gl_unposted_balance_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `gl_unposted_balance_v` AS select `cc`.`combination` AS `combination`,`gjl`.`code_combination_id` AS `code_combination_id`,`gp`.`period_name` AS `period_name`,`cc`.`coa_id` AS `coa_id`,sum(`gjl`.`total_cr`) AS `total_cr`,sum(`gjl`.`total_dr`) AS `total_dr`,sum(`gjl`.`total_ac_dr`) AS `total_ac_dr`,sum(`gjl`.`total_ac_cr`) AS `total_ac_cr`,`gjh`.`ledger_id` AS `ledger_id`,`cc`.`description` AS `description`,`gjl`.`gl_journal_line_id` AS `gl_journal_line_id`,`gjl`.`gl_journal_header_id` AS `gl_journal_header_id`,`gjl`.`line_num` AS `line_num`,`gjl`.`line_type` AS `line_type`,`gjl`.`description` AS `line_description`,`gjl`.`reference_type` AS `reference_type`,`gjl`.`reference_key_name` AS `reference_key_name`,`gjl`.`reference_key_value` AS `reference_key_value`,`cc`.`coa_structure_id` AS `coa_structure_id`,`cc`.`field1` AS `field1`,`cc`.`field2` AS `field2`,`cc`.`field3` AS `field3`,`cc`.`field4` AS `field4`,`cc`.`field5` AS `field5`,`cc`.`field6` AS `field6`,`cc`.`field7` AS `field7`,`cc`.`field8` AS `field8`,`gjh`.`balance_type` AS `balance_type`,`gjh`.`post_date` AS `post_date`,`gp`.`gl_period_id` AS `gl_period_id` from (((`gl_journal_line` `gjl` left join `gl_journal_header` `gjh` on((`gjl`.`gl_journal_header_id` = `gjh`.`gl_journal_header_id`))) left join `gl_period` `gp` on((`gp`.`gl_period_id` = `gjh`.`period_id`))) left join `coa_combination` `cc` on((`gjl`.`code_combination_id` = `cc`.`coa_combination_id`))) where (`gjl`.`status` = 'U') group by `gjl`.`code_combination_id`; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `gl_unposted_balance_v` AS select `cc`.`combination` AS `combination`,`gjl`.`code_combination_id` AS `code_combination_id`,`gp`.`period_name` AS `period_name`,`cc`.`coa_id` AS `coa_id`,sum(`gjl`.`total_cr`) AS `total_cr`,sum(`gjl`.`total_dr`) AS `total_dr`,sum(`gjl`.`total_ac_dr`) AS `total_ac_dr`,sum(`gjl`.`total_ac_cr`) AS `total_ac_cr`,`gjh`.`ledger_id` AS `ledger_id`,`cc`.`description` AS `description`,`gjl`.`gl_journal_line_id` AS `gl_journal_line_id`,`gjl`.`gl_journal_header_id` AS `gl_journal_header_id`,`gjl`.`line_num` AS `line_num`,`gjl`.`line_type` AS `line_type`,`gjl`.`description` AS `line_description`,`gjl`.`reference_type` AS `reference_type`,`gjl`.`reference_key_name` AS `reference_key_name`,`gjl`.`reference_key_value` AS `reference_key_value`,`cc`.`coa_structure_id` AS `coa_structure_id`,`cc`.`field1` AS `field1`,`cc`.`field2` AS `field2`,`cc`.`field3` AS `field3`,`cc`.`field4` AS `field4`,`cc`.`field5` AS `field5`,`cc`.`field6` AS `field6`,`cc`.`field7` AS `field7`,`cc`.`field8` AS `field8`,`gjh`.`balance_type` AS `balance_type`,`gjh`.`post_date` AS `post_date`,`gp`.`gl_period_id` AS `gl_period_id` from (((`gl_journal_line` `gjl` left join `gl_journal_header` `gjh` on((`gjl`.`gl_journal_header_id` = `gjh`.`gl_journal_header_id`))) left join `gl_period` `gp` on((`gp`.`gl_period_id` = `gjh`.`period_id`))) left join `coa_combination` `cc` on((`gjl`.`code_combination_id` = `cc`.`coa_combination_id`))) where (`gjl`.`status` = 'U') group by `gjl`.`code_combination_id` ; -- -------------------------------------------------------- @@ -38222,7 +37634,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `gl_unposted_balance_v` AS -- DROP TABLE IF EXISTS `gl_unposted_journal_lines_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `gl_unposted_journal_lines_v` AS select `cc`.`combination` AS `combination`,`gjl`.`code_combination_id` AS `code_combination_id`,`gp`.`period_name` AS `period_name`,`cc`.`coa_id` AS `coa_id`,sum(`gjl`.`total_cr`) AS `sum_total_cr`,sum(`gjl`.`total_dr`) AS `sum_total_dr`,sum(`gjl`.`total_ac_dr`) AS `sum_total_ac_dr`,sum(`gjl`.`total_ac_cr`) AS `sum_total_ac_cr`,`gjh`.`ledger_id` AS `ledger_id`,`cc`.`description` AS `combination_description`,`gjl`.`gl_journal_line_id` AS `gl_journal_line_id`,`gjl`.`status` AS `status`,`gjl`.`gl_journal_header_id` AS `gl_journal_header_id`,`gjl`.`line_num` AS `line_num`,`gjl`.`line_type` AS `line_type`,`gjl`.`description` AS `line_description`,`gjl`.`reference_type` AS `reference_type`,`gjl`.`reference_key_name` AS `reference_key_name`,`gjl`.`reference_key_value` AS `reference_key_value`,`cc`.`coa_structure_id` AS `coa_structure_id`,`cc`.`field1` AS `field1`,`cc`.`field2` AS `field2`,`cc`.`field3` AS `field3`,`cc`.`field4` AS `field4`,`cc`.`field5` AS `field5`,`cc`.`field6` AS `field6`,`cc`.`field7` AS `field7`,`cc`.`field8` AS `field8`,`gjh`.`balance_type` AS `balance_type`,`gjh`.`post_date` AS `post_date`,`gp`.`gl_period_id` AS `gl_period_id`,`gjl`.`created_by` AS `created_by`,`gjl`.`creation_date` AS `creation_date`,`gjl`.`last_update_by` AS `last_update_by`,`gjl`.`last_update_date` AS `last_update_date`,`gjh`.`reference_key_name` AS `reference_key_name_h`,`gjh`.`reference_key_value` AS `reference_key_value_h` from (((`gl_journal_line` `gjl` left join `gl_journal_header` `gjh` on((`gjl`.`gl_journal_header_id` = `gjh`.`gl_journal_header_id`))) left join `gl_period` `gp` on((`gp`.`gl_period_id` = `gjh`.`period_id`))) left join `coa_combination` `cc` on((`gjl`.`code_combination_id` = `cc`.`coa_combination_id`))) group by `gjl`.`code_combination_id`; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `gl_unposted_journal_lines_v` AS select `cc`.`combination` AS `combination`,`gjl`.`code_combination_id` AS `code_combination_id`,`gp`.`period_name` AS `period_name`,`cc`.`coa_id` AS `coa_id`,sum(`gjl`.`total_cr`) AS `sum_total_cr`,sum(`gjl`.`total_dr`) AS `sum_total_dr`,sum(`gjl`.`total_ac_dr`) AS `sum_total_ac_dr`,sum(`gjl`.`total_ac_cr`) AS `sum_total_ac_cr`,`gjh`.`ledger_id` AS `ledger_id`,`cc`.`description` AS `combination_description`,`gjl`.`gl_journal_line_id` AS `gl_journal_line_id`,`gjl`.`status` AS `status`,`gjl`.`gl_journal_header_id` AS `gl_journal_header_id`,`gjl`.`line_num` AS `line_num`,`gjl`.`line_type` AS `line_type`,`gjl`.`description` AS `line_description`,`gjl`.`reference_type` AS `reference_type`,`gjl`.`reference_key_name` AS `reference_key_name`,`gjl`.`reference_key_value` AS `reference_key_value`,`cc`.`coa_structure_id` AS `coa_structure_id`,`cc`.`field1` AS `field1`,`cc`.`field2` AS `field2`,`cc`.`field3` AS `field3`,`cc`.`field4` AS `field4`,`cc`.`field5` AS `field5`,`cc`.`field6` AS `field6`,`cc`.`field7` AS `field7`,`cc`.`field8` AS `field8`,`gjh`.`balance_type` AS `balance_type`,`gjh`.`post_date` AS `post_date`,`gp`.`gl_period_id` AS `gl_period_id`,`gjl`.`created_by` AS `created_by`,`gjl`.`creation_date` AS `creation_date`,`gjl`.`last_update_by` AS `last_update_by`,`gjl`.`last_update_date` AS `last_update_date`,`gjh`.`reference_key_name` AS `reference_key_name_h`,`gjh`.`reference_key_value` AS `reference_key_value_h` from (((`gl_journal_line` `gjl` left join `gl_journal_header` `gjh` on((`gjl`.`gl_journal_header_id` = `gjh`.`gl_journal_header_id`))) left join `gl_period` `gp` on((`gp`.`gl_period_id` = `gjh`.`period_id`))) left join `coa_combination` `cc` on((`gjl`.`code_combination_id` = `cc`.`coa_combination_id`))) group by `gjl`.`code_combination_id` ; -- -------------------------------------------------------- @@ -38231,7 +37643,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `gl_unposted_journal_lines -- DROP TABLE IF EXISTS `hr_employee_position_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `hr_employee_position_v` AS select `user`.`user_id` AS `user_id`,`user`.`username` AS `username`,`user`.`first_name` AS `first_name`,`user`.`last_name` AS `last_name`,`user`.`email` AS `email`,`user`.`hr_employee_id` AS `hr_employee_id`,`user`.`status` AS `status`,`he`.`identification_id` AS `identification_id`,`he`.`start_date` AS `emp_start_date`,`he`.`citizen_number` AS `citizen_number`,`he`.`first_name` AS `emp_first_name`,`he`.`last_name` AS `emp_last_name`,`he`.`phone` AS `phone`,`he`.`email` AS `emp_email`,`he`.`gender` AS `gender`,`he`.`person_type` AS `person_type`,`he`.`org_id` AS `org_id`,`he`.`job_id` AS `job_id`,`he`.`position_id` AS `position_id`,`he`.`expense_ac_id` AS `expense_ac_id`,`he`.`supervisor_employee_id` AS `supervisor_employee_id`,`hp`.`position_name` AS `position_name`,`he`.`org_id` AS `emp_org_id`,`hala`.`hr_approval_limit_header_id` AS `hr_approval_limit_header_id`,`hala`.`document_type` AS `document_type`,`hala`.`start_date` AS `limit_start_date`,`hall`.`limit_type` AS `limit_type`,`hall`.`limit_range_low` AS `limit_range_low`,`hall`.`limit_range_high` AS `limit_range_high`,`hall`.`amount_limit` AS `amount_limit`,`hall`.`limit_object` AS `limit_object`,`halh`.`bu_org_id` AS `bu_org_id`,`org_v`.`currency_code` AS `currency_code` from (((((((`user` left join `hr_employee` `he` on((`he`.`hr_employee_id` = `user`.`hr_employee_id`))) left join `hr_position` `hp` on((`hp`.`hr_position_id` = `he`.`position_id`))) left join `hr_approval_limit_assignment` `hala` on((`he`.`position_id` = `hala`.`position_id`))) left join `hr_approval_limit_line` `hall` on((`hala`.`hr_approval_limit_header_id` = `hall`.`hr_approval_limit_header_id`))) left join `hr_approval_object` `hao` on((`hao`.`hr_approval_object_id` = `hall`.`limit_object`))) left join `hr_approval_limit_header` `halh` on((`hall`.`hr_approval_limit_header_id` = `halh`.`hr_approval_limit_header_id`))) left join `org_v` on((`org_v`.`org_id` = `halh`.`bu_org_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hr_employee_position_v` AS select `user`.`user_id` AS `user_id`,`user`.`username` AS `username`,`user`.`first_name` AS `first_name`,`user`.`last_name` AS `last_name`,`user`.`email` AS `email`,`user`.`hr_employee_id` AS `hr_employee_id`,`user`.`status` AS `status`,`he`.`identification_id` AS `identification_id`,`he`.`start_date` AS `emp_start_date`,`he`.`citizen_number` AS `citizen_number`,`he`.`first_name` AS `emp_first_name`,`he`.`last_name` AS `emp_last_name`,`he`.`phone` AS `phone`,`he`.`email` AS `emp_email`,`he`.`gender` AS `gender`,`he`.`person_type` AS `person_type`,`he`.`org_id` AS `org_id`,`he`.`job_id` AS `job_id`,`he`.`position_id` AS `position_id`,`he`.`expense_ac_id` AS `expense_ac_id`,`he`.`supervisor_employee_id` AS `supervisor_employee_id`,`hp`.`position_name` AS `position_name`,`he`.`org_id` AS `emp_org_id`,`hala`.`hr_approval_limit_header_id` AS `hr_approval_limit_header_id`,`hala`.`document_type` AS `document_type`,`hala`.`start_date` AS `limit_start_date`,`hall`.`limit_type` AS `limit_type`,`hall`.`limit_range_low` AS `limit_range_low`,`hall`.`limit_range_high` AS `limit_range_high`,`hall`.`amount_limit` AS `amount_limit`,`hall`.`limit_object` AS `limit_object`,`halh`.`bu_org_id` AS `bu_org_id`,`org_v`.`currency_code` AS `currency_code` from (((((((`user` left join `hr_employee` `he` on((`he`.`hr_employee_id` = `user`.`hr_employee_id`))) left join `hr_position` `hp` on((`hp`.`hr_position_id` = `he`.`position_id`))) left join `hr_approval_limit_assignment` `hala` on((`he`.`position_id` = `hala`.`position_id`))) left join `hr_approval_limit_line` `hall` on((`hala`.`hr_approval_limit_header_id` = `hall`.`hr_approval_limit_header_id`))) left join `hr_approval_object` `hao` on((`hao`.`hr_approval_object_id` = `hall`.`limit_object`))) left join `hr_approval_limit_header` `halh` on((`hall`.`hr_approval_limit_header_id` = `halh`.`hr_approval_limit_header_id`))) left join `org_v` on((`org_v`.`org_id` = `halh`.`bu_org_id`))) ; -- -------------------------------------------------------- @@ -38240,7 +37652,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `hr_employee_position_v` A -- DROP TABLE IF EXISTS `hr_employee_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `hr_employee_v` AS select `user`.`user_id` AS `user_id`,`user`.`username` AS `username`,`user`.`first_name` AS `first_name`,`user`.`last_name` AS `last_name`,`user`.`email` AS `email`,`user`.`hr_employee_id` AS `hr_employee_id`,`user`.`status` AS `status`,`he`.`identification_id` AS `identification_id`,`he`.`start_date` AS `emp_start_date`,`he`.`citizen_number` AS `citizen_number`,`he`.`first_name` AS `emp_first_name`,`he`.`last_name` AS `emp_last_name`,`he`.`phone` AS `phone`,concat(`he`.`last_name`,', ',`he`.`first_name`) AS `employee_name`,`he`.`email` AS `emp_email`,`he`.`gender` AS `gender`,`he`.`person_type` AS `person_type`,`he`.`org_id` AS `org_id`,`he`.`job_id` AS `job_id`,`he`.`position_id` AS `position_id`,`he`.`expense_ac_id` AS `expense_ac_id`,`he`.`supervisor_employee_id` AS `supervisor_employee_id`,`org_v`.`currency_code` AS `currency_code`,`org_v`.`org` AS `org` from ((`hr_employee` `he` left join `user` on((`he`.`hr_employee_id` = `user`.`hr_employee_id`))) left join `org_v` on((`org_v`.`org_id` = `he`.`org_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hr_employee_v` AS select `user`.`user_id` AS `user_id`,`user`.`username` AS `username`,`user`.`first_name` AS `first_name`,`user`.`last_name` AS `last_name`,`user`.`email` AS `email`,`user`.`hr_employee_id` AS `hr_employee_id`,`user`.`status` AS `status`,`he`.`identification_id` AS `identification_id`,`he`.`start_date` AS `emp_start_date`,`he`.`citizen_number` AS `citizen_number`,`he`.`first_name` AS `emp_first_name`,`he`.`last_name` AS `emp_last_name`,`he`.`phone` AS `phone`,concat(`he`.`last_name`,', ',`he`.`first_name`) AS `employee_name`,`he`.`email` AS `emp_email`,`he`.`gender` AS `gender`,`he`.`person_type` AS `person_type`,`he`.`org_id` AS `org_id`,`he`.`job_id` AS `job_id`,`he`.`position_id` AS `position_id`,`he`.`expense_ac_id` AS `expense_ac_id`,`he`.`supervisor_employee_id` AS `supervisor_employee_id`,`org_v`.`currency_code` AS `currency_code`,`org_v`.`org` AS `org` from ((`hr_employee` `he` left join `user` on((`he`.`hr_employee_id` = `user`.`hr_employee_id`))) left join `org_v` on((`org_v`.`org_id` = `he`.`org_id`))) ; -- -------------------------------------------------------- @@ -38249,7 +37661,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `hr_employee_v` AS select -- DROP TABLE IF EXISTS `hr_expense_all_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `hr_expense_all_v` AS select `eh`.`hr_expense_header_id` AS `hr_expense_header_id`,`eh`.`bu_org_id` AS `bu_org_id`,`eh`.`hr_employee_id` AS `hr_employee_id`,`eh`.`claim_date` AS `claim_date`,`eh`.`status` AS `status`,`eh`.`purpose` AS `purpose`,`eh`.`doc_currency` AS `doc_currency`,`eh`.`department_id` AS `department_id`,`eh`.`reason` AS `reason`,`eh`.`currency` AS `currency`,`eh`.`exchange_rate_type` AS `exchange_rate_type`,`eh`.`exchange_rate` AS `exchange_rate`,`eh`.`header_amount` AS `header_amount`,`el`.`hr_expense_line_id` AS `hr_expense_line_id`,`el`.`line_number` AS `line_number`,`el`.`claim_date` AS `line_claim_date`,`el`.`receipt_amount` AS `receipt_amount`,`el`.`receipt_currency` AS `receipt_currency`,`el`.`expense_type` AS `expense_type`,`el`.`status` AS `line_status`,`el`.`purpose` AS `line_purpose`,`el`.`start_date` AS `start_date`,`el`.`exchange_rate` AS `line_exchange_rate`,`user`.`supplier_id` AS `supplier_id` from ((`hr_expense_header` `eh` join `hr_expense_line` `el`) join `user`) where ((`el`.`hr_expense_header_id` = `eh`.`hr_expense_header_id`) and (`user`.`hr_employee_id` = `eh`.`hr_employee_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `hr_expense_all_v` AS select `eh`.`hr_expense_header_id` AS `hr_expense_header_id`,`eh`.`bu_org_id` AS `bu_org_id`,`eh`.`hr_employee_id` AS `hr_employee_id`,`eh`.`claim_date` AS `claim_date`,`eh`.`status` AS `status`,`eh`.`purpose` AS `purpose`,`eh`.`doc_currency` AS `doc_currency`,`eh`.`department_id` AS `department_id`,`eh`.`reason` AS `reason`,`eh`.`currency` AS `currency`,`eh`.`exchange_rate_type` AS `exchange_rate_type`,`eh`.`exchange_rate` AS `exchange_rate`,`eh`.`header_amount` AS `header_amount`,`el`.`hr_expense_line_id` AS `hr_expense_line_id`,`el`.`line_number` AS `line_number`,`el`.`claim_date` AS `line_claim_date`,`el`.`receipt_amount` AS `receipt_amount`,`el`.`receipt_currency` AS `receipt_currency`,`el`.`expense_type` AS `expense_type`,`el`.`status` AS `line_status`,`el`.`purpose` AS `line_purpose`,`el`.`start_date` AS `start_date`,`el`.`exchange_rate` AS `line_exchange_rate`,`user`.`supplier_id` AS `supplier_id` from ((`hr_expense_header` `eh` join `hr_expense_line` `el`) join `user`) where ((`el`.`hr_expense_header_id` = `eh`.`hr_expense_header_id`) and (`user`.`hr_employee_id` = `eh`.`hr_employee_id`)) ; -- -------------------------------------------------------- @@ -38258,7 +37670,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `hr_expense_all_v` AS sele -- DROP TABLE IF EXISTS `inv_count_entries_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `inv_count_entries_v` AS select `ice`.`inv_count_entries_id` AS `inv_count_entries_id`,`ice`.`inv_count_schedule_id` AS `inv_count_schedule_id`,`ice`.`item_id_m` AS `item_id_m`,`ice`.`uom_id` AS `uom_id`,`ice`.`org_id` AS `org_id`,`ice`.`subinventory_id` AS `subinventory_id`,`ice`.`locator_id` AS `locator_id`,`ice`.`lot_number` AS `lot_number`,`ice`.`serial_number` AS `serial_number`,`ice`.`schedule_date` AS `schedule_date`,`ice`.`adjustment_ac_id` AS `adjustment_ac_id`,`ice`.`status` AS `status`,`ice`.`reason` AS `reason`,`ice`.`reference` AS `reference`,`ice`.`counted_by` AS `counted_by`,`ice`.`count_date` AS `count_date`,`ice`.`count_qty` AS `count_qty`,`ice`.`system_qty` AS `system_qty`,`ice`.`adjusted_qty` AS `adjusted_qty`,`ice`.`description` AS `description`,`ice`.`created_by` AS `created_by`,`ice`.`creation_date` AS `creation_date`,`ice`.`last_update_by` AS `last_update_by`,`ice`.`last_update_date` AS `last_update_date`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`sin`.`subinventory` AS `subinventory`,`loc`.`locator` AS `locator`,`uom`.`uom_name` AS `uom_name`,`org`.`org` AS `org` from (((((`inv_count_entries` `ice` left join `item` on(((`item`.`item_id_m` = `ice`.`item_id_m`) and (`item`.`org_id` = `ice`.`org_id`)))) left join `subinventory` `sin` on((`sin`.`subinventory_id` = `ice`.`subinventory_id`))) left join `locator` `loc` on((`loc`.`locator_id` = `ice`.`locator_id`))) left join `uom` on((`uom`.`uom_id` = `ice`.`uom_id`))) left join `org` on((`org`.`org_id` = `ice`.`org_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `inv_count_entries_v` AS select `ice`.`inv_count_entries_id` AS `inv_count_entries_id`,`ice`.`inv_count_schedule_id` AS `inv_count_schedule_id`,`ice`.`item_id_m` AS `item_id_m`,`ice`.`uom_id` AS `uom_id`,`ice`.`org_id` AS `org_id`,`ice`.`subinventory_id` AS `subinventory_id`,`ice`.`locator_id` AS `locator_id`,`ice`.`lot_number` AS `lot_number`,`ice`.`serial_number` AS `serial_number`,`ice`.`schedule_date` AS `schedule_date`,`ice`.`adjustment_ac_id` AS `adjustment_ac_id`,`ice`.`status` AS `status`,`ice`.`reason` AS `reason`,`ice`.`reference` AS `reference`,`ice`.`counted_by` AS `counted_by`,`ice`.`count_date` AS `count_date`,`ice`.`count_qty` AS `count_qty`,`ice`.`system_qty` AS `system_qty`,`ice`.`adjusted_qty` AS `adjusted_qty`,`ice`.`description` AS `description`,`ice`.`created_by` AS `created_by`,`ice`.`creation_date` AS `creation_date`,`ice`.`last_update_by` AS `last_update_by`,`ice`.`last_update_date` AS `last_update_date`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`sin`.`subinventory` AS `subinventory`,`loc`.`locator` AS `locator`,`uom`.`uom_name` AS `uom_name`,`org`.`org` AS `org` from (((((`inv_count_entries` `ice` left join `item` on(((`item`.`item_id_m` = `ice`.`item_id_m`) and (`item`.`org_id` = `ice`.`org_id`)))) left join `subinventory` `sin` on((`sin`.`subinventory_id` = `ice`.`subinventory_id`))) left join `locator` `loc` on((`loc`.`locator_id` = `ice`.`locator_id`))) left join `uom` on((`uom`.`uom_id` = `ice`.`uom_id`))) left join `org` on((`org`.`org_id` = `ice`.`org_id`))) ; -- -------------------------------------------------------- @@ -38267,7 +37679,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `inv_count_entries_v` AS s -- DROP TABLE IF EXISTS `inv_interorg_receipt_header`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `inv_interorg_receipt_header` AS select `inv_receipt_header`.`inv_receipt_header_id` AS `inv_receipt_header_id`,`inv_receipt_header`.`receipt_number` AS `receipt_number`,`inv_receipt_header`.`org_id` AS `org_id`,`inv_receipt_header`.`transaction_type_id` AS `transaction_type_id`,`inv_receipt_header`.`receipt_date` AS `receipt_date`,`inv_receipt_header`.`received_by` AS `received_by`,`inv_receipt_header`.`carrier` AS `carrier`,`inv_receipt_header`.`vechile_number` AS `vechile_number`,`inv_receipt_header`.`comment` AS `comment`,`inv_receipt_header`.`ef_id` AS `ef_id`,`inv_receipt_header`.`created_by` AS `created_by`,`inv_receipt_header`.`creation_date` AS `creation_date`,`inv_receipt_header`.`last_update_by` AS `last_update_by`,`inv_receipt_header`.`last_update_date` AS `last_update_date` from `inv_receipt_header` where (`inv_receipt_header`.`transaction_type_id` = '20'); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `inv_interorg_receipt_header` AS select `inv_receipt_header`.`inv_receipt_header_id` AS `inv_receipt_header_id`,`inv_receipt_header`.`receipt_number` AS `receipt_number`,`inv_receipt_header`.`org_id` AS `org_id`,`inv_receipt_header`.`transaction_type_id` AS `transaction_type_id`,`inv_receipt_header`.`receipt_date` AS `receipt_date`,`inv_receipt_header`.`received_by` AS `received_by`,`inv_receipt_header`.`carrier` AS `carrier`,`inv_receipt_header`.`vechile_number` AS `vechile_number`,`inv_receipt_header`.`comment` AS `comment`,`inv_receipt_header`.`ef_id` AS `ef_id`,`inv_receipt_header`.`created_by` AS `created_by`,`inv_receipt_header`.`creation_date` AS `creation_date`,`inv_receipt_header`.`last_update_by` AS `last_update_by`,`inv_receipt_header`.`last_update_date` AS `last_update_date` from `inv_receipt_header` where (`inv_receipt_header`.`transaction_type_id` = '20') ; -- -------------------------------------------------------- @@ -38276,7 +37688,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `inv_interorg_receipt_head -- DROP TABLE IF EXISTS `inv_interorg_transfer_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `inv_interorg_transfer_v` AS select `ith`.`inv_interorg_transfer_header_id` AS `inv_interorg_transfer_header_id`,`ith`.`order_number` AS `order_number`,`ith`.`order_number` AS `io_order_number`,`itl`.`line_number` AS `line_number`,`itl`.`line_number` AS `io_line_number`,`item`.`item_number` AS `item_number`,`itl`.`status` AS `status`,`itl`.`inv_interorg_transfer_line_id` AS `inv_interorg_transfer_line_id`,`ith`.`comment` AS `comment`,`ith`.`from_org_id` AS `from_org_id`,`ith`.`transaction_type_id` AS `transaction_type_id`,`ith`.`to_org_id` AS `to_org_id`,`ith`.`carrier` AS `carrier`,`ith`.`vehicle_number` AS `vehicle_number`,`ith`.`waybill` AS `waybill`,`itl`.`uom_id` AS `uom_id`,`itl`.`from_subinventory_id` AS `from_subinventory_id`,`itl`.`from_locator_id` AS `from_locator_id`,`itl`.`item_id_m` AS `item_id_m`,`itl`.`item_description` AS `item_description`,`itl`.`to_subinventory_id` AS `to_subinventory_id`,`itl`.`to_locator_id` AS `to_locator_id`,`itl`.`transaction_quantity` AS `transaction_quantity`,`itl`.`serial_number` AS `serial_number`,`itl`.`lot_number` AS `lot_number` from ((`inv_interorg_transfer_header` `ith` join `inv_interorg_transfer_line` `itl`) join `item`) where ((`ith`.`inv_interorg_transfer_header_id` = `itl`.`inv_interorg_transfer_header_id`) and (`item`.`item_id_m` = `itl`.`item_id_m`) and (`item`.`org_id` = `ith`.`from_org_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `inv_interorg_transfer_v` AS select `ith`.`inv_interorg_transfer_header_id` AS `inv_interorg_transfer_header_id`,`ith`.`order_number` AS `order_number`,`ith`.`order_number` AS `io_order_number`,`itl`.`line_number` AS `line_number`,`itl`.`line_number` AS `io_line_number`,`item`.`item_number` AS `item_number`,`itl`.`status` AS `status`,`itl`.`inv_interorg_transfer_line_id` AS `inv_interorg_transfer_line_id`,`ith`.`comment` AS `comment`,`ith`.`from_org_id` AS `from_org_id`,`ith`.`transaction_type_id` AS `transaction_type_id`,`ith`.`to_org_id` AS `to_org_id`,`ith`.`carrier` AS `carrier`,`ith`.`vehicle_number` AS `vehicle_number`,`ith`.`waybill` AS `waybill`,`itl`.`uom_id` AS `uom_id`,`itl`.`from_subinventory_id` AS `from_subinventory_id`,`itl`.`from_locator_id` AS `from_locator_id`,`itl`.`item_id_m` AS `item_id_m`,`itl`.`item_description` AS `item_description`,`itl`.`to_subinventory_id` AS `to_subinventory_id`,`itl`.`to_locator_id` AS `to_locator_id`,`itl`.`transaction_quantity` AS `transaction_quantity`,`itl`.`serial_number` AS `serial_number`,`itl`.`lot_number` AS `lot_number` from ((`inv_interorg_transfer_header` `ith` join `inv_interorg_transfer_line` `itl`) join `item`) where ((`ith`.`inv_interorg_transfer_header_id` = `itl`.`inv_interorg_transfer_header_id`) and (`item`.`item_id_m` = `itl`.`item_id_m`) and (`item`.`org_id` = `ith`.`from_org_id`)) ; -- -------------------------------------------------------- @@ -38285,7 +37697,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `inv_interorg_transfer_v` -- DROP TABLE IF EXISTS `inv_lot_onhand_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `inv_lot_onhand_v` AS select `ilo`.`inv_lot_onhand_id` AS `inv_lot_onhand_id`,`ilo`.`onhand_id` AS `onhand_id`,`ilo`.`inv_lot_number_id` AS `lot_inv_lot_number_id`,`ilo`.`lot_quantity` AS `lot_quantity`,`iln`.`lot_number` AS `lot_number`,`iln`.`inv_lot_number_id` AS `inv_lot_number_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`oh`.`org_id` AS `org_id`,`oh`.`item_id_m` AS `item_id_m`,`sub`.`subinventory` AS `subinventory`,`loc`.`locator` AS `locator`,`oh`.`uom_id` AS `uom_id`,`oh`.`onhand` AS `onhand`,`oh`.`subinventory_id` AS `subinventory_id`,`oh`.`locator_id` AS `locator_id` from (((((`inv_lot_onhand` `ilo` left join `inv_lot_number` `iln` on((`iln`.`inv_lot_number_id` = `ilo`.`inv_lot_number_id`))) left join `onhand` `oh` on((`oh`.`onhand_id` = `ilo`.`onhand_id`))) left join `item` on(((`item`.`item_id_m` = `oh`.`item_id_m`) and (`item`.`org_id` = `oh`.`org_id`)))) left join `subinventory` `sub` on((`sub`.`subinventory_id` = `oh`.`subinventory_id`))) left join `locator` `loc` on((`loc`.`locator_id` = `oh`.`locator_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `inv_lot_onhand_v` AS select `ilo`.`inv_lot_onhand_id` AS `inv_lot_onhand_id`,`ilo`.`onhand_id` AS `onhand_id`,`ilo`.`inv_lot_number_id` AS `lot_inv_lot_number_id`,`ilo`.`lot_quantity` AS `lot_quantity`,`iln`.`lot_number` AS `lot_number`,`iln`.`inv_lot_number_id` AS `inv_lot_number_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`oh`.`org_id` AS `org_id`,`oh`.`item_id_m` AS `item_id_m`,`sub`.`subinventory` AS `subinventory`,`loc`.`locator` AS `locator`,`oh`.`uom_id` AS `uom_id`,`oh`.`onhand` AS `onhand`,`oh`.`subinventory_id` AS `subinventory_id`,`oh`.`locator_id` AS `locator_id` from (((((`inv_lot_onhand` `ilo` left join `inv_lot_number` `iln` on((`iln`.`inv_lot_number_id` = `ilo`.`inv_lot_number_id`))) left join `onhand` `oh` on((`oh`.`onhand_id` = `ilo`.`onhand_id`))) left join `item` on(((`item`.`item_id_m` = `oh`.`item_id_m`) and (`item`.`org_id` = `oh`.`org_id`)))) left join `subinventory` `sub` on((`sub`.`subinventory_id` = `oh`.`subinventory_id`))) left join `locator` `loc` on((`loc`.`locator_id` = `oh`.`locator_id`))) ; -- -------------------------------------------------------- @@ -38294,7 +37706,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `inv_lot_onhand_v` AS sele -- DROP TABLE IF EXISTS `inv_lot_transaction_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `inv_lot_transaction_v` AS select `ist`.`inv_lot_transaction_id` AS `inv_lot_transaction_id`,`ist`.`inv_transaction_id` AS `inv_transaction_id`,`ist`.`inv_lot_number_id` AS `inv_lot_number_id`,`isn`.`lot_number` AS `lot_number`,`it`.`transaction_type_id` AS `transaction_type_id`,`tt`.`transaction_type` AS `transaction_type`,`it`.`org_id` AS `org_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`it`.`item_id_m` AS `item_id_m`,`subf`.`subinventory` AS `from_subinventory`,`subt`.`subinventory` AS `to_subinventory`,`locf`.`locator` AS `from_locator`,`loct`.`locator` AS `to_locator`,`it`.`uom_id` AS `uom_id`,`it`.`lot_number_id` AS `lot_number_id`,`it`.`document_type` AS `document_type`,`it`.`document_number` AS `document_number`,`it`.`document_id` AS `document_id`,`it`.`po_header_id` AS `po_header_id`,`it`.`po_line_id` AS `po_line_id`,`it`.`po_detail_id` AS `po_detail_id`,`it`.`sd_so_line_id` AS `sd_so_line_id`,`it`.`reason` AS `reason`,`it`.`reference_key_name` AS `reference_key_name`,`it`.`reference_key_value` AS `reference_key_value`,`it`.`description` AS `description`,`it`.`from_org_id` AS `from_org_id`,`it`.`from_subinventory_id` AS `from_subinventory_id`,`it`.`to_org_id` AS `to_org_id`,`it`.`to_subinventory_id` AS `to_subinventory_id`,`it`.`from_locator_id` AS `from_locator_id`,`it`.`to_locator_id` AS `to_locator_id` from ((((((((`inv_lot_transaction` `ist` left join `inv_lot_number` `isn` on((`isn`.`inv_lot_number_id` = `ist`.`inv_lot_number_id`))) left join `inv_transaction` `it` on((`it`.`inv_transaction_id` = `ist`.`inv_transaction_id`))) left join `item` on(((`item`.`item_id_m` = `it`.`item_id_m`) and (`item`.`org_id` = `it`.`org_id`)))) left join `transaction_type` `tt` on((`tt`.`transaction_type_id` = `it`.`transaction_type_id`))) left join `subinventory` `subf` on((`subf`.`subinventory_id` = `it`.`from_subinventory_id`))) left join `subinventory` `subt` on((`subt`.`subinventory_id` = `it`.`to_subinventory_id`))) left join `locator` `locf` on((`locf`.`locator_id` = `it`.`from_locator_id`))) left join `locator` `loct` on((`loct`.`locator_id` = `it`.`to_locator_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `inv_lot_transaction_v` AS select `ist`.`inv_lot_transaction_id` AS `inv_lot_transaction_id`,`ist`.`inv_transaction_id` AS `inv_transaction_id`,`ist`.`inv_lot_number_id` AS `inv_lot_number_id`,`isn`.`lot_number` AS `lot_number`,`it`.`transaction_type_id` AS `transaction_type_id`,`tt`.`transaction_type` AS `transaction_type`,`it`.`org_id` AS `org_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`it`.`item_id_m` AS `item_id_m`,`subf`.`subinventory` AS `from_subinventory`,`subt`.`subinventory` AS `to_subinventory`,`locf`.`locator` AS `from_locator`,`loct`.`locator` AS `to_locator`,`it`.`uom_id` AS `uom_id`,`it`.`lot_number_id` AS `lot_number_id`,`it`.`document_type` AS `document_type`,`it`.`document_number` AS `document_number`,`it`.`document_id` AS `document_id`,`it`.`po_header_id` AS `po_header_id`,`it`.`po_line_id` AS `po_line_id`,`it`.`po_detail_id` AS `po_detail_id`,`it`.`sd_so_line_id` AS `sd_so_line_id`,`it`.`reason` AS `reason`,`it`.`reference_key_name` AS `reference_key_name`,`it`.`reference_key_value` AS `reference_key_value`,`it`.`description` AS `description`,`it`.`from_org_id` AS `from_org_id`,`it`.`from_subinventory_id` AS `from_subinventory_id`,`it`.`to_org_id` AS `to_org_id`,`it`.`to_subinventory_id` AS `to_subinventory_id`,`it`.`from_locator_id` AS `from_locator_id`,`it`.`to_locator_id` AS `to_locator_id` from ((((((((`inv_lot_transaction` `ist` left join `inv_lot_number` `isn` on((`isn`.`inv_lot_number_id` = `ist`.`inv_lot_number_id`))) left join `inv_transaction` `it` on((`it`.`inv_transaction_id` = `ist`.`inv_transaction_id`))) left join `item` on(((`item`.`item_id_m` = `it`.`item_id_m`) and (`item`.`org_id` = `it`.`org_id`)))) left join `transaction_type` `tt` on((`tt`.`transaction_type_id` = `it`.`transaction_type_id`))) left join `subinventory` `subf` on((`subf`.`subinventory_id` = `it`.`from_subinventory_id`))) left join `subinventory` `subt` on((`subt`.`subinventory_id` = `it`.`to_subinventory_id`))) left join `locator` `locf` on((`locf`.`locator_id` = `it`.`from_locator_id`))) left join `locator` `loct` on((`loct`.`locator_id` = `it`.`to_locator_id`))) ; -- -------------------------------------------------------- @@ -38303,7 +37715,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `inv_lot_transaction_v` AS -- DROP TABLE IF EXISTS `inv_serial_transaction_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `inv_serial_transaction_v` AS select `ist`.`inv_serial_transaction_id` AS `inv_serial_transaction_id`,`ist`.`inv_transaction_id` AS `inv_transaction_id`,`ist`.`inv_serial_number_id` AS `inv_serial_number_id`,`isn`.`serial_number` AS `serial_number`,`it`.`transaction_type_id` AS `transaction_type_id`,`tt`.`transaction_type` AS `transaction_type`,`it`.`org_id` AS `org_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`it`.`item_id_m` AS `item_id_m`,`subf`.`subinventory` AS `from_subinventory`,`subt`.`subinventory` AS `to_subinventory`,`locf`.`locator` AS `from_locator`,`loct`.`locator` AS `to_locator`,`it`.`uom_id` AS `uom_id`,`it`.`lot_number_id` AS `lot_number_id`,`it`.`document_type` AS `document_type`,`it`.`document_number` AS `document_number`,`it`.`document_id` AS `document_id`,`it`.`po_header_id` AS `po_header_id`,`it`.`po_line_id` AS `po_line_id`,`it`.`po_detail_id` AS `po_detail_id`,`it`.`sd_so_line_id` AS `sd_so_line_id`,`it`.`reason` AS `reason`,`it`.`reference_key_name` AS `reference_key_name`,`it`.`reference_key_value` AS `reference_key_value`,`it`.`description` AS `description`,`it`.`from_org_id` AS `from_org_id`,`it`.`from_subinventory_id` AS `from_subinventory_id`,`it`.`to_org_id` AS `to_org_id`,`it`.`to_subinventory_id` AS `to_subinventory_id`,`it`.`from_locator_id` AS `from_locator_id`,`it`.`to_locator_id` AS `to_locator_id` from ((((((((`inv_serial_transaction` `ist` left join `inv_serial_number` `isn` on((`isn`.`inv_serial_number_id` = `ist`.`inv_serial_number_id`))) left join `inv_transaction` `it` on((`it`.`inv_transaction_id` = `ist`.`inv_transaction_id`))) left join `item` on(((`item`.`item_id_m` = `it`.`item_id_m`) and (`item`.`org_id` = `it`.`org_id`)))) left join `transaction_type` `tt` on((`tt`.`transaction_type_id` = `it`.`transaction_type_id`))) left join `subinventory` `subf` on((`subf`.`subinventory_id` = `it`.`from_subinventory_id`))) left join `subinventory` `subt` on((`subt`.`subinventory_id` = `it`.`to_subinventory_id`))) left join `locator` `locf` on((`locf`.`locator_id` = `it`.`from_locator_id`))) left join `locator` `loct` on((`loct`.`locator_id` = `it`.`to_locator_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `inv_serial_transaction_v` AS select `ist`.`inv_serial_transaction_id` AS `inv_serial_transaction_id`,`ist`.`inv_transaction_id` AS `inv_transaction_id`,`ist`.`inv_serial_number_id` AS `inv_serial_number_id`,`isn`.`serial_number` AS `serial_number`,`it`.`transaction_type_id` AS `transaction_type_id`,`tt`.`transaction_type` AS `transaction_type`,`it`.`org_id` AS `org_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`it`.`item_id_m` AS `item_id_m`,`subf`.`subinventory` AS `from_subinventory`,`subt`.`subinventory` AS `to_subinventory`,`locf`.`locator` AS `from_locator`,`loct`.`locator` AS `to_locator`,`it`.`uom_id` AS `uom_id`,`it`.`lot_number_id` AS `lot_number_id`,`it`.`document_type` AS `document_type`,`it`.`document_number` AS `document_number`,`it`.`document_id` AS `document_id`,`it`.`po_header_id` AS `po_header_id`,`it`.`po_line_id` AS `po_line_id`,`it`.`po_detail_id` AS `po_detail_id`,`it`.`sd_so_line_id` AS `sd_so_line_id`,`it`.`reason` AS `reason`,`it`.`reference_key_name` AS `reference_key_name`,`it`.`reference_key_value` AS `reference_key_value`,`it`.`description` AS `description`,`it`.`from_org_id` AS `from_org_id`,`it`.`from_subinventory_id` AS `from_subinventory_id`,`it`.`to_org_id` AS `to_org_id`,`it`.`to_subinventory_id` AS `to_subinventory_id`,`it`.`from_locator_id` AS `from_locator_id`,`it`.`to_locator_id` AS `to_locator_id` from ((((((((`inv_serial_transaction` `ist` left join `inv_serial_number` `isn` on((`isn`.`inv_serial_number_id` = `ist`.`inv_serial_number_id`))) left join `inv_transaction` `it` on((`it`.`inv_transaction_id` = `ist`.`inv_transaction_id`))) left join `item` on(((`item`.`item_id_m` = `it`.`item_id_m`) and (`item`.`org_id` = `it`.`org_id`)))) left join `transaction_type` `tt` on((`tt`.`transaction_type_id` = `it`.`transaction_type_id`))) left join `subinventory` `subf` on((`subf`.`subinventory_id` = `it`.`from_subinventory_id`))) left join `subinventory` `subt` on((`subt`.`subinventory_id` = `it`.`to_subinventory_id`))) left join `locator` `locf` on((`locf`.`locator_id` = `it`.`from_locator_id`))) left join `locator` `loct` on((`loct`.`locator_id` = `it`.`to_locator_id`))) ; -- -------------------------------------------------------- @@ -38312,7 +37724,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `inv_serial_transaction_v` -- DROP TABLE IF EXISTS `item_select_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `item_select_v` AS select distinct `item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`product_line` AS `product_line`,`item`.`item_id_m` AS `item_id_m` from `item`; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `item_select_v` AS select distinct `item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`product_line` AS `product_line`,`item`.`item_id_m` AS `item_id_m` from `item` ; -- -------------------------------------------------------- @@ -38321,7 +37733,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `item_select_v` AS select -- DROP TABLE IF EXISTS `locator_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `locator_v` AS select `org`.`org_id` AS `org_id`,`loca`.`locator` AS `locator`,`loca`.`alias` AS `alias`,`loca`.`locator_id` AS `locator_id`,`sub`.`subinventory` AS `subinventory`,`sub`.`subinventory_id` AS `subinventory_id`,`sub`.`description` AS `sub_description`,`org`.`org` AS `org`,`org`.`type` AS `type`,`org`.`code` AS `code`,`org`.`description` AS `description`,`org`.`enterprise_org_id` AS `enterprise_org_id`,`org`.`legal_org_id` AS `legal_org_id`,`org`.`business_org_id` AS `business_org_id`,`org`.`inventory_org_id` AS `inventory_org_id`,`org`.`address_id` AS `address_id`,`legal`.`ledger_id` AS `ledger_id`,`gl`.`ledger` AS `ledger`,`gl`.`coa_structure_id` AS `coa_structure_id`,`gl`.`currency_code` AS `currency_code` from ((((`org` join `subinventory` `sub`) join `locator` `loca`) join `legal`) join `gl_ledger` `gl`) where ((`sub`.`org_id` = `org`.`org_id`) and (`loca`.`subinventory_id` = `sub`.`subinventory_id`) and (`legal`.`org_id` = `org`.`legal_org_id`) and (`gl`.`gl_ledger_id` = `legal`.`ledger_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `locator_v` AS select `org`.`org_id` AS `org_id`,`loca`.`locator` AS `locator`,`loca`.`alias` AS `alias`,`loca`.`locator_id` AS `locator_id`,`sub`.`subinventory` AS `subinventory`,`sub`.`subinventory_id` AS `subinventory_id`,`sub`.`description` AS `sub_description`,`org`.`org` AS `org`,`org`.`type` AS `type`,`org`.`code` AS `code`,`org`.`description` AS `description`,`org`.`enterprise_org_id` AS `enterprise_org_id`,`org`.`legal_org_id` AS `legal_org_id`,`org`.`business_org_id` AS `business_org_id`,`org`.`inventory_org_id` AS `inventory_org_id`,`org`.`address_id` AS `address_id`,`legal`.`ledger_id` AS `ledger_id`,`gl`.`ledger` AS `ledger`,`gl`.`coa_structure_id` AS `coa_structure_id`,`gl`.`currency_code` AS `currency_code` from ((((`org` join `subinventory` `sub`) join `locator` `loca`) join `legal`) join `gl_ledger` `gl`) where ((`sub`.`org_id` = `org`.`org_id`) and (`loca`.`subinventory_id` = `sub`.`subinventory_id`) and (`legal`.`org_id` = `org`.`legal_org_id`) and (`gl`.`gl_ledger_id` = `legal`.`ledger_id`)) ; -- -------------------------------------------------------- @@ -38330,7 +37742,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `locator_v` AS select `org -- DROP TABLE IF EXISTS `mdm_bank_account_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `mdm_bank_account_v` AS select `mba`.`mdm_bank_account_id` AS `mdm_bank_account_id`,`mba`.`account_number` AS `account_number`,`mba`.`description` AS `account_description`,`mba`.`account_usage` AS `account_usage`,`mba`.`account_type` AS `account_type`,`mba`.`bu_org_id` AS `bu_org_id`,`mba`.`supplier_id` AS `supplier_id`,`mba`.`supplier_site_id` AS `supplier_site_id`,`mba`.`ar_customer_id` AS `ar_customer_id`,`mba`.`ar_customer_site_id` AS `ar_customer_site_id`,`mba`.`cash_ac_id` AS `cash_ac_id`,`mba`.`cash_clearing_ac_id` AS `cash_clearing_ac_id`,`mba`.`bank_charge_ac_id` AS `bank_charge_ac_id`,`mba`.`exchange_gl_ac_id` AS `exchange_gl_ac_id`,`mba`.`netting_ac_cb` AS `netting_ac_cb`,`mba`.`minimum_payment` AS `minimum_payment`,`mba`.`maximum_payment` AS `maximum_payment`,`mba`.`contact_id` AS `contact_id`,`mba`.`ap_payment_method_id` AS `ap_payment_method_id`,`mbh`.`mdm_bank_header_id` AS `mdm_bank_header_id`,`mbh`.`country` AS `country`,`mbh`.`bank_name` AS `bank_name`,`mbh`.`bank_number` AS `bank_number`,`mbh`.`description` AS `description`,`mbh`.`bank_name_short` AS `bank_name_short`,`mbh`.`bank_name_alt` AS `bank_name_alt`,`mbh`.`tax_reg_no` AS `tax_reg_no`,`mbh`.`tax_payer_id` AS `tax_payer_id`,`mbs`.`branch_name` AS `branch_name`,`mbs`.`country` AS `branch_country`,`mbs`.`branch_number` AS `branch_number`,`mbs`.`mdm_bank_site_id` AS `mdm_bank_site_id`,`mbs`.`branch_name_short` AS `branch_name_short`,`mbs`.`branch_name_alt` AS `branch_name_alt`,`mbs`.`ifsc_code` AS `ifsc_code`,`mbs`.`swift_code` AS `swift_code`,`mbs`.`routing_number` AS `routing_number`,`mbs`.`iban_code` AS `iban_code`,`mbs`.`tax_reg_no` AS `branch_tax_reg_no`,`mbs`.`tax_payer_id` AS `branch_tax_payer_id`,`mbs`.`site_address_id` AS `site_address_id`,`sav`.`supplier_name` AS `supplier_name`,`sav`.`supplier_site_name` AS `supplier_site_name`,`acv`.`customer_name` AS `customer_name`,`acv`.`customer_number` AS `customer_number` from (((((`mdm_bank_account` `mba` left join `supplier_all_v` `sav` on((`mba`.`supplier_site_id` = `sav`.`supplier_site_id`))) left join `ar_customer_v` `acv` on((`mba`.`ar_customer_site_id` = `acv`.`ar_customer_site_id`))) left join `org_v` `ov` on((`ov`.`org_id` = `mba`.`bu_org_id`))) join `mdm_bank_header` `mbh`) join `mdm_bank_site` `mbs`) where ((`mbs`.`mdm_bank_header_id` = `mbh`.`mdm_bank_header_id`) and (`mbh`.`mdm_bank_header_id` = `mba`.`mdm_bank_header_id`) and (`mbs`.`mdm_bank_site_id` = `mba`.`mdm_bank_site_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mdm_bank_account_v` AS select `mba`.`mdm_bank_account_id` AS `mdm_bank_account_id`,`mba`.`account_number` AS `account_number`,`mba`.`description` AS `account_description`,`mba`.`account_usage` AS `account_usage`,`mba`.`account_type` AS `account_type`,`mba`.`bu_org_id` AS `bu_org_id`,`mba`.`supplier_id` AS `supplier_id`,`mba`.`supplier_site_id` AS `supplier_site_id`,`mba`.`ar_customer_id` AS `ar_customer_id`,`mba`.`ar_customer_site_id` AS `ar_customer_site_id`,`mba`.`cash_ac_id` AS `cash_ac_id`,`mba`.`cash_clearing_ac_id` AS `cash_clearing_ac_id`,`mba`.`bank_charge_ac_id` AS `bank_charge_ac_id`,`mba`.`exchange_gl_ac_id` AS `exchange_gl_ac_id`,`mba`.`netting_ac_cb` AS `netting_ac_cb`,`mba`.`minimum_payment` AS `minimum_payment`,`mba`.`maximum_payment` AS `maximum_payment`,`mba`.`contact_id` AS `contact_id`,`mba`.`ap_payment_method_id` AS `ap_payment_method_id`,`mbh`.`mdm_bank_header_id` AS `mdm_bank_header_id`,`mbh`.`country` AS `country`,`mbh`.`bank_name` AS `bank_name`,`mbh`.`bank_number` AS `bank_number`,`mbh`.`description` AS `description`,`mbh`.`bank_name_short` AS `bank_name_short`,`mbh`.`bank_name_alt` AS `bank_name_alt`,`mbh`.`tax_reg_no` AS `tax_reg_no`,`mbh`.`tax_payer_id` AS `tax_payer_id`,`mbs`.`branch_name` AS `branch_name`,`mbs`.`country` AS `branch_country`,`mbs`.`branch_number` AS `branch_number`,`mbs`.`mdm_bank_site_id` AS `mdm_bank_site_id`,`mbs`.`branch_name_short` AS `branch_name_short`,`mbs`.`branch_name_alt` AS `branch_name_alt`,`mbs`.`ifsc_code` AS `ifsc_code`,`mbs`.`swift_code` AS `swift_code`,`mbs`.`routing_number` AS `routing_number`,`mbs`.`iban_code` AS `iban_code`,`mbs`.`tax_reg_no` AS `branch_tax_reg_no`,`mbs`.`tax_payer_id` AS `branch_tax_payer_id`,`mbs`.`site_address_id` AS `site_address_id`,`sav`.`supplier_name` AS `supplier_name`,`sav`.`supplier_site_name` AS `supplier_site_name`,`acv`.`customer_name` AS `customer_name`,`acv`.`customer_number` AS `customer_number` from (((((`mdm_bank_account` `mba` left join `supplier_all_v` `sav` on((`mba`.`supplier_site_id` = `sav`.`supplier_site_id`))) left join `ar_customer_v` `acv` on((`mba`.`ar_customer_site_id` = `acv`.`ar_customer_site_id`))) left join `org_v` `ov` on((`ov`.`org_id` = `mba`.`bu_org_id`))) join `mdm_bank_header` `mbh`) join `mdm_bank_site` `mbs`) where ((`mbs`.`mdm_bank_header_id` = `mbh`.`mdm_bank_header_id`) and (`mbh`.`mdm_bank_header_id` = `mba`.`mdm_bank_header_id`) and (`mbs`.`mdm_bank_site_id` = `mba`.`mdm_bank_site_id`)) ; -- -------------------------------------------------------- @@ -38339,7 +37751,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `mdm_bank_account_v` AS se -- DROP TABLE IF EXISTS `mdm_bank_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `mdm_bank_v` AS select `mbh`.`mdm_bank_header_id` AS `mdm_bank_header_id`,`mbh`.`country` AS `country`,`mbh`.`bank_name` AS `bank_name`,`mbh`.`bank_number` AS `bank_number`,`mbh`.`description` AS `description`,`mbh`.`bank_name_short` AS `bank_name_short`,`mbh`.`bank_name_alt` AS `bank_name_alt`,`mbh`.`tax_reg_no` AS `tax_reg_no`,`mbh`.`tax_payer_id` AS `tax_payer_id`,`mbs`.`branch_name` AS `branch_name`,`mbs`.`country` AS `branch_country`,`mbs`.`branch_number` AS `branch_number`,`mbs`.`mdm_bank_site_id` AS `mdm_bank_site_id`,`mbs`.`branch_name_short` AS `branch_name_short`,`mbs`.`branch_name_alt` AS `branch_name_alt`,`mbs`.`ifsc_code` AS `ifsc_code`,`mbs`.`swift_code` AS `swift_code`,`mbs`.`routing_number` AS `routing_number`,`mbs`.`iban_code` AS `iban_code`,`mbs`.`tax_reg_no` AS `branch_tax_reg_no`,`mbs`.`tax_payer_id` AS `branch_tax_payer_id`,`mbs`.`site_address_id` AS `site_address_id` from (`mdm_bank_header` `mbh` join `mdm_bank_site` `mbs`) where (`mbs`.`mdm_bank_header_id` = `mbh`.`mdm_bank_header_id`); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mdm_bank_v` AS select `mbh`.`mdm_bank_header_id` AS `mdm_bank_header_id`,`mbh`.`country` AS `country`,`mbh`.`bank_name` AS `bank_name`,`mbh`.`bank_number` AS `bank_number`,`mbh`.`description` AS `description`,`mbh`.`bank_name_short` AS `bank_name_short`,`mbh`.`bank_name_alt` AS `bank_name_alt`,`mbh`.`tax_reg_no` AS `tax_reg_no`,`mbh`.`tax_payer_id` AS `tax_payer_id`,`mbs`.`branch_name` AS `branch_name`,`mbs`.`country` AS `branch_country`,`mbs`.`branch_number` AS `branch_number`,`mbs`.`mdm_bank_site_id` AS `mdm_bank_site_id`,`mbs`.`branch_name_short` AS `branch_name_short`,`mbs`.`branch_name_alt` AS `branch_name_alt`,`mbs`.`ifsc_code` AS `ifsc_code`,`mbs`.`swift_code` AS `swift_code`,`mbs`.`routing_number` AS `routing_number`,`mbs`.`iban_code` AS `iban_code`,`mbs`.`tax_reg_no` AS `branch_tax_reg_no`,`mbs`.`tax_payer_id` AS `branch_tax_payer_id`,`mbs`.`site_address_id` AS `site_address_id` from (`mdm_bank_header` `mbh` join `mdm_bank_site` `mbs`) where (`mbs`.`mdm_bank_header_id` = `mbh`.`mdm_bank_header_id`) ; -- -------------------------------------------------------- @@ -38348,7 +37760,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `mdm_bank_v` AS select `mb -- DROP TABLE IF EXISTS `onhand_summary_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `onhand_summary_v` AS select `onhand`.`onhand_id` AS `onhand_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`org`.`org` AS `org_name`,`onhand`.`uom_id` AS `uom_id`,sum(`onhand`.`onhand`) AS `onhand`,`onhand`.`item_id_m` AS `item_id_m`,`onhand`.`org_id` AS `org_id`,`onhand`.`reservable_onhand` AS `reservable_onhand`,`onhand`.`transactable_onhand` AS `transactable_onhand` from ((`onhand` left join `item` on(((`onhand`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `onhand`.`org_id`)))) left join `org` on((`onhand`.`org_id` = `org`.`org_id`))) group by `onhand`.`item_id_m`,`onhand`.`org_id`; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `onhand_summary_v` AS select `onhand`.`onhand_id` AS `onhand_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`org`.`org` AS `org_name`,`onhand`.`uom_id` AS `uom_id`,sum(`onhand`.`onhand`) AS `onhand`,`onhand`.`item_id_m` AS `item_id_m`,`onhand`.`org_id` AS `org_id`,`onhand`.`reservable_onhand` AS `reservable_onhand`,`onhand`.`transactable_onhand` AS `transactable_onhand` from ((`onhand` left join `item` on(((`onhand`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `onhand`.`org_id`)))) left join `org` on((`onhand`.`org_id` = `org`.`org_id`))) group by `onhand`.`item_id_m`,`onhand`.`org_id` ; -- -------------------------------------------------------- @@ -38357,7 +37769,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `onhand_summary_v` AS sele -- DROP TABLE IF EXISTS `onhand_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `onhand_v` AS select `onhand`.`onhand_id` AS `onhand_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`product_line` AS `product_line`,`org`.`org` AS `org_name`,`subinventory`.`subinventory` AS `subinventory`,`locator`.`locator` AS `locator`,`onhand`.`uom_id` AS `uom_id`,`onhand`.`onhand` AS `onhand`,(`onhand`.`onhand` - ifnull(sum(`ir`.`demand_quantity`),0)) AS `reservable_onhand`,sum(`ir`.`demand_quantity`) AS `reserved_quantity`,`cic`.`standard_cost` AS `standard_cost`,(`onhand`.`onhand` * `cic`.`standard_cost`) AS `onhand_value`,`onhand`.`item_id_m` AS `item_id_m`,`onhand`.`revision_name` AS `revision_name`,`onhand`.`org_id` AS `org_id`,`onhand`.`subinventory_id` AS `subinventory_id`,`subinventory`.`type` AS `subinventory_type`,`onhand`.`locator_id` AS `locator_id`,`onhand`.`lot_id` AS `lot_id`,`onhand`.`serial_id` AS `serial_id`,`onhand`.`transactable_onhand` AS `transactable_onhand`,`onhand`.`lot_status` AS `lot_status`,`onhand`.`serial_status` AS `serial_status`,`onhand`.`secondary_uom_id` AS `secondary_uom_id`,`onhand`.`onhand_status` AS `onhand_status`,`onhand`.`ef_id` AS `ef_id`,`onhand`.`created_by` AS `created_by`,`onhand`.`creation_date` AS `creation_date`,`onhand`.`last_update_by` AS `last_update_by`,`onhand`.`last_update_date` AS `last_update_date` from ((((((`onhand` left join `item` on(((`onhand`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `onhand`.`org_id`)))) left join `org` on((`onhand`.`org_id` = `org`.`org_id`))) left join `subinventory` on((`onhand`.`subinventory_id` = `subinventory`.`subinventory_id`))) left join `locator` on((`onhand`.`locator_id` = `locator`.`locator_id`))) left join `cst_item_cost_v` `cic` on(((`cic`.`item_id_m` = `onhand`.`item_id_m`) and (`cic`.`bom_cost_type` = 'FROZEN') and (`cic`.`org_id` = `onhand`.`org_id`)))) left join `inv_reservation` `ir` on(((`ir`.`item_id_m` = `onhand`.`item_id_m`) and (`ir`.`org_id` = `onhand`.`org_id`) and (`ir`.`subinventory_id` = `onhand`.`subinventory_id`) and ((`ir`.`locator_id` = `onhand`.`locator_id`) or isnull(`onhand`.`locator_id`))))) group by `onhand`.`item_id_m`,`onhand`.`org_id`,`onhand`.`subinventory_id`,`onhand`.`locator_id`; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `onhand_v` AS select `onhand`.`onhand_id` AS `onhand_id`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`product_line` AS `product_line`,`org`.`org` AS `org_name`,`subinventory`.`subinventory` AS `subinventory`,`locator`.`locator` AS `locator`,`onhand`.`uom_id` AS `uom_id`,`onhand`.`onhand` AS `onhand`,(`onhand`.`onhand` - ifnull(sum(`ir`.`demand_quantity`),0)) AS `reservable_onhand`,sum(`ir`.`demand_quantity`) AS `reserved_quantity`,`cic`.`standard_cost` AS `standard_cost`,(`onhand`.`onhand` * `cic`.`standard_cost`) AS `onhand_value`,`onhand`.`item_id_m` AS `item_id_m`,`onhand`.`revision_name` AS `revision_name`,`onhand`.`org_id` AS `org_id`,`onhand`.`subinventory_id` AS `subinventory_id`,`subinventory`.`type` AS `subinventory_type`,`onhand`.`locator_id` AS `locator_id`,`onhand`.`lot_id` AS `lot_id`,`onhand`.`serial_id` AS `serial_id`,`onhand`.`transactable_onhand` AS `transactable_onhand`,`onhand`.`lot_status` AS `lot_status`,`onhand`.`serial_status` AS `serial_status`,`onhand`.`secondary_uom_id` AS `secondary_uom_id`,`onhand`.`onhand_status` AS `onhand_status`,`onhand`.`ef_id` AS `ef_id`,`onhand`.`created_by` AS `created_by`,`onhand`.`creation_date` AS `creation_date`,`onhand`.`last_update_by` AS `last_update_by`,`onhand`.`last_update_date` AS `last_update_date` from ((((((`onhand` left join `item` on(((`onhand`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `onhand`.`org_id`)))) left join `org` on((`onhand`.`org_id` = `org`.`org_id`))) left join `subinventory` on((`onhand`.`subinventory_id` = `subinventory`.`subinventory_id`))) left join `locator` on((`onhand`.`locator_id` = `locator`.`locator_id`))) left join `cst_item_cost_v` `cic` on(((`cic`.`item_id_m` = `onhand`.`item_id_m`) and (`cic`.`bom_cost_type` = 'FROZEN') and (`cic`.`org_id` = `onhand`.`org_id`)))) left join `inv_reservation` `ir` on(((`ir`.`item_id_m` = `onhand`.`item_id_m`) and (`ir`.`org_id` = `onhand`.`org_id`) and (`ir`.`subinventory_id` = `onhand`.`subinventory_id`) and ((`ir`.`locator_id` = `onhand`.`locator_id`) or isnull(`onhand`.`locator_id`))))) group by `onhand`.`item_id_m`,`onhand`.`org_id`,`onhand`.`subinventory_id`,`onhand`.`locator_id` ; -- -------------------------------------------------------- @@ -38366,7 +37778,16 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `onhand_v` AS select `onha -- DROP TABLE IF EXISTS `org_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `org_v` AS select `org`.`org_id` AS `org_id`,`org`.`org` AS `org`,`org`.`type` AS `type`,`org`.`code` AS `code`,`org`.`description` AS `description`,`org`.`enterprise_org_id` AS `enterprise_org_id`,`org`.`legal_org_id` AS `legal_org_id`,`org`.`business_org_id` AS `business_org_id`,`org`.`inventory_org_id` AS `inventory_org_id`,`org`.`address_id` AS `address_id`,`legal`.`ledger_id` AS `ledger_id`,`gl`.`ledger` AS `ledger`,`gl`.`coa_structure_id` AS `coa_structure_id`,`gl`.`currency_code` AS `currency_code` from ((`org` left join `legal` on((`legal`.`org_id` = `org`.`legal_org_id`))) left join `gl_ledger` `gl` on((`gl`.`gl_ledger_id` = `legal`.`ledger_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `org_v` AS select `org`.`org_id` AS `org_id`,`org`.`org` AS `org`,`org`.`type` AS `type`,`org`.`code` AS `code`,`org`.`description` AS `description`,`org`.`enterprise_org_id` AS `enterprise_org_id`,`org`.`legal_org_id` AS `legal_org_id`,`org`.`business_org_id` AS `business_org_id`,`org`.`inventory_org_id` AS `inventory_org_id`,`org`.`address_id` AS `address_id`,`legal`.`ledger_id` AS `ledger_id`,`gl`.`ledger` AS `ledger`,`gl`.`coa_structure_id` AS `coa_structure_id`,`gl`.`currency_code` AS `currency_code` from ((`org` left join `legal` on((`legal`.`org_id` = `org`.`legal_org_id`))) left join `gl_ledger` `gl` on((`gl`.`gl_ledger_id` = `legal`.`ledger_id`))) ; + +-- -------------------------------------------------------- + +-- +-- Structure for view `pm_recipe_all_v` +-- +DROP TABLE IF EXISTS `pm_recipe_all_v`; + +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `pm_recipe_all_v` AS select `prh`.`pm_recipe_header_id` AS `pm_recipe_header_id`,`prh`.`org_id` AS `org_id`,`prh`.`recipe_name` AS `recipe_name`,`prh`.`pm_formula_header_id` AS `pm_formula_header_id`,`prh`.`pm_process_routing_header_id` AS `pm_process_routing_header_id`,`prh`.`item_id_m` AS `item_id_m`,`pfh`.`formula_name` AS `formula_name`,`pfh`.`description` AS `formula_description`,`pprh`.`routing_name` AS `routing_name`,`pprh`.`description` AS `routing_description`,`item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description` from (((`pm_recipe_header` `prh` left join `item` on(((`item`.`item_id_m` = `prh`.`item_id_m`) and (`item`.`org_id` = `prh`.`org_id`)))) join `pm_formula_header` `pfh`) join `pm_process_routing_header` `pprh`) where ((`prh`.`pm_formula_header_id` = `pfh`.`pm_formula_header_id`) and (`prh`.`pm_process_routing_header_id` = `pprh`.`pm_process_routing_header_id`)) ; -- -------------------------------------------------------- @@ -38375,7 +37796,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `org_v` AS select `org`.`o -- DROP TABLE IF EXISTS `po_all_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `po_all_v` AS select `po_header`.`po_header_id` AS `po_header_id`,`po_header`.`bu_org_id` AS `bu_org_id`,`po_header`.`po_type` AS `po_type`,`po_header`.`po_number` AS `po_number`,`po_header`.`supplier_id` AS `supplier_id`,`po_header`.`supplier_site_id` AS `supplier_site_id`,`po_header`.`buyer` AS `buyer`,`po_header`.`currency` AS `currency`,`po_header`.`doc_currency` AS `doc_currency`,`po_header`.`header_amount` AS `header_amount`,`po_header`.`po_status` AS `po_status`,`po_header`.`payment_term_id` AS `payment_term_id`,`po_header`.`exchange_rate` AS `exchange_rate`,`po_header`.`exchange_rate_type` AS `exchange_rate_type`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`po_line`.`po_line_id` AS `po_line_id`,`po_line`.`line_type` AS `line_type`,`po_line`.`line_number` AS `po_line_number`,`po_line`.`item_id_m` AS `item_id_m`,`po_line`.`kit_cb` AS `kit_cb`,`po_line`.`revision_name` AS `revision_name`,`po_line`.`item_description` AS `item_description`,`po_line`.`line_description` AS `line_description`,`po_line`.`line_quantity` AS `line_quantity`,`po_line`.`unit_price` AS `unit_price`,`po_line`.`line_price` AS `line_price`,`po_line`.`gl_line_price` AS `gl_line_price`,`po_line`.`gl_tax_amount` AS `gl_tax_amount`,`po_line`.`reference_doc_type` AS `reference_doc_type`,`po_line`.`reference_doc_number` AS `reference_doc_number`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`item`.`serial_generation` AS `serial_generation`,`item`.`lot_generation` AS `lot_generation`,`po_detail`.`po_detail_id` AS `po_detail_id`,`po_detail`.`shipment_number` AS `shipment_number`,`po_line`.`receving_org_id` AS `receving_org_id`,`po_line`.`receving_org_id` AS `org_id`,`po_detail`.`subinventory_id` AS `subinventory_id`,`po_detail`.`locator_id` AS `locator_id`,`po_detail`.`requestor` AS `requestor`,`po_detail`.`quantity` AS `quantity`,ifnull(`po_detail`.`received_quantity`,0) AS `received_quantity`,(`po_detail`.`quantity` - ifnull(`po_detail`.`received_quantity`,0)) AS `open_quantity`,`po_detail`.`need_by_date` AS `need_by_date`,`po_detail`.`promise_date` AS `promise_date`,`po_detail`.`accepted_quantity` AS `accepted_quantity`,`po_detail`.`delivered_quantity` AS `delivered_quantity`,`po_detail`.`invoiced_quantity` AS `invoiced_quantity`,`po_detail`.`paid_quantity` AS `paid_quantity`,`po_detail`.`charge_ac_id` AS `charge_ac_id`,`po_detail`.`accrual_ac_id` AS `accrual_ac_id`,`po_detail`.`budget_ac_id` AS `budget_ac_id`,`po_detail`.`ppv_ac_id` AS `ppv_ac_id`,`org`.`org` AS `receving_org`,`po_header`.`created_by` AS `created_by`,`po_header`.`creation_date` AS `creation_date`,`po_header`.`last_update_by` AS `last_update_by`,`po_header`.`last_update_date` AS `last_update_date` from (((((((`po_header` left join `supplier` on((`po_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`po_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`po_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `po_line` on((`po_header`.`po_header_id` = `po_line`.`po_header_id`))) left join `item` on(((`po_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `po_line`.`receving_org_id`)))) left join `po_detail` on((`po_line`.`po_line_id` = `po_detail`.`po_line_id`))) left join `org` on((`po_line`.`receving_org_id` = `org`.`org_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `po_all_v` AS select `po_header`.`po_header_id` AS `po_header_id`,`po_header`.`bu_org_id` AS `bu_org_id`,`po_header`.`po_type` AS `po_type`,`po_header`.`po_number` AS `po_number`,`po_header`.`supplier_id` AS `supplier_id`,`po_header`.`supplier_site_id` AS `supplier_site_id`,`po_header`.`buyer` AS `buyer`,`po_header`.`currency` AS `currency`,`po_header`.`doc_currency` AS `doc_currency`,`po_header`.`header_amount` AS `header_amount`,`po_header`.`po_status` AS `po_status`,`po_header`.`payment_term_id` AS `payment_term_id`,`po_header`.`exchange_rate` AS `exchange_rate`,`po_header`.`exchange_rate_type` AS `exchange_rate_type`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`po_line`.`po_line_id` AS `po_line_id`,`po_line`.`line_type` AS `line_type`,`po_line`.`line_number` AS `po_line_number`,`po_line`.`item_id_m` AS `item_id_m`,`po_line`.`kit_cb` AS `kit_cb`,`po_line`.`revision_name` AS `revision_name`,`po_line`.`item_description` AS `item_description`,`po_line`.`line_description` AS `line_description`,`po_line`.`line_quantity` AS `line_quantity`,`po_line`.`unit_price` AS `unit_price`,`po_line`.`line_price` AS `line_price`,`po_line`.`gl_line_price` AS `gl_line_price`,`po_line`.`gl_tax_amount` AS `gl_tax_amount`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`item`.`serial_generation` AS `serial_generation`,`item`.`lot_generation` AS `lot_generation`,`po_detail`.`po_detail_id` AS `po_detail_id`,`po_detail`.`shipment_number` AS `shipment_number`,`po_line`.`receving_org_id` AS `receving_org_id`,`po_line`.`receving_org_id` AS `org_id`,`po_detail`.`subinventory_id` AS `subinventory_id`,`po_detail`.`locator_id` AS `locator_id`,`po_detail`.`requestor` AS `requestor`,`po_detail`.`quantity` AS `quantity`,ifnull(`po_detail`.`received_quantity`,0) AS `received_quantity`,(`po_detail`.`quantity` - ifnull(`po_detail`.`received_quantity`,0)) AS `open_quantity`,`po_detail`.`need_by_date` AS `need_by_date`,`po_detail`.`promise_date` AS `promise_date`,`po_detail`.`accepted_quantity` AS `accepted_quantity`,`po_detail`.`delivered_quantity` AS `delivered_quantity`,`po_detail`.`invoiced_quantity` AS `invoiced_quantity`,`po_detail`.`paid_quantity` AS `paid_quantity`,`po_detail`.`charge_ac_id` AS `charge_ac_id`,`po_detail`.`accrual_ac_id` AS `accrual_ac_id`,`po_detail`.`budget_ac_id` AS `budget_ac_id`,`po_detail`.`ppv_ac_id` AS `ppv_ac_id`,`org`.`org` AS `receving_org`,`po_header`.`created_by` AS `created_by`,`po_header`.`creation_date` AS `creation_date`,`po_header`.`last_update_by` AS `last_update_by`,`po_header`.`last_update_date` AS `last_update_date` from (((((((`po_header` left join `supplier` on((`po_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`po_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`po_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `po_line` on((`po_header`.`po_header_id` = `po_line`.`po_header_id`))) left join `item` on(((`po_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `po_line`.`receving_org_id`)))) left join `po_detail` on((`po_line`.`po_line_id` = `po_detail`.`po_line_id`))) left join `org` on((`po_line`.`receving_org_id` = `org`.`org_id`))) ; -- -------------------------------------------------------- @@ -38384,7 +37805,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `po_all_v` AS select `po_h -- DROP TABLE IF EXISTS `po_blanket_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `po_blanket_v` AS select `po_header`.`po_header_id` AS `po_header_id`,`po_header`.`bu_org_id` AS `bu_org_id`,`po_header`.`po_type` AS `po_type`,`po_header`.`po_number` AS `po_number`,`po_header`.`release_number` AS `release_number`,`po_header`.`supplier_id` AS `supplier_id`,`po_header`.`supplier_site_id` AS `supplier_site_id`,`po_header`.`buyer` AS `buyer`,`po_header`.`currency` AS `currency`,`po_header`.`header_amount` AS `header_amount`,`po_header`.`po_status` AS `po_status`,`po_header`.`payment_term_id` AS `payment_term_id`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`po_header`.`agreement_start_date` AS `agreement_start_date`,`po_header`.`agreement_end_date` AS `agreement_end_date`,`po_line`.`po_line_id` AS `po_line_id`,`po_line`.`line_type` AS `line_type`,`po_line`.`line_number` AS `po_line_number`,`po_line`.`item_id_m` AS `item_id_m`,`po_line`.`item_description` AS `item_description`,`po_line`.`line_description` AS `line_description`,`po_line`.`line_quantity` AS `line_quantity`,`po_line`.`unit_price` AS `unit_price`,`po_line`.`line_price` AS `line_price`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`po_detail`.`po_detail_id` AS `po_detail_id`,`po_detail`.`shipment_number` AS `shipment_number`,`po_line`.`receving_org_id` AS `receving_org_id`,`po_detail`.`subinventory_id` AS `subinventory_id`,`po_detail`.`locator_id` AS `locator_id`,`po_detail`.`requestor` AS `requestor`,`po_detail`.`quantity` AS `quantity`,ifnull(`po_detail`.`received_quantity`,0) AS `received_quantity`,(`po_detail`.`quantity` - ifnull(`po_detail`.`received_quantity`,0)) AS `open_quantity`,`po_detail`.`need_by_date` AS `need_by_date`,`po_detail`.`promise_date` AS `promise_date`,`po_detail`.`accepted_quantity` AS `accepted_quantity`,`po_detail`.`delivered_quantity` AS `delivered_quantity`,`po_detail`.`invoiced_quantity` AS `invoiced_quantity`,`po_detail`.`paid_quantity` AS `paid_quantity`,`po_detail`.`charge_ac_id` AS `charge_ac_id`,`po_detail`.`accrual_ac_id` AS `accrual_ac_id`,`po_detail`.`budget_ac_id` AS `budget_ac_id`,`po_detail`.`ppv_ac_id` AS `ppv_ac_id`,`org`.`org` AS `receving_org`,`po_header`.`created_by` AS `created_by`,`po_header`.`creation_date` AS `creation_date`,`po_header`.`last_update_by` AS `last_update_by`,`po_header`.`last_update_date` AS `last_update_date` from (((((((`po_header` left join `supplier` on((`po_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`po_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`po_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `po_line` on((`po_header`.`po_header_id` = `po_line`.`po_header_id`))) left join `item` on(((`po_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `po_line`.`receving_org_id`)))) left join `po_detail` on((`po_line`.`po_line_id` = `po_detail`.`po_line_id`))) left join `org` on((`po_line`.`receving_org_id` = `org`.`org_id`))) where (`po_header`.`po_type` in ('BLANKET','BLANKET_RELEASE')); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `po_blanket_v` AS select `po_header`.`po_header_id` AS `po_header_id`,`po_header`.`bu_org_id` AS `bu_org_id`,`po_header`.`po_type` AS `po_type`,`po_header`.`po_number` AS `po_number`,`po_header`.`release_number` AS `release_number`,`po_header`.`supplier_id` AS `supplier_id`,`po_header`.`supplier_site_id` AS `supplier_site_id`,`po_header`.`buyer` AS `buyer`,`po_header`.`currency` AS `currency`,`po_header`.`header_amount` AS `header_amount`,`po_header`.`po_status` AS `po_status`,`po_header`.`payment_term_id` AS `payment_term_id`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`po_header`.`agreement_start_date` AS `agreement_start_date`,`po_header`.`agreement_end_date` AS `agreement_end_date`,`po_line`.`po_line_id` AS `po_line_id`,`po_line`.`line_type` AS `line_type`,`po_line`.`line_number` AS `po_line_number`,`po_line`.`item_id_m` AS `item_id_m`,`po_line`.`item_description` AS `item_description`,`po_line`.`line_description` AS `line_description`,`po_line`.`line_quantity` AS `line_quantity`,`po_line`.`unit_price` AS `unit_price`,`po_line`.`line_price` AS `line_price`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`po_detail`.`po_detail_id` AS `po_detail_id`,`po_detail`.`shipment_number` AS `shipment_number`,`po_line`.`receving_org_id` AS `receving_org_id`,`po_detail`.`subinventory_id` AS `subinventory_id`,`po_detail`.`locator_id` AS `locator_id`,`po_detail`.`requestor` AS `requestor`,`po_detail`.`quantity` AS `quantity`,ifnull(`po_detail`.`received_quantity`,0) AS `received_quantity`,(`po_detail`.`quantity` - ifnull(`po_detail`.`received_quantity`,0)) AS `open_quantity`,`po_detail`.`need_by_date` AS `need_by_date`,`po_detail`.`promise_date` AS `promise_date`,`po_detail`.`accepted_quantity` AS `accepted_quantity`,`po_detail`.`delivered_quantity` AS `delivered_quantity`,`po_detail`.`invoiced_quantity` AS `invoiced_quantity`,`po_detail`.`paid_quantity` AS `paid_quantity`,`po_detail`.`charge_ac_id` AS `charge_ac_id`,`po_detail`.`accrual_ac_id` AS `accrual_ac_id`,`po_detail`.`budget_ac_id` AS `budget_ac_id`,`po_detail`.`ppv_ac_id` AS `ppv_ac_id`,`org`.`org` AS `receving_org`,`po_header`.`created_by` AS `created_by`,`po_header`.`creation_date` AS `creation_date`,`po_header`.`last_update_by` AS `last_update_by`,`po_header`.`last_update_date` AS `last_update_date` from (((((((`po_header` left join `supplier` on((`po_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`po_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`po_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `po_line` on((`po_header`.`po_header_id` = `po_line`.`po_header_id`))) left join `item` on(((`po_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `po_line`.`receving_org_id`)))) left join `po_detail` on((`po_line`.`po_line_id` = `po_detail`.`po_line_id`))) left join `org` on((`po_line`.`receving_org_id` = `org`.`org_id`))) where (`po_header`.`po_type` in ('BLANKET','BLANKET_RELEASE')) ; -- -------------------------------------------------------- @@ -38393,7 +37814,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `po_blanket_v` AS select ` -- DROP TABLE IF EXISTS `po_convert_requisition_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `po_convert_requisition_v` AS select `po_requisition_header`.`po_requisition_header_id` AS `po_requisition_header_id`,`po_requisition_header`.`bu_org_id` AS `bu_org_id`,`po_requisition_header`.`po_requisition_type` AS `po_requisition_type`,`po_requisition_header`.`po_requisition_number` AS `po_requisition_number`,`po_requisition_header`.`supplier_id` AS `supplier_id`,`po_requisition_header`.`supplier_site_id` AS `supplier_site_id`,`po_requisition_header`.`buyer` AS `buyer`,`po_requisition_header`.`currency` AS `currency`,`po_requisition_header`.`header_amount` AS `header_amount`,`po_requisition_header`.`requisition_status` AS `requisition_status`,ifnull(`po_requisition_header`.`payment_term_id`,`supplier_site`.`payment_term_id`) AS `payment_term_id`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`po_requisition_line`.`po_requisition_line_id` AS `po_requisition_line_id`,`po_requisition_line`.`line_type` AS `line_type`,`po_requisition_line`.`line_number` AS `po_requisition_line_number`,`po_requisition_line`.`item_id_m` AS `item_id_m`,`po_requisition_line`.`bpa_po_line_id` AS `bpa_po_line_id`,`po_requisition_line`.`item_description` AS `item_description`,`po_requisition_line`.`line_description` AS `line_description`,`po_requisition_line`.`line_quantity` AS `line_quantity`,`po_requisition_line`.`unit_price` AS `unit_price`,`po_requisition_line`.`line_price` AS `line_price`,`po_requisition_line`.`receving_org_id` AS `receving_org_id`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`po_requisition_detail`.`po_requisition_detail_id` AS `po_requisition_detail_id`,`po_requisition_detail`.`shipment_number` AS `shipment_number`,`po_requisition_detail`.`subinventory_id` AS `subinventory_id`,`po_requisition_detail`.`locator_id` AS `locator_id`,`po_requisition_detail`.`requestor` AS `requestor`,`po_requisition_detail`.`quantity` AS `quantity`,`po_requisition_detail`.`need_by_date` AS `need_by_date`,`po_requisition_detail`.`promise_date` AS `promise_date`,`po_requisition_detail`.`received_quantity` AS `received_quantity`,`po_requisition_detail`.`accepted_quantity` AS `accepted_quantity`,`po_requisition_detail`.`delivered_quantity` AS `delivered_quantity`,`po_requisition_detail`.`invoiced_quantity` AS `invoiced_quantity`,`po_requisition_detail`.`paid_quantity` AS `paid_quantity`,`po_requisition_detail`.`order_number` AS `order_number`,`org`.`org` AS `ship_to_org`,`po_requisition_header`.`created_by` AS `created_by`,`po_requisition_header`.`creation_date` AS `creation_date`,`po_requisition_header`.`last_update_by` AS `last_update_by`,`po_requisition_header`.`last_update_date` AS `last_update_date` from (((((((`po_requisition_header` left join `supplier` on((`po_requisition_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`po_requisition_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`po_requisition_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `po_requisition_line` on((`po_requisition_header`.`po_requisition_header_id` = `po_requisition_line`.`po_requisition_header_id`))) left join `item` on(((`po_requisition_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `po_requisition_line`.`receving_org_id`)))) left join `po_requisition_detail` on((`po_requisition_line`.`po_requisition_line_id` = `po_requisition_detail`.`po_requisition_line_id`))) left join `org` on((`po_requisition_line`.`receving_org_id` = `org`.`org_id`))) where ((`po_requisition_header`.`requisition_status` = 'APPROVED') and (isnull(`po_requisition_detail`.`order_number`) or (`po_requisition_detail`.`order_number` = ''))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `po_convert_requisition_v` AS select `po_requisition_header`.`po_requisition_header_id` AS `po_requisition_header_id`,`po_requisition_header`.`bu_org_id` AS `bu_org_id`,`po_requisition_header`.`po_requisition_type` AS `po_requisition_type`,`po_requisition_header`.`po_requisition_number` AS `po_requisition_number`,`po_requisition_header`.`supplier_id` AS `supplier_id`,`po_requisition_header`.`supplier_site_id` AS `supplier_site_id`,`po_requisition_header`.`buyer` AS `buyer`,`po_requisition_header`.`currency` AS `currency`,`po_requisition_header`.`header_amount` AS `header_amount`,`po_requisition_header`.`requisition_status` AS `requisition_status`,ifnull(`po_requisition_header`.`payment_term_id`,`supplier_site`.`payment_term_id`) AS `payment_term_id`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`po_requisition_line`.`po_requisition_line_id` AS `po_requisition_line_id`,`po_requisition_line`.`line_type` AS `line_type`,`po_requisition_line`.`line_number` AS `po_requisition_line_number`,`po_requisition_line`.`item_id_m` AS `item_id_m`,`po_requisition_line`.`bpa_po_line_id` AS `bpa_po_line_id`,`po_requisition_line`.`item_description` AS `item_description`,`po_requisition_line`.`line_description` AS `line_description`,`po_requisition_line`.`line_quantity` AS `line_quantity`,`po_requisition_line`.`unit_price` AS `unit_price`,`po_requisition_line`.`line_price` AS `line_price`,`po_requisition_line`.`receving_org_id` AS `receving_org_id`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`po_requisition_detail`.`po_requisition_detail_id` AS `po_requisition_detail_id`,`po_requisition_detail`.`shipment_number` AS `shipment_number`,`po_requisition_detail`.`subinventory_id` AS `subinventory_id`,`po_requisition_detail`.`locator_id` AS `locator_id`,`po_requisition_detail`.`requestor` AS `requestor`,`po_requisition_detail`.`quantity` AS `quantity`,`po_requisition_detail`.`need_by_date` AS `need_by_date`,`po_requisition_detail`.`promise_date` AS `promise_date`,`po_requisition_detail`.`received_quantity` AS `received_quantity`,`po_requisition_detail`.`accepted_quantity` AS `accepted_quantity`,`po_requisition_detail`.`delivered_quantity` AS `delivered_quantity`,`po_requisition_detail`.`invoiced_quantity` AS `invoiced_quantity`,`po_requisition_detail`.`paid_quantity` AS `paid_quantity`,`po_requisition_detail`.`order_number` AS `order_number`,`org`.`org` AS `ship_to_org`,`po_requisition_header`.`created_by` AS `created_by`,`po_requisition_header`.`creation_date` AS `creation_date`,`po_requisition_header`.`last_update_by` AS `last_update_by`,`po_requisition_header`.`last_update_date` AS `last_update_date` from (((((((`po_requisition_header` left join `supplier` on((`po_requisition_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`po_requisition_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`po_requisition_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `po_requisition_line` on((`po_requisition_header`.`po_requisition_header_id` = `po_requisition_line`.`po_requisition_header_id`))) left join `item` on(((`po_requisition_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `po_requisition_line`.`receving_org_id`)))) left join `po_requisition_detail` on((`po_requisition_line`.`po_requisition_line_id` = `po_requisition_detail`.`po_requisition_line_id`))) left join `org` on((`po_requisition_line`.`receving_org_id` = `org`.`org_id`))) where ((`po_requisition_header`.`requisition_status` = 'APPROVED') and (isnull(`po_requisition_detail`.`order_number`) or (`po_requisition_detail`.`order_number` = ''))) ; -- -------------------------------------------------------- @@ -38402,7 +37823,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `po_convert_requisition_v` -- DROP TABLE IF EXISTS `po_document_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `po_document_v` AS select `po_header`.`po_header_id` AS `po_header_id`,`po_header`.`bu_org_id` AS `bu_org_id`,`po_header`.`po_type` AS `po_type`,`po_header`.`po_number` AS `po_number`,`po_header`.`supplier_id` AS `supplier_id`,`po_header`.`supplier_site_id` AS `supplier_site_id`,`po_header`.`buyer` AS `buyer`,`po_header`.`currency` AS `currency`,`po_header`.`header_amount` AS `header_amount`,`po_header`.`po_status` AS `po_status`,`po_header`.`payment_term_id` AS `payment_term_id`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`po_line`.`po_line_id` AS `po_line_id`,`po_line`.`line_type` AS `line_type`,`po_line`.`line_number` AS `po_line_number`,`po_line`.`item_id_m` AS `item_id_m`,`po_line`.`item_description` AS `item_description`,`po_line`.`line_description` AS `line_description`,`po_line`.`line_quantity` AS `line_quantity`,`po_line`.`unit_price` AS `unit_price`,`po_line`.`line_price` AS `line_price`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`po_detail`.`po_detail_id` AS `po_detail_id`,`po_detail`.`shipment_number` AS `shipment_number`,`po_line`.`receving_org_id` AS `receving_org_id`,`po_detail`.`subinventory_id` AS `subinventory_id`,`po_detail`.`locator_id` AS `locator_id`,`po_detail`.`requestor` AS `requestor`,`po_detail`.`quantity` AS `quantity`,ifnull(`po_detail`.`received_quantity`,0) AS `received_quantity`,(`po_detail`.`quantity` - ifnull(`po_detail`.`received_quantity`,0)) AS `open_quantity`,`po_detail`.`need_by_date` AS `need_by_date`,`po_detail`.`promise_date` AS `promise_date`,`po_detail`.`accepted_quantity` AS `accepted_quantity`,`po_detail`.`delivered_quantity` AS `delivered_quantity`,`po_detail`.`invoiced_quantity` AS `invoiced_quantity`,`po_detail`.`paid_quantity` AS `paid_quantity`,`po_detail`.`charge_ac_id` AS `charge_ac_id`,`po_detail`.`accrual_ac_id` AS `accrual_ac_id`,`po_detail`.`budget_ac_id` AS `budget_ac_id`,`po_detail`.`ppv_ac_id` AS `ppv_ac_id`,`org`.`org` AS `receving_org`,`po_header`.`created_by` AS `created_by`,`po_header`.`creation_date` AS `creation_date`,`po_header`.`last_update_by` AS `last_update_by`,`po_header`.`last_update_date` AS `last_update_date` from (((((((`po_header` left join `supplier` on((`po_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`po_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`po_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `po_line` on((`po_header`.`po_header_id` = `po_line`.`po_header_id`))) left join `item` on(((`po_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `po_line`.`receving_org_id`)))) left join `po_detail` on((`po_line`.`po_line_id` = `po_detail`.`po_line_id`))) left join `org` on((`po_line`.`receving_org_id` = `org`.`org_id`))) where (`po_header`.`po_type` in ('STANDARD','BLANKET','CONTRACT')); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `po_document_v` AS select `po_header`.`po_header_id` AS `po_header_id`,`po_header`.`bu_org_id` AS `bu_org_id`,`po_header`.`po_type` AS `po_type`,`po_header`.`po_number` AS `po_number`,`po_header`.`supplier_id` AS `supplier_id`,`po_header`.`supplier_site_id` AS `supplier_site_id`,`po_header`.`buyer` AS `buyer`,`po_header`.`currency` AS `currency`,`po_header`.`header_amount` AS `header_amount`,`po_header`.`po_status` AS `po_status`,`po_header`.`payment_term_id` AS `payment_term_id`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`po_line`.`po_line_id` AS `po_line_id`,`po_line`.`line_type` AS `line_type`,`po_line`.`line_number` AS `po_line_number`,`po_line`.`item_id_m` AS `item_id_m`,`po_line`.`item_description` AS `item_description`,`po_line`.`line_description` AS `line_description`,`po_line`.`line_quantity` AS `line_quantity`,`po_line`.`unit_price` AS `unit_price`,`po_line`.`line_price` AS `line_price`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`po_detail`.`po_detail_id` AS `po_detail_id`,`po_detail`.`shipment_number` AS `shipment_number`,`po_line`.`receving_org_id` AS `receving_org_id`,`po_detail`.`subinventory_id` AS `subinventory_id`,`po_detail`.`locator_id` AS `locator_id`,`po_detail`.`requestor` AS `requestor`,`po_detail`.`quantity` AS `quantity`,ifnull(`po_detail`.`received_quantity`,0) AS `received_quantity`,(`po_detail`.`quantity` - ifnull(`po_detail`.`received_quantity`,0)) AS `open_quantity`,`po_detail`.`need_by_date` AS `need_by_date`,`po_detail`.`promise_date` AS `promise_date`,`po_detail`.`accepted_quantity` AS `accepted_quantity`,`po_detail`.`delivered_quantity` AS `delivered_quantity`,`po_detail`.`invoiced_quantity` AS `invoiced_quantity`,`po_detail`.`paid_quantity` AS `paid_quantity`,`po_detail`.`charge_ac_id` AS `charge_ac_id`,`po_detail`.`accrual_ac_id` AS `accrual_ac_id`,`po_detail`.`budget_ac_id` AS `budget_ac_id`,`po_detail`.`ppv_ac_id` AS `ppv_ac_id`,`org`.`org` AS `receving_org`,`po_header`.`created_by` AS `created_by`,`po_header`.`creation_date` AS `creation_date`,`po_header`.`last_update_by` AS `last_update_by`,`po_header`.`last_update_date` AS `last_update_date` from (((((((`po_header` left join `supplier` on((`po_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`po_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`po_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `po_line` on((`po_header`.`po_header_id` = `po_line`.`po_header_id`))) left join `item` on(((`po_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `po_line`.`receving_org_id`)))) left join `po_detail` on((`po_line`.`po_line_id` = `po_detail`.`po_line_id`))) left join `org` on((`po_line`.`receving_org_id` = `org`.`org_id`))) where (`po_header`.`po_type` in ('STANDARD','BLANKET','CONTRACT')) ; -- -------------------------------------------------------- @@ -38411,7 +37832,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `po_document_v` AS select -- DROP TABLE IF EXISTS `po_requisition_all_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `po_requisition_all_v` AS select `po_requisition_header`.`po_requisition_header_id` AS `po_requisition_header_id`,`po_requisition_header`.`bu_org_id` AS `bu_org_id`,`po_requisition_header`.`po_requisition_type` AS `po_requisition_type`,`po_requisition_header`.`po_requisition_number` AS `po_requisition_number`,`po_requisition_header`.`supplier_id` AS `supplier_id`,`po_requisition_header`.`supplier_site_id` AS `supplier_site_id`,`po_requisition_header`.`buyer` AS `buyer`,`po_requisition_header`.`currency` AS `currency`,`po_requisition_header`.`header_amount` AS `header_amount`,`po_requisition_header`.`requisition_status` AS `requisition_status`,`po_requisition_header`.`payment_term_id` AS `payment_term_id`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`po_requisition_line`.`po_requisition_line_id` AS `po_requisition_line_id`,`po_requisition_line`.`line_type` AS `line_type`,`po_requisition_line`.`line_number` AS `po_requisition_line_number`,`po_requisition_line`.`item_id_m` AS `item_id_m`,`po_requisition_line`.`item_description` AS `item_description`,`po_requisition_line`.`line_description` AS `line_description`,`po_requisition_line`.`line_quantity` AS `line_quantity`,`po_requisition_line`.`unit_price` AS `unit_price`,`po_requisition_line`.`line_price` AS `line_price`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`po_requisition_detail`.`po_requisition_detail_id` AS `po_requisition_detail_id`,`po_requisition_detail`.`shipment_number` AS `shipment_number`,`po_requisition_detail`.`ship_to_inventory` AS `ship_to_inventory`,`po_requisition_detail`.`subinventory_id` AS `subinventory_id`,`po_requisition_detail`.`locator_id` AS `locator_id`,`po_requisition_detail`.`requestor` AS `requestor`,`po_requisition_detail`.`quantity` AS `quantity`,`po_requisition_detail`.`need_by_date` AS `need_by_date`,`po_requisition_detail`.`promise_date` AS `promise_date`,`po_requisition_detail`.`received_quantity` AS `received_quantity`,`po_requisition_detail`.`accepted_quantity` AS `accepted_quantity`,`po_requisition_detail`.`delivered_quantity` AS `delivered_quantity`,`po_requisition_detail`.`invoiced_quantity` AS `invoiced_quantity`,`po_requisition_detail`.`paid_quantity` AS `paid_quantity`,`po_requisition_detail`.`order_number` AS `order_number`,`org`.`org` AS `ship_to_org`,`po_requisition_header`.`created_by` AS `created_by`,`po_requisition_header`.`creation_date` AS `creation_date`,`po_requisition_header`.`last_update_by` AS `last_update_by`,`po_requisition_header`.`last_update_date` AS `last_update_date` from (((((((`po_requisition_header` left join `supplier` on((`po_requisition_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`po_requisition_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`po_requisition_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `po_requisition_line` on((`po_requisition_header`.`po_requisition_header_id` = `po_requisition_line`.`po_requisition_header_id`))) left join `item` on(((`po_requisition_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `po_requisition_line`.`receving_org_id`)))) left join `po_requisition_detail` on((`po_requisition_line`.`po_requisition_line_id` = `po_requisition_detail`.`po_requisition_line_id`))) left join `org` on((`po_requisition_detail`.`ship_to_inventory` = `org`.`org_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `po_requisition_all_v` AS select `po_requisition_header`.`po_requisition_header_id` AS `po_requisition_header_id`,`po_requisition_header`.`bu_org_id` AS `bu_org_id`,`po_requisition_header`.`po_requisition_type` AS `po_requisition_type`,`po_requisition_header`.`po_requisition_number` AS `po_requisition_number`,`po_requisition_header`.`supplier_id` AS `supplier_id`,`po_requisition_header`.`supplier_site_id` AS `supplier_site_id`,`po_requisition_header`.`buyer` AS `buyer`,`po_requisition_header`.`currency` AS `currency`,`po_requisition_header`.`header_amount` AS `header_amount`,`po_requisition_header`.`requisition_status` AS `requisition_status`,`po_requisition_header`.`payment_term_id` AS `payment_term_id`,`supplier`.`supplier_name` AS `supplier_name`,`supplier`.`supplier_number` AS `supplier_number`,`supplier_site`.`supplier_site_name` AS `supplier_site_name`,`supplier_site`.`supplier_site_number` AS `supplier_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`po_requisition_line`.`po_requisition_line_id` AS `po_requisition_line_id`,`po_requisition_line`.`line_type` AS `line_type`,`po_requisition_line`.`line_number` AS `po_requisition_line_number`,`po_requisition_line`.`item_id_m` AS `item_id_m`,`po_requisition_line`.`item_description` AS `item_description`,`po_requisition_line`.`line_description` AS `line_description`,`po_requisition_line`.`line_quantity` AS `line_quantity`,`po_requisition_line`.`unit_price` AS `unit_price`,`po_requisition_line`.`line_price` AS `line_price`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`po_requisition_detail`.`po_requisition_detail_id` AS `po_requisition_detail_id`,`po_requisition_detail`.`shipment_number` AS `shipment_number`,`po_requisition_detail`.`ship_to_inventory` AS `ship_to_inventory`,`po_requisition_detail`.`subinventory_id` AS `subinventory_id`,`po_requisition_detail`.`locator_id` AS `locator_id`,`po_requisition_detail`.`requestor` AS `requestor`,`po_requisition_detail`.`quantity` AS `quantity`,`po_requisition_detail`.`need_by_date` AS `need_by_date`,`po_requisition_detail`.`promise_date` AS `promise_date`,`po_requisition_detail`.`received_quantity` AS `received_quantity`,`po_requisition_detail`.`accepted_quantity` AS `accepted_quantity`,`po_requisition_detail`.`delivered_quantity` AS `delivered_quantity`,`po_requisition_detail`.`invoiced_quantity` AS `invoiced_quantity`,`po_requisition_detail`.`paid_quantity` AS `paid_quantity`,`po_requisition_detail`.`order_number` AS `order_number`,`org`.`org` AS `ship_to_org`,`po_requisition_header`.`created_by` AS `created_by`,`po_requisition_header`.`creation_date` AS `creation_date`,`po_requisition_header`.`last_update_by` AS `last_update_by`,`po_requisition_header`.`last_update_date` AS `last_update_date` from (((((((`po_requisition_header` left join `supplier` on((`po_requisition_header`.`supplier_id` = `supplier`.`supplier_id`))) left join `supplier_site` on((`po_requisition_header`.`supplier_site_id` = `supplier_site`.`supplier_site_id`))) left join `payment_term` on((`po_requisition_header`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `po_requisition_line` on((`po_requisition_header`.`po_requisition_header_id` = `po_requisition_line`.`po_requisition_header_id`))) left join `item` on(((`po_requisition_line`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `po_requisition_line`.`receving_org_id`)))) left join `po_requisition_detail` on((`po_requisition_line`.`po_requisition_line_id` = `po_requisition_detail`.`po_requisition_line_id`))) left join `org` on((`po_requisition_detail`.`ship_to_inventory` = `org`.`org_id`))) ; -- -------------------------------------------------------- @@ -38420,7 +37841,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `po_requisition_all_v` AS -- DROP TABLE IF EXISTS `prj_burden_expenditure_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `prj_burden_expenditure_v` AS select `pbe`.`prj_burden_expenditure_id` AS `prj_burden_expenditure_id`,`pph`.`project_number` AS `project_number`,`pbc`.`costcode` AS `costcode`,`pbc`.`description` AS `costcode_description`,`pbcb`.`cost_base` AS `cost_base`,`pbcb`.`description` AS `cost_base_description`,`bplh`.`burden_list` AS `burden_list`,`pel`.`prj_expenditure_line_id` AS `prj_expenditure_line_id`,`pel`.`prj_expenditure_header_id` AS `prj_expenditure_header_id`,`pel`.`org_id` AS `org_id`,`pel`.`prj_project_header_id` AS `prj_project_header_id`,`pel`.`prj_project_line_id` AS `prj_project_line_id`,`pel`.`prj_nlr_header_id` AS `prj_nlr_header_id`,`pel`.`prj_expenditure_type_header_id` AS `prj_expenditure_type_header_id`,`pel`.`uom_id` AS `uom_id`,`pel`.`quantity` AS `quantity`,`pbe`.`description` AS `description`,`pbe`.`prj_burden_list_header_id` AS `prj_burden_list_header_id`,`pbe`.`expenditure_date` AS `expenditure_date`,`pbe`.`prj_burden_structure_header_id` AS `prj_burden_structure_header_id`,`pbe`.`prj_burden_costcode_id` AS `prj_burden_costcode_id`,`pbe`.`multiplier` AS `multiplier`,`pbe`.`burden_value` AS `burden_value`,`pbe`.`burden_amount` AS `burden_amount` from (((((`prj_burden_expenditure` `pbe` join `prj_expenditure_line` `pel`) join `prj_project_header` `pph`) join `prj_burden_list_header` `bplh`) join `prj_burden_cost_base` `pbcb`) join `prj_burden_costcode` `pbc`) where ((`pbe`.`prj_expenditure_line_id` = `pel`.`prj_expenditure_line_id`) and (`pbcb`.`prj_burden_cost_base_id` = `pbe`.`prj_burden_cost_base_id`) and (`pbc`.`prj_burden_costcode_id` = `pbe`.`prj_burden_cost_base_id`) and (`pph`.`prj_project_header_id` = `pel`.`prj_project_header_id`) and (`bplh`.`prj_burden_list_header_id` = `pbe`.`prj_burden_list_header_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `prj_burden_expenditure_v` AS select `pbe`.`prj_burden_expenditure_id` AS `prj_burden_expenditure_id`,`pph`.`project_number` AS `project_number`,`pbc`.`costcode` AS `costcode`,`pbc`.`description` AS `costcode_description`,`pbcb`.`cost_base` AS `cost_base`,`pbcb`.`description` AS `cost_base_description`,`bplh`.`burden_list` AS `burden_list`,`pel`.`prj_expenditure_line_id` AS `prj_expenditure_line_id`,`pel`.`prj_expenditure_header_id` AS `prj_expenditure_header_id`,`pel`.`org_id` AS `org_id`,`pel`.`prj_project_header_id` AS `prj_project_header_id`,`pel`.`prj_project_line_id` AS `prj_project_line_id`,`pel`.`prj_nlr_header_id` AS `prj_nlr_header_id`,`pel`.`prj_expenditure_type_header_id` AS `prj_expenditure_type_header_id`,`pel`.`uom_id` AS `uom_id`,`pel`.`quantity` AS `quantity`,`pbe`.`description` AS `description`,`pbe`.`prj_burden_list_header_id` AS `prj_burden_list_header_id`,`pbe`.`expenditure_date` AS `expenditure_date`,`pbe`.`prj_burden_structure_header_id` AS `prj_burden_structure_header_id`,`pbe`.`prj_burden_costcode_id` AS `prj_burden_costcode_id`,`pbe`.`multiplier` AS `multiplier`,`pbe`.`burden_value` AS `burden_value`,`pbe`.`burden_amount` AS `burden_amount` from (((((`prj_burden_expenditure` `pbe` join `prj_expenditure_line` `pel`) join `prj_project_header` `pph`) join `prj_burden_list_header` `bplh`) join `prj_burden_cost_base` `pbcb`) join `prj_burden_costcode` `pbc`) where ((`pbe`.`prj_expenditure_line_id` = `pel`.`prj_expenditure_line_id`) and (`pbcb`.`prj_burden_cost_base_id` = `pbe`.`prj_burden_cost_base_id`) and (`pbc`.`prj_burden_costcode_id` = `pbe`.`prj_burden_cost_base_id`) and (`pph`.`prj_project_header_id` = `pel`.`prj_project_header_id`) and (`bplh`.`prj_burden_list_header_id` = `pbe`.`prj_burden_list_header_id`)) ; -- -------------------------------------------------------- @@ -38429,7 +37850,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `prj_burden_expenditure_v` -- DROP TABLE IF EXISTS `prj_expenditure_line_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `prj_expenditure_line_v` AS select `pel`.`prj_expenditure_line_id` AS `prj_expenditure_line_id`,`pel`.`prj_expenditure_header_id` AS `prj_expenditure_header_id`,`pel`.`org_id` AS `org_id`,`pel`.`hr_employee_id` AS `hr_employee_id`,`pel`.`description` AS `description`,`pel`.`job_id` AS `job_id`,`pel`.`expenditure_date` AS `expenditure_date`,`pel`.`prj_project_header_id` AS `prj_project_header_id`,`pel`.`prj_project_line_id` AS `prj_project_line_id`,`pel`.`prj_nlr_header_id` AS `prj_nlr_header_id`,`pel`.`prj_expenditure_type_header_id` AS `prj_expenditure_type_header_id`,`pel`.`uom_id` AS `uom_id`,`pel`.`quantity` AS `quantity`,`pel`.`rate` AS `rate`,`pel`.`debit_ac_id` AS `debit_ac_id`,`pel`.`credit_ac_id` AS `credit_ac_id`,`pel`.`burden_amount` AS `burden_amount`,`pel`.`gl_journal_header_id` AS `gl_journal_header_id`,`pel`.`gl_journal_interface_cb` AS `gl_journal_interface_cb`,`pel`.`status` AS `status`,`pph`.`project_number` AS `project_number`,`pph`.`bu_org_id` AS `bu_org_id`,`ppl`.`task_number` AS `task_number` from ((`prj_expenditure_line` `pel` join `prj_project_line` `ppl`) join `prj_project_header` `pph`) where ((`pel`.`prj_project_header_id` = `pph`.`prj_project_header_id`) and (`pel`.`prj_project_line_id` = `ppl`.`prj_project_line_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `prj_expenditure_line_v` AS select `pel`.`prj_expenditure_line_id` AS `prj_expenditure_line_id`,`pel`.`prj_expenditure_header_id` AS `prj_expenditure_header_id`,`pel`.`org_id` AS `org_id`,`pel`.`hr_employee_id` AS `hr_employee_id`,`pel`.`description` AS `description`,`pel`.`job_id` AS `job_id`,`pel`.`expenditure_date` AS `expenditure_date`,`pel`.`prj_project_header_id` AS `prj_project_header_id`,`pel`.`prj_project_line_id` AS `prj_project_line_id`,`pel`.`prj_nlr_header_id` AS `prj_nlr_header_id`,`pel`.`prj_expenditure_type_header_id` AS `prj_expenditure_type_header_id`,`pel`.`uom_id` AS `uom_id`,`pel`.`quantity` AS `quantity`,`pel`.`rate` AS `rate`,`pel`.`debit_ac_id` AS `debit_ac_id`,`pel`.`credit_ac_id` AS `credit_ac_id`,`pel`.`burden_amount` AS `burden_amount`,`pel`.`gl_journal_header_id` AS `gl_journal_header_id`,`pel`.`gl_journal_interface_cb` AS `gl_journal_interface_cb`,`pel`.`status` AS `status`,`pph`.`project_number` AS `project_number`,`pph`.`bu_org_id` AS `bu_org_id`,`ppl`.`task_number` AS `task_number` from ((`prj_expenditure_line` `pel` join `prj_project_line` `ppl`) join `prj_project_header` `pph`) where ((`pel`.`prj_project_header_id` = `pph`.`prj_project_header_id`) and (`pel`.`prj_project_line_id` = `ppl`.`prj_project_line_id`)) ; -- -------------------------------------------------------- @@ -38438,7 +37859,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `prj_expenditure_line_v` A -- DROP TABLE IF EXISTS `prj_percent_all_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `prj_percent_all_v` AS select `pp`.`prj_percent_header_id` AS `prj_percent_header_id`,`pp`.`percent` AS `percent`,`pp`.`description` AS `description`,`pp`.`as_of_date` AS `as_of_date`,`pp`.`status` AS `status`,`pp`.`created_by` AS `created_by`,`pp`.`creation_date` AS `creation_date`,`pp`.`last_update_by` AS `last_update_by`,`pp`.`last_update_date` AS `last_update_date`,`projh`.`project_number` AS `project_number`,`projh`.`description` AS `project_description`,`projh`.`prj_project_header_id` AS `prj_project_header_id` from (`prj_percent_header` `pp` join `prj_project_header` `projh`) where (`projh`.`prj_project_header_id` = `pp`.`prj_project_header_id`) union select NULL AS `prj_percent_header_id`,NULL AS `percent`,NULL AS `description`,NULL AS `as_of_date`,NULL AS `status`,NULL AS `created_by`,NULL AS `creation_date`,NULL AS `last_update_by`,NULL AS `last_update_date`,`projh`.`project_number` AS `project_number`,`projh`.`description` AS `project_description`,`projh`.`prj_project_header_id` AS `prj_project_header_id` from `prj_project_header` `projh` where (not(`projh`.`prj_project_header_id` in (select distinct `prj_percent_header`.`prj_project_header_id` from `prj_percent_header`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `prj_percent_all_v` AS select `pp`.`prj_percent_header_id` AS `prj_percent_header_id`,`pp`.`percent` AS `percent`,`pp`.`description` AS `description`,`pp`.`as_of_date` AS `as_of_date`,`pp`.`status` AS `status`,`pp`.`created_by` AS `created_by`,`pp`.`creation_date` AS `creation_date`,`pp`.`last_update_by` AS `last_update_by`,`pp`.`last_update_date` AS `last_update_date`,`projh`.`project_number` AS `project_number`,`projh`.`description` AS `project_description`,`projh`.`prj_project_header_id` AS `prj_project_header_id` from (`prj_percent_header` `pp` join `prj_project_header` `projh`) where (`projh`.`prj_project_header_id` = `pp`.`prj_project_header_id`) union select NULL AS `prj_percent_header_id`,NULL AS `percent`,NULL AS `description`,NULL AS `as_of_date`,NULL AS `status`,NULL AS `created_by`,NULL AS `creation_date`,NULL AS `last_update_by`,NULL AS `last_update_date`,`projh`.`project_number` AS `project_number`,`projh`.`description` AS `project_description`,`projh`.`prj_project_header_id` AS `prj_project_header_id` from `prj_project_header` `projh` where (not(`projh`.`prj_project_header_id` in (select distinct `prj_percent_header`.`prj_project_header_id` from `prj_percent_header`))) ; -- -------------------------------------------------------- @@ -38447,7 +37868,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `prj_percent_all_v` AS sel -- DROP TABLE IF EXISTS `prj_percent_line_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `prj_percent_line_v` AS select `ppl`.`prj_percent_line_id` AS `prj_percent_line_id`,`ppl`.`prj_percent_header_id` AS `prj_percent_header_id`,`ppl`.`percent` AS `percent`,`ppl`.`comment` AS `comment`,`ppl`.`as_of_date` AS `as_of_date`,`ppl`.`created_by` AS `created_by`,`ppl`.`creation_date` AS `creation_date`,`ppl`.`last_update_by` AS `last_update_by`,`ppl`.`last_update_date` AS `last_update_date`,`projl`.`prj_project_line_id` AS `prj_project_line_id`,`projl`.`prj_project_header_id` AS `prj_project_header_id`,`projl`.`task_number` AS `task_number`,`projl`.`task_name` AS `task_name`,`projl`.`task_level_weight` AS `task_level_weight`,`projl`.`parent_prj_task_num` AS `parent_prj_task_num`,`projl`.`description` AS `description` from (`prj_percent_line` `ppl` join `prj_project_line` `projl`) where ((`projl`.`prj_project_header_id` = `ppl`.`prj_project_header_id`) and (`projl`.`prj_project_line_id` = `ppl`.`prj_project_line_id`)) union select NULL AS `prj_percent_line_id`,NULL AS `prj_percent_line_id`,NULL AS `percent`,NULL AS `comment`,NULL AS `as_of_date`,NULL AS `created_by`,NULL AS `creation_date`,NULL AS `last_update_by`,NULL AS `last_update_date`,`projl`.`prj_project_line_id` AS `prj_project_line_id`,`projl`.`prj_project_header_id` AS `prj_project_header_id`,`projl`.`task_number` AS `task_number`,`projl`.`task_name` AS `task_name`,`projl`.`task_level_weight` AS `task_level_weight`,`projl`.`parent_prj_task_num` AS `parent_prj_task_num`,`projl`.`description` AS `description` from `prj_project_line` `projl` where (not(`projl`.`prj_project_line_id` in (select distinct `prj_percent_line`.`prj_project_line_id` from `prj_percent_line`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `prj_percent_line_v` AS select `ppl`.`prj_percent_line_id` AS `prj_percent_line_id`,`ppl`.`prj_percent_header_id` AS `prj_percent_header_id`,`ppl`.`percent` AS `percent`,`ppl`.`comment` AS `comment`,`ppl`.`as_of_date` AS `as_of_date`,`ppl`.`created_by` AS `created_by`,`ppl`.`creation_date` AS `creation_date`,`ppl`.`last_update_by` AS `last_update_by`,`ppl`.`last_update_date` AS `last_update_date`,`projl`.`prj_project_line_id` AS `prj_project_line_id`,`projl`.`prj_project_header_id` AS `prj_project_header_id`,`projl`.`task_number` AS `task_number`,`projl`.`task_name` AS `task_name`,`projl`.`task_level_weight` AS `task_level_weight`,`projl`.`parent_prj_task_num` AS `parent_prj_task_num`,`projl`.`description` AS `description` from (`prj_percent_line` `ppl` join `prj_project_line` `projl`) where ((`projl`.`prj_project_header_id` = `ppl`.`prj_project_header_id`) and (`projl`.`prj_project_line_id` = `ppl`.`prj_project_line_id`)) union select NULL AS `prj_percent_line_id`,NULL AS `prj_percent_line_id`,NULL AS `percent`,NULL AS `comment`,NULL AS `as_of_date`,NULL AS `created_by`,NULL AS `creation_date`,NULL AS `last_update_by`,NULL AS `last_update_date`,`projl`.`prj_project_line_id` AS `prj_project_line_id`,`projl`.`prj_project_header_id` AS `prj_project_header_id`,`projl`.`task_number` AS `task_number`,`projl`.`task_name` AS `task_name`,`projl`.`task_level_weight` AS `task_level_weight`,`projl`.`parent_prj_task_num` AS `parent_prj_task_num`,`projl`.`description` AS `description` from `prj_project_line` `projl` where (not(`projl`.`prj_project_line_id` in (select distinct `prj_percent_line`.`prj_project_line_id` from `prj_percent_line`))) ; -- -------------------------------------------------------- @@ -38456,7 +37877,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `prj_percent_line_v` AS se -- DROP TABLE IF EXISTS `prj_project_all_lowesttask_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `prj_project_all_lowesttask_v` AS select `org`.`org` AS `org`,`prh`.`project_number` AS `project_number`,`prh`.`description` AS `description`,`prl`.`task_number` AS `task_number`,`prl`.`task_name` AS `task_name`,`prl`.`description` AS `task_description`,`prh`.`project_status` AS `project_status`,`prh`.`approval_status` AS `approval_status`,`prl`.`prj_project_line_id` AS `prj_project_line_id`,`prl`.`prj_project_header_id` AS `prj_project_header_id`,`prl`.`task_level_weight` AS `task_level_weight`,`prl`.`parent_prj_task_num` AS `parent_prj_task_num`,`prl`.`start_date` AS `task_start_date`,`prl`.`end_date` AS `task_end_date`,`prl`.`manager_user_id` AS `task_manager_user_id`,`prl`.`org_id` AS `org_id`,`prl`.`service_type` AS `service_type`,`prl`.`work_type` AS `work_type`,`prl`.`allow_charges_cb` AS `allow_charges_cb`,`prl`.`capitalizable_cb` AS `capitalizable_cb`,`prh`.`bu_org_id` AS `bu_org_id`,`prh`.`prj_project_type_id` AS `prj_project_type_id`,`prh`.`ar_customer_id` AS `ar_customer_id`,`prh`.`ar_customer_site_id` AS `ar_customer_site_id`,`prh`.`pm_employee_id` AS `pm_employee_id`,`prh`.`manager_user_id` AS `manager_user_id`,`prh`.`start_date` AS `start_date`,`prh`.`completion_date` AS `completion_date`,`prh`.`header_amount` AS `header_amount` from ((`prj_project_header` `prh` join `prj_project_line` `prl`) join `org`) where ((`prl`.`prj_project_header_id` = `prh`.`prj_project_header_id`) and (`prh`.`bu_org_id` = `org`.`org_id`) and (not(`prl`.`task_number` in (select `prl`.`parent_prj_task_num` from `prj_project_line` `prl` where (`prl`.`parent_prj_task_num` is not null))))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `prj_project_all_lowesttask_v` AS select `org`.`org` AS `org`,`prh`.`project_number` AS `project_number`,`prh`.`description` AS `description`,`prl`.`task_number` AS `task_number`,`prl`.`task_name` AS `task_name`,`prl`.`description` AS `task_description`,`prh`.`project_status` AS `project_status`,`prh`.`approval_status` AS `approval_status`,`prl`.`prj_project_line_id` AS `prj_project_line_id`,`prl`.`prj_project_header_id` AS `prj_project_header_id`,`prl`.`task_level_weight` AS `task_level_weight`,`prl`.`parent_prj_task_num` AS `parent_prj_task_num`,`prl`.`start_date` AS `task_start_date`,`prl`.`end_date` AS `task_end_date`,`prl`.`manager_user_id` AS `task_manager_user_id`,`prl`.`org_id` AS `org_id`,`prl`.`service_type` AS `service_type`,`prl`.`work_type` AS `work_type`,`prl`.`allow_charges_cb` AS `allow_charges_cb`,`prl`.`capitalizable_cb` AS `capitalizable_cb`,`prh`.`bu_org_id` AS `bu_org_id`,`prh`.`prj_project_type_id` AS `prj_project_type_id`,`prh`.`ar_customer_id` AS `ar_customer_id`,`prh`.`ar_customer_site_id` AS `ar_customer_site_id`,`prh`.`pm_employee_id` AS `pm_employee_id`,`prh`.`manager_user_id` AS `manager_user_id`,`prh`.`start_date` AS `start_date`,`prh`.`completion_date` AS `completion_date`,`prh`.`header_amount` AS `header_amount` from ((`prj_project_header` `prh` join `prj_project_line` `prl`) join `org`) where ((`prl`.`prj_project_header_id` = `prh`.`prj_project_header_id`) and (`prh`.`bu_org_id` = `org`.`org_id`) and (not(`prl`.`task_number` in (select `prl`.`parent_prj_task_num` from `prj_project_line` `prl` where (`prl`.`parent_prj_task_num` is not null))))) ; -- -------------------------------------------------------- @@ -38465,7 +37886,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `prj_project_all_lowesttas -- DROP TABLE IF EXISTS `prj_project_all_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `prj_project_all_v` AS select `org`.`org` AS `org`,`prh`.`project_number` AS `project_number`,`prh`.`description` AS `description`,`prl`.`task_number` AS `task_number`,`prl`.`task_name` AS `task_name`,`prl`.`description` AS `task_description`,`prh`.`project_status` AS `project_status`,`prh`.`approval_status` AS `approval_status`,`prl`.`prj_project_line_id` AS `prj_project_line_id`,`prl`.`prj_project_header_id` AS `prj_project_header_id`,`prl`.`task_level_weight` AS `task_level_weight`,`prl`.`parent_prj_task_num` AS `parent_prj_task_num`,`prl`.`start_date` AS `task_start_date`,`prl`.`end_date` AS `task_end_date`,`prl`.`manager_user_id` AS `task_manager_user_id`,`prl`.`org_id` AS `org_id`,`prl`.`service_type` AS `service_type`,`prl`.`work_type` AS `work_type`,`prl`.`allow_charges_cb` AS `allow_charges_cb`,`prl`.`capitalizable_cb` AS `capitalizable_cb`,`prh`.`bu_org_id` AS `bu_org_id`,`prh`.`prj_project_type_id` AS `prj_project_type_id`,`prh`.`ar_customer_id` AS `ar_customer_id`,`prh`.`ar_customer_site_id` AS `ar_customer_site_id`,`prh`.`pm_employee_id` AS `pm_employee_id`,`prh`.`manager_user_id` AS `manager_user_id`,`prh`.`start_date` AS `start_date`,`prh`.`completion_date` AS `completion_date`,`prh`.`header_amount` AS `header_amount` from ((`prj_project_header` `prh` join `prj_project_line` `prl`) join `org`) where ((`prl`.`prj_project_header_id` = `prh`.`prj_project_header_id`) and (`prh`.`bu_org_id` = `org`.`org_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `prj_project_all_v` AS select `org`.`org` AS `org`,`prh`.`project_number` AS `project_number`,`prh`.`description` AS `description`,`prl`.`task_number` AS `task_number`,`prl`.`task_name` AS `task_name`,`prl`.`description` AS `task_description`,`prh`.`project_status` AS `project_status`,`prh`.`approval_status` AS `approval_status`,`prl`.`prj_project_line_id` AS `prj_project_line_id`,`prl`.`prj_project_header_id` AS `prj_project_header_id`,`prl`.`task_level_weight` AS `task_level_weight`,`prl`.`parent_prj_task_num` AS `parent_prj_task_num`,`prl`.`start_date` AS `task_start_date`,`prl`.`end_date` AS `task_end_date`,`prl`.`manager_user_id` AS `task_manager_user_id`,`prl`.`org_id` AS `org_id`,`prl`.`service_type` AS `service_type`,`prl`.`work_type` AS `work_type`,`prl`.`allow_charges_cb` AS `allow_charges_cb`,`prl`.`capitalizable_cb` AS `capitalizable_cb`,`prh`.`bu_org_id` AS `bu_org_id`,`prh`.`prj_project_type_id` AS `prj_project_type_id`,`prh`.`ar_customer_id` AS `ar_customer_id`,`prh`.`ar_customer_site_id` AS `ar_customer_site_id`,`prh`.`pm_employee_id` AS `pm_employee_id`,`prh`.`manager_user_id` AS `manager_user_id`,`prh`.`start_date` AS `start_date`,`prh`.`completion_date` AS `completion_date`,`prh`.`header_amount` AS `header_amount` from ((`prj_project_header` `prh` join `prj_project_line` `prl`) join `org`) where ((`prl`.`prj_project_header_id` = `prh`.`prj_project_header_id`) and (`prh`.`bu_org_id` = `org`.`org_id`)) ; -- -------------------------------------------------------- @@ -38474,7 +37895,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `prj_project_all_v` AS sel -- DROP TABLE IF EXISTS `sd_delivery_all_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `sd_delivery_all_v` AS select `sddh`.`sd_delivery_header_id` AS `sd_delivery_header_id`,`sddh`.`delivery_number` AS `delivery_number`,`sddh`.`carrier` AS `carrier`,`sddh`.`vehicle_number` AS `vehicle_number`,`sddh`.`handling_instruction` AS `handling_instruction`,`sddl`.`shipped_quantity` AS `delivery_shipped_quantity`,`sddl`.`delivery_status` AS `delivery_status`,`sdsh`.`sd_so_header_id` AS `sd_so_header_id`,`sdsh`.`bu_org_id` AS `bu_org_id`,`sdsh`.`document_type` AS `document_type`,`sdsh`.`so_number` AS `so_number`,`sdsh`.`ar_customer_id` AS `ar_customer_id`,`sdsh`.`ship_to_id` AS `ship_to_id`,`sdsh`.`bill_to_id` AS `bill_to_id`,`sdsh`.`ar_customer_site_id` AS `ar_customer_site_id`,`sdsh`.`hr_employee_id` AS `hr_employee_id`,`sdsh`.`doc_currency` AS `doc_currency`,`sdsh`.`header_amount` AS `header_amount`,`sdsh`.`so_status` AS `so_status`,`sdsh`.`payment_term_id` AS `payment_term_id`,`ar_customer`.`customer_name` AS `customer_name`,`ar_customer`.`customer_number` AS `customer_number`,`ar_customer_site`.`customer_site_name` AS `customer_site_name`,`ar_customer_site`.`customer_site_number` AS `customer_site_number`,`sdsl`.`sd_so_line_id` AS `sd_so_line_id`,`sdsl`.`line_type` AS `line_type`,`sdsl`.`line_number` AS `line_number`,`sdsl`.`item_id_m` AS `item_id_m`,`sdsl`.`kit_cb` AS `kit_cb`,`sdsl`.`kit_configured_cb` AS `kit_configured_cb`,`sdsl`.`bom_config_header_id` AS `bom_config_header_id`,`sdsl`.`wip_wo_header_id` AS `wip_wo_header_id`,`sdsl`.`item_description` AS `item_description`,`sdsl`.`line_description` AS `line_description`,`sdsl`.`line_quantity` AS `line_quantity`,`sdsl`.`picked_quantity` AS `picked_quantity`,`sdsl`.`shipped_quantity` AS `shipped_quantity`,`sdsl`.`unit_price` AS `unit_price`,`sdsl`.`line_price` AS `line_price`,`sdsl`.`line_status` AS `line_status`,`sdsl`.`requested_date` AS `requested_date`,`sdsl`.`promise_date` AS `promise_date`,`sdsl`.`schedule_ship_date` AS `schedule_ship_date`,`sdsl`.`actual_ship_date` AS `actual_ship_date`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`org`.`org` AS `org`,`sdsl`.`shipping_org_id` AS `shipping_org_id`,`sdsl`.`created_by` AS `created_by`,`sdsl`.`creation_date` AS `creation_date`,`sdsl`.`last_update_by` AS `last_update_by`,`sdsl`.`last_update_date` AS `last_update_date`,`ship_address`.`address` AS `address`,`ship_address`.`country` AS `country`,`ship_address`.`postal_code` AS `postal_code`,`ship_address`.`phone` AS `phone`,`ship_address`.`email` AS `email`,`ship_address`.`website` AS `website`,`bill_address`.`address` AS `address_b`,`bill_address`.`country` AS `country_b`,`bill_address`.`postal_code` AS `postal_code_b`,`bill_address`.`phone` AS `phone_b`,`bill_address`.`email` AS `email_b`,`bill_address`.`website` AS `website_b`,concat(`hre`.`last_name`,', ',`hre`.`first_name`) AS `sales_person` from ((((((((`sd_delivery_header` `sddh` join `sd_delivery_line` `sddl`) join `ar_customer`) join `item`) join `org`) join `address` `ship_address`) join `address` `bill_address`) join ((`sd_so_header` `sdsh` left join `hr_employee` `hre` on((`sdsh`.`hr_employee_id` = `hre`.`hr_employee_id`))) left join `ar_customer_site` on((`sdsh`.`ar_customer_site_id` = `ar_customer_site`.`ar_customer_site_id`)))) join `sd_so_line` `sdsl`) where ((`sdsh`.`sd_so_header_id` = `sdsl`.`sd_so_header_id`) and (`sdsh`.`ar_customer_id` = `ar_customer`.`ar_customer_id`) and (`sdsl`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `sdsl`.`shipping_org_id`) and (`sdsl`.`shipping_org_id` = `org`.`org_id`) and (`sddh`.`sd_delivery_header_id` = `sddl`.`sd_delivery_header_id`) and (`sddl`.`sd_so_line_id` = `sdsl`.`sd_so_line_id`) and (`ship_address`.`address_id` = `sdsh`.`ship_to_id`) and (`bill_address`.`address_id` = `sdsh`.`bill_to_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `sd_delivery_all_v` AS select `sddh`.`sd_delivery_header_id` AS `sd_delivery_header_id`,`sddh`.`delivery_number` AS `delivery_number`,`sddh`.`carrier` AS `carrier`,`sddh`.`vehicle_number` AS `vehicle_number`,`sddh`.`handling_instruction` AS `handling_instruction`,`sddl`.`shipped_quantity` AS `delivery_shipped_quantity`,`sddl`.`delivery_status` AS `delivery_status`,`sdsh`.`sd_so_header_id` AS `sd_so_header_id`,`sdsh`.`bu_org_id` AS `bu_org_id`,`sdsh`.`document_type` AS `document_type`,`sdsh`.`so_number` AS `so_number`,`sdsh`.`ar_customer_id` AS `ar_customer_id`,`sdsh`.`ship_to_id` AS `ship_to_id`,`sdsh`.`bill_to_id` AS `bill_to_id`,`sdsh`.`ar_customer_site_id` AS `ar_customer_site_id`,`sdsh`.`hr_employee_id` AS `hr_employee_id`,`sdsh`.`doc_currency` AS `doc_currency`,`sdsh`.`header_amount` AS `header_amount`,`sdsh`.`so_status` AS `so_status`,`sdsh`.`payment_term_id` AS `payment_term_id`,`ar_customer`.`customer_name` AS `customer_name`,`ar_customer`.`customer_number` AS `customer_number`,`ar_customer_site`.`customer_site_name` AS `customer_site_name`,`ar_customer_site`.`customer_site_number` AS `customer_site_number`,`sdsl`.`sd_so_line_id` AS `sd_so_line_id`,`sdsl`.`line_type` AS `line_type`,`sdsl`.`line_number` AS `line_number`,`sdsl`.`item_id_m` AS `item_id_m`,`sdsl`.`kit_cb` AS `kit_cb`,`sdsl`.`kit_configured_cb` AS `kit_configured_cb`,`sdsl`.`bom_config_header_id` AS `bom_config_header_id`,`sdsl`.`wip_wo_header_id` AS `wip_wo_header_id`,`sdsl`.`item_description` AS `item_description`,`sdsl`.`line_description` AS `line_description`,`sdsl`.`line_quantity` AS `line_quantity`,`sdsl`.`picked_quantity` AS `picked_quantity`,`sdsl`.`shipped_quantity` AS `shipped_quantity`,`sdsl`.`unit_price` AS `unit_price`,`sdsl`.`line_price` AS `line_price`,`sdsl`.`line_status` AS `line_status`,`sdsl`.`requested_date` AS `requested_date`,`sdsl`.`promise_date` AS `promise_date`,`sdsl`.`schedule_ship_date` AS `schedule_ship_date`,`sdsl`.`actual_ship_date` AS `actual_ship_date`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`org`.`org` AS `org`,`sdsl`.`shipping_org_id` AS `shipping_org_id`,`sdsl`.`created_by` AS `created_by`,`sdsl`.`creation_date` AS `creation_date`,`sdsl`.`last_update_by` AS `last_update_by`,`sdsl`.`last_update_date` AS `last_update_date`,`ship_address`.`address` AS `address`,`ship_address`.`country` AS `country`,`ship_address`.`postal_code` AS `postal_code`,`ship_address`.`phone` AS `phone`,`ship_address`.`email` AS `email`,`ship_address`.`website` AS `website`,`bill_address`.`address` AS `address_b`,`bill_address`.`country` AS `country_b`,`bill_address`.`postal_code` AS `postal_code_b`,`bill_address`.`phone` AS `phone_b`,`bill_address`.`email` AS `email_b`,`bill_address`.`website` AS `website_b`,concat(`hre`.`last_name`,', ',`hre`.`first_name`) AS `sales_person` from ((((((((`sd_delivery_header` `sddh` join `sd_delivery_line` `sddl`) join `ar_customer`) join `item`) join `org`) join `address` `ship_address`) join `address` `bill_address`) join ((`sd_so_header` `sdsh` left join `hr_employee` `hre` on((`sdsh`.`hr_employee_id` = `hre`.`hr_employee_id`))) left join `ar_customer_site` on((`sdsh`.`ar_customer_site_id` = `ar_customer_site`.`ar_customer_site_id`)))) join `sd_so_line` `sdsl`) where ((`sdsh`.`sd_so_header_id` = `sdsl`.`sd_so_header_id`) and (`sdsh`.`ar_customer_id` = `ar_customer`.`ar_customer_id`) and (`sdsl`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `sdsl`.`shipping_org_id`) and (`sdsl`.`shipping_org_id` = `org`.`org_id`) and (`sddh`.`sd_delivery_header_id` = `sddl`.`sd_delivery_header_id`) and (`sddl`.`sd_so_line_id` = `sdsl`.`sd_so_line_id`) and (`ship_address`.`address_id` = `sdsh`.`ship_to_id`) and (`bill_address`.`address_id` = `sdsh`.`bill_to_id`)) ; -- -------------------------------------------------------- @@ -38483,7 +37904,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `sd_delivery_all_v` AS sel -- DROP TABLE IF EXISTS `sd_pick_list_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `sd_pick_list_v` AS select `sdsh`.`sd_so_header_id` AS `sd_so_header_id`,`sdsh`.`bu_org_id` AS `bu_org_id`,`sdsh`.`document_type` AS `document_type`,`sdsh`.`so_number` AS `so_number`,`sdsh`.`ar_customer_id` AS `ar_customer_id`,`sdsh`.`ar_customer_site_id` AS `ar_customer_site_id`,`sdsh`.`hr_employee_id` AS `hr_employee_id`,`sdsh`.`doc_currency` AS `doc_currency`,`sdsh`.`header_amount` AS `header_amount`,`sdsh`.`so_status` AS `so_status`,`sdsh`.`payment_term_id` AS `payment_term_id`,`osv`.`onhand` AS `onhand`,`ar_customer`.`customer_name` AS `customer_name`,`ar_customer`.`customer_number` AS `customer_number`,`ar_customer_site`.`customer_site_name` AS `customer_site_name`,`ar_customer_site`.`customer_site_number` AS `customer_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`sdsl`.`sd_so_line_id` AS `sd_so_line_id`,`sdsl`.`line_type` AS `line_type`,`sdsl`.`line_number` AS `line_number`,`sdsl`.`item_id_m` AS `item_id_m`,`sdsl`.`kit_cb` AS `kit_cb`,`sdsl`.`kit_configured_cb` AS `kit_configured_cb`,`sdsl`.`bom_config_header_id` AS `bom_config_header_id`,`sdsl`.`wip_wo_header_id` AS `wip_wo_header_id`,`sdsl`.`item_description` AS `item_description`,`sdsl`.`line_description` AS `line_description`,`sdsl`.`line_quantity` AS `line_quantity`,`sdsl`.`picked_quantity` AS `picked_quantity`,`sdsl`.`shipped_quantity` AS `shipped_quantity`,`sdsl`.`unit_price` AS `unit_price`,`sdsl`.`line_price` AS `line_price`,`sdsl`.`line_status` AS `line_status`,`ssc`.`staging_subinventory_id` AS `staging_subinventory_id`,`ssc`.`staging_locator_id` AS `staging_locator_id`,`subinventory`.`subinventory` AS `staging_subinventory`,`locator`.`locator` AS `staging_locator`,`sdsl`.`requested_date` AS `requested_date`,`sdsl`.`promise_date` AS `promise_date`,`sdsl`.`schedule_ship_date` AS `schedule_ship_date`,`sdsl`.`actual_ship_date` AS `actual_ship_date`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`item`.`serial_generation` AS `serial_generation`,`item`.`lot_generation` AS `lot_generation`,`org`.`org` AS `org`,`sdsl`.`shipping_org_id` AS `shipping_org_id`,`sdsl`.`created_by` AS `created_by`,`sdsl`.`creation_date` AS `creation_date`,`sdsl`.`last_update_by` AS `last_update_by`,`sdsl`.`last_update_date` AS `last_update_date` from (((((((`sd_so_header` `sdsh` left join `payment_term` on((`sdsh`.`payment_term_id` = `payment_term`.`payment_term_id`))) join `ar_customer`) join `ar_customer_site`) join (`sd_so_line` `sdsl` left join `onhand_summary_v` `osv` on(((`osv`.`item_id_m` = `sdsl`.`item_id_m`) and (`osv`.`org_id` = `sdsl`.`shipping_org_id`))))) join `item`) join `org`) join ((`sd_shipping_control` `ssc` left join `subinventory` on((`subinventory`.`subinventory_id` = `ssc`.`staging_subinventory_id`))) left join `locator` on((`locator`.`locator_id` = `ssc`.`staging_locator_id`)))) where ((`sdsh`.`sd_so_header_id` = `sdsl`.`sd_so_header_id`) and (`sdsh`.`ar_customer_id` = `ar_customer`.`ar_customer_id`) and (`sdsh`.`ar_customer_site_id` = `ar_customer_site`.`ar_customer_site_id`) and (`sdsl`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `sdsl`.`shipping_org_id`) and (`sdsl`.`shipping_org_id` = `org`.`org_id`) and (`ssc`.`org_id` = `sdsl`.`shipping_org_id`) and (`sdsh`.`so_status` = 'BOOKED') and (`sdsl`.`line_status` in ('AWAITING_PICKING','PARTIAL_PICKED','PARTIAL_SHIPPED'))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `sd_pick_list_v` AS select `sdsh`.`sd_so_header_id` AS `sd_so_header_id`,`sdsh`.`bu_org_id` AS `bu_org_id`,`sdsh`.`document_type` AS `document_type`,`sdsh`.`so_number` AS `so_number`,`sdsh`.`ar_customer_id` AS `ar_customer_id`,`sdsh`.`ar_customer_site_id` AS `ar_customer_site_id`,`sdsh`.`hr_employee_id` AS `hr_employee_id`,`sdsh`.`doc_currency` AS `doc_currency`,`sdsh`.`header_amount` AS `header_amount`,`sdsh`.`so_status` AS `so_status`,`sdsh`.`payment_term_id` AS `payment_term_id`,`osv`.`onhand` AS `onhand`,`ar_customer`.`customer_name` AS `customer_name`,`ar_customer`.`customer_number` AS `customer_number`,`ar_customer_site`.`customer_site_name` AS `customer_site_name`,`ar_customer_site`.`customer_site_number` AS `customer_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`sdsl`.`sd_so_line_id` AS `sd_so_line_id`,`sdsl`.`line_type` AS `line_type`,`sdsl`.`line_number` AS `line_number`,`sdsl`.`item_id_m` AS `item_id_m`,`sdsl`.`kit_cb` AS `kit_cb`,`sdsl`.`kit_configured_cb` AS `kit_configured_cb`,`sdsl`.`bom_config_header_id` AS `bom_config_header_id`,`sdsl`.`wip_wo_header_id` AS `wip_wo_header_id`,`sdsl`.`item_description` AS `item_description`,`sdsl`.`line_description` AS `line_description`,`sdsl`.`line_quantity` AS `line_quantity`,`sdsl`.`picked_quantity` AS `picked_quantity`,`sdsl`.`shipped_quantity` AS `shipped_quantity`,`sdsl`.`unit_price` AS `unit_price`,`sdsl`.`line_price` AS `line_price`,`sdsl`.`line_status` AS `line_status`,`ssc`.`staging_subinventory_id` AS `staging_subinventory_id`,`ssc`.`staging_locator_id` AS `staging_locator_id`,`subinventory`.`subinventory` AS `staging_subinventory`,`locator`.`locator` AS `staging_locator`,`sdsl`.`requested_date` AS `requested_date`,`sdsl`.`promise_date` AS `promise_date`,`sdsl`.`schedule_ship_date` AS `schedule_ship_date`,`sdsl`.`actual_ship_date` AS `actual_ship_date`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`item`.`serial_generation` AS `serial_generation`,`item`.`lot_generation` AS `lot_generation`,`org`.`org` AS `org`,`sdsl`.`shipping_org_id` AS `shipping_org_id`,`sdsl`.`created_by` AS `created_by`,`sdsl`.`creation_date` AS `creation_date`,`sdsl`.`last_update_by` AS `last_update_by`,`sdsl`.`last_update_date` AS `last_update_date` from (((((((`sd_so_header` `sdsh` left join `payment_term` on((`sdsh`.`payment_term_id` = `payment_term`.`payment_term_id`))) join `ar_customer`) join `ar_customer_site`) join (`sd_so_line` `sdsl` left join `onhand_summary_v` `osv` on(((`osv`.`item_id_m` = `sdsl`.`item_id_m`) and (`osv`.`org_id` = `sdsl`.`shipping_org_id`))))) join `item`) join `org`) join ((`sd_shipping_control` `ssc` left join `subinventory` on((`subinventory`.`subinventory_id` = `ssc`.`staging_subinventory_id`))) left join `locator` on((`locator`.`locator_id` = `ssc`.`staging_locator_id`)))) where ((`sdsh`.`sd_so_header_id` = `sdsl`.`sd_so_header_id`) and (`sdsh`.`ar_customer_id` = `ar_customer`.`ar_customer_id`) and (`sdsh`.`ar_customer_site_id` = `ar_customer_site`.`ar_customer_site_id`) and (`sdsl`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `sdsl`.`shipping_org_id`) and (`sdsl`.`shipping_org_id` = `org`.`org_id`) and (`ssc`.`org_id` = `sdsl`.`shipping_org_id`) and (`sdsh`.`so_status` = 'BOOKED') and (`sdsl`.`line_status` in ('AWAITING_PICKING','PARTIAL_PICKED','PARTIAL_SHIPPED'))) ; -- -------------------------------------------------------- @@ -38492,7 +37913,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `sd_pick_list_v` AS select -- DROP TABLE IF EXISTS `sd_sales_documents_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `sd_sales_documents_v` AS select `sd_lead`.`sd_lead_id` AS `document_id`,`sd_lead`.`lead_number` AS `docuemnt_number`,`sd_lead`.`sales_team` AS `sales_team`,`sd_lead`.`creation_date` AS `creation_date`,'lead' AS `document_type`,`sd_lead`.`status` AS `status` from `sd_lead` union select `sd_opportunity`.`sd_opportunity_id` AS `document_id`,`sd_opportunity`.`opportunity_number` AS `docuemnt_number`,`sd_opportunity`.`sales_team` AS `sales_team`,`sd_opportunity`.`creation_date` AS `creation_date`,'opportunity' AS `document_type`,`sd_opportunity`.`status` AS `status` from `sd_opportunity` union select `sd_quote_header`.`sd_quote_header_id` AS `document_id`,`sd_quote_header`.`quote_number` AS `docuemnt_number`,'Quote' AS `sales_team`,`sd_quote_header`.`creation_date` AS `creation_date`,'quote' AS `document_type`,`sd_quote_header`.`status` AS `status` from `sd_quote_header` union select `sd_so_header`.`sd_so_header_id` AS `document_id`,`sd_so_header`.`so_number` AS `docuemnt_number`,'SO' AS `sales_team`,`sd_so_header`.`creation_date` AS `creation_date`,'Sales Order' AS `document_type`,`sd_so_header`.`so_status` AS `status` from `sd_so_header`; +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `sd_sales_documents_v` AS select `sd_lead`.`sd_lead_id` AS `document_id`,`sd_lead`.`lead_number` AS `docuemnt_number`,`sd_lead`.`sales_team` AS `sales_team`,`sd_lead`.`creation_date` AS `creation_date`,'lead' AS `document_type`,`sd_lead`.`status` AS `status` from `sd_lead` union select `sd_opportunity`.`sd_opportunity_id` AS `document_id`,`sd_opportunity`.`opportunity_number` AS `docuemnt_number`,`sd_opportunity`.`sales_team` AS `sales_team`,`sd_opportunity`.`creation_date` AS `creation_date`,'opportunity' AS `document_type`,`sd_opportunity`.`status` AS `status` from `sd_opportunity` union select `sd_quote_header`.`sd_quote_header_id` AS `document_id`,`sd_quote_header`.`quote_number` AS `docuemnt_number`,'Quote' AS `sales_team`,`sd_quote_header`.`creation_date` AS `creation_date`,'quote' AS `document_type`,`sd_quote_header`.`status` AS `status` from `sd_quote_header` union select `sd_so_header`.`sd_so_header_id` AS `document_id`,`sd_so_header`.`so_number` AS `docuemnt_number`,'SO' AS `sales_team`,`sd_so_header`.`creation_date` AS `creation_date`,'Sales Order' AS `document_type`,`sd_so_header`.`so_status` AS `status` from `sd_so_header` ; -- -------------------------------------------------------- @@ -38501,7 +37922,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `sd_sales_documents_v` AS -- DROP TABLE IF EXISTS `sd_so_all_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `sd_so_all_v` AS select `sdsh`.`sd_so_header_id` AS `sd_so_header_id`,`sdsh`.`bu_org_id` AS `bu_org_id`,`sdsh`.`document_type` AS `document_type`,`sdsh`.`so_number` AS `so_number`,`sdsh`.`ar_customer_id` AS `ar_customer_id`,`sdsh`.`ar_customer_site_id` AS `ar_customer_site_id`,`sdsh`.`hr_employee_id` AS `hr_employee_id`,`sdsh`.`doc_currency` AS `doc_currency`,`sdsh`.`header_amount` AS `header_amount`,`sdsh`.`so_status` AS `so_status`,`sdsh`.`payment_term_id` AS `payment_term_id`,`osv`.`onhand` AS `onhand`,`ar_customer`.`customer_name` AS `customer_name`,`ar_customer`.`customer_number` AS `customer_number`,`ar_customer_site`.`customer_site_name` AS `customer_site_name`,`ar_customer_site`.`customer_site_number` AS `customer_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`sdsl`.`sd_so_line_id` AS `sd_so_line_id`,`sdsl`.`line_type` AS `line_type`,`sdsl`.`line_number` AS `line_number`,`sdsl`.`item_id_m` AS `item_id_m`,`sdsl`.`kit_cb` AS `kit_cb`,`sdsl`.`kit_configured_cb` AS `kit_configured_cb`,`sdsl`.`bom_config_header_id` AS `bom_config_header_id`,`sdsl`.`wip_wo_header_id` AS `wip_wo_header_id`,`sdsl`.`item_description` AS `item_description`,`sdsl`.`line_description` AS `line_description`,`sdsl`.`line_quantity` AS `line_quantity`,`sdsl`.`picked_quantity` AS `picked_quantity`,`sdsl`.`shipped_quantity` AS `shipped_quantity`,`sdsl`.`unit_price` AS `unit_price`,`sdsl`.`line_price` AS `line_price`,`sdsl`.`line_status` AS `line_status`,`ssc`.`staging_subinventory_id` AS `staging_subinventory_id`,`ssc`.`staging_locator_id` AS `staging_locator_id`,`subinventory`.`subinventory` AS `staging_subinventory`,`locator`.`locator` AS `staging_locator`,`sdsl`.`requested_date` AS `requested_date`,`sdsl`.`promise_date` AS `promise_date`,`sdsl`.`schedule_ship_date` AS `schedule_ship_date`,`sdsl`.`actual_ship_date` AS `actual_ship_date`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`org`.`org` AS `org`,`sdsl`.`shipping_org_id` AS `shipping_org_id`,`sdsl`.`created_by` AS `created_by`,`sdsl`.`creation_date` AS `creation_date`,`sdsl`.`last_update_by` AS `last_update_by`,`sdsl`.`last_update_date` AS `last_update_date`,concat(`hre`.`last_name`,', ',`hre`.`first_name`) AS `sales_person` from ((((((((`sd_so_header` `sdsh` left join `hr_employee` `hre` on((`sdsh`.`hr_employee_id` = `hre`.`hr_employee_id`))) left join `payment_term` on((`sdsh`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `ar_customer_site` on((`sdsh`.`ar_customer_site_id` = `ar_customer_site`.`ar_customer_site_id`))) join `ar_customer`) join (`sd_so_line` `sdsl` left join `onhand_summary_v` `osv` on(((`osv`.`item_id_m` = `sdsl`.`item_id_m`) and (`osv`.`org_id` = `sdsl`.`shipping_org_id`))))) join `item`) join `org`) join ((`sd_shipping_control` `ssc` left join `subinventory` on((`subinventory`.`subinventory_id` = `ssc`.`staging_subinventory_id`))) left join `locator` on((`locator`.`locator_id` = `ssc`.`staging_locator_id`)))) where ((`sdsh`.`sd_so_header_id` = `sdsl`.`sd_so_header_id`) and (`sdsh`.`ar_customer_id` = `ar_customer`.`ar_customer_id`) and (`sdsl`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `sdsl`.`shipping_org_id`) and (`sdsl`.`shipping_org_id` = `org`.`org_id`) and (`ssc`.`org_id` = `sdsl`.`shipping_org_id`)); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `sd_so_all_v` AS select `sdsh`.`sd_so_header_id` AS `sd_so_header_id`,`sdsh`.`bu_org_id` AS `bu_org_id`,`sdsh`.`document_type` AS `document_type`,`sdsh`.`so_number` AS `so_number`,`sdsh`.`ar_customer_id` AS `ar_customer_id`,`sdsh`.`ar_customer_site_id` AS `ar_customer_site_id`,`sdsh`.`hr_employee_id` AS `hr_employee_id`,`sdsh`.`doc_currency` AS `doc_currency`,`sdsh`.`header_amount` AS `header_amount`,`sdsh`.`so_status` AS `so_status`,`sdsh`.`payment_term_id` AS `payment_term_id`,`osv`.`onhand` AS `onhand`,`ar_customer`.`customer_name` AS `customer_name`,`ar_customer`.`customer_number` AS `customer_number`,`ar_customer_site`.`customer_site_name` AS `customer_site_name`,`ar_customer_site`.`customer_site_number` AS `customer_site_number`,`payment_term`.`payment_term` AS `payment_term`,`payment_term`.`description` AS `payment_term_description`,`sdsl`.`sd_so_line_id` AS `sd_so_line_id`,`sdsl`.`line_type` AS `line_type`,`sdsl`.`line_number` AS `line_number`,`sdsl`.`item_id_m` AS `item_id_m`,`sdsl`.`kit_cb` AS `kit_cb`,`sdsl`.`kit_configured_cb` AS `kit_configured_cb`,`sdsl`.`bom_config_header_id` AS `bom_config_header_id`,`sdsl`.`wip_wo_header_id` AS `wip_wo_header_id`,`sdsl`.`item_description` AS `item_description`,`sdsl`.`line_description` AS `line_description`,`sdsl`.`line_quantity` AS `line_quantity`,`sdsl`.`picked_quantity` AS `picked_quantity`,`sdsl`.`shipped_quantity` AS `shipped_quantity`,`sdsl`.`unit_price` AS `unit_price`,`sdsl`.`line_price` AS `line_price`,`sdsl`.`line_status` AS `line_status`,`ssc`.`staging_subinventory_id` AS `staging_subinventory_id`,`ssc`.`staging_locator_id` AS `staging_locator_id`,`subinventory`.`subinventory` AS `staging_subinventory`,`locator`.`locator` AS `staging_locator`,`sdsl`.`requested_date` AS `requested_date`,`sdsl`.`promise_date` AS `promise_date`,`sdsl`.`schedule_ship_date` AS `schedule_ship_date`,`sdsl`.`actual_ship_date` AS `actual_ship_date`,`item`.`item_number` AS `item_number`,`item`.`uom_id` AS `uom_id`,`item`.`item_status` AS `item_status`,`org`.`org` AS `org`,`sdsl`.`shipping_org_id` AS `shipping_org_id`,`sdsl`.`created_by` AS `created_by`,`sdsl`.`creation_date` AS `creation_date`,`sdsl`.`last_update_by` AS `last_update_by`,`sdsl`.`last_update_date` AS `last_update_date`,concat(`hre`.`last_name`,', ',`hre`.`first_name`) AS `sales_person` from ((((((((`sd_so_header` `sdsh` left join `hr_employee` `hre` on((`sdsh`.`hr_employee_id` = `hre`.`hr_employee_id`))) left join `payment_term` on((`sdsh`.`payment_term_id` = `payment_term`.`payment_term_id`))) left join `ar_customer_site` on((`sdsh`.`ar_customer_site_id` = `ar_customer_site`.`ar_customer_site_id`))) join `ar_customer`) join (`sd_so_line` `sdsl` left join `onhand_summary_v` `osv` on(((`osv`.`item_id_m` = `sdsl`.`item_id_m`) and (`osv`.`org_id` = `sdsl`.`shipping_org_id`))))) join `item`) join `org`) join ((`sd_shipping_control` `ssc` left join `subinventory` on((`subinventory`.`subinventory_id` = `ssc`.`staging_subinventory_id`))) left join `locator` on((`locator`.`locator_id` = `ssc`.`staging_locator_id`)))) where ((`sdsh`.`sd_so_header_id` = `sdsl`.`sd_so_header_id`) and (`sdsh`.`ar_customer_id` = `ar_customer`.`ar_customer_id`) and (`sdsl`.`item_id_m` = `item`.`item_id_m`) and (`item`.`org_id` = `sdsl`.`shipping_org_id`) and (`sdsl`.`shipping_org_id` = `org`.`org_id`) and (`ssc`.`org_id` = `sdsl`.`shipping_org_id`)) ; -- -------------------------------------------------------- @@ -38510,7 +37931,7 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `sd_so_all_v` AS select `s -- DROP TABLE IF EXISTS `supplier_all_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `supplier_all_v` AS select `su`.`supplier_id` AS `supplier_id`,`su`.`supplier_number` AS `supplier_number`,`su`.`supplier_name` AS `supplier_name`,`ss`.`supplier_site_id` AS `supplier_site_id`,`ss`.`supplier_site_number` AS `supplier_site_number`,`ss`.`supplier_site_name` AS `supplier_site_name`,`su`.`supplier_type` AS `supplier_type`,`su`.`tax_country` AS `tax_country`,`su`.`created_by` AS `created_by`,`su`.`ar_customer_id` AS `ar_customer_id`,`su`.`status` AS `status`,`su`.`creation_date` AS `creation_date`,`su`.`last_update_by` AS `last_update_by`,`su`.`last_update_date` AS `last_update_date`,`sb`.`supplier_bu_id` AS `supplier_bu_id`,`sb`.`org_id` AS `org_id`,`sb`.`liability_account_id` AS `liability_account_id`,`sb`.`payable_account_id` AS `payable_account_id`,`sb`.`payment_discount_account_id` AS `payment_discount_account_id`,`sb`.`pre_payment_account_id` AS `pre_payment_account_id`,`ss`.`site_tax_country` AS `site_tax_country`,`ss`.`site_tax_reg_no` AS `site_tax_reg_no`,`ss`.`status` AS `site_status`,`ss`.`currency` AS `currency`,`ss`.`payment_term_id` AS `payment_term_id` from ((`supplier` `su` left join `supplier_site` `ss` on((`ss`.`supplier_id` = `su`.`supplier_id`))) left join `supplier_bu` `sb` on((`su`.`supplier_id` = `sb`.`supplier_id`))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `supplier_all_v` AS select `su`.`supplier_id` AS `supplier_id`,`su`.`supplier_number` AS `supplier_number`,`su`.`supplier_name` AS `supplier_name`,`ss`.`supplier_site_id` AS `supplier_site_id`,`ss`.`supplier_site_number` AS `supplier_site_number`,`ss`.`supplier_site_name` AS `supplier_site_name`,`su`.`supplier_type` AS `supplier_type`,`su`.`tax_country` AS `tax_country`,`su`.`created_by` AS `created_by`,`su`.`ar_customer_id` AS `ar_customer_id`,`su`.`status` AS `status`,`su`.`creation_date` AS `creation_date`,`su`.`last_update_by` AS `last_update_by`,`su`.`last_update_date` AS `last_update_date`,`sb`.`supplier_bu_id` AS `supplier_bu_id`,`sb`.`org_id` AS `org_id`,`sb`.`liability_account_id` AS `liability_account_id`,`sb`.`payable_account_id` AS `payable_account_id`,`sb`.`payment_discount_account_id` AS `payment_discount_account_id`,`sb`.`pre_payment_account_id` AS `pre_payment_account_id`,`ss`.`site_tax_country` AS `site_tax_country`,`ss`.`site_tax_reg_no` AS `site_tax_reg_no`,`ss`.`status` AS `site_status`,`ss`.`currency` AS `currency`,`ss`.`payment_term_id` AS `payment_term_id` from ((`supplier` `su` left join `supplier_site` `ss` on((`ss`.`supplier_id` = `su`.`supplier_id`))) left join `supplier_bu` `sb` on((`su`.`supplier_id` = `sb`.`supplier_id`))) ; -- -------------------------------------------------------- @@ -38519,23 +37940,5764 @@ CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `supplier_all_v` AS select -- DROP TABLE IF EXISTS `wip_wo_routing_v`; -CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `wip_wo_routing_v` AS select `item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`uom_id` AS `uom_id`,`wwh`.`item_id_m` AS `item_id_m`,`wwh`.`wo_number` AS `wo_number`,`wwh`.`org_id` AS `org_id`,`wwh`.`wip_accounting_group_id` AS `wip_accounting_group_id`,`wwh`.`quantity` AS `quantity`,`wwh`.`completed_quantity` AS `completed_quantity`,`wwrl`.`routing_sequence` AS `routing_sequence`,`wwrl`.`department_id` AS `department_id`,`wwrd`.`wip_wo_routing_detail_id` AS `wip_wo_routing_detail_id`,`wwrd`.`wip_wo_routing_line_id` AS `wip_wo_routing_line_id`,`wwrd`.`wip_wo_header_id` AS `wip_wo_header_id`,`wwrd`.`resource_sequence` AS `resource_sequence`,`wwrd`.`resource_id` AS `resource_id`,`wwrd`.`resource_usage` AS `resource_usage`,`wwrd`.`resource_schedule` AS `resource_schedule`,`wwrd`.`required_quantity` AS `required_quantity`,`wwrd`.`applied_quantity` AS `applied_quantity`,`wwrd`.`charge_type` AS `charge_type` from (((`wip_wo_routing_detail` `wwrd` left join `wip_wo_routing_line` `wwrl` on((`wwrl`.`wip_wo_routing_line_id` = `wwrd`.`wip_wo_routing_line_id`))) left join `wip_wo_header` `wwh` on((`wwh`.`wip_wo_header_id` = `wwrd`.`wip_wo_header_id`))) left join `item` on(((`item`.`item_id_m` = `wwh`.`item_id_m`) and (`item`.`org_id` = `wwh`.`org_id`)))); +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `wip_wo_routing_v` AS select `item`.`item_number` AS `item_number`,`item`.`item_description` AS `item_description`,`item`.`uom_id` AS `uom_id`,`wwh`.`item_id_m` AS `item_id_m`,`wwh`.`wo_number` AS `wo_number`,`wwh`.`org_id` AS `org_id`,`wwh`.`wip_accounting_group_id` AS `wip_accounting_group_id`,`wwh`.`quantity` AS `quantity`,`wwh`.`completed_quantity` AS `completed_quantity`,`wwrl`.`routing_sequence` AS `routing_sequence`,`wwrl`.`department_id` AS `department_id`,`wwrd`.`wip_wo_routing_detail_id` AS `wip_wo_routing_detail_id`,`wwrd`.`wip_wo_routing_line_id` AS `wip_wo_routing_line_id`,`wwrd`.`wip_wo_header_id` AS `wip_wo_header_id`,`wwrd`.`resource_sequence` AS `resource_sequence`,`wwrd`.`resource_id` AS `resource_id`,`wwrd`.`resource_usage` AS `resource_usage`,`wwrd`.`resource_schedule` AS `resource_schedule`,`wwrd`.`required_quantity` AS `required_quantity`,`wwrd`.`applied_quantity` AS `applied_quantity`,`wwrd`.`charge_type` AS `charge_type` from (((`wip_wo_routing_detail` `wwrd` left join `wip_wo_routing_line` `wwrl` on((`wwrl`.`wip_wo_routing_line_id` = `wwrd`.`wip_wo_routing_line_id`))) left join `wip_wo_header` `wwh` on((`wwh`.`wip_wo_header_id` = `wwrd`.`wip_wo_header_id`))) left join `item` on(((`item`.`item_id_m` = `wwh`.`item_id_m`) and (`item`.`org_id` = `wwh`.`org_id`)))) ; -- --- Constraints for dumped tables +-- Indexes for dumped tables -- -- --- Constraints for table `coa_combination` +-- Indexes for table `address` +-- +ALTER TABLE `address` + ADD PRIMARY KEY (`address_id`), + ADD UNIQUE KEY `name` (`address_name`), + ADD UNIQUE KEY `address` (`address_name`), + ADD UNIQUE KEY `address_name` (`address_name`); + +-- +-- Indexes for table `address_reference` +-- +ALTER TABLE `address_reference` + ADD PRIMARY KEY (`address_reference_id`), + ADD UNIQUE KEY `address_id` (`address_id`,`reference_table`,`reference_id`); + +-- +-- Indexes for table `adm_task_status` +-- +ALTER TABLE `adm_task_status` + ADD PRIMARY KEY (`adm_task_status_id`); + +-- +-- Indexes for table `adm_task_template_header` +-- +ALTER TABLE `adm_task_template_header` + ADD PRIMARY KEY (`adm_task_template_header_id`); + +-- +-- Indexes for table `adm_task_template_line` +-- +ALTER TABLE `adm_task_template_line` + ADD PRIMARY KEY (`adm_task_template_line_id`); + +-- +-- Indexes for table `adm_task_type` +-- +ALTER TABLE `adm_task_type` + ADD PRIMARY KEY (`adm_task_type_id`); + +-- +-- Indexes for table `am_activity_reference` +-- +ALTER TABLE `am_activity_reference` + ADD PRIMARY KEY (`am_activity_reference_id`), + ADD UNIQUE KEY `asset_number` (`am_asset_id`), + ADD UNIQUE KEY `tag_number` (`priority`), + ADD UNIQUE KEY `asset_number_2` (`am_asset_id`,`start_date`); + +-- +-- Indexes for table `am_asset` +-- +ALTER TABLE `am_asset` + ADD PRIMARY KEY (`am_asset_id`), + ADD UNIQUE KEY `asset_number` (`asset_number`), + ADD UNIQUE KEY `tag_number` (`tag_number`), + ADD UNIQUE KEY `asset_number_2` (`asset_number`,`serial_number`); + +-- +-- Indexes for table `am_maintenance_schedule` +-- +ALTER TABLE `am_maintenance_schedule` + ADD PRIMARY KEY (`am_maintenance_schedule_id`), + ADD UNIQUE KEY `schedule_name` (`schedule_name`,`org_id`); + +-- +-- Indexes for table `am_meter` +-- +ALTER TABLE `am_meter` + ADD PRIMARY KEY (`am_meter_id`), + ADD UNIQUE KEY `base_interval_days` (`type`,`from_date`); + +-- +-- Indexes for table `am_ms_activity_reference` +-- +ALTER TABLE `am_ms_activity_reference` + ADD PRIMARY KEY (`am_ms_activity_reference_id`), + ADD UNIQUE KEY `am_maintenance_schedule_id` (`am_maintenance_schedule_id`,`activity_item_id_m`); + +-- +-- Indexes for table `am_ms_calendar_date` +-- +ALTER TABLE `am_ms_calendar_date` + ADD PRIMARY KEY (`am_ms_calendar_date_id`), + ADD UNIQUE KEY `am_maintenance_schedule_id` (`am_maintenance_schedule_id`,`date`); + +-- +-- Indexes for table `am_ms_date_rule` +-- +ALTER TABLE `am_ms_date_rule` + ADD PRIMARY KEY (`am_ms_date_rule_id`), + ADD UNIQUE KEY `base_interval_days` (`base_interval_days`,`from_date`); + +-- +-- Indexes for table `am_ms_meter_rule` +-- +ALTER TABLE `am_ms_meter_rule` + ADD PRIMARY KEY (`am_ms_meter_rule_id`), + ADD UNIQUE KEY `am_maintenance_schedule_id` (`am_maintenance_schedule_id`,`am_meter_id`); + +-- +-- Indexes for table `am_planned_wo` +-- +ALTER TABLE `am_planned_wo` + ADD PRIMARY KEY (`am_wo_header_id`); + +-- +-- Indexes for table `am_wo_bom` +-- +ALTER TABLE `am_wo_bom` + ADD PRIMARY KEY (`am_wo_bom_id`), + ADD UNIQUE KEY `bom_header_id` (`am_wo_header_id`,`bom_sequence`), + ADD UNIQUE KEY `bom_header_id_2` (`am_wo_header_id`,`routing_sequence`,`component_item_id_m`); + +-- +-- Indexes for table `am_wo_header` +-- +ALTER TABLE `am_wo_header` + ADD PRIMARY KEY (`am_wo_header_id`); + +-- +-- Indexes for table `am_wo_routing_detail` +-- +ALTER TABLE `am_wo_routing_detail` + ADD PRIMARY KEY (`am_wo_routing_detail_id`), + ADD UNIQUE KEY `wip_wo_routing_line_id` (`am_wo_routing_line_id`,`resource_sequence`); + +-- +-- Indexes for table `am_wo_routing_line` +-- +ALTER TABLE `am_wo_routing_line` + ADD PRIMARY KEY (`am_wo_routing_line_id`), + ADD UNIQUE KEY `bom_header_id` (`am_wo_header_id`,`routing_sequence`); + +-- +-- Indexes for table `ap_payable_control` +-- +ALTER TABLE `ap_payable_control` + ADD PRIMARY KEY (`ap_payable_control_id`), + ADD UNIQUE KEY `org` (`org_id`); + +-- +-- Indexes for table `ap_payment_header` +-- +ALTER TABLE `ap_payment_header` + ADD PRIMARY KEY (`ap_payment_header_id`), + ADD UNIQUE KEY `transaction_number` (`payment_number`); + +-- +-- Indexes for table `ap_payment_interface` +-- +ALTER TABLE `ap_payment_interface` + ADD PRIMARY KEY (`ap_payment_interface_id`), + ADD UNIQUE KEY `ap_payment_interface_id` (`ap_payment_interface_id`); + +-- +-- Indexes for table `ap_payment_line` +-- +ALTER TABLE `ap_payment_line` + ADD PRIMARY KEY (`ap_payment_line_id`), + ADD UNIQUE KEY `ap_transaction_header_id` (`ap_payment_header_id`,`line_number`); + +-- +-- Indexes for table `ap_payment_process` +-- +ALTER TABLE `ap_payment_process` + ADD PRIMARY KEY (`ap_payment_process_id`), + ADD UNIQUE KEY `document_type_name` (`payment_process`,`cash_ac_id`); + +-- +-- Indexes for table `ap_payment_terms` +-- +ALTER TABLE `ap_payment_terms` + ADD PRIMARY KEY (`term_id`), + ADD UNIQUE KEY `term_name` (`term_name`); + +-- +-- Indexes for table `ap_transaction_detail` +-- +ALTER TABLE `ap_transaction_detail` + ADD PRIMARY KEY (`ap_transaction_detail_id`); + +-- +-- Indexes for table `ap_transaction_header` +-- +ALTER TABLE `ap_transaction_header` + ADD PRIMARY KEY (`ap_transaction_header_id`), + ADD UNIQUE KEY `transaction_number` (`transaction_number`); + +-- +-- Indexes for table `ap_transaction_line` +-- +ALTER TABLE `ap_transaction_line` + ADD PRIMARY KEY (`ap_transaction_line_id`), + ADD UNIQUE KEY `ap_transaction_header_id` (`ap_transaction_header_id`,`line_number`); + +-- +-- Indexes for table `ar_customer` +-- +ALTER TABLE `ar_customer` + ADD PRIMARY KEY (`ar_customer_id`), + ADD UNIQUE KEY `customer_number` (`customer_number`), + ADD UNIQUE KEY `customer_name` (`customer_name`); + +-- +-- Indexes for table `ar_customer_bu` +-- +ALTER TABLE `ar_customer_bu` + ADD PRIMARY KEY (`ar_customer_bu_id`), + ADD UNIQUE KEY `ar_customer_id` (`ar_customer_id`,`org_id`); + +-- +-- Indexes for table `ar_customer_relation` +-- +ALTER TABLE `ar_customer_relation` + ADD PRIMARY KEY (`ar_customer_relation_id`), + ADD UNIQUE KEY `customer_number` (`ar_customer_id`), + ADD UNIQUE KEY `customer_name` (`org_id`); + +-- +-- Indexes for table `ar_customer_site` +-- +ALTER TABLE `ar_customer_site` + ADD PRIMARY KEY (`ar_customer_site_id`), + ADD UNIQUE KEY `customer_site_number` (`customer_site_number`), + ADD UNIQUE KEY `ar_customer_id` (`ar_customer_id`,`customer_site_name`); + +-- +-- Indexes for table `ar_payment_process` +-- +ALTER TABLE `ar_payment_process` + ADD PRIMARY KEY (`ar_receipt_source_id`), + ADD UNIQUE KEY `document_type_name` (`receipt_source`,`creation_method`); + +-- +-- Indexes for table `ar_receipt_header` +-- +ALTER TABLE `ar_receipt_header` + ADD PRIMARY KEY (`ar_receipt_header_id`), + ADD UNIQUE KEY `transaction_number` (`receipt_number`); + +-- +-- Indexes for table `ar_receipt_interface` +-- +ALTER TABLE `ar_receipt_interface` + ADD PRIMARY KEY (`ar_receipt_interface_id`); + +-- +-- Indexes for table `ar_receipt_line` +-- +ALTER TABLE `ar_receipt_line` + ADD PRIMARY KEY (`ar_receipt_line_id`), + ADD UNIQUE KEY `ar_receipt_header_id` (`ar_receipt_header_id`,`line_number`); + +-- +-- Indexes for table `ar_receipt_source` +-- +ALTER TABLE `ar_receipt_source` + ADD PRIMARY KEY (`ar_receipt_source_id`), + ADD UNIQUE KEY `document_type_name` (`receipt_source`,`creation_method`); + +-- +-- Indexes for table `ar_sales_region` +-- +ALTER TABLE `ar_sales_region` + ADD PRIMARY KEY (`ar_sales_region_id`), + ADD UNIQUE KEY `gl_calendar_id` (`state`,`description`), + ADD UNIQUE KEY `tax_region_name` (`sales_region_name`); + +-- +-- Indexes for table `ar_transaction_detail` +-- +ALTER TABLE `ar_transaction_detail` + ADD PRIMARY KEY (`ar_transaction_detail_id`), + ADD UNIQUE KEY `ar_transaction_line_id` (`ar_transaction_line_id`,`detail_number`); + +-- +-- Indexes for table `ar_transaction_header` +-- +ALTER TABLE `ar_transaction_header` + ADD PRIMARY KEY (`ar_transaction_header_id`), + ADD UNIQUE KEY `transaction_number` (`transaction_number`); + +-- +-- Indexes for table `ar_transaction_interface` +-- +ALTER TABLE `ar_transaction_interface` + ADD PRIMARY KEY (`ar_transaction_interface_id`), + ADD UNIQUE KEY `ap_transaction_header_id` (`ar_transaction_header_id`,`line_number`); + +-- +-- Indexes for table `ar_transaction_line` +-- +ALTER TABLE `ar_transaction_line` + ADD PRIMARY KEY (`ar_transaction_line_id`), + ADD UNIQUE KEY `ap_transaction_header_id` (`ar_transaction_header_id`,`line_number`); + +-- +-- Indexes for table `ar_transaction_source` +-- +ALTER TABLE `ar_transaction_source` + ADD PRIMARY KEY (`ar_transaction_source_id`), + ADD UNIQUE KEY `document_type_name` (`transaction_source`,`source_type`); + +-- +-- Indexes for table `ar_transaction_type` +-- +ALTER TABLE `ar_transaction_type` + ADD PRIMARY KEY (`ar_transaction_type_id`), + ADD UNIQUE KEY `document_type_name` (`ar_transaction_type`,`transaction_class`); + +-- +-- Indexes for table `bc_label_auto_trigger` +-- +ALTER TABLE `bc_label_auto_trigger` + ADD PRIMARY KEY (`bc_label_auto_trigger_id`), + ADD UNIQUE KEY `transaction_type_id` (`transaction_type_id`,`association_level`,`association_level_value`); + +-- +-- Indexes for table `bc_label_format_header` +-- +ALTER TABLE `bc_label_format_header` + ADD PRIMARY KEY (`bc_label_format_header_id`), + ADD UNIQUE KEY `document_type_name` (`label_type`,`format_name`); + +-- +-- Indexes for table `bc_label_format_line` +-- +ALTER TABLE `bc_label_format_line` + ADD PRIMARY KEY (`bc_label_format_line_id`), + ADD UNIQUE KEY `document_type_name` (`bc_label_format_header_id`,`sys_field_name`); + +-- +-- Indexes for table `bc_label_request` +-- +ALTER TABLE `bc_label_request` + ADD PRIMARY KEY (`bc_label_request_id`), + ADD UNIQUE KEY `transaction_type_id` (`transaction_type_id`,`status`,`label_content`); + +-- +-- Indexes for table `bc_static_label` +-- +ALTER TABLE `bc_static_label` + ADD PRIMARY KEY (`bc_static_label_id`), + ADD UNIQUE KEY `transaction_type_id` (`label_type`,`status`,`label_content`); + +-- +-- Indexes for table `block` +-- +ALTER TABLE `block` + ADD PRIMARY KEY (`block_id`), + ADD UNIQUE KEY `reference_table` (`reference_table`,`name`,`reference_key_value`); + +-- +-- Indexes for table `block_cache` +-- +ALTER TABLE `block_cache` + ADD UNIQUE KEY `block_id` (`block_id`,`session_id`); + +-- +-- Indexes for table `block_content` +-- +ALTER TABLE `block_content` + ADD PRIMARY KEY (`block_content_id`); + +-- +-- Indexes for table `bom_commonbom_line` +-- +ALTER TABLE `bom_commonbom_line` + ADD PRIMARY KEY (`bom_commonbom_line_id`), + ADD UNIQUE KEY `bom_header_id` (`bom_header_id`,`bom_line_id`); + +-- +-- Indexes for table `bom_config_header` +-- +ALTER TABLE `bom_config_header` + ADD PRIMARY KEY (`bom_config_header_id`), + ADD UNIQUE KEY `item_id_m` (`item_id_m`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `bom_config_line` +-- +ALTER TABLE `bom_config_line` + ADD PRIMARY KEY (`bom_config_line_id`), + ADD UNIQUE KEY `bom_header_id` (`bom_config_header_id`,`bom_sequence`), + ADD UNIQUE KEY `bom_header_id_2` (`bom_config_header_id`,`routing_sequence`,`component_item_id_m`); + +-- +-- Indexes for table `bom_cost_type` +-- +ALTER TABLE `bom_cost_type` + ADD PRIMARY KEY (`bom_cost_type_id`), + ADD UNIQUE KEY `cost_type` (`cost_type`,`org_id`), + ADD UNIQUE KEY `cost_type_code` (`cost_type_code`); + +-- +-- Indexes for table `bom_department` +-- +ALTER TABLE `bom_department` + ADD PRIMARY KEY (`bom_department_id`), + ADD UNIQUE KEY `overhead` (`department`,`org_id`); + +-- +-- Indexes for table `bom_department_resource_assignment` +-- +ALTER TABLE `bom_department_resource_assignment` + ADD PRIMARY KEY (`bom_department_resource_assignment_id`); + +-- +-- Indexes for table `bom_header` +-- +ALTER TABLE `bom_header` + ADD PRIMARY KEY (`bom_header_id`), + ADD UNIQUE KEY `item_id` (`item_id_m`,`org_id`), + ADD UNIQUE KEY `item_id_2` (`item_id_m`,`alternate_bom`); + +-- +-- Indexes for table `bom_line` +-- +ALTER TABLE `bom_line` + ADD PRIMARY KEY (`bom_line_id`), + ADD UNIQUE KEY `bom_header_id` (`bom_header_id`,`bom_sequence`), + ADD UNIQUE KEY `bom_header_id_2` (`bom_header_id`,`routing_sequence`,`component_item_id_m`); + +-- +-- Indexes for table `bom_material_element` +-- +ALTER TABLE `bom_material_element` + ADD PRIMARY KEY (`bom_material_element_id`), + ADD UNIQUE KEY `cost_type` (`material_element`,`org_id`); + +-- +-- Indexes for table `bom_overhead` +-- +ALTER TABLE `bom_overhead` + ADD PRIMARY KEY (`bom_overhead_id`), + ADD UNIQUE KEY `overhead` (`overhead`,`org_id`); + +-- +-- Indexes for table `bom_overhead_rate_assignment` +-- +ALTER TABLE `bom_overhead_rate_assignment` + ADD PRIMARY KEY (`bom_overhead_rate_assignment_id`), + ADD UNIQUE KEY `bom_overhead_id` (`bom_overhead_id`,`bom_cost_type`); + +-- +-- Indexes for table `bom_overhead_resource_assignment` +-- +ALTER TABLE `bom_overhead_resource_assignment` + ADD PRIMARY KEY (`bom_overhead_resource_assignment_id`), + ADD UNIQUE KEY `bom_overhead_id` (`bom_overhead_id`,`bom_cost_type`,`resource_id`); + +-- +-- Indexes for table `bom_resource` +-- +ALTER TABLE `bom_resource` + ADD PRIMARY KEY (`bom_resource_id`), + ADD UNIQUE KEY `item_id` (`resource`,`org_id`), + ADD UNIQUE KEY `item_id_2` (`resource`,`description`); + +-- +-- Indexes for table `bom_resource_cost` +-- +ALTER TABLE `bom_resource_cost` + ADD PRIMARY KEY (`bom_resource_cost_id`); + +-- +-- Indexes for table `bom_routing_detail` +-- +ALTER TABLE `bom_routing_detail` + ADD PRIMARY KEY (`bom_routing_detail_id`); + +-- +-- Indexes for table `bom_routing_header` +-- +ALTER TABLE `bom_routing_header` + ADD PRIMARY KEY (`bom_routing_header_id`), + ADD UNIQUE KEY `item_id` (`item_id_m`,`org_id`), + ADD UNIQUE KEY `item_id_2` (`item_id_m`,`alternate_routing`); + +-- +-- Indexes for table `bom_routing_line` +-- +ALTER TABLE `bom_routing_line` + ADD PRIMARY KEY (`bom_routing_line_id`), + ADD UNIQUE KEY `bom_header_id` (`bom_routing_header_id`,`routing_sequence`), + ADD UNIQUE KEY `bom_header_id_2` (`bom_routing_header_id`,`department_id`,`description`); + +-- +-- Indexes for table `bom_standard_operation` +-- +ALTER TABLE `bom_standard_operation` + ADD PRIMARY KEY (`bom_standard_operation_id`); + +-- +-- Indexes for table `bom_standard_operation_resource_assignment` +-- +ALTER TABLE `bom_standard_operation_resource_assignment` + ADD PRIMARY KEY (`bom_standard_operation_resource_assignment_id`); + +-- +-- Indexes for table `business` +-- +ALTER TABLE `business` + ADD PRIMARY KEY (`business_id`), + ADD UNIQUE KEY `org_id` (`org_id`); + +-- +-- Indexes for table `category` +-- +ALTER TABLE `category` + ADD PRIMARY KEY (`category_id`), + ADD UNIQUE KEY `parent_id` (`parent_id`,`category`); + +-- +-- Indexes for table `category_reference` +-- +ALTER TABLE `category_reference` + ADD PRIMARY KEY (`category_reference_id`), + ADD UNIQUE KEY `category_id` (`category_id`,`reference_type`,`reference_table`,`reference_id`); + +-- +-- Indexes for table `cc_co_header` +-- +ALTER TABLE `cc_co_header` + ADD PRIMARY KEY (`cc_co_header_id`), + ADD UNIQUE KEY `release_number` (`security_level`,`change_type`), + ADD UNIQUE KEY `po_header_id` (`cc_co_header_id`,`security_level`); + +-- +-- Indexes for table `cc_co_line` +-- +ALTER TABLE `cc_co_line` + ADD PRIMARY KEY (`cc_co_line_id`), + ADD UNIQUE KEY `po_header_id` (`cc_co_header_id`,`item_description`); + +-- +-- Indexes for table `cc_co_line_value` +-- +ALTER TABLE `cc_co_line_value` + ADD PRIMARY KEY (`cc_co_line_value_id`), + ADD UNIQUE KEY `cc_co_line_id` (`cc_co_line_id`,`cc_co_template_line_id`); + +-- +-- Indexes for table `cc_co_process_flow_action` +-- +ALTER TABLE `cc_co_process_flow_action` + ADD PRIMARY KEY (`cc_co_process_flow_action_id`), + ADD UNIQUE KEY `document_type_name` (`cc_co_header_id`,`role_code`), + ADD UNIQUE KEY `sys_process_flow_line_id` (`cc_co_header_id`,`role_code`), + ADD UNIQUE KEY `sys_process_flow_line_id_2` (`cc_co_header_id`,`user_id`); + +-- +-- Indexes for table `cc_co_process_flow_action_value` +-- +ALTER TABLE `cc_co_process_flow_action_value` + ADD PRIMARY KEY (`sys_process_flow_action_value_id`), + ADD UNIQUE KEY `document_type_name` (`sys_process_flow_action_id`,`comment`); + +-- +-- Indexes for table `cc_co_template_header` +-- +ALTER TABLE `cc_co_template_header` + ADD PRIMARY KEY (`cc_co_template_header_id`), + ADD UNIQUE KEY `po_header_id` (`template_name`,`description`); + +-- +-- Indexes for table `cc_co_template_line` +-- +ALTER TABLE `cc_co_template_line` + ADD PRIMARY KEY (`cc_co_template_line_id`), + ADD UNIQUE KEY `sys_extra_field_id` (`cc_co_template_header_id`,`field_name`); + +-- +-- Indexes for table `coa` +-- +ALTER TABLE `coa` + ADD PRIMARY KEY (`coa_id`), + ADD UNIQUE KEY `value` (`coa_name`); + +-- +-- Indexes for table `coa_combination` -- ALTER TABLE `coa_combination` - ADD CONSTRAINT `coa_combination_ibfk_1` FOREIGN KEY (`coa_id`) REFERENCES `coa` (`coa_id`); + ADD PRIMARY KEY (`coa_combination_id`), + ADD UNIQUE KEY `combination` (`combination`), + ADD KEY `coa_id` (`coa_id`), + ADD KEY `balancing` (`field1`), + ADD KEY `cost_center` (`field2`), + ADD KEY `natural_account` (`field3`), + ADD KEY `inter_company` (`field4`), + ADD KEY `segment1` (`field5`), + ADD KEY `segment2` (`field6`), + ADD KEY `segment3` (`field7`), + ADD KEY `segment4` (`field8`); -- --- Constraints for table `option_detail` +-- Indexes for table `coa_segment_values` -- -ALTER TABLE `option_detail` - ADD CONSTRAINT `option_detail_ibfk_1` FOREIGN KEY (`option_header_id`) REFERENCES `option_header` (`option_header_id`); +ALTER TABLE `coa_segment_values` + ADD PRIMARY KEY (`coa_segment_values_id`), + ADD KEY `coa_id` (`coa_id`), + ADD KEY `coa_segments` (`coa_segments`), + ADD KEY `coa_segment_values_id` (`coa_segment_values_id`); + +-- +-- Indexes for table `comment` +-- +ALTER TABLE `comment` + ADD PRIMARY KEY (`comment_id`); +ALTER TABLE `comment` ADD FULLTEXT KEY `content` (`comment`); +ALTER TABLE `comment` ADD FULLTEXT KEY `subject` (`subject`); + +-- +-- Indexes for table `common_bom_line` +-- +ALTER TABLE `common_bom_line` + ADD PRIMARY KEY (`bom_line_id`), + ADD UNIQUE KEY `bom_header_id` (`bom_header_id`,`bom_sequence`), + ADD UNIQUE KEY `bom_header_id_2` (`bom_header_id`,`routing_sequence`,`component_item_id_m`); + +-- +-- Indexes for table `content` +-- +ALTER TABLE `content` + ADD PRIMARY KEY (`content_id`); +ALTER TABLE `content` ADD FULLTEXT KEY `subject` (`subject`); + +-- +-- Indexes for table `content_type` +-- +ALTER TABLE `content_type` + ADD PRIMARY KEY (`content_type_id`), + ADD UNIQUE KEY `content_type` (`content_type`); +ALTER TABLE `content_type` ADD FULLTEXT KEY `content` (`content_label`); +ALTER TABLE `content_type` ADD FULLTEXT KEY `subject` (`subject_label`); + +-- +-- Indexes for table `content_type_reference` +-- +ALTER TABLE `content_type_reference` + ADD PRIMARY KEY (`content_type_reference_id`), + ADD UNIQUE KEY `field_name` (`content_type_id`,`field_name`); + +-- +-- Indexes for table `cst_item_cost_header` +-- +ALTER TABLE `cst_item_cost_header` + ADD PRIMARY KEY (`cst_item_cost_header_id`), + ADD UNIQUE KEY `bom_cost_type` (`bom_cost_type`,`org_id`,`item_id_m`); + +-- +-- Indexes for table `cst_item_cost_line` +-- +ALTER TABLE `cst_item_cost_line` + ADD PRIMARY KEY (`cst_item_cost_line_id`), + ADD UNIQUE KEY `cst_item_cost_header_id_2` (`cst_item_cost_header_id`,`cost_element_type`,`cost_element_id`,`this_level_cb`); + +-- +-- Indexes for table `cst_item_cost_line_pre` +-- +ALTER TABLE `cst_item_cost_line_pre` + ADD PRIMARY KEY (`cst_item_cost_line_pre_id`); + +-- +-- Indexes for table `c_article` +-- +ALTER TABLE `c_article` + ADD PRIMARY KEY (`content_id`); + +-- +-- Indexes for table `c_collections` +-- +ALTER TABLE `c_collections` + ADD PRIMARY KEY (`content_id`); + +-- +-- Indexes for table `c_content` +-- +ALTER TABLE `c_content` + ADD PRIMARY KEY (`content_id`); + +-- +-- Indexes for table `c_documentation` +-- +ALTER TABLE `c_documentation` + ADD PRIMARY KEY (`content_id`); + +-- +-- Indexes for table `c_forum` +-- +ALTER TABLE `c_forum` + ADD PRIMARY KEY (`content_id`); + +-- +-- Indexes for table `c_issue` +-- +ALTER TABLE `c_issue` + ADD PRIMARY KEY (`content_id`); + +-- +-- Indexes for table `ec_cart` +-- +ALTER TABLE `ec_cart` + ADD PRIMARY KEY (`ec_cart_id`), + ADD UNIQUE KEY `ec_product_id` (`ec_product_id`,`user_id`); + +-- +-- Indexes for table `ec_control` +-- +ALTER TABLE `ec_control` + ADD UNIQUE KEY `name` (`site_name`); + +-- +-- Indexes for table `ec_paid_order` +-- +ALTER TABLE `ec_paid_order` + ADD PRIMARY KEY (`ec_paid_order_id`), + ADD UNIQUE KEY `service_provider` (`service_provider`,`sp_transaction_id`); + +-- +-- Indexes for table `ec_payment_method` +-- +ALTER TABLE `ec_payment_method` + ADD PRIMARY KEY (`ec_payment_method_id`), + ADD UNIQUE KEY `item_id_m` (`type`,`username`); + +-- +-- Indexes for table `ec_product` +-- +ALTER TABLE `ec_product` + ADD PRIMARY KEY (`ec_product_id`), + ADD UNIQUE KEY `item_id_m` (`item_id_m`,`product_name`); + +-- +-- Indexes for table `engine` +-- +ALTER TABLE `engine` + ADD PRIMARY KEY (`engine_id`), + ADD UNIQUE KEY `reference_table` (`obj_class_name`,`type`), + ADD UNIQUE KEY `number` (`number`); + +-- +-- Indexes for table `enterprise` +-- +ALTER TABLE `enterprise` + ADD PRIMARY KEY (`enterprise_id`), + ADD UNIQUE KEY `org_id` (`org_id`); + +-- +-- Indexes for table `extn_contact` +-- +ALTER TABLE `extn_contact` + ADD PRIMARY KEY (`extn_contact_id`), + ADD UNIQUE KEY `job_code` (`contact_name`), + ADD UNIQUE KEY `job_code_2` (`contact_name`), + ADD UNIQUE KEY `job_name` (`last_name`), + ADD UNIQUE KEY `job_name_2` (`last_name`); + +-- +-- Indexes for table `extn_contact_reference` +-- +ALTER TABLE `extn_contact_reference` + ADD PRIMARY KEY (`extn_contact_reference_id`), + ADD UNIQUE KEY `category_id` (`status`,`reference_type`,`reference_table`,`reference_id`); + +-- +-- Indexes for table `extn_image` +-- +ALTER TABLE `extn_image` + ADD PRIMARY KEY (`extn_image_id`); + +-- +-- Indexes for table `extn_image_reference` +-- +ALTER TABLE `extn_image_reference` + ADD PRIMARY KEY (`extn_image_reference_id`); + +-- +-- Indexes for table `extn_rating_control` +-- +ALTER TABLE `extn_rating_control` + ADD PRIMARY KEY (`pos_inv_control_id`); + +-- +-- Indexes for table `extn_rating_values` +-- +ALTER TABLE `extn_rating_values` + ADD PRIMARY KEY (`extn_rating_values_id`); + +-- +-- Indexes for table `extn_report` +-- +ALTER TABLE `extn_report` + ADD PRIMARY KEY (`extn_report_id`), + ADD UNIQUE KEY `name` (`report_name`); + +-- +-- Indexes for table `extn_report_path` +-- +ALTER TABLE `extn_report_path` + ADD PRIMARY KEY (`extn_report_path_id`), + ADD UNIQUE KEY `view_id` (`extn_report_id`,`column_name`); + +-- +-- Indexes for table `extn_social_login` +-- +ALTER TABLE `extn_social_login` + ADD PRIMARY KEY (`extn_social_login_id`), + ADD UNIQUE KEY `name` (`enabled_cb`,`sl_id`); + +-- +-- Indexes for table `extn_subscribe` +-- +ALTER TABLE `extn_subscribe` + ADD PRIMARY KEY (`extn_subscribe_id`), + ADD UNIQUE KEY `reference_key_name` (`reference_key_name`,`reference_key_value`,`user_email`); + +-- +-- Indexes for table `extn_theme` +-- +ALTER TABLE `extn_theme` + ADD PRIMARY KEY (`extn_theme_id`), + ADD UNIQUE KEY `theme_name` (`theme_name`); + +-- +-- Indexes for table `extn_web_tracking` +-- +ALTER TABLE `extn_web_tracking` + ADD PRIMARY KEY (`extn_web_tracking_id`), + ADD UNIQUE KEY `name` (`referrer`); + +-- +-- Indexes for table `extra_field_calculated_power` +-- +ALTER TABLE `extra_field_calculated_power` + ADD PRIMARY KEY (`extra_field_calculated_power_id`), + ADD UNIQUE KEY `extra_field_value` (`extra_field_calculated_power_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `extra_field_grade` +-- +ALTER TABLE `extra_field_grade` + ADD PRIMARY KEY (`extra_field_grade_id`), + ADD UNIQUE KEY `extra_field_value` (`extra_field_grade_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `extra_field_length` +-- +ALTER TABLE `extra_field_length` + ADD PRIMARY KEY (`extra_field_length_id`), + ADD UNIQUE KEY `extra_field_value` (`extra_field_length_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `extra_field_per_master_file` +-- +ALTER TABLE `extra_field_per_master_file` + ADD PRIMARY KEY (`extra_field_per_master_file_id`), + ADD UNIQUE KEY `extra_field_value` (`extra_field_per_master_file_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `extra_field_power_cable` +-- +ALTER TABLE `extra_field_power_cable` + ADD PRIMARY KEY (`extra_field_power_cable_id`), + ADD UNIQUE KEY `extra_field_value` (`extra_field_power_cable_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `extra_field_serial_status` +-- +ALTER TABLE `extra_field_serial_status` + ADD PRIMARY KEY (`extra_field_serial_status_id`), + ADD UNIQUE KEY `extra_field_value` (`extra_field_serial_status_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `ext_test_case_header` +-- +ALTER TABLE `ext_test_case_header` + ADD PRIMARY KEY (`ext_test_case_header_id`), + ADD UNIQUE KEY `module_name` (`module_name`,`name`); + +-- +-- Indexes for table `ext_test_case_line` +-- +ALTER TABLE `ext_test_case_line` + ADD PRIMARY KEY (`ext_test_case_line_id`), + ADD UNIQUE KEY `module_name` (`ext_test_case_header_id`,`line_number`); + +-- +-- Indexes for table `ext_url_alias` +-- +ALTER TABLE `ext_url_alias` + ADD PRIMARY KEY (`ext_url_alias_id`), + ADD UNIQUE KEY `original_url` (`original_url`), + ADD UNIQUE KEY `alias` (`alias`); + +-- +-- Indexes for table `fa_asset` +-- +ALTER TABLE `fa_asset` + ADD PRIMARY KEY (`fa_asset_id`), + ADD UNIQUE KEY `asset_number` (`asset_number`), + ADD UNIQUE KEY `tag_number` (`tag_number`), + ADD UNIQUE KEY `asset_number_2` (`asset_number`,`serial_number`); + +-- +-- Indexes for table `fa_asset_assignment` +-- +ALTER TABLE `fa_asset_assignment` + ADD PRIMARY KEY (`fa_asset_assignment_id`); + +-- +-- Indexes for table `fa_asset_book` +-- +ALTER TABLE `fa_asset_book` + ADD PRIMARY KEY (`fa_asset_book_id`), + ADD UNIQUE KEY `asset_book_name` (`asset_book_name`); + +-- +-- Indexes for table `fa_asset_book_info` +-- +ALTER TABLE `fa_asset_book_info` + ADD PRIMARY KEY (`fa_asset_book_info_id`), + ADD UNIQUE KEY `fa_asset_book_id` (`fa_asset_book_id`,`fa_asset_id`); + +-- +-- Indexes for table `fa_asset_category` +-- +ALTER TABLE `fa_asset_category` + ADD PRIMARY KEY (`fa_asset_category_id`), + ADD UNIQUE KEY `name` (`type`), + ADD UNIQUE KEY `address` (`type`), + ADD UNIQUE KEY `address_name` (`type`); + +-- +-- Indexes for table `fa_asset_component` +-- +ALTER TABLE `fa_asset_component` + ADD PRIMARY KEY (`fa_asset_component_id`), + ADD UNIQUE KEY `fa_asset_book_id` (`fa_asset_id`,`reference2`); + +-- +-- Indexes for table `fa_asset_retirement` +-- +ALTER TABLE `fa_asset_retirement` + ADD PRIMARY KEY (`fa_asset_retirement_id`), + ADD UNIQUE KEY `fa_asset_book_id` (`fa_asset_id`,`retired_cost`); + +-- +-- Indexes for table `fa_asset_source` +-- +ALTER TABLE `fa_asset_source` + ADD PRIMARY KEY (`fa_asset_source_id`), + ADD UNIQUE KEY `fa_asset_book_id` (`fa_asset_id`,`ap_transaction_line_id`); + +-- +-- Indexes for table `fa_asset_trasaction` +-- +ALTER TABLE `fa_asset_trasaction` + ADD PRIMARY KEY (`fa_asset_trasaction_id`), + ADD UNIQUE KEY `asset_number` (`fa_asset_id`), + ADD UNIQUE KEY `tag_number` (`transaction_type_id`), + ADD UNIQUE KEY `asset_number_2` (`fa_asset_id`,`quantity`); + +-- +-- Indexes for table `fa_book_category_association` +-- +ALTER TABLE `fa_book_category_association` + ADD PRIMARY KEY (`fa_book_category_association_id`), + ADD UNIQUE KEY `fa_asset_category_id` (`fa_asset_category_id`,`fa_asset_book_id`); + +-- +-- Indexes for table `fa_depreciation_header` +-- +ALTER TABLE `fa_depreciation_header` + ADD PRIMARY KEY (`fa_depreciation_header_id`), + ADD UNIQUE KEY `fa_asset_book_id` (`fa_asset_book_id`,`gl_period_id`); + +-- +-- Indexes for table `fa_depreciation_line` +-- +ALTER TABLE `fa_depreciation_line` + ADD PRIMARY KEY (`fa_depreciation_line_id`), + ADD UNIQUE KEY `fa_depreciation_header_id` (`fa_depreciation_header_id`,`asset_id`); + +-- +-- Indexes for table `fa_depreciation_method` +-- +ALTER TABLE `fa_depreciation_method` + ADD PRIMARY KEY (`fa_depreciation_method_id`), + ADD UNIQUE KEY `depreciation_method` (`depreciation_method`); + +-- +-- Indexes for table `fa_depreciation_method_rate` +-- +ALTER TABLE `fa_depreciation_method_rate` + ADD PRIMARY KEY (`fa_depreciation_method_rate_id`), + ADD UNIQUE KEY `fa_depreciation_method_id` (`fa_depreciation_method_id`,`year`,`period`); + +-- +-- Indexes for table `file` +-- +ALTER TABLE `file` + ADD PRIMARY KEY (`file_id`); + +-- +-- Indexes for table `file_reference` +-- +ALTER TABLE `file_reference` + ADD PRIMARY KEY (`file_reference_id`); + +-- +-- Indexes for table `form` +-- +ALTER TABLE `form` + ADD PRIMARY KEY (`form_id`); + +-- +-- Indexes for table `fp_forecast_consumption` +-- +ALTER TABLE `fp_forecast_consumption` + ADD PRIMARY KEY (`fp_forecast_consumption_id`); + +-- +-- Indexes for table `fp_forecast_group` +-- +ALTER TABLE `fp_forecast_group` + ADD PRIMARY KEY (`fp_forecast_group_id`); + +-- +-- Indexes for table `fp_forecast_header` +-- +ALTER TABLE `fp_forecast_header` + ADD PRIMARY KEY (`fp_forecast_header_id`), + ADD UNIQUE KEY `org_id` (`org_id`,`forecast`); + +-- +-- Indexes for table `fp_forecast_line` +-- +ALTER TABLE `fp_forecast_line` + ADD PRIMARY KEY (`fp_forecast_line_id`); + +-- +-- Indexes for table `fp_forecast_line_date` +-- +ALTER TABLE `fp_forecast_line_date` + ADD PRIMARY KEY (`fp_forecast_line_date_id`), + ADD UNIQUE KEY `fp_forecast_line_id` (`fp_forecast_line_id`,`forecast_date`); + +-- +-- Indexes for table `fp_kanban_demand` +-- +ALTER TABLE `fp_kanban_demand` + ADD PRIMARY KEY (`fp_kanban_demand_id`); + +-- +-- Indexes for table `fp_kanban_header` +-- +ALTER TABLE `fp_kanban_header` + ADD PRIMARY KEY (`fp_kanban_header_id`), + ADD UNIQUE KEY `org_id` (`org_id`,`item_id_m`,`subinventory_id`); + +-- +-- Indexes for table `fp_kanban_line` +-- +ALTER TABLE `fp_kanban_line` + ADD PRIMARY KEY (`fp_kanban_line_id`), + ADD UNIQUE KEY `card_number` (`card_number`); + +-- +-- Indexes for table `fp_kanban_planner_header` +-- +ALTER TABLE `fp_kanban_planner_header` + ADD PRIMARY KEY (`fp_kanban_planner_header_id`), + ADD UNIQUE KEY `org_id` (`org_id`,`plan_name`); + +-- +-- Indexes for table `fp_mds_header` +-- +ALTER TABLE `fp_mds_header` + ADD PRIMARY KEY (`fp_mds_header_id`), + ADD UNIQUE KEY `org_id` (`org_id`,`mds_name`); + +-- +-- Indexes for table `fp_mds_line` +-- +ALTER TABLE `fp_mds_line` + ADD PRIMARY KEY (`fp_mds_line_id`); + +-- +-- Indexes for table `fp_minmax_demand` +-- +ALTER TABLE `fp_minmax_demand` + ADD PRIMARY KEY (`fp_minmax_demand_id`); + +-- +-- Indexes for table `fp_minmax_header` +-- +ALTER TABLE `fp_minmax_header` + ADD PRIMARY KEY (`fp_minmax_header_id`), + ADD UNIQUE KEY `org_id` (`org_id`,`plan_name`), + ADD UNIQUE KEY `org_id_2` (`org_id`,`plan_name`); + +-- +-- Indexes for table `fp_minmax_line` +-- +ALTER TABLE `fp_minmax_line` + ADD PRIMARY KEY (`fp_minmax_line_id`), + ADD UNIQUE KEY `fp_mrp_header_id` (`fp_minmax_header_id`,`item_id_m`); + +-- +-- Indexes for table `fp_mrp_demand` +-- +ALTER TABLE `fp_mrp_demand` + ADD PRIMARY KEY (`fp_mrp_demand_id`); + +-- +-- Indexes for table `fp_mrp_exception` +-- +ALTER TABLE `fp_mrp_exception` + ADD PRIMARY KEY (`fp_mrp_exception_id`); + +-- +-- Indexes for table `fp_mrp_header` +-- +ALTER TABLE `fp_mrp_header` + ADD PRIMARY KEY (`fp_mrp_header_id`), + ADD UNIQUE KEY `org_id` (`org_id`,`mrp_name`); + +-- +-- Indexes for table `fp_mrp_lowlevel_code` +-- +ALTER TABLE `fp_mrp_lowlevel_code` + ADD PRIMARY KEY (`fp_mrp_lowlevel_code_id`), + ADD UNIQUE KEY `item_id` (`item_id_m`); + +-- +-- Indexes for table `fp_mrp_planned_order` +-- +ALTER TABLE `fp_mrp_planned_order` + ADD PRIMARY KEY (`fp_mrp_planned_order_id`); + +-- +-- Indexes for table `fp_mrp_supply` +-- +ALTER TABLE `fp_mrp_supply` + ADD PRIMARY KEY (`fp_mrp_supply_id`); + +-- +-- Indexes for table `fp_planning_control` +-- +ALTER TABLE `fp_planning_control` + ADD PRIMARY KEY (`fp_planning_control_id`); + +-- +-- Indexes for table `fp_source_list_header` +-- +ALTER TABLE `fp_source_list_header` + ADD PRIMARY KEY (`fp_source_list_header_id`), + ADD UNIQUE KEY `org_id` (`org_id`,`source_list`); + +-- +-- Indexes for table `fp_source_list_line` +-- +ALTER TABLE `fp_source_list_line` + ADD PRIMARY KEY (`fp_source_list_line_id`); + +-- +-- Indexes for table `fp_urgent_card` +-- +ALTER TABLE `fp_urgent_card` + ADD PRIMARY KEY (`fp_urgent_card_id`); + +-- +-- Indexes for table `gl_balance` +-- +ALTER TABLE `gl_balance` + ADD PRIMARY KEY (`gl_balance_id`), + ADD UNIQUE KEY `begin_balance_dr` (`coa_combination_id`,`balance_type`,`begin_balance_dr`,`period_id`), + ADD UNIQUE KEY `begin_balance_cr` (`period_id`,`coa_combination_id`,`balance_type`,`begin_balance_cr`), + ADD UNIQUE KEY `period_net_cr` (`period_id`,`coa_combination_id`,`balance_type`,`period_net_cr`), + ADD UNIQUE KEY `period_net_dr` (`period_id`,`coa_combination_id`,`balance_type`,`period_net_dr`); + +-- +-- Indexes for table `gl_calendar` +-- +ALTER TABLE `gl_calendar` + ADD PRIMARY KEY (`gl_calendar_id`), + ADD UNIQUE KEY `option_line_code` (`option_line_code`,`name`), + ADD UNIQUE KEY `option_line_code_2` (`option_line_code`,`year`,`number`); + +-- +-- Indexes for table `gl_currency_conversion` +-- +ALTER TABLE `gl_currency_conversion` + ADD PRIMARY KEY (`gl_currency_conversion_id`), + ADD UNIQUE KEY `currency_conversion_type` (`currency_conversion_type`,`from_date`,`from_currency`,`to_currency`); + +-- +-- Indexes for table `gl_journal_header` +-- +ALTER TABLE `gl_journal_header` + ADD PRIMARY KEY (`gl_journal_header_id`), + ADD UNIQUE KEY `ledger_id` (`ledger_id`,`period_id`,`reference_type`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `gl_journal_interface` +-- +ALTER TABLE `gl_journal_interface` + ADD PRIMARY KEY (`gl_journal_interface_id`), + ADD UNIQUE KEY `ledger_id` (`ledger_id`,`document_date`,`line_reference_key_name`,`line_reference_key_value`); + +-- +-- Indexes for table `gl_journal_line` +-- +ALTER TABLE `gl_journal_line` + ADD PRIMARY KEY (`gl_journal_line_id`), + ADD UNIQUE KEY `gl_journal_header_id` (`gl_journal_header_id`,`line_num`); + +-- +-- Indexes for table `gl_ledger` +-- +ALTER TABLE `gl_ledger` + ADD PRIMARY KEY (`gl_ledger_id`); + +-- +-- Indexes for table `gl_ledger_balancing_values` +-- +ALTER TABLE `gl_ledger_balancing_values` + ADD PRIMARY KEY (`gl_ledger_balancing_values_id`); + +-- +-- Indexes for table `gl_period` +-- +ALTER TABLE `gl_period` + ADD PRIMARY KEY (`gl_period_id`), + ADD UNIQUE KEY `gl_calendar_id` (`gl_calendar_id`,`ledger_id`); + +-- +-- Indexes for table `hd_change_request` +-- +ALTER TABLE `hd_change_request` + ADD PRIMARY KEY (`hd_change_request_id`); + +-- +-- Indexes for table `hd_repair_type_line` +-- +ALTER TABLE `hd_repair_type_line` + ADD PRIMARY KEY (`hd_service_activity_line_id`), + ADD UNIQUE KEY `sd_so_header_id_2` (`hd_service_activity_header_id`,`bu_org_id`), + ADD UNIQUE KEY `sd_so_header_id` (`hd_service_activity_header_id`,`line_type_id`); + +-- +-- Indexes for table `hd_sbp_header` +-- +ALTER TABLE `hd_sbp_header` + ADD PRIMARY KEY (`hd_sbp_header_id`), + ADD UNIQUE KEY `customer_number` (`business_process`), + ADD UNIQUE KEY `customer_name` (`description`); + +-- +-- Indexes for table `hd_sbp_line` +-- +ALTER TABLE `hd_sbp_line` + ADD PRIMARY KEY (`hd_sbp_line_id`), + ADD UNIQUE KEY `hd_sbp_header_id` (`hd_sbp_header_id`,`hd_service_activity_header_id`); + +-- +-- Indexes for table `hd_service_activity_header` +-- +ALTER TABLE `hd_service_activity_header` + ADD PRIMARY KEY (`hd_service_activity_header_id`); + +-- +-- Indexes for table `hd_service_activity_line` +-- +ALTER TABLE `hd_service_activity_line` + ADD PRIMARY KEY (`hd_service_activity_line_id`), + ADD UNIQUE KEY `sd_so_header_id_2` (`hd_service_activity_header_id`,`bu_org_id`), + ADD UNIQUE KEY `sd_so_header_id` (`hd_service_activity_header_id`,`line_type_id`); + +-- +-- Indexes for table `hd_service_contract_detail` +-- +ALTER TABLE `hd_service_contract_detail` + ADD PRIMARY KEY (`hd_service_contract_detail_id`); + +-- +-- Indexes for table `hd_service_contract_header` +-- +ALTER TABLE `hd_service_contract_header` + ADD PRIMARY KEY (`hd_service_contract_header_id`), + ADD UNIQUE KEY `transaction_number` (`version`); + +-- +-- Indexes for table `hd_service_contract_line` +-- +ALTER TABLE `hd_service_contract_line` + ADD PRIMARY KEY (`hd_service_contract_line_id`), + ADD UNIQUE KEY `ap_transaction_header_id` (`hd_service_contract_header_id`,`line_number`); + +-- +-- Indexes for table `hd_service_contract_schedule` +-- +ALTER TABLE `hd_service_contract_schedule` + ADD PRIMARY KEY (`hd_service_contract_schedule_id`); + +-- +-- Indexes for table `hd_service_request` +-- +ALTER TABLE `hd_service_request` + ADD PRIMARY KEY (`hd_service_request_id`); + +-- +-- Indexes for table `hd_service_type_header` +-- +ALTER TABLE `hd_service_type_header` + ADD PRIMARY KEY (`hd_service_type_header_id`); + +-- +-- Indexes for table `hd_service_type_line` +-- +ALTER TABLE `hd_service_type_line` + ADD PRIMARY KEY (`hd_service_type_line_id`), + ADD UNIQUE KEY `hd_service_type_header_id` (`hd_service_type_header_id`,`billing_type`); + +-- +-- Indexes for table `hd_subscription_detail` +-- +ALTER TABLE `hd_subscription_detail` + ADD PRIMARY KEY (`hd_subscription_detail_id`), + ADD UNIQUE KEY `hd_subscription_line_id` (`hd_subscription_line_id`,`member_name`); + +-- +-- Indexes for table `hd_subscription_header` +-- +ALTER TABLE `hd_subscription_header` + ADD PRIMARY KEY (`hd_subscription_header_id`), + ADD UNIQUE KEY `order_reference_table` (`mobile_phone2`,`fax_no`); + +-- +-- Indexes for table `hd_subscription_line` +-- +ALTER TABLE `hd_subscription_line` + ADD PRIMARY KEY (`hd_subscription_line_id`), + ADD UNIQUE KEY `hd_subscription_header_id` (`hd_subscription_header_id`,`item_id_m`,`line_type`); + +-- +-- Indexes for table `hd_support_request` +-- +ALTER TABLE `hd_support_request` + ADD PRIMARY KEY (`hd_support_request_id`); + +-- +-- Indexes for table `hd_svo_actuals` +-- +ALTER TABLE `hd_svo_actuals` + ADD PRIMARY KEY (`hd_svo_actuals_id`), + ADD UNIQUE KEY `hd_svo_header_id` (`hd_svo_header_id`,`source`,`wip_wo_header_id`), + ADD UNIQUE KEY `hd_svo_header_id_2` (`hd_svo_header_id`,`hd_svo_estimates_id`); + +-- +-- Indexes for table `hd_svo_estimates` +-- +ALTER TABLE `hd_svo_estimates` + ADD PRIMARY KEY (`hd_svo_estimates_id`), + ADD UNIQUE KEY `sd_so_header_id_2` (`hd_svo_header_id`), + ADD UNIQUE KEY `sd_so_header_id` (`hd_svo_header_id`,`billing_source`); + +-- +-- Indexes for table `hd_svo_header` +-- +ALTER TABLE `hd_svo_header` + ADD PRIMARY KEY (`hd_svo_header_id`), + ADD UNIQUE KEY `primary_sd_so_header_id` (`primary_sd_so_header_id`); + +-- +-- Indexes for table `hd_svo_line` +-- +ALTER TABLE `hd_svo_line` + ADD PRIMARY KEY (`hd_svo_line_id`), + ADD UNIQUE KEY `sd_so_header_id_2` (`hd_svo_header_id`,`line_number`), + ADD UNIQUE KEY `sd_so_header_id` (`hd_svo_header_id`,`hd_service_type_header_id`,`requested_date`); + +-- +-- Indexes for table `hd_task_type` +-- +ALTER TABLE `hd_task_type` + ADD PRIMARY KEY (`hd_task_type_id`), + ADD UNIQUE KEY `org` (`task_type`); + +-- +-- Indexes for table `hr_approval_limit_assignment` +-- +ALTER TABLE `hr_approval_limit_assignment` + ADD PRIMARY KEY (`hr_approval_limit_assignment_id`), + ADD UNIQUE KEY `hr_approval_limit_header_id` (`hr_approval_limit_header_id`,`bu_org_id`,`job_id`,`document_type`); + +-- +-- Indexes for table `hr_approval_limit_header` +-- +ALTER TABLE `hr_approval_limit_header` + ADD PRIMARY KEY (`hr_approval_limit_header_id`), + ADD UNIQUE KEY `element_name` (`limit_name`); + +-- +-- Indexes for table `hr_approval_limit_line` +-- +ALTER TABLE `hr_approval_limit_line` + ADD PRIMARY KEY (`hr_approval_limit_line_id`), + ADD UNIQUE KEY `hr_approval_limit_header_id` (`hr_approval_limit_header_id`,`limit_object`); + +-- +-- Indexes for table `hr_approval_object` +-- +ALTER TABLE `hr_approval_object` + ADD PRIMARY KEY (`hr_approval_object_id`), + ADD UNIQUE KEY `object_name` (`object_name`); + +-- +-- Indexes for table `hr_attendance` +-- +ALTER TABLE `hr_attendance` + ADD PRIMARY KEY (`hr_attendance_id`), + ADD UNIQUE KEY `hr_employee_id` (`hr_employee_id`,`date`); + +-- +-- Indexes for table `hr_compensation_element` +-- +ALTER TABLE `hr_compensation_element` + ADD PRIMARY KEY (`hr_compensation_element_id`), + ADD UNIQUE KEY `position_name_2` (`element_type`,`element_name`); + +-- +-- Indexes for table `hr_control` +-- +ALTER TABLE `hr_control` + ADD PRIMARY KEY (`hr_control_id`), + ADD UNIQUE KEY `org` (`bu_org_id`); + +-- +-- Indexes for table `hr_element_entry_header` +-- +ALTER TABLE `hr_element_entry_header` + ADD PRIMARY KEY (`hr_element_entry_header_id`), + ADD UNIQUE KEY `element_name` (`hr_employee_id`); + +-- +-- Indexes for table `hr_element_entry_line` +-- +ALTER TABLE `hr_element_entry_line` + ADD PRIMARY KEY (`hr_element_entry_line_id`), + ADD UNIQUE KEY `hr_element_entry_header_id` (`hr_element_entry_header_id`,`element_id`); + +-- +-- Indexes for table `hr_element_entry_tpl_header` +-- +ALTER TABLE `hr_element_entry_tpl_header` + ADD PRIMARY KEY (`hr_element_entry_tpl_header_id`), + ADD UNIQUE KEY `element_name` (`template_name`); + +-- +-- Indexes for table `hr_element_entry_tpl_line` +-- +ALTER TABLE `hr_element_entry_tpl_line` + ADD PRIMARY KEY (`hr_element_entry_tpl_line_id`), + ADD UNIQUE KEY `hr_element_entry_tpl_header_id` (`hr_element_entry_tpl_header_id`,`element_id`); + +-- +-- Indexes for table `hr_element_history_header` +-- +ALTER TABLE `hr_element_history_header` + ADD PRIMARY KEY (`hr_element_history_header_id`), + ADD UNIQUE KEY `hr_element_entry_header_id` (`hr_element_entry_header_id`,`archive_date`); + +-- +-- Indexes for table `hr_element_history_line` +-- +ALTER TABLE `hr_element_history_line` + ADD PRIMARY KEY (`hr_element_history_line_id`), + ADD UNIQUE KEY `hr_element_entry_header_id` (`hr_element_history_header_id`,`element_id`); + +-- +-- Indexes for table `hr_employee` +-- +ALTER TABLE `hr_employee` + ADD PRIMARY KEY (`hr_employee_id`), + ADD UNIQUE KEY `email` (`email`), + ADD UNIQUE KEY `identification_id` (`identification_id`); + +-- +-- Indexes for table `hr_employee_education` +-- +ALTER TABLE `hr_employee_education` + ADD PRIMARY KEY (`hr_employee_education_id`), + ADD UNIQUE KEY `employee_id` (`employee_id`,`degree_name`); + +-- +-- Indexes for table `hr_employee_experience` +-- +ALTER TABLE `hr_employee_experience` + ADD PRIMARY KEY (`hr_employee_experience_id`), + ADD UNIQUE KEY `employee_id_2` (`employee_id`,`organization_name`,`designation`,`employee_number`); + +-- +-- Indexes for table `hr_employee_termination` +-- +ALTER TABLE `hr_employee_termination` + ADD PRIMARY KEY (`hr_employee_termination_id`), + ADD UNIQUE KEY `employee_id` (`employee_id`,`new_employer`); + +-- +-- Indexes for table `hr_expense_header` +-- +ALTER TABLE `hr_expense_header` + ADD PRIMARY KEY (`hr_expense_header_id`), + ADD UNIQUE KEY `bu_org_id` (`bu_org_id`,`claim_number`); + +-- +-- Indexes for table `hr_expense_line` +-- +ALTER TABLE `hr_expense_line` + ADD PRIMARY KEY (`hr_expense_line_id`), + ADD UNIQUE KEY `hr_expense_header_id` (`hr_expense_header_id`,`line_number`); + +-- +-- Indexes for table `hr_expense_tpl_header` +-- +ALTER TABLE `hr_expense_tpl_header` + ADD PRIMARY KEY (`hr_expense_tpl_header_id`); + +-- +-- Indexes for table `hr_expense_tpl_line` +-- +ALTER TABLE `hr_expense_tpl_line` + ADD PRIMARY KEY (`hr_expense_tpl_line_id`), + ADD UNIQUE KEY `hr_expense_tpl_header_id` (`hr_expense_tpl_header_id`,`expense_item`); + +-- +-- Indexes for table `hr_grade` +-- +ALTER TABLE `hr_grade` + ADD PRIMARY KEY (`hr_grade_id`), + ADD UNIQUE KEY `grade` (`grade`); + +-- +-- Indexes for table `hr_job` +-- +ALTER TABLE `hr_job` + ADD PRIMARY KEY (`hr_job_id`), + ADD UNIQUE KEY `job_code` (`job_code`), + ADD UNIQUE KEY `job_name` (`job_name`), + ADD UNIQUE KEY `job_code_2` (`job_code`), + ADD UNIQUE KEY `job_name_2` (`job_name`); + +-- +-- Indexes for table `hr_leave_balance` +-- +ALTER TABLE `hr_leave_balance` + ADD PRIMARY KEY (`hr_leave_balance_id`), + ADD UNIQUE KEY `gl_calendar_id` (`leave_type`,`total_used`); + +-- +-- Indexes for table `hr_leave_entitlement_header` +-- +ALTER TABLE `hr_leave_entitlement_header` + ADD PRIMARY KEY (`hr_leave_entitlement_header_id`), + ADD UNIQUE KEY `gl_calendar_id` (`job_id`,`grade_id`); + +-- +-- Indexes for table `hr_leave_entitlement_line` +-- +ALTER TABLE `hr_leave_entitlement_line` + ADD PRIMARY KEY (`hr_leave_entitlement_line_id`), + ADD UNIQUE KEY `gl_calendar_id` (`leave_type`,`default_no_of_period`); + +-- +-- Indexes for table `hr_leave_transaction` +-- +ALTER TABLE `hr_leave_transaction` + ADD PRIMARY KEY (`hr_leave_transaction_id`); + +-- +-- Indexes for table `hr_leave_type` +-- +ALTER TABLE `hr_leave_type` + ADD PRIMARY KEY (`hr_leave_type_id`), + ADD UNIQUE KEY `leave_type` (`leave_type`); + +-- +-- Indexes for table `hr_location` +-- +ALTER TABLE `hr_location` + ADD PRIMARY KEY (`hr_location_id`), + ADD UNIQUE KEY `combination` (`combination`), + ADD KEY `balancing` (`country`), + ADD KEY `cost_center` (`state`), + ADD KEY `natural_account` (`city`); + +-- +-- Indexes for table `hr_payroll` +-- +ALTER TABLE `hr_payroll` + ADD PRIMARY KEY (`hr_payroll_id`), + ADD UNIQUE KEY `payroll` (`payroll`); + +-- +-- Indexes for table `hr_payroll_payment_method` +-- +ALTER TABLE `hr_payroll_payment_method` + ADD PRIMARY KEY (`hr_payroll_payment_method_id`), + ADD UNIQUE KEY `job_code` (`payment_method`), + ADD UNIQUE KEY `job_name` (`payment_type`), + ADD UNIQUE KEY `job_code_2` (`payment_method`), + ADD UNIQUE KEY `job_name_2` (`payment_type`); + +-- +-- Indexes for table `hr_payroll_process` +-- +ALTER TABLE `hr_payroll_process` + ADD PRIMARY KEY (`hr_payroll_process_id`), + ADD UNIQUE KEY `hr_payroll_schedule_id` (`hr_payroll_schedule_id`,`proces_name`); + +-- +-- Indexes for table `hr_payroll_schedule` +-- +ALTER TABLE `hr_payroll_schedule` + ADD PRIMARY KEY (`hr_payroll_schedule_id`), + ADD UNIQUE KEY `hr_payroll_id` (`hr_payroll_id`,`scheduled_date`); + +-- +-- Indexes for table `hr_payslip_header` +-- +ALTER TABLE `hr_payslip_header` + ADD PRIMARY KEY (`hr_payslip_header_id`), + ADD UNIQUE KEY `pay_date` (`pay_date`,`employee_id`); + +-- +-- Indexes for table `hr_payslip_line` +-- +ALTER TABLE `hr_payslip_line` + ADD PRIMARY KEY (`hr_payslip_line_id`), + ADD UNIQUE KEY `hr_payslip_header_id` (`hr_payslip_header_id`,`hr_compensation_element_id`); + +-- +-- Indexes for table `hr_perdiem_rate` +-- +ALTER TABLE `hr_perdiem_rate` + ADD PRIMARY KEY (`hr_perdiem_rate_id`), + ADD UNIQUE KEY `hr_location_id` (`hr_location_id`,`hr_grade_id`,`from_date`,`currency`); + +-- +-- Indexes for table `hr_position` +-- +ALTER TABLE `hr_position` + ADD PRIMARY KEY (`hr_position_id`), + ADD UNIQUE KEY `position_name_2` (`position_name`,`org_id`); + +-- +-- Indexes for table `hr_position_hierarchy_header` +-- +ALTER TABLE `hr_position_hierarchy_header` + ADD PRIMARY KEY (`hr_position_hierarchy_header_id`), + ADD UNIQUE KEY `item_id` (`starting_position_id`), + ADD UNIQUE KEY `item_id_2` (`starting_position_id`,`hierarchy_name`); + +-- +-- Indexes for table `hr_position_hierarchy_line` +-- +ALTER TABLE `hr_position_hierarchy_line` + ADD PRIMARY KEY (`hr_position_hierarchy_line_id`), + ADD UNIQUE KEY `hr_position_hierarchy_header_id` (`hr_position_hierarchy_header_id`,`position_id`); + +-- +-- Indexes for table `hr_team_header` +-- +ALTER TABLE `hr_team_header` + ADD PRIMARY KEY (`hr_team_header_id`), + ADD UNIQUE KEY `element_name` (`team_name`); + +-- +-- Indexes for table `hr_team_line` +-- +ALTER TABLE `hr_team_line` + ADD PRIMARY KEY (`hr_team_line_id`), + ADD UNIQUE KEY `hr_team_header_id` (`hr_team_header_id`,`member_employee_id`); + +-- +-- Indexes for table `hr_timesheet_header` +-- +ALTER TABLE `hr_timesheet_header` + ADD PRIMARY KEY (`hr_timesheet_header_id`), + ADD UNIQUE KEY `hr_timesheet_period_id` (`hr_timesheet_period_id`,`hr_employee_id`); + +-- +-- Indexes for table `hr_timesheet_line` +-- +ALTER TABLE `hr_timesheet_line` + ADD PRIMARY KEY (`hr_timesheet_line_id`), + ADD UNIQUE KEY `hr_timesheet_header_id` (`hr_timesheet_header_id`,`prj_project_line_id`); + +-- +-- Indexes for table `hr_timesheet_period` +-- +ALTER TABLE `hr_timesheet_period` + ADD PRIMARY KEY (`hr_timesheet_period_id`), + ADD UNIQUE KEY `combination` (`max_work_hour`), + ADD KEY `balancing` (`timesheet_period`), + ADD KEY `cost_center` (`from_date`), + ADD KEY `natural_account` (`to_date`); + +-- +-- Indexes for table `inventory` +-- +ALTER TABLE `inventory` + ADD PRIMARY KEY (`inventory_id`); + +-- +-- Indexes for table `inv_abc_assignment_header` +-- +ALTER TABLE `inv_abc_assignment_header` + ADD PRIMARY KEY (`inv_abc_assignment_header_id`), + ADD UNIQUE KEY `document_type_name` (`abc_assignment_name`,`org_id`); + +-- +-- Indexes for table `inv_abc_assignment_line` +-- +ALTER TABLE `inv_abc_assignment_line` + ADD PRIMARY KEY (`inv_abc_assignment_line_id`), + ADD UNIQUE KEY `inv_abc_assignment_header_id` (`inv_abc_assignment_header_id`,`item_id_m`); + +-- +-- Indexes for table `inv_abc_valuation` +-- +ALTER TABLE `inv_abc_valuation` + ADD PRIMARY KEY (`inv_abc_valuation_id`), + ADD UNIQUE KEY `document_type_name` (`valuation_name`,`scope_sub_inventory_id`); + +-- +-- Indexes for table `inv_abc_valuation_result` +-- +ALTER TABLE `inv_abc_valuation_result` + ADD PRIMARY KEY (`inv_abc_valuation_result_id`), + ADD UNIQUE KEY `inv_abc_valuation_id` (`inv_abc_valuation_id`,`seq_number`), + ADD UNIQUE KEY `inv_abc_valuation_id_2` (`inv_abc_valuation_id`,`item_id_m`); + +-- +-- Indexes for table `inv_count_abc_ref` +-- +ALTER TABLE `inv_count_abc_ref` + ADD PRIMARY KEY (`inv_count_abc_ref_id`), + ADD UNIQUE KEY `inv_count_header_id` (`inv_count_header_id`,`class_code`); + +-- +-- Indexes for table `inv_count_entries` +-- +ALTER TABLE `inv_count_entries` + ADD PRIMARY KEY (`inv_count_entries_id`), + ADD UNIQUE KEY `inv_count_schedule_id` (`inv_count_schedule_id`); + +-- +-- Indexes for table `inv_count_header` +-- +ALTER TABLE `inv_count_header` + ADD PRIMARY KEY (`inv_count_header_id`), + ADD UNIQUE KEY `document_type_name` (`count_name`,`org_id`); + +-- +-- Indexes for table `inv_count_schedule` +-- +ALTER TABLE `inv_count_schedule` + ADD PRIMARY KEY (`inv_count_schedule_id`), + ADD UNIQUE KEY `inv_count_header_id` (`inv_count_header_id`,`item_id_m`,`subinventory_id`,`locator_id`,`schedule_date`); + +-- +-- Indexes for table `inv_interorg_transfer_header` +-- +ALTER TABLE `inv_interorg_transfer_header` + ADD PRIMARY KEY (`inv_interorg_transfer_header_id`), + ADD UNIQUE KEY `order_number` (`order_number`); + +-- +-- Indexes for table `inv_interorg_transfer_line` +-- +ALTER TABLE `inv_interorg_transfer_line` + ADD PRIMARY KEY (`inv_interorg_transfer_line_id`); + +-- +-- Indexes for table `inv_item_relation` +-- +ALTER TABLE `inv_item_relation` + ADD PRIMARY KEY (`inv_item_relation_id`), + ADD UNIQUE KEY `gl_calendar_id` (`to_item_id_m`,`description`); + +-- +-- Indexes for table `inv_item_revision` +-- +ALTER TABLE `inv_item_revision` + ADD PRIMARY KEY (`inv_item_revision_id`), + ADD UNIQUE KEY `serial_number` (`revision_name`,`item_id_m`,`org_id`); + +-- +-- Indexes for table `inv_location_default` +-- +ALTER TABLE `inv_location_default` + ADD PRIMARY KEY (`inv_location_default_id`), + ADD UNIQUE KEY `org_id` (`org_id`,`item_id_m`,`priority`,`subinventory_id`,`locator_id`); + +-- +-- Indexes for table `inv_lot_number` +-- +ALTER TABLE `inv_lot_number` + ADD PRIMARY KEY (`inv_lot_number_id`), + ADD UNIQUE KEY `serial_number` (`lot_number`,`item_id_m`,`org_id`); + +-- +-- Indexes for table `inv_lot_onhand` +-- +ALTER TABLE `inv_lot_onhand` + ADD PRIMARY KEY (`inv_lot_onhand_id`), + ADD UNIQUE KEY `onhand_id` (`onhand_id`,`inv_lot_number_id`); + +-- +-- Indexes for table `inv_lot_transaction` +-- +ALTER TABLE `inv_lot_transaction` + ADD PRIMARY KEY (`inv_lot_transaction_id`); + +-- +-- Indexes for table `inv_moveorder_header` +-- +ALTER TABLE `inv_moveorder_header` + ADD PRIMARY KEY (`inv_moveorder_header_id`), + ADD UNIQUE KEY `order_number` (`order_number`); + +-- +-- Indexes for table `inv_moveorder_line` +-- +ALTER TABLE `inv_moveorder_line` + ADD PRIMARY KEY (`inv_moveorder_line_id`); + +-- +-- Indexes for table `inv_receipt_header` +-- +ALTER TABLE `inv_receipt_header` + ADD PRIMARY KEY (`inv_receipt_header_id`); + +-- +-- Indexes for table `inv_receipt_line` +-- +ALTER TABLE `inv_receipt_line` + ADD PRIMARY KEY (`inv_receipt_line_id`), + ADD UNIQUE KEY `inv_receipt_header_id` (`inv_receipt_header_id`,`line_number`); + +-- +-- Indexes for table `inv_reservation` +-- +ALTER TABLE `inv_reservation` + ADD PRIMARY KEY (`inv_reservation_id`), + ADD UNIQUE KEY `d_reference_key_name` (`d_reference_key_name`,`d_reference_key_value`,`s_reference_key_name`,`s_reference_key_value`,`inv_serial_number_id`), + ADD UNIQUE KEY `sd_so_line_id` (`sd_so_line_id`,`inv_serial_number_id`); + +-- +-- Indexes for table `inv_serial_number` +-- +ALTER TABLE `inv_serial_number` + ADD PRIMARY KEY (`inv_serial_number_id`), + ADD UNIQUE KEY `serial_number` (`serial_number`,`item_id_m`,`org_id`); + +-- +-- Indexes for table `inv_serial_transaction` +-- +ALTER TABLE `inv_serial_transaction` + ADD PRIMARY KEY (`inv_serial_transaction_id`); + +-- +-- Indexes for table `inv_transaction` +-- +ALTER TABLE `inv_transaction` + ADD PRIMARY KEY (`inv_transaction_id`), + ADD KEY `transaction_type_id` (`transaction_type_id`); + +-- +-- Indexes for table `item` +-- +ALTER TABLE `item` + ADD PRIMARY KEY (`item_id`), + ADD UNIQUE KEY `item_number_2` (`item_number`,`org_id`), + ADD UNIQUE KEY `item_id_m` (`item_id_m`,`org_id`); + +-- +-- Indexes for table `item_status` +-- +ALTER TABLE `item_status` + ADD PRIMARY KEY (`item_status_id`), + ADD UNIQUE KEY `name` (`active`); + +-- +-- Indexes for table `legal` +-- +ALTER TABLE `legal` + ADD PRIMARY KEY (`legal_id`); + +-- +-- Indexes for table `locator` +-- +ALTER TABLE `locator` + ADD PRIMARY KEY (`locator_id`); + +-- +-- Indexes for table `mdm_bank_account` +-- +ALTER TABLE `mdm_bank_account` + ADD PRIMARY KEY (`mdm_bank_account_id`), + ADD UNIQUE KEY `supplier_number` (`mdm_bank_site_id`), + ADD UNIQUE KEY `mdm_bank_site_id` (`mdm_bank_site_id`,`account_number`); + +-- +-- Indexes for table `mdm_bank_header` +-- +ALTER TABLE `mdm_bank_header` + ADD PRIMARY KEY (`mdm_bank_header_id`), + ADD UNIQUE KEY `bank_name` (`bank_name`), + ADD UNIQUE KEY `bank_name_short` (`bank_name_short`), + ADD UNIQUE KEY `bank_name_short_2` (`bank_name_short`), + ADD UNIQUE KEY `bank_name_alt` (`bank_name_alt`); + +-- +-- Indexes for table `mdm_bank_site` +-- +ALTER TABLE `mdm_bank_site` + ADD PRIMARY KEY (`mdm_bank_site_id`), + ADD UNIQUE KEY `mdm_bank_header_id` (`mdm_bank_header_id`,`branch_name`), + ADD UNIQUE KEY `branch_name_short` (`branch_name_short`); + +-- +-- Indexes for table `mdm_price_list_detail` +-- +ALTER TABLE `mdm_price_list_detail` + ADD PRIMARY KEY (`mdm_price_list_detail_id`), + ADD UNIQUE KEY `mdm_price_list_line_id` (`mdm_price_list_line_id`,`qty_from`,`effective_start_date`); + +-- +-- Indexes for table `mdm_price_list_header` +-- +ALTER TABLE `mdm_price_list_header` + ADD PRIMARY KEY (`mdm_price_list_header_id`), + ADD UNIQUE KEY `price_list` (`price_list`); + +-- +-- Indexes for table `mdm_price_list_line` +-- +ALTER TABLE `mdm_price_list_line` + ADD PRIMARY KEY (`mdm_price_list_line_id`), + ADD UNIQUE KEY `mdm_price_list_header_id` (`mdm_price_list_header_id`,`org_id`,`item_id_m`,`effective_start_date`); + +-- +-- Indexes for table `mdm_tax_code` +-- +ALTER TABLE `mdm_tax_code` + ADD PRIMARY KEY (`mdm_tax_code_id`), + ADD UNIQUE KEY `gl_calendar_id` (`tax_code`,`description`); + +-- +-- Indexes for table `mdm_tax_region` +-- +ALTER TABLE `mdm_tax_region` + ADD PRIMARY KEY (`mdm_tax_region_id`), + ADD UNIQUE KEY `gl_calendar_id` (`state`,`description`), + ADD UNIQUE KEY `tax_region_name` (`tax_region_name`); + +-- +-- Indexes for table `mdm_tax_rule` +-- +ALTER TABLE `mdm_tax_rule` + ADD PRIMARY KEY (`mdm_tax_rule_id`), + ADD UNIQUE KEY `tax_region_name` (`weightage`), + ADD UNIQUE KEY `gl_calendar_id` (`ship_to_region_id`,`tax_code_id`); + +-- +-- Indexes for table `module` +-- +ALTER TABLE `module` + ADD PRIMARY KEY (`module_id`), + ADD UNIQUE KEY `number` (`number`,`name`); + +-- +-- Indexes for table `onhand` +-- +ALTER TABLE `onhand` + ADD PRIMARY KEY (`onhand_id`), + ADD UNIQUE KEY `item_id_m` (`item_id_m`,`revision_name`,`org_id`,`subinventory_id`,`locator_id`); + +-- +-- Indexes for table `option_detail` +-- +ALTER TABLE `option_detail` + ADD PRIMARY KEY (`option_detail_id`), + ADD UNIQUE KEY `option_line_id` (`option_line_id`,`option_detail_value`), + ADD KEY `option_header_id` (`option_header_id`,`option_line_id`); + +-- +-- Indexes for table `option_header` +-- +ALTER TABLE `option_header` + ADD PRIMARY KEY (`option_header_id`), + ADD UNIQUE KEY `option_type` (`option_type`); + +-- +-- Indexes for table `option_line` +-- +ALTER TABLE `option_line` + ADD PRIMARY KEY (`option_line_id`), + ADD UNIQUE KEY `option_header_id_2` (`option_header_id`,`option_line_code`), + ADD KEY `option_header_id` (`option_header_id`); + +-- +-- Indexes for table `org` +-- +ALTER TABLE `org` + ADD PRIMARY KEY (`org_id`), + ADD UNIQUE KEY `org` (`org`), + ADD KEY `inventory_id` (`inventory_org_id`), + ADD KEY `enterprise_id` (`enterprise_org_id`), + ADD KEY `legal_id` (`legal_org_id`), + ADD KEY `business_id` (`business_org_id`); + +-- +-- Indexes for table `page` +-- +ALTER TABLE `page` + ADD PRIMARY KEY (`page_id`); +ALTER TABLE `page` ADD FULLTEXT KEY `content` (`content`); +ALTER TABLE `page` ADD FULLTEXT KEY `subject` (`subject`); + +-- +-- Indexes for table `path` +-- +ALTER TABLE `path` + ADD PRIMARY KEY (`path_id`), + ADD UNIQUE KEY `name` (`name`,`module_code`); + +-- +-- Indexes for table `payment_term` +-- +ALTER TABLE `payment_term` + ADD PRIMARY KEY (`payment_term_id`); + +-- +-- Indexes for table `payment_term_discount` +-- +ALTER TABLE `payment_term_discount` + ADD PRIMARY KEY (`payment_term_discount_id`); + +-- +-- Indexes for table `payment_term_schedule` +-- +ALTER TABLE `payment_term_schedule` + ADD PRIMARY KEY (`payment_term_schedule_id`); + +-- +-- Indexes for table `pm_formula_byproduct` +-- +ALTER TABLE `pm_formula_byproduct` + ADD PRIMARY KEY (`pm_formula_byproduct_id`), + ADD UNIQUE KEY `org_id` (`pm_formula_header_id`,`line_no`); + +-- +-- Indexes for table `pm_formula_header` +-- +ALTER TABLE `pm_formula_header` + ADD PRIMARY KEY (`pm_formula_header_id`), + ADD UNIQUE KEY `org_id` (`org_id`,`formula_name`); + +-- +-- Indexes for table `pm_formula_ingredient` +-- +ALTER TABLE `pm_formula_ingredient` + ADD PRIMARY KEY (`pm_formula_ingredient_id`), + ADD UNIQUE KEY `org_id` (`pm_formula_header_id`,`line_no`); + +-- +-- Indexes for table `pm_formula_line` +-- +ALTER TABLE `pm_formula_line` + ADD PRIMARY KEY (`pm_formula_line_id`), + ADD UNIQUE KEY `pm_formula_header_id` (`pm_formula_header_id`,`item_id_m`), + ADD UNIQUE KEY `org_id` (`pm_formula_header_id`,`line_no`); + +-- +-- Indexes for table `pm_process_operation_header` +-- +ALTER TABLE `pm_process_operation_header` + ADD PRIMARY KEY (`pm_process_operation_header_id`), + ADD UNIQUE KEY `org_id` (`org_id`,`operation_class`); + +-- +-- Indexes for table `pm_process_operation_line` +-- +ALTER TABLE `pm_process_operation_line` + ADD PRIMARY KEY (`pm_process_operation_line_id`), + ADD UNIQUE KEY `org_id` (`pm_process_operation_header_id`,`activity_code`); + +-- +-- Indexes for table `pm_process_routing_header` +-- +ALTER TABLE `pm_process_routing_header` + ADD PRIMARY KEY (`pm_process_routing_header_id`), + ADD UNIQUE KEY `routing_name` (`routing_name`,`org_id`); + +-- +-- Indexes for table `pm_process_routing_line` +-- +ALTER TABLE `pm_process_routing_line` + ADD PRIMARY KEY (`pm_process_routing_line_id`), + ADD UNIQUE KEY `org_id` (`pm_process_routing_header_id`,`step_no`); + +-- +-- Indexes for table `pm_recipe_customer` +-- +ALTER TABLE `pm_recipe_customer` + ADD PRIMARY KEY (`pm_recipe_customer_id`), + ADD UNIQUE KEY `org_id` (`pm_recipe_header_id`,`org_id`); + +-- +-- Indexes for table `pm_recipe_header` +-- +ALTER TABLE `pm_recipe_header` + ADD PRIMARY KEY (`pm_recipe_header_id`), + ADD UNIQUE KEY `org_id` (`org_id`,`recipe_name`); + +-- +-- Indexes for table `pm_recipe_line` +-- +ALTER TABLE `pm_recipe_line` + ADD PRIMARY KEY (`pm_recipe_line_id`), + ADD UNIQUE KEY `org_id` (`pm_recipe_header_id`,`org_id`); + +-- +-- Indexes for table `pm_recipe_material_header` +-- +ALTER TABLE `pm_recipe_material_header` + ADD PRIMARY KEY (`pm_recipe_material_header_id`), + ADD UNIQUE KEY `routing_name` (`pm_recipe_header_id`); + +-- +-- Indexes for table `pm_recipe_material_line` +-- +ALTER TABLE `pm_recipe_material_line` + ADD PRIMARY KEY (`pm_recipe_material_line_id`), + ADD UNIQUE KEY `routing_name` (`pm_recipe_material_header_id`,`step`); + +-- +-- Indexes for table `pos_barcode_list_header` +-- +ALTER TABLE `pos_barcode_list_header` + ADD PRIMARY KEY (`pos_barcode_list_header_id`), + ADD UNIQUE KEY `pos_transaction_header_id` (`list_name`,`description`); + +-- +-- Indexes for table `pos_barcode_list_line` +-- +ALTER TABLE `pos_barcode_list_line` + ADD PRIMARY KEY (`pos_barcode_list_line_id`), + ADD UNIQUE KEY `pos_transaction_header_id` (`pos_barcode_list_header_id`,`item_number`); + +-- +-- Indexes for table `pos_inv_control` +-- +ALTER TABLE `pos_inv_control` + ADD PRIMARY KEY (`pos_inv_control_id`); + +-- +-- Indexes for table `pos_terminal` +-- +ALTER TABLE `pos_terminal` + ADD PRIMARY KEY (`pos_terminal_id`); + +-- +-- Indexes for table `pos_transaction_header` +-- +ALTER TABLE `pos_transaction_header` + ADD PRIMARY KEY (`pos_transaction_header_id`); + +-- +-- Indexes for table `pos_transaction_line` +-- +ALTER TABLE `pos_transaction_line` + ADD PRIMARY KEY (`pos_transaction_line_id`), + ADD UNIQUE KEY `pos_transaction_header_id` (`pos_transaction_header_id`,`item_number`); + +-- +-- Indexes for table `po_asl_document` +-- +ALTER TABLE `po_asl_document` + ADD PRIMARY KEY (`po_asl_document_id`); + +-- +-- Indexes for table `po_asl_header` +-- +ALTER TABLE `po_asl_header` + ADD PRIMARY KEY (`po_asl_header_id`), + ADD UNIQUE KEY `bu_org_id` (`bu_org_id`,`asl_type`,`item_id_m`); + +-- +-- Indexes for table `po_asl_line` +-- +ALTER TABLE `po_asl_line` + ADD PRIMARY KEY (`po_asl_line_id`); + +-- +-- Indexes for table `po_detail` +-- +ALTER TABLE `po_detail` + ADD PRIMARY KEY (`po_detail_id`); + +-- +-- Indexes for table `po_header` +-- +ALTER TABLE `po_header` + ADD PRIMARY KEY (`po_header_id`), + ADD UNIQUE KEY `release_number` (`release_number`,`po_number`), + ADD UNIQUE KEY `po_header_id` (`po_header_id`,`release_number`); + +-- +-- Indexes for table `po_line` +-- +ALTER TABLE `po_line` + ADD PRIMARY KEY (`po_line_id`), + ADD UNIQUE KEY `po_header_id` (`po_header_id`,`line_number`); + +-- +-- Indexes for table `po_purchasing_control` +-- +ALTER TABLE `po_purchasing_control` + ADD PRIMARY KEY (`po_purchasing_control_id`), + ADD UNIQUE KEY `org` (`org_id`); + +-- +-- Indexes for table `po_quote_detail` +-- +ALTER TABLE `po_quote_detail` + ADD PRIMARY KEY (`po_quote_detail_id`), + ADD UNIQUE KEY `po_quote_line_id` (`po_quote_line_id`,`po_rfq_detail_id`); + +-- +-- Indexes for table `po_quote_header` +-- +ALTER TABLE `po_quote_header` + ADD PRIMARY KEY (`po_quote_header_id`), + ADD UNIQUE KEY `po_rfq_header_id` (`po_rfq_header_id`,`supplier_site_id`,`supplier_id`,`active_cb`); + +-- +-- Indexes for table `po_quote_line` +-- +ALTER TABLE `po_quote_line` + ADD PRIMARY KEY (`po_quote_line_id`), + ADD UNIQUE KEY `po_header_id` (`po_quote_header_id`,`line_number`); + +-- +-- Indexes for table `po_requisition_detail` +-- +ALTER TABLE `po_requisition_detail` + ADD PRIMARY KEY (`po_requisition_detail_id`); + +-- +-- Indexes for table `po_requisition_header` +-- +ALTER TABLE `po_requisition_header` + ADD PRIMARY KEY (`po_requisition_header_id`); + +-- +-- Indexes for table `po_requisition_interface` +-- +ALTER TABLE `po_requisition_interface` + ADD PRIMARY KEY (`po_requisition_interface_id`); + +-- +-- Indexes for table `po_requisition_line` +-- +ALTER TABLE `po_requisition_line` + ADD PRIMARY KEY (`po_requisition_line_id`); + +-- +-- Indexes for table `po_rfq_detail` +-- +ALTER TABLE `po_rfq_detail` + ADD PRIMARY KEY (`po_rfq_detail_id`); + +-- +-- Indexes for table `po_rfq_header` +-- +ALTER TABLE `po_rfq_header` + ADD PRIMARY KEY (`po_rfq_header_id`), + ADD UNIQUE KEY `release_number` (`security_level`,`rfq_type`), + ADD UNIQUE KEY `po_header_id` (`po_rfq_header_id`,`security_level`); + +-- +-- Indexes for table `po_rfq_line` +-- +ALTER TABLE `po_rfq_line` + ADD PRIMARY KEY (`po_rfq_line_id`), + ADD UNIQUE KEY `po_header_id` (`po_rfq_header_id`,`line_number`); + +-- +-- Indexes for table `po_sourcing_rule_header` +-- +ALTER TABLE `po_sourcing_rule_header` + ADD PRIMARY KEY (`po_sourcing_rule_header_id`); + +-- +-- Indexes for table `po_sourcing_rule_line` +-- +ALTER TABLE `po_sourcing_rule_line` + ADD PRIMARY KEY (`po_sourcing_rule_line_id`); + +-- +-- Indexes for table `prj_agreement_header` +-- +ALTER TABLE `prj_agreement_header` + ADD PRIMARY KEY (`prj_agreement_header_id`); + +-- +-- Indexes for table `prj_agreement_line` +-- +ALTER TABLE `prj_agreement_line` + ADD PRIMARY KEY (`prj_agreement_line_id`); + +-- +-- Indexes for table `prj_bem` +-- +ALTER TABLE `prj_bem` + ADD PRIMARY KEY (`prj_bem_id`), + ADD UNIQUE KEY `value_group` (`bem`); + +-- +-- Indexes for table `prj_budget_detail` +-- +ALTER TABLE `prj_budget_detail` + ADD PRIMARY KEY (`prj_budget_detail_id`), + ADD UNIQUE KEY `value_group` (`prj_budget_line_id`); + +-- +-- Indexes for table `prj_budget_header` +-- +ALTER TABLE `prj_budget_header` + ADD PRIMARY KEY (`prj_budget_header_id`), + ADD UNIQUE KEY `budget_type` (`budget_type`,`prj_project_header_id`,`version_number`); + +-- +-- Indexes for table `prj_budget_line` +-- +ALTER TABLE `prj_budget_line` + ADD PRIMARY KEY (`prj_budget_line_id`); + +-- +-- Indexes for table `prj_budget_rev_header` +-- +ALTER TABLE `prj_budget_rev_header` + ADD PRIMARY KEY (`prj_budget_rev_header_id`), + ADD UNIQUE KEY `prj_project_header_id` (`prj_project_header_id`,`version_number`,`baselined_cb`); + +-- +-- Indexes for table `prj_budget_rev_line` +-- +ALTER TABLE `prj_budget_rev_line` + ADD PRIMARY KEY (`prj_budget_rev_line_id`), + ADD UNIQUE KEY `prj_budget_header_id` (`prj_budget_rev_header_id`,`prj_project_line_id`); + +-- +-- Indexes for table `prj_burden_costcode` +-- +ALTER TABLE `prj_burden_costcode` + ADD PRIMARY KEY (`prj_burden_costcode_id`), + ADD UNIQUE KEY `value_group` (`costcode`); + +-- +-- Indexes for table `prj_burden_cost_base` +-- +ALTER TABLE `prj_burden_cost_base` + ADD PRIMARY KEY (`prj_burden_cost_base_id`), + ADD UNIQUE KEY `value_group` (`cost_base`); + +-- +-- Indexes for table `prj_burden_expenditure` +-- +ALTER TABLE `prj_burden_expenditure` + ADD PRIMARY KEY (`prj_burden_expenditure_id`), + ADD UNIQUE KEY `prj_expenditure_line_id` (`prj_expenditure_line_id`,`prj_burden_costcode_id`); + +-- +-- Indexes for table `prj_burden_list_header` +-- +ALTER TABLE `prj_burden_list_header` + ADD PRIMARY KEY (`prj_burden_list_header_id`), + ADD UNIQUE KEY `value_group` (`burden_list`); + +-- +-- Indexes for table `prj_burden_list_line` +-- +ALTER TABLE `prj_burden_list_line` + ADD PRIMARY KEY (`prj_burden_list_line_id`), + ADD UNIQUE KEY `mdm_price_list_header_id` (`prj_burden_list_header_id`,`bu_org_id`,`multiplier`,`effective_start_date`); + +-- +-- Indexes for table `prj_burden_structure_costcode` +-- +ALTER TABLE `prj_burden_structure_costcode` + ADD PRIMARY KEY (`prj_burden_structure_costcode_id`), + ADD UNIQUE KEY `prj_burden_structure_header_id` (`prj_burden_structure_header_id`,`burden_cost_code_id`,`burden_cost_base_id`); + +-- +-- Indexes for table `prj_burden_structure_expendituretype` +-- +ALTER TABLE `prj_burden_structure_expendituretype` + ADD PRIMARY KEY (`prj_burden_structure_expendituretype_id`), + ADD UNIQUE KEY `prj_burden_structure_header_id` (`prj_burden_structure_header_id`,`prj_expenditure_type_id`); + +-- +-- Indexes for table `prj_burden_structure_header` +-- +ALTER TABLE `prj_burden_structure_header` + ADD PRIMARY KEY (`prj_burden_structure_header_id`), + ADD UNIQUE KEY `value_group` (`structure`); + +-- +-- Indexes for table `prj_category_header` +-- +ALTER TABLE `prj_category_header` + ADD PRIMARY KEY (`prj_category_header_id`), + ADD UNIQUE KEY `value_group` (`category`); + +-- +-- Indexes for table `prj_category_line` +-- +ALTER TABLE `prj_category_line` + ADD PRIMARY KEY (`prj_category_line_id`), + ADD UNIQUE KEY `sys_catalog_header_id` (`prj_category_header_id`,`category_code`); + +-- +-- Indexes for table `prj_category_value` +-- +ALTER TABLE `prj_category_value` + ADD PRIMARY KEY (`prj_category_value_id`), + ADD UNIQUE KEY `sys_catalog_line_id` (`prj_project_header_id`,`reference_table`,`reference_id`); + +-- +-- Indexes for table `prj_default_account` +-- +ALTER TABLE `prj_default_account` + ADD PRIMARY KEY (`prj_default_account_id`), + ADD UNIQUE KEY `gl_calendar_id` (`description`); + +-- +-- Indexes for table `prj_event_header` +-- +ALTER TABLE `prj_event_header` + ADD PRIMARY KEY (`prj_event_header_id`), + ADD UNIQUE KEY `prj_project_header_id` (`prj_project_header_id`); + +-- +-- Indexes for table `prj_event_line` +-- +ALTER TABLE `prj_event_line` + ADD PRIMARY KEY (`prj_event_line_id`), + ADD UNIQUE KEY `value_group` (`event_type_id`); + +-- +-- Indexes for table `prj_event_type` +-- +ALTER TABLE `prj_event_type` + ADD PRIMARY KEY (`prj_event_type_id`), + ADD UNIQUE KEY `value_group` (`event_type`); + +-- +-- Indexes for table `prj_expenditure_header` +-- +ALTER TABLE `prj_expenditure_header` + ADD PRIMARY KEY (`prj_expenditure_header_id`), + ADD UNIQUE KEY `value_group` (`batch_name`); + +-- +-- Indexes for table `prj_expenditure_line` +-- +ALTER TABLE `prj_expenditure_line` + ADD PRIMARY KEY (`prj_expenditure_line_id`), + ADD UNIQUE KEY `sys_catalog_header_id` (`prj_expenditure_header_id`,`org_id`); + +-- +-- Indexes for table `prj_expenditure_type_header` +-- +ALTER TABLE `prj_expenditure_type_header` + ADD PRIMARY KEY (`prj_expenditure_type_header_id`), + ADD UNIQUE KEY `value_group` (`expenditure_type`); + +-- +-- Indexes for table `prj_expenditure_type_line` +-- +ALTER TABLE `prj_expenditure_type_line` + ADD PRIMARY KEY (`prj_expenditure_type_line_id`), + ADD UNIQUE KEY `sys_catalog_header_id` (`prj_expenditure_type_header_id`,`bu_org_id`); + +-- +-- Indexes for table `prj_invoice_header` +-- +ALTER TABLE `prj_invoice_header` + ADD PRIMARY KEY (`prj_invoice_header_id`), + ADD UNIQUE KEY `transaction_number` (`unbilled_coa_id`); + +-- +-- Indexes for table `prj_invoice_line` +-- +ALTER TABLE `prj_invoice_line` + ADD PRIMARY KEY (`prj_invoice_line_id`), + ADD UNIQUE KEY `transaction_number` (`revenue_source`); + +-- +-- Indexes for table `prj_milestone` +-- +ALTER TABLE `prj_milestone` + ADD PRIMARY KEY (`prj_milestone_id`), + ADD UNIQUE KEY `prj_project_line_id` (`prj_project_line_id`); + +-- +-- Indexes for table `prj_nlr_header` +-- +ALTER TABLE `prj_nlr_header` + ADD PRIMARY KEY (`prj_nlr_header_id`), + ADD UNIQUE KEY `value_group` (`resource_name`); + +-- +-- Indexes for table `prj_nlr_line` +-- +ALTER TABLE `prj_nlr_line` + ADD PRIMARY KEY (`prj_nlr_line_id`), + ADD UNIQUE KEY `sys_catalog_header_id` (`prj_nlr_header_id`,`bu_org_id`); + +-- +-- Indexes for table `prj_percent_header` +-- +ALTER TABLE `prj_percent_header` + ADD PRIMARY KEY (`prj_percent_header_id`), + ADD UNIQUE KEY `value_group` (`percent`); + +-- +-- Indexes for table `prj_percent_headerrev` +-- +ALTER TABLE `prj_percent_headerrev` + ADD PRIMARY KEY (`prj_percent_headerrev_id`), + ADD UNIQUE KEY `value_group` (`percent`); + +-- +-- Indexes for table `prj_percent_line` +-- +ALTER TABLE `prj_percent_line` + ADD PRIMARY KEY (`prj_percent_line_id`), + ADD UNIQUE KEY `value_group` (`prj_project_header_id`); + +-- +-- Indexes for table `prj_project_control` +-- +ALTER TABLE `prj_project_control` + ADD PRIMARY KEY (`prj_project_control_id`); + +-- +-- Indexes for table `prj_project_header` +-- +ALTER TABLE `prj_project_header` + ADD PRIMARY KEY (`prj_project_header_id`); + +-- +-- Indexes for table `prj_project_line` +-- +ALTER TABLE `prj_project_line` + ADD PRIMARY KEY (`prj_project_line_id`); + +-- +-- Indexes for table `prj_project_member` +-- +ALTER TABLE `prj_project_member` + ADD PRIMARY KEY (`prj_project_member_id`); + +-- +-- Indexes for table `prj_project_type_billing` +-- +ALTER TABLE `prj_project_type_billing` + ADD PRIMARY KEY (`prj_project_type_billing_id`); + +-- +-- Indexes for table `prj_project_type_header` +-- +ALTER TABLE `prj_project_type_header` + ADD PRIMARY KEY (`prj_project_type_header_id`), + ADD UNIQUE KEY `value_group` (`project_type`); + +-- +-- Indexes for table `prj_project_type_line` +-- +ALTER TABLE `prj_project_type_line` + ADD PRIMARY KEY (`prj_project_type_line_id`); + +-- +-- Indexes for table `prj_rate_schedule_header` +-- +ALTER TABLE `prj_rate_schedule_header` + ADD PRIMARY KEY (`prj_rate_schedule_header_id`), + ADD UNIQUE KEY `value_group` (`schedule_name`); + +-- +-- Indexes for table `prj_rate_schedule_line` +-- +ALTER TABLE `prj_rate_schedule_line` + ADD PRIMARY KEY (`prj_rate_schedule_line_id`), + ADD UNIQUE KEY `sys_catalog_header_id` (`prj_rate_schedule_header_id`,`reference_key_name`); + +-- +-- Indexes for table `prj_resource_list_header` +-- +ALTER TABLE `prj_resource_list_header` + ADD PRIMARY KEY (`prj_resource_list_header_id`), + ADD UNIQUE KEY `value_group` (`list_name`); + +-- +-- Indexes for table `prj_resource_list_line` +-- +ALTER TABLE `prj_resource_list_line` + ADD PRIMARY KEY (`prj_resource_list_line_id`), + ADD UNIQUE KEY `sys_catalog_header_id` (`prj_resource_list_header_id`,`resource_type`); + +-- +-- Indexes for table `prj_revenue_header` +-- +ALTER TABLE `prj_revenue_header` + ADD PRIMARY KEY (`prj_revenue_header_id`); + +-- +-- Indexes for table `prj_revenue_line` +-- +ALTER TABLE `prj_revenue_line` + ADD PRIMARY KEY (`prj_revenue_line_id`), + ADD UNIQUE KEY `prj_revenue_header_id` (`prj_revenue_header_id`,`line_number`); + +-- +-- Indexes for table `prj_role` +-- +ALTER TABLE `prj_role` + ADD PRIMARY KEY (`prj_role_id`), + ADD UNIQUE KEY `value_group` (`role_name`); + +-- +-- Indexes for table `prj_status_header` +-- +ALTER TABLE `prj_status_header` + ADD PRIMARY KEY (`prj_status_header_id`); + +-- +-- Indexes for table `prj_status_line` +-- +ALTER TABLE `prj_status_line` + ADD PRIMARY KEY (`prj_status_line_id`), + ADD UNIQUE KEY `sd_so_header_id_2` (`prj_status_header_id`,`action_code`), + ADD UNIQUE KEY `sd_so_header_id` (`prj_status_header_id`,`default_cb`); + +-- +-- Indexes for table `prj_status_next` +-- +ALTER TABLE `prj_status_next` + ADD PRIMARY KEY (`prj_status_next_id`), + ADD UNIQUE KEY `sd_so_header_id_2` (`prj_status_header_id`,`status_name`), + ADD UNIQUE KEY `sd_so_header_id` (`prj_status_header_id`); + +-- +-- Indexes for table `prj_work_type` +-- +ALTER TABLE `prj_work_type` + ADD PRIMARY KEY (`prj_work_type_id`), + ADD UNIQUE KEY `value_group` (`work_type`); + +-- +-- Indexes for table `product` +-- +ALTER TABLE `product` + ADD PRIMARY KEY (`content_id`); + +-- +-- Indexes for table `qa_ce_action_type` +-- +ALTER TABLE `qa_ce_action_type` + ADD PRIMARY KEY (`qa_ce_action_type_id`), + ADD UNIQUE KEY `colletion_element_value` (`qa_ce_action_type_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `qa_ce_bgm_calibration_reading` +-- +ALTER TABLE `qa_ce_bgm_calibration_reading` + ADD PRIMARY KEY (`qa_ce_bgm_calibration_reading_id`), + ADD UNIQUE KEY `colletion_element_value` (`qa_ce_bgm_calibration_reading_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `qa_ce_enc_rating` +-- +ALTER TABLE `qa_ce_enc_rating` + ADD PRIMARY KEY (`qa_ce_enc_rating_id`), + ADD UNIQUE KEY `colletion_element_value` (`qa_ce_enc_rating_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `qa_ce_higher_bandwidth1` +-- +ALTER TABLE `qa_ce_higher_bandwidth1` + ADD PRIMARY KEY (`qa_ce_higher_bandwidth1_id`), + ADD UNIQUE KEY `colletion_element_value` (`qa_ce_higher_bandwidth1_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `qa_ce_lower_bandwidth1` +-- +ALTER TABLE `qa_ce_lower_bandwidth1` + ADD PRIMARY KEY (`qa_ce_lower_bandwidth1_id`), + ADD UNIQUE KEY `colletion_element_value` (`qa_ce_lower_bandwidth1_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `qa_ce_lower_bandwidth2` +-- +ALTER TABLE `qa_ce_lower_bandwidth2` + ADD PRIMARY KEY (`qa_ce_lower_bandwidth2_id`), + ADD UNIQUE KEY `colletion_element_value` (`qa_ce_lower_bandwidth2_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `qa_ce_quality_rating` +-- +ALTER TABLE `qa_ce_quality_rating` + ADD PRIMARY KEY (`qa_ce_quality_rating_id`), + ADD UNIQUE KEY `colletion_element_value` (`qa_ce_quality_rating_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `qa_ce_spectra_reading` +-- +ALTER TABLE `qa_ce_spectra_reading` + ADD PRIMARY KEY (`qa_ce_spectra_reading_id`), + ADD UNIQUE KEY `colletion_element_value` (`qa_ce_spectra_reading_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `qa_ce_spectrum_range` +-- +ALTER TABLE `qa_ce_spectrum_range` + ADD PRIMARY KEY (`qa_ce_spectrum_range_id`), + ADD UNIQUE KEY `colletion_element_value` (`qa_ce_spectrum_range_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `qa_collection_element_action` +-- +ALTER TABLE `qa_collection_element_action` + ADD PRIMARY KEY (`qa_collection_element_action_id`); + +-- +-- Indexes for table `qa_collection_element_header` +-- +ALTER TABLE `qa_collection_element_header` + ADD PRIMARY KEY (`qa_collection_element_header_id`), + ADD UNIQUE KEY `element_name` (`element_name`), + ADD UNIQUE KEY `sys_element_name` (`sys_element_name`); + +-- +-- Indexes for table `qa_collection_element_line` +-- +ALTER TABLE `qa_collection_element_line` + ADD PRIMARY KEY (`qa_collection_element_line_id`); + +-- +-- Indexes for table `qa_cp_assignment_header` +-- +ALTER TABLE `qa_cp_assignment_header` + ADD PRIMARY KEY (`qa_cp_assignment_header_id`); + +-- +-- Indexes for table `qa_cp_assignment_line` +-- +ALTER TABLE `qa_cp_assignment_line` + ADD PRIMARY KEY (`qa_cp_assignment_line_id`); + +-- +-- Indexes for table `qa_cp_header` +-- +ALTER TABLE `qa_cp_header` + ADD PRIMARY KEY (`qa_cp_header_id`); + +-- +-- Indexes for table `qa_cp_line` +-- +ALTER TABLE `qa_cp_line` + ADD PRIMARY KEY (`qa_cp_line_id`); + +-- +-- Indexes for table `qa_specification_header` +-- +ALTER TABLE `qa_specification_header` + ADD PRIMARY KEY (`qa_specification_header_id`); + +-- +-- Indexes for table `qa_specification_line` +-- +ALTER TABLE `qa_specification_line` + ADD PRIMARY KEY (`qa_specification_line_id`); + +-- +-- Indexes for table `role_access` +-- +ALTER TABLE `role_access` + ADD PRIMARY KEY (`role_access_id`); + +-- +-- Indexes for table `role_path` +-- +ALTER TABLE `role_path` + ADD PRIMARY KEY (`role_path_id`); + +-- +-- Indexes for table `sd_delivery_header` +-- +ALTER TABLE `sd_delivery_header` + ADD PRIMARY KEY (`sd_delivery_header_id`); + +-- +-- Indexes for table `sd_delivery_line` +-- +ALTER TABLE `sd_delivery_line` + ADD PRIMARY KEY (`sd_delivery_line_id`); + +-- +-- Indexes for table `sd_document_relation` +-- +ALTER TABLE `sd_document_relation` + ADD PRIMARY KEY (`mdm_price_list_header_id`), + ADD UNIQUE KEY `org_id` (`module_name`,`currency_code`), + ADD UNIQUE KEY `price_list` (`price_list`); + +-- +-- Indexes for table `sd_document_type` +-- +ALTER TABLE `sd_document_type` + ADD PRIMARY KEY (`sd_document_type_id`), + ADD UNIQUE KEY `document_type_name` (`document_type_name`,`bu_org_id_r`); + +-- +-- Indexes for table `sd_lead` +-- +ALTER TABLE `sd_lead` + ADD PRIMARY KEY (`sd_lead_id`), + ADD UNIQUE KEY `job_code` (`lead_number`), + ADD UNIQUE KEY `job_code_2` (`lead_number`), + ADD UNIQUE KEY `job_name` (`last_name`), + ADD UNIQUE KEY `job_name_2` (`last_name`); + +-- +-- Indexes for table `sd_opportunity` +-- +ALTER TABLE `sd_opportunity` + ADD PRIMARY KEY (`sd_opportunity_id`), + ADD UNIQUE KEY `job_code` (`opportunity_number`), + ADD UNIQUE KEY `job_code_2` (`opportunity_number`), + ADD UNIQUE KEY `job_name` (`last_name`), + ADD UNIQUE KEY `job_name_2` (`last_name`); + +-- +-- Indexes for table `sd_quote_header` +-- +ALTER TABLE `sd_quote_header` + ADD PRIMARY KEY (`sd_quote_header_id`); + +-- +-- Indexes for table `sd_quote_line` +-- +ALTER TABLE `sd_quote_line` + ADD PRIMARY KEY (`sd_quote_line_id`); + +-- +-- Indexes for table `sd_sales_control` +-- +ALTER TABLE `sd_sales_control` + ADD PRIMARY KEY (`sd_sales_control_id`); + +-- +-- Indexes for table `sd_shipping_control` +-- +ALTER TABLE `sd_shipping_control` + ADD PRIMARY KEY (`sd_shipping_control_id`); + +-- +-- Indexes for table `sd_so_header` +-- +ALTER TABLE `sd_so_header` + ADD PRIMARY KEY (`sd_so_header_id`), + ADD UNIQUE KEY `order_reference_table` (`order_reference_table`,`order_reference_id`); + +-- +-- Indexes for table `sd_so_line` +-- +ALTER TABLE `sd_so_line` + ADD PRIMARY KEY (`sd_so_line_id`), + ADD UNIQUE KEY `sd_so_header_id_2` (`sd_so_header_id`,`line_number`), + ADD UNIQUE KEY `sd_so_header_id` (`sd_so_header_id`,`item_id_m`,`requested_date`); + +-- +-- Indexes for table `sd_store` +-- +ALTER TABLE `sd_store` + ADD PRIMARY KEY (`sd_store_id`), + ADD UNIQUE KEY `org` (`store_name`), + ADD UNIQUE KEY `code` (`code`), + ADD KEY `inventory_id` (`org_id`); + +-- +-- Indexes for table `sd_store_subinventory` +-- +ALTER TABLE `sd_store_subinventory` + ADD PRIMARY KEY (`sd_store_subinventory_id`), + ADD UNIQUE KEY `sd_store_id` (`sd_store_id`,`subinventory_id`); + +-- +-- Indexes for table `sf_item_file1` +-- +ALTER TABLE `sf_item_file1` + ADD PRIMARY KEY (`sf_item_file1_id`), + ADD UNIQUE KEY `secondary_field_value` (`sf_item_file1_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `sf_item_image1` +-- +ALTER TABLE `sf_item_image1` + ADD PRIMARY KEY (`sf_item_image1_id`), + ADD UNIQUE KEY `secondary_field_value` (`sf_item_image1_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `sf_item_image2` +-- +ALTER TABLE `sf_item_image2` + ADD PRIMARY KEY (`sf_item_image2_id`), + ADD UNIQUE KEY `secondary_field_value` (`sf_item_image2_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `sf_item_inv_category` +-- +ALTER TABLE `sf_item_inv_category` + ADD PRIMARY KEY (`sf_item_inv_category_id`), + ADD UNIQUE KEY `secondary_field_value` (`sf_item_inv_category_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `sf_item_pur_category` +-- +ALTER TABLE `sf_item_pur_category` + ADD PRIMARY KEY (`sf_item_pur_category_id`), + ADD UNIQUE KEY `secondary_field_value` (`sf_item_pur_category_value`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `site_info` +-- +ALTER TABLE `site_info` + ADD UNIQUE KEY `name` (`site_name`); + +-- +-- Indexes for table `subinventory` +-- +ALTER TABLE `subinventory` + ADD PRIMARY KEY (`subinventory_id`); + +-- +-- Indexes for table `supplier` +-- +ALTER TABLE `supplier` + ADD PRIMARY KEY (`supplier_id`), + ADD UNIQUE KEY `supplier_number` (`supplier_number`), + ADD UNIQUE KEY `supplier_name` (`supplier_name`); + +-- +-- Indexes for table `supplier_bu` +-- +ALTER TABLE `supplier_bu` + ADD PRIMARY KEY (`supplier_bu_id`), + ADD UNIQUE KEY `supplier_id` (`supplier_id`,`org_id`); + +-- +-- Indexes for table `supplier_site` +-- +ALTER TABLE `supplier_site` + ADD PRIMARY KEY (`supplier_site_id`), + ADD UNIQUE KEY `supplier_site_number` (`supplier_site_number`), + ADD KEY `supplier_site_ref` (`supplier_site_ref`); + +-- +-- Indexes for table `system_path` +-- +ALTER TABLE `system_path` + ADD PRIMARY KEY (`path_id`); + +-- +-- Indexes for table `sys_catalog_header` +-- +ALTER TABLE `sys_catalog_header` + ADD PRIMARY KEY (`sys_catalog_header_id`), + ADD UNIQUE KEY `value_group` (`catalog`); + +-- +-- Indexes for table `sys_catalog_line` +-- +ALTER TABLE `sys_catalog_line` + ADD PRIMARY KEY (`sys_catalog_line_id`), + ADD UNIQUE KEY `sys_catalog_header_id` (`sys_catalog_header_id`,`line_name`); + +-- +-- Indexes for table `sys_catalog_value` +-- +ALTER TABLE `sys_catalog_value` + ADD PRIMARY KEY (`sys_catalog_value_id`), + ADD UNIQUE KEY `sys_catalog_line_id` (`sys_catalog_line_id`,`reference_table`,`reference_id`); + +-- +-- Indexes for table `sys_document_sequence` +-- +ALTER TABLE `sys_document_sequence` + ADD PRIMARY KEY (`sys_document_sequence_id`), + ADD UNIQUE KEY `org_id` (`bu_org_id`,`next_number`,`document_type`); + +-- +-- Indexes for table `sys_dynamic_block_header` +-- +ALTER TABLE `sys_dynamic_block_header` + ADD PRIMARY KEY (`sys_dynamic_block_header_id`), + ADD UNIQUE KEY `reference_table` (`block_id`,`name`); + +-- +-- Indexes for table `sys_dynamic_block_line` +-- +ALTER TABLE `sys_dynamic_block_line` + ADD PRIMARY KEY (`sys_dynamic_block_line_id`), + ADD UNIQUE KEY `reference_table` (`dynamic_block_header_id`,`content_type`); + +-- +-- Indexes for table `sys_extra_field` +-- +ALTER TABLE `sys_extra_field` + ADD PRIMARY KEY (`sys_extra_field_id`); + +-- +-- Indexes for table `sys_extra_field_instance` +-- +ALTER TABLE `sys_extra_field_instance` + ADD PRIMARY KEY (`sys_extra_field_instance_id`), + ADD UNIQUE KEY `sys_extra_field_id` (`sys_extra_field_id`,`reference_type`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `sys_hold` +-- +ALTER TABLE `sys_hold` + ADD PRIMARY KEY (`sys_hold_id`), + ADD UNIQUE KEY `job_code` (`hold_code`), + ADD UNIQUE KEY `job_name` (`hold_name`), + ADD UNIQUE KEY `job_code_2` (`hold_code`), + ADD UNIQUE KEY `job_name_2` (`hold_name`); + +-- +-- Indexes for table `sys_hold_reference` +-- +ALTER TABLE `sys_hold_reference` + ADD PRIMARY KEY (`sys_hold_reference_id`), + ADD UNIQUE KEY `hold_code` (`hold_code`,`reference_table`,`reference_id`,`hold_count`); + +-- +-- Indexes for table `sys_message_format` +-- +ALTER TABLE `sys_message_format` + ADD PRIMARY KEY (`sys_message_format_id`); + +-- +-- Indexes for table `sys_notification` +-- +ALTER TABLE `sys_notification` + ADD PRIMARY KEY (`sys_notification_id`); + +-- +-- Indexes for table `sys_notification_group` +-- +ALTER TABLE `sys_notification_group` + ADD PRIMARY KEY (`sys_notification_group_id`), + ADD UNIQUE KEY `user_name` (`notification_name`); + +-- +-- Indexes for table `sys_pd_header` +-- +ALTER TABLE `sys_pd_header` + ADD PRIMARY KEY (`sys_pd_header_id`), + ADD UNIQUE KEY `release_number` (`security_level`,`change_type`), + ADD UNIQUE KEY `po_header_id` (`sys_pd_header_id`,`security_level`); + +-- +-- Indexes for table `sys_pd_process_flow_action` +-- +ALTER TABLE `sys_pd_process_flow_action` + ADD PRIMARY KEY (`sys_pd_process_flow_action_id`), + ADD UNIQUE KEY `sys_pd_header_id` (`sys_pd_header_id`,`sys_process_flow_line_id`); + +-- +-- Indexes for table `sys_pd_process_flow_action_value` +-- +ALTER TABLE `sys_pd_process_flow_action_value` + ADD PRIMARY KEY (`sys_pd_process_flow_action_value_id`), + ADD UNIQUE KEY `document_type_name` (`sys_process_flow_action_id`,`comment`); + +-- +-- Indexes for table `sys_permission` +-- +ALTER TABLE `sys_permission` + ADD PRIMARY KEY (`sys_permission_id`), + ADD UNIQUE KEY `permision` (`permision`,`class`); + +-- +-- Indexes for table `sys_printer` +-- +ALTER TABLE `sys_printer` + ADD PRIMARY KEY (`sys_printer_id`), + ADD UNIQUE KEY `printer_name` (`printer_name`); + +-- +-- Indexes for table `sys_process_flow_action` +-- +ALTER TABLE `sys_process_flow_action` + ADD PRIMARY KEY (`sys_process_flow_action_id`), + ADD UNIQUE KEY `document_type_name` (`sys_process_flow_line_id`,`role_code`), + ADD UNIQUE KEY `sys_process_flow_line_id` (`sys_process_flow_line_id`,`role_code`), + ADD UNIQUE KEY `sys_process_flow_line_id_2` (`sys_process_flow_line_id`,`user_id`); + +-- +-- Indexes for table `sys_process_flow_action_value` +-- +ALTER TABLE `sys_process_flow_action_value` + ADD PRIMARY KEY (`sys_process_flow_action_value_id`), + ADD UNIQUE KEY `document_type_name` (`sys_process_flow_action_id`,`comment`); + +-- +-- Indexes for table `sys_process_flow_header` +-- +ALTER TABLE `sys_process_flow_header` + ADD PRIMARY KEY (`sys_process_flow_header_id`), + ADD UNIQUE KEY `document_type_name` (`process_flow`,`module_name`); + +-- +-- Indexes for table `sys_process_flow_line` +-- +ALTER TABLE `sys_process_flow_line` + ADD PRIMARY KEY (`sys_process_flow_line_id`), + ADD UNIQUE KEY `document_type_name` (`sys_process_flow_header_id`,`line_name`); + +-- +-- Indexes for table `sys_profile_header` +-- +ALTER TABLE `sys_profile_header` + ADD PRIMARY KEY (`sys_profile_header_id`), + ADD UNIQUE KEY `profile_name` (`profile_name`); + +-- +-- Indexes for table `sys_profile_line` +-- +ALTER TABLE `sys_profile_line` + ADD PRIMARY KEY (`sys_profile_line_id`), + ADD UNIQUE KEY `sys_profile_header_id_2` (`sys_profile_header_id`,`profile_level`,`level_name`,`level_value`); + +-- +-- Indexes for table `sys_program` +-- +ALTER TABLE `sys_program` + ADD PRIMARY KEY (`sys_program_id`); + +-- +-- Indexes for table `sys_program_schedule` +-- +ALTER TABLE `sys_program_schedule` + ADD PRIMARY KEY (`sys_program_schedule_id`); + +-- +-- Indexes for table `sys_program_status` +-- +ALTER TABLE `sys_program_status` + ADD PRIMARY KEY (`sys_program_status_id`); + +-- +-- Indexes for table `sys_rfid_interface` +-- +ALTER TABLE `sys_rfid_interface` + ADD PRIMARY KEY (`sys_rfid_interface_id`), + ADD UNIQUE KEY `tag_number` (`tag_number`,`antena_number`,`time_stamp`); + +-- +-- Indexes for table `sys_role_permission` +-- +ALTER TABLE `sys_role_permission` + ADD PRIMARY KEY (`sys_role_permission_id`); + +-- +-- Indexes for table `sys_secondary_field` +-- +ALTER TABLE `sys_secondary_field` + ADD PRIMARY KEY (`sys_secondary_field_id`); + +-- +-- Indexes for table `sys_secondary_field_instance` +-- +ALTER TABLE `sys_secondary_field_instance` + ADD PRIMARY KEY (`sys_secondary_field_instance_id`), + ADD UNIQUE KEY `sys_extra_field_id` (`sys_secondary_field_id`,`reference_type`,`reference_key_name`,`reference_key_value`); + +-- +-- Indexes for table `sys_spd_header` +-- +ALTER TABLE `sys_spd_header` + ADD PRIMARY KEY (`sys_spd_header_id`), + ADD UNIQUE KEY `release_number` (`security_level`,`change_type`), + ADD UNIQUE KEY `po_header_id` (`sys_spd_header_id`,`security_level`), + ADD UNIQUE KEY `primary_document` (`primary_document`,`primary_document_id`); + +-- +-- Indexes for table `sys_spd_process_flow_action` +-- +ALTER TABLE `sys_spd_process_flow_action` + ADD PRIMARY KEY (`sys_spd_process_flow_action_id`), + ADD UNIQUE KEY `sys_pd_header_id` (`sys_spd_header_id`,`sys_process_flow_line_id`); + +-- +-- Indexes for table `sys_value_group_header` +-- +ALTER TABLE `sys_value_group_header` + ADD PRIMARY KEY (`sys_value_group_header_id`), + ADD UNIQUE KEY `value_group` (`value_group`); + +-- +-- Indexes for table `sys_value_group_line` +-- +ALTER TABLE `sys_value_group_line` + ADD PRIMARY KEY (`sys_value_group_line_id`), + ADD UNIQUE KEY `sys_value_group_header_id` (`sys_value_group_header_id`,`code`), + ADD KEY `option_header_id` (`sys_value_group_header_id`); + +-- +-- Indexes for table `transaction_type` +-- +ALTER TABLE `transaction_type` + ADD PRIMARY KEY (`transaction_type_id`); + +-- +-- Indexes for table `uom` +-- +ALTER TABLE `uom` + ADD PRIMARY KEY (`uom_id`), + ADD UNIQUE KEY `name` (`uom_name`); + +-- +-- Indexes for table `user` +-- +ALTER TABLE `user` + ADD PRIMARY KEY (`user_id`), + ADD UNIQUE KEY `email` (`email`), + ADD UNIQUE KEY `user_name` (`username`); + +-- +-- Indexes for table `user_dashboard_config` +-- +ALTER TABLE `user_dashboard_config` + ADD PRIMARY KEY (`user_dashboard_config_id`); + +-- +-- Indexes for table `user_favourite` +-- +ALTER TABLE `user_favourite` + ADD PRIMARY KEY (`user_favourite_id`); + +-- +-- Indexes for table `user_group` +-- +ALTER TABLE `user_group` + ADD PRIMARY KEY (`user_group_id`), + ADD UNIQUE KEY `user_group_code` (`user_group_code`,`user_id`); + +-- +-- Indexes for table `user_group_access` +-- +ALTER TABLE `user_group_access` + ADD PRIMARY KEY (`user_group_access_id`), + ADD UNIQUE KEY `user_group_code` (`user_group_code`,`org_id`,`access_level`); + +-- +-- Indexes for table `user_password_reset` +-- +ALTER TABLE `user_password_reset` + ADD PRIMARY KEY (`user_password_reset_id`); + +-- +-- Indexes for table `user_role` +-- +ALTER TABLE `user_role` + ADD PRIMARY KEY (`user_role_id`); + +-- +-- Indexes for table `user_supplier` +-- +ALTER TABLE `user_supplier` + ADD PRIMARY KEY (`user_supplier_id`); + +-- +-- Indexes for table `view` +-- +ALTER TABLE `view` + ADD PRIMARY KEY (`view_id`), + ADD UNIQUE KEY `name` (`view_name`); + +-- +-- Indexes for table `view_path` +-- +ALTER TABLE `view_path` + ADD PRIMARY KEY (`view_path_id`), + ADD UNIQUE KEY `view_id` (`view_id`,`column_name`); + +-- +-- Indexes for table `wip_accounting_group` +-- +ALTER TABLE `wip_accounting_group` + ADD PRIMARY KEY (`wip_accounting_group_id`), + ADD UNIQUE KEY `org_id` (`org_id`,`wip_accounting_group`); + +-- +-- Indexes for table `wip_control` +-- +ALTER TABLE `wip_control` + ADD PRIMARY KEY (`wip_control_id`); + +-- +-- Indexes for table `wip_move_transaction` +-- +ALTER TABLE `wip_move_transaction` + ADD PRIMARY KEY (`wip_move_transaction_id`); + +-- +-- Indexes for table `wip_resource_transaction` +-- +ALTER TABLE `wip_resource_transaction` + ADD PRIMARY KEY (`wip_resource_transaction_id`); + +-- +-- Indexes for table `wip_wol_transaction` +-- +ALTER TABLE `wip_wol_transaction` + ADD PRIMARY KEY (`wip_wol_transaction_id`), + ADD UNIQUE KEY `wo_number` (`description`); + +-- +-- Indexes for table `wip_wo_bom` +-- +ALTER TABLE `wip_wo_bom` + ADD PRIMARY KEY (`wip_wo_bom_id`), + ADD UNIQUE KEY `bom_header_id` (`wip_wo_header_id`,`bom_sequence`), + ADD UNIQUE KEY `bom_header_id_2` (`wip_wo_header_id`,`routing_sequence`,`component_item_id_m`); + +-- +-- Indexes for table `wip_wo_header` +-- +ALTER TABLE `wip_wo_header` + ADD PRIMARY KEY (`wip_wo_header_id`), + ADD UNIQUE KEY `wo_number` (`wo_number`); + +-- +-- Indexes for table `wip_wo_routing_detail` +-- +ALTER TABLE `wip_wo_routing_detail` + ADD PRIMARY KEY (`wip_wo_routing_detail_id`), + ADD UNIQUE KEY `wip_wo_routing_line_id` (`wip_wo_routing_line_id`,`resource_sequence`); + +-- +-- Indexes for table `wip_wo_routing_line` +-- +ALTER TABLE `wip_wo_routing_line` + ADD PRIMARY KEY (`wip_wo_routing_line_id`), + ADD UNIQUE KEY `bom_header_id` (`wip_wo_header_id`,`routing_sequence`); + +-- +-- AUTO_INCREMENT for dumped tables +-- + +-- +-- AUTO_INCREMENT for table `address` +-- +ALTER TABLE `address` + MODIFY `address_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=105; +-- +-- AUTO_INCREMENT for table `address_reference` +-- +ALTER TABLE `address_reference` + MODIFY `address_reference_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `adm_task_status` +-- +ALTER TABLE `adm_task_status` + MODIFY `adm_task_status_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `adm_task_template_header` +-- +ALTER TABLE `adm_task_template_header` + MODIFY `adm_task_template_header_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `adm_task_template_line` +-- +ALTER TABLE `adm_task_template_line` + MODIFY `adm_task_template_line_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `adm_task_type` +-- +ALTER TABLE `adm_task_type` + MODIFY `adm_task_type_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `am_activity_reference` +-- +ALTER TABLE `am_activity_reference` + MODIFY `am_activity_reference_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `am_asset` +-- +ALTER TABLE `am_asset` + MODIFY `am_asset_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `am_maintenance_schedule` +-- +ALTER TABLE `am_maintenance_schedule` + MODIFY `am_maintenance_schedule_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `am_meter` +-- +ALTER TABLE `am_meter` + MODIFY `am_meter_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `am_ms_activity_reference` +-- +ALTER TABLE `am_ms_activity_reference` + MODIFY `am_ms_activity_reference_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `am_ms_calendar_date` +-- +ALTER TABLE `am_ms_calendar_date` + MODIFY `am_ms_calendar_date_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; +-- +-- AUTO_INCREMENT for table `am_ms_date_rule` +-- +ALTER TABLE `am_ms_date_rule` + MODIFY `am_ms_date_rule_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `am_ms_meter_rule` +-- +ALTER TABLE `am_ms_meter_rule` + MODIFY `am_ms_meter_rule_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `am_planned_wo` +-- +ALTER TABLE `am_planned_wo` + MODIFY `am_wo_header_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `am_wo_bom` +-- +ALTER TABLE `am_wo_bom` + MODIFY `am_wo_bom_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49; +-- +-- AUTO_INCREMENT for table `am_wo_header` +-- +ALTER TABLE `am_wo_header` + MODIFY `am_wo_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25; +-- +-- AUTO_INCREMENT for table `am_wo_routing_detail` +-- +ALTER TABLE `am_wo_routing_detail` + MODIFY `am_wo_routing_detail_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24; +-- +-- AUTO_INCREMENT for table `am_wo_routing_line` +-- +ALTER TABLE `am_wo_routing_line` + MODIFY `am_wo_routing_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24; +-- +-- AUTO_INCREMENT for table `ap_payable_control` +-- +ALTER TABLE `ap_payable_control` + MODIFY `ap_payable_control_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `ap_payment_header` +-- +ALTER TABLE `ap_payment_header` + MODIFY `ap_payment_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=121; +-- +-- AUTO_INCREMENT for table `ap_payment_interface` +-- +ALTER TABLE `ap_payment_interface` + MODIFY `ap_payment_interface_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `ap_payment_line` +-- +ALTER TABLE `ap_payment_line` + MODIFY `ap_payment_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=308; +-- +-- AUTO_INCREMENT for table `ap_payment_process` +-- +ALTER TABLE `ap_payment_process` + MODIFY `ap_payment_process_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `ap_payment_terms` +-- +ALTER TABLE `ap_payment_terms` + MODIFY `term_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `ap_transaction_detail` +-- +ALTER TABLE `ap_transaction_detail` + MODIFY `ap_transaction_detail_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=224; +-- +-- AUTO_INCREMENT for table `ap_transaction_header` +-- +ALTER TABLE `ap_transaction_header` + MODIFY `ap_transaction_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=80; +-- +-- AUTO_INCREMENT for table `ap_transaction_line` +-- +ALTER TABLE `ap_transaction_line` + MODIFY `ap_transaction_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=175; +-- +-- AUTO_INCREMENT for table `ar_customer` +-- +ALTER TABLE `ar_customer` + MODIFY `ar_customer_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; +-- +-- AUTO_INCREMENT for table `ar_customer_bu` +-- +ALTER TABLE `ar_customer_bu` + MODIFY `ar_customer_bu_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `ar_customer_relation` +-- +ALTER TABLE `ar_customer_relation` + MODIFY `ar_customer_relation_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `ar_customer_site` +-- +ALTER TABLE `ar_customer_site` + MODIFY `ar_customer_site_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; +-- +-- AUTO_INCREMENT for table `ar_payment_process` +-- +ALTER TABLE `ar_payment_process` + MODIFY `ar_receipt_source_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `ar_receipt_header` +-- +ALTER TABLE `ar_receipt_header` + MODIFY `ar_receipt_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23; +-- +-- AUTO_INCREMENT for table `ar_receipt_interface` +-- +ALTER TABLE `ar_receipt_interface` + MODIFY `ar_receipt_interface_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `ar_receipt_line` +-- +ALTER TABLE `ar_receipt_line` + MODIFY `ar_receipt_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35; +-- +-- AUTO_INCREMENT for table `ar_receipt_source` +-- +ALTER TABLE `ar_receipt_source` + MODIFY `ar_receipt_source_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `ar_sales_region` +-- +ALTER TABLE `ar_sales_region` + MODIFY `ar_sales_region_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `ar_transaction_detail` +-- +ALTER TABLE `ar_transaction_detail` + MODIFY `ar_transaction_detail_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=146; +-- +-- AUTO_INCREMENT for table `ar_transaction_header` +-- +ALTER TABLE `ar_transaction_header` + MODIFY `ar_transaction_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=78; +-- +-- AUTO_INCREMENT for table `ar_transaction_interface` +-- +ALTER TABLE `ar_transaction_interface` + MODIFY `ar_transaction_interface_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49; +-- +-- AUTO_INCREMENT for table `ar_transaction_line` +-- +ALTER TABLE `ar_transaction_line` + MODIFY `ar_transaction_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=83; +-- +-- AUTO_INCREMENT for table `ar_transaction_source` +-- +ALTER TABLE `ar_transaction_source` + MODIFY `ar_transaction_source_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `ar_transaction_type` +-- +ALTER TABLE `ar_transaction_type` + MODIFY `ar_transaction_type_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `bc_label_auto_trigger` +-- +ALTER TABLE `bc_label_auto_trigger` + MODIFY `bc_label_auto_trigger_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; +-- +-- AUTO_INCREMENT for table `bc_label_format_header` +-- +ALTER TABLE `bc_label_format_header` + MODIFY `bc_label_format_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `bc_label_format_line` +-- +ALTER TABLE `bc_label_format_line` + MODIFY `bc_label_format_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26; +-- +-- AUTO_INCREMENT for table `bc_label_request` +-- +ALTER TABLE `bc_label_request` + MODIFY `bc_label_request_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `bc_static_label` +-- +ALTER TABLE `bc_static_label` + MODIFY `bc_static_label_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `block` +-- +ALTER TABLE `block` + MODIFY `block_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=62; +-- +-- AUTO_INCREMENT for table `block_content` +-- +ALTER TABLE `block_content` + MODIFY `block_content_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22; +-- +-- AUTO_INCREMENT for table `bom_commonbom_line` +-- +ALTER TABLE `bom_commonbom_line` + MODIFY `bom_commonbom_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; +-- +-- AUTO_INCREMENT for table `bom_config_header` +-- +ALTER TABLE `bom_config_header` + MODIFY `bom_config_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; +-- +-- AUTO_INCREMENT for table `bom_config_line` +-- +ALTER TABLE `bom_config_line` + MODIFY `bom_config_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; +-- +-- AUTO_INCREMENT for table `bom_cost_type` +-- +ALTER TABLE `bom_cost_type` + MODIFY `bom_cost_type_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `bom_department` +-- +ALTER TABLE `bom_department` + MODIFY `bom_department_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `bom_department_resource_assignment` +-- +ALTER TABLE `bom_department_resource_assignment` + MODIFY `bom_department_resource_assignment_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; +-- +-- AUTO_INCREMENT for table `bom_header` +-- +ALTER TABLE `bom_header` + MODIFY `bom_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43; +-- +-- AUTO_INCREMENT for table `bom_line` +-- +ALTER TABLE `bom_line` + MODIFY `bom_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=67; +-- +-- AUTO_INCREMENT for table `bom_material_element` +-- +ALTER TABLE `bom_material_element` + MODIFY `bom_material_element_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `bom_overhead` +-- +ALTER TABLE `bom_overhead` + MODIFY `bom_overhead_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `bom_overhead_rate_assignment` +-- +ALTER TABLE `bom_overhead_rate_assignment` + MODIFY `bom_overhead_rate_assignment_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `bom_overhead_resource_assignment` +-- +ALTER TABLE `bom_overhead_resource_assignment` + MODIFY `bom_overhead_resource_assignment_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `bom_resource` +-- +ALTER TABLE `bom_resource` + MODIFY `bom_resource_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `bom_resource_cost` +-- +ALTER TABLE `bom_resource_cost` + MODIFY `bom_resource_cost_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `bom_routing_detail` +-- +ALTER TABLE `bom_routing_detail` + MODIFY `bom_routing_detail_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32; +-- +-- AUTO_INCREMENT for table `bom_routing_header` +-- +ALTER TABLE `bom_routing_header` + MODIFY `bom_routing_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19; +-- +-- AUTO_INCREMENT for table `bom_routing_line` +-- +ALTER TABLE `bom_routing_line` + MODIFY `bom_routing_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25; +-- +-- AUTO_INCREMENT for table `bom_standard_operation` +-- +ALTER TABLE `bom_standard_operation` + MODIFY `bom_standard_operation_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `bom_standard_operation_resource_assignment` +-- +ALTER TABLE `bom_standard_operation_resource_assignment` + MODIFY `bom_standard_operation_resource_assignment_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `business` +-- +ALTER TABLE `business` + MODIFY `business_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `category` +-- +ALTER TABLE `category` + MODIFY `category_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=77; +-- +-- AUTO_INCREMENT for table `category_reference` +-- +ALTER TABLE `category_reference` + MODIFY `category_reference_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=237; +-- +-- AUTO_INCREMENT for table `cc_co_header` +-- +ALTER TABLE `cc_co_header` + MODIFY `cc_co_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `cc_co_line` +-- +ALTER TABLE `cc_co_line` + MODIFY `cc_co_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; +-- +-- AUTO_INCREMENT for table `cc_co_line_value` +-- +ALTER TABLE `cc_co_line_value` + MODIFY `cc_co_line_value_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=84; +-- +-- AUTO_INCREMENT for table `cc_co_process_flow_action` +-- +ALTER TABLE `cc_co_process_flow_action` + MODIFY `cc_co_process_flow_action_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `cc_co_process_flow_action_value` +-- +ALTER TABLE `cc_co_process_flow_action_value` + MODIFY `sys_process_flow_action_value_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `cc_co_template_header` +-- +ALTER TABLE `cc_co_template_header` + MODIFY `cc_co_template_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `cc_co_template_line` +-- +ALTER TABLE `cc_co_template_line` + MODIFY `cc_co_template_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `coa` +-- +ALTER TABLE `coa` + MODIFY `coa_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `coa_combination` +-- +ALTER TABLE `coa_combination` + MODIFY `coa_combination_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6207; +-- +-- AUTO_INCREMENT for table `coa_segment_values` +-- +ALTER TABLE `coa_segment_values` + MODIFY `coa_segment_values_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=90; +-- +-- AUTO_INCREMENT for table `comment` +-- +ALTER TABLE `comment` + MODIFY `comment_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=476; +-- +-- AUTO_INCREMENT for table `common_bom_line` +-- +ALTER TABLE `common_bom_line` + MODIFY `bom_line_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `content` +-- +ALTER TABLE `content` + MODIFY `content_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=269; +-- +-- AUTO_INCREMENT for table `content_type` +-- +ALTER TABLE `content_type` + MODIFY `content_type_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50; +-- +-- AUTO_INCREMENT for table `content_type_reference` +-- +ALTER TABLE `content_type_reference` + MODIFY `content_type_reference_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39; +-- +-- AUTO_INCREMENT for table `cst_item_cost_header` +-- +ALTER TABLE `cst_item_cost_header` + MODIFY `cst_item_cost_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=202; +-- +-- AUTO_INCREMENT for table `cst_item_cost_line` +-- +ALTER TABLE `cst_item_cost_line` + MODIFY `cst_item_cost_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=411; +-- +-- AUTO_INCREMENT for table `cst_item_cost_line_pre` +-- +ALTER TABLE `cst_item_cost_line_pre` + MODIFY `cst_item_cost_line_pre_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=75; +-- +-- AUTO_INCREMENT for table `ec_cart` +-- +ALTER TABLE `ec_cart` + MODIFY `ec_cart_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `ec_paid_order` +-- +ALTER TABLE `ec_paid_order` + MODIFY `ec_paid_order_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22; +-- +-- AUTO_INCREMENT for table `ec_payment_method` +-- +ALTER TABLE `ec_payment_method` + MODIFY `ec_payment_method_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `ec_product` +-- +ALTER TABLE `ec_product` + MODIFY `ec_product_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19; +-- +-- AUTO_INCREMENT for table `engine` +-- +ALTER TABLE `engine` + MODIFY `engine_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=257; +-- +-- AUTO_INCREMENT for table `enterprise` +-- +ALTER TABLE `enterprise` + MODIFY `enterprise_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44; +-- +-- AUTO_INCREMENT for table `extn_contact` +-- +ALTER TABLE `extn_contact` + MODIFY `extn_contact_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `extn_contact_reference` +-- +ALTER TABLE `extn_contact_reference` + MODIFY `extn_contact_reference_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25; +-- +-- AUTO_INCREMENT for table `extn_image` +-- +ALTER TABLE `extn_image` + MODIFY `extn_image_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=110; +-- +-- AUTO_INCREMENT for table `extn_image_reference` +-- +ALTER TABLE `extn_image_reference` + MODIFY `extn_image_reference_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=105; +-- +-- AUTO_INCREMENT for table `extn_rating_control` +-- +ALTER TABLE `extn_rating_control` + MODIFY `pos_inv_control_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `extn_rating_values` +-- +ALTER TABLE `extn_rating_values` + MODIFY `extn_rating_values_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `extn_report` +-- +ALTER TABLE `extn_report` + MODIFY `extn_report_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `extn_report_path` +-- +ALTER TABLE `extn_report_path` + MODIFY `extn_report_path_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `extn_social_login` +-- +ALTER TABLE `extn_social_login` + MODIFY `extn_social_login_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `extn_subscribe` +-- +ALTER TABLE `extn_subscribe` + MODIFY `extn_subscribe_id` int(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `extn_theme` +-- +ALTER TABLE `extn_theme` + MODIFY `extn_theme_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; +-- +-- AUTO_INCREMENT for table `extra_field_calculated_power` +-- +ALTER TABLE `extra_field_calculated_power` + MODIFY `extra_field_calculated_power_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `extra_field_grade` +-- +ALTER TABLE `extra_field_grade` + MODIFY `extra_field_grade_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `extra_field_length` +-- +ALTER TABLE `extra_field_length` + MODIFY `extra_field_length_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `extra_field_per_master_file` +-- +ALTER TABLE `extra_field_per_master_file` + MODIFY `extra_field_per_master_file_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `extra_field_power_cable` +-- +ALTER TABLE `extra_field_power_cable` + MODIFY `extra_field_power_cable_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `extra_field_serial_status` +-- +ALTER TABLE `extra_field_serial_status` + MODIFY `extra_field_serial_status_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `ext_test_case_header` +-- +ALTER TABLE `ext_test_case_header` + MODIFY `ext_test_case_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `ext_test_case_line` +-- +ALTER TABLE `ext_test_case_line` + MODIFY `ext_test_case_line_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `ext_url_alias` +-- +ALTER TABLE `ext_url_alias` + MODIFY `ext_url_alias_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; +-- +-- AUTO_INCREMENT for table `fa_asset` +-- +ALTER TABLE `fa_asset` + MODIFY `fa_asset_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `fa_asset_assignment` +-- +ALTER TABLE `fa_asset_assignment` + MODIFY `fa_asset_assignment_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `fa_asset_book` +-- +ALTER TABLE `fa_asset_book` + MODIFY `fa_asset_book_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `fa_asset_book_info` +-- +ALTER TABLE `fa_asset_book_info` + MODIFY `fa_asset_book_info_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `fa_asset_category` +-- +ALTER TABLE `fa_asset_category` + MODIFY `fa_asset_category_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `fa_asset_component` +-- +ALTER TABLE `fa_asset_component` + MODIFY `fa_asset_component_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `fa_asset_retirement` +-- +ALTER TABLE `fa_asset_retirement` + MODIFY `fa_asset_retirement_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `fa_asset_source` +-- +ALTER TABLE `fa_asset_source` + MODIFY `fa_asset_source_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `fa_asset_trasaction` +-- +ALTER TABLE `fa_asset_trasaction` + MODIFY `fa_asset_trasaction_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `fa_book_category_association` +-- +ALTER TABLE `fa_book_category_association` + MODIFY `fa_book_category_association_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `fa_depreciation_header` +-- +ALTER TABLE `fa_depreciation_header` + MODIFY `fa_depreciation_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `fa_depreciation_line` +-- +ALTER TABLE `fa_depreciation_line` + MODIFY `fa_depreciation_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `fa_depreciation_method` +-- +ALTER TABLE `fa_depreciation_method` + MODIFY `fa_depreciation_method_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `fa_depreciation_method_rate` +-- +ALTER TABLE `fa_depreciation_method_rate` + MODIFY `fa_depreciation_method_rate_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; +-- +-- AUTO_INCREMENT for table `file` +-- +ALTER TABLE `file` + MODIFY `file_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=613; +-- +-- AUTO_INCREMENT for table `file_reference` +-- +ALTER TABLE `file_reference` + MODIFY `file_reference_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=166; +-- +-- AUTO_INCREMENT for table `fp_forecast_consumption` +-- +ALTER TABLE `fp_forecast_consumption` + MODIFY `fp_forecast_consumption_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30; +-- +-- AUTO_INCREMENT for table `fp_forecast_group` +-- +ALTER TABLE `fp_forecast_group` + MODIFY `fp_forecast_group_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `fp_forecast_header` +-- +ALTER TABLE `fp_forecast_header` + MODIFY `fp_forecast_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `fp_forecast_line` +-- +ALTER TABLE `fp_forecast_line` + MODIFY `fp_forecast_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28; +-- +-- AUTO_INCREMENT for table `fp_forecast_line_date` +-- +ALTER TABLE `fp_forecast_line_date` + MODIFY `fp_forecast_line_date_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=248; +-- +-- AUTO_INCREMENT for table `fp_kanban_demand` +-- +ALTER TABLE `fp_kanban_demand` + MODIFY `fp_kanban_demand_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40; +-- +-- AUTO_INCREMENT for table `fp_kanban_header` +-- +ALTER TABLE `fp_kanban_header` + MODIFY `fp_kanban_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `fp_kanban_line` +-- +ALTER TABLE `fp_kanban_line` + MODIFY `fp_kanban_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=157; +-- +-- AUTO_INCREMENT for table `fp_kanban_planner_header` +-- +ALTER TABLE `fp_kanban_planner_header` + MODIFY `fp_kanban_planner_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `fp_mds_header` +-- +ALTER TABLE `fp_mds_header` + MODIFY `fp_mds_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `fp_mds_line` +-- +ALTER TABLE `fp_mds_line` + MODIFY `fp_mds_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=241; +-- +-- AUTO_INCREMENT for table `fp_minmax_demand` +-- +ALTER TABLE `fp_minmax_demand` + MODIFY `fp_minmax_demand_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=348; +-- +-- AUTO_INCREMENT for table `fp_minmax_header` +-- +ALTER TABLE `fp_minmax_header` + MODIFY `fp_minmax_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `fp_minmax_line` +-- +ALTER TABLE `fp_minmax_line` + MODIFY `fp_minmax_line_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `fp_mrp_demand` +-- +ALTER TABLE `fp_mrp_demand` + MODIFY `fp_mrp_demand_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2739; +-- +-- AUTO_INCREMENT for table `fp_mrp_exception` +-- +ALTER TABLE `fp_mrp_exception` + MODIFY `fp_mrp_exception_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=322; +-- +-- AUTO_INCREMENT for table `fp_mrp_header` +-- +ALTER TABLE `fp_mrp_header` + MODIFY `fp_mrp_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `fp_mrp_lowlevel_code` +-- +ALTER TABLE `fp_mrp_lowlevel_code` + MODIFY `fp_mrp_lowlevel_code_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=70; +-- +-- AUTO_INCREMENT for table `fp_mrp_planned_order` +-- +ALTER TABLE `fp_mrp_planned_order` + MODIFY `fp_mrp_planned_order_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=821; +-- +-- AUTO_INCREMENT for table `fp_mrp_supply` +-- +ALTER TABLE `fp_mrp_supply` + MODIFY `fp_mrp_supply_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `fp_planning_control` +-- +ALTER TABLE `fp_planning_control` + MODIFY `fp_planning_control_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `fp_source_list_header` +-- +ALTER TABLE `fp_source_list_header` + MODIFY `fp_source_list_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `fp_source_list_line` +-- +ALTER TABLE `fp_source_list_line` + MODIFY `fp_source_list_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `fp_urgent_card` +-- +ALTER TABLE `fp_urgent_card` + MODIFY `fp_urgent_card_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28; +-- +-- AUTO_INCREMENT for table `gl_balance` +-- +ALTER TABLE `gl_balance` + MODIFY `gl_balance_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=166; +-- +-- AUTO_INCREMENT for table `gl_calendar` +-- +ALTER TABLE `gl_calendar` + MODIFY `gl_calendar_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39; +-- +-- AUTO_INCREMENT for table `gl_currency_conversion` +-- +ALTER TABLE `gl_currency_conversion` + MODIFY `gl_currency_conversion_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `gl_journal_header` +-- +ALTER TABLE `gl_journal_header` + MODIFY `gl_journal_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=358; +-- +-- AUTO_INCREMENT for table `gl_journal_interface` +-- +ALTER TABLE `gl_journal_interface` + MODIFY `gl_journal_interface_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23; +-- +-- AUTO_INCREMENT for table `gl_journal_line` +-- +ALTER TABLE `gl_journal_line` + MODIFY `gl_journal_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=897; +-- +-- AUTO_INCREMENT for table `gl_ledger` +-- +ALTER TABLE `gl_ledger` + MODIFY `gl_ledger_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; +-- +-- AUTO_INCREMENT for table `gl_ledger_balancing_values` +-- +ALTER TABLE `gl_ledger_balancing_values` + MODIFY `gl_ledger_balancing_values_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; +-- +-- AUTO_INCREMENT for table `gl_period` +-- +ALTER TABLE `gl_period` + MODIFY `gl_period_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31; +-- +-- AUTO_INCREMENT for table `hd_change_request` +-- +ALTER TABLE `hd_change_request` + MODIFY `hd_change_request_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `hd_repair_type_line` +-- +ALTER TABLE `hd_repair_type_line` + MODIFY `hd_service_activity_line_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `hd_sbp_header` +-- +ALTER TABLE `hd_sbp_header` + MODIFY `hd_sbp_header_id` int(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `hd_sbp_line` +-- +ALTER TABLE `hd_sbp_line` + MODIFY `hd_sbp_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; +-- +-- AUTO_INCREMENT for table `hd_service_activity_header` +-- +ALTER TABLE `hd_service_activity_header` + MODIFY `hd_service_activity_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `hd_service_activity_line` +-- +ALTER TABLE `hd_service_activity_line` + MODIFY `hd_service_activity_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `hd_service_contract_detail` +-- +ALTER TABLE `hd_service_contract_detail` + MODIFY `hd_service_contract_detail_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `hd_service_contract_header` +-- +ALTER TABLE `hd_service_contract_header` + MODIFY `hd_service_contract_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `hd_service_contract_line` +-- +ALTER TABLE `hd_service_contract_line` + MODIFY `hd_service_contract_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `hd_service_contract_schedule` +-- +ALTER TABLE `hd_service_contract_schedule` + MODIFY `hd_service_contract_schedule_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `hd_service_request` +-- +ALTER TABLE `hd_service_request` + MODIFY `hd_service_request_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `hd_service_type_header` +-- +ALTER TABLE `hd_service_type_header` + MODIFY `hd_service_type_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `hd_service_type_line` +-- +ALTER TABLE `hd_service_type_line` + MODIFY `hd_service_type_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `hd_subscription_detail` +-- +ALTER TABLE `hd_subscription_detail` + MODIFY `hd_subscription_detail_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; +-- +-- AUTO_INCREMENT for table `hd_subscription_header` +-- +ALTER TABLE `hd_subscription_header` + MODIFY `hd_subscription_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `hd_subscription_line` +-- +ALTER TABLE `hd_subscription_line` + MODIFY `hd_subscription_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; +-- +-- AUTO_INCREMENT for table `hd_support_request` +-- +ALTER TABLE `hd_support_request` + MODIFY `hd_support_request_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; +-- +-- AUTO_INCREMENT for table `hd_svo_actuals` +-- +ALTER TABLE `hd_svo_actuals` + MODIFY `hd_svo_actuals_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `hd_svo_estimates` +-- +ALTER TABLE `hd_svo_estimates` + MODIFY `hd_svo_estimates_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `hd_svo_header` +-- +ALTER TABLE `hd_svo_header` + MODIFY `hd_svo_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `hd_svo_line` +-- +ALTER TABLE `hd_svo_line` + MODIFY `hd_svo_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `hd_task_type` +-- +ALTER TABLE `hd_task_type` + MODIFY `hd_task_type_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `hr_approval_limit_assignment` +-- +ALTER TABLE `hr_approval_limit_assignment` + MODIFY `hr_approval_limit_assignment_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22; +-- +-- AUTO_INCREMENT for table `hr_approval_limit_header` +-- +ALTER TABLE `hr_approval_limit_header` + MODIFY `hr_approval_limit_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `hr_approval_limit_line` +-- +ALTER TABLE `hr_approval_limit_line` + MODIFY `hr_approval_limit_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `hr_approval_object` +-- +ALTER TABLE `hr_approval_object` + MODIFY `hr_approval_object_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `hr_attendance` +-- +ALTER TABLE `hr_attendance` + MODIFY `hr_attendance_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `hr_compensation_element` +-- +ALTER TABLE `hr_compensation_element` + MODIFY `hr_compensation_element_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `hr_control` +-- +ALTER TABLE `hr_control` + MODIFY `hr_control_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `hr_element_entry_header` +-- +ALTER TABLE `hr_element_entry_header` + MODIFY `hr_element_entry_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; +-- +-- AUTO_INCREMENT for table `hr_element_entry_line` +-- +ALTER TABLE `hr_element_entry_line` + MODIFY `hr_element_entry_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22; +-- +-- AUTO_INCREMENT for table `hr_element_entry_tpl_header` +-- +ALTER TABLE `hr_element_entry_tpl_header` + MODIFY `hr_element_entry_tpl_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `hr_element_entry_tpl_line` +-- +ALTER TABLE `hr_element_entry_tpl_line` + MODIFY `hr_element_entry_tpl_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `hr_element_history_header` +-- +ALTER TABLE `hr_element_history_header` + MODIFY `hr_element_history_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; +-- +-- AUTO_INCREMENT for table `hr_element_history_line` +-- +ALTER TABLE `hr_element_history_line` + MODIFY `hr_element_history_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; +-- +-- AUTO_INCREMENT for table `hr_employee` +-- +ALTER TABLE `hr_employee` + MODIFY `hr_employee_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; +-- +-- AUTO_INCREMENT for table `hr_employee_education` +-- +ALTER TABLE `hr_employee_education` + MODIFY `hr_employee_education_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28; +-- +-- AUTO_INCREMENT for table `hr_employee_experience` +-- +ALTER TABLE `hr_employee_experience` + MODIFY `hr_employee_experience_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; +-- +-- AUTO_INCREMENT for table `hr_employee_termination` +-- +ALTER TABLE `hr_employee_termination` + MODIFY `hr_employee_termination_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `hr_expense_header` +-- +ALTER TABLE `hr_expense_header` + MODIFY `hr_expense_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27; +-- +-- AUTO_INCREMENT for table `hr_expense_line` +-- +ALTER TABLE `hr_expense_line` + MODIFY `hr_expense_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43; +-- +-- AUTO_INCREMENT for table `hr_expense_tpl_header` +-- +ALTER TABLE `hr_expense_tpl_header` + MODIFY `hr_expense_tpl_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `hr_expense_tpl_line` +-- +ALTER TABLE `hr_expense_tpl_line` + MODIFY `hr_expense_tpl_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29; +-- +-- AUTO_INCREMENT for table `hr_grade` +-- +ALTER TABLE `hr_grade` + MODIFY `hr_grade_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `hr_job` +-- +ALTER TABLE `hr_job` + MODIFY `hr_job_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `hr_leave_balance` +-- +ALTER TABLE `hr_leave_balance` + MODIFY `hr_leave_balance_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `hr_leave_entitlement_header` +-- +ALTER TABLE `hr_leave_entitlement_header` + MODIFY `hr_leave_entitlement_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `hr_leave_entitlement_line` +-- +ALTER TABLE `hr_leave_entitlement_line` + MODIFY `hr_leave_entitlement_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `hr_leave_transaction` +-- +ALTER TABLE `hr_leave_transaction` + MODIFY `hr_leave_transaction_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18; +-- +-- AUTO_INCREMENT for table `hr_leave_type` +-- +ALTER TABLE `hr_leave_type` + MODIFY `hr_leave_type_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `hr_location` +-- +ALTER TABLE `hr_location` + MODIFY `hr_location_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `hr_payroll` +-- +ALTER TABLE `hr_payroll` + MODIFY `hr_payroll_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `hr_payroll_payment_method` +-- +ALTER TABLE `hr_payroll_payment_method` + MODIFY `hr_payroll_payment_method_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `hr_payroll_process` +-- +ALTER TABLE `hr_payroll_process` + MODIFY `hr_payroll_process_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `hr_payroll_schedule` +-- +ALTER TABLE `hr_payroll_schedule` + MODIFY `hr_payroll_schedule_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=110; +-- +-- AUTO_INCREMENT for table `hr_payslip_header` +-- +ALTER TABLE `hr_payslip_header` + MODIFY `hr_payslip_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29; +-- +-- AUTO_INCREMENT for table `hr_payslip_line` +-- +ALTER TABLE `hr_payslip_line` + MODIFY `hr_payslip_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=82; +-- +-- AUTO_INCREMENT for table `hr_perdiem_rate` +-- +ALTER TABLE `hr_perdiem_rate` + MODIFY `hr_perdiem_rate_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `hr_position` +-- +ALTER TABLE `hr_position` + MODIFY `hr_position_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `hr_position_hierarchy_header` +-- +ALTER TABLE `hr_position_hierarchy_header` + MODIFY `hr_position_hierarchy_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `hr_position_hierarchy_line` +-- +ALTER TABLE `hr_position_hierarchy_line` + MODIFY `hr_position_hierarchy_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `hr_team_header` +-- +ALTER TABLE `hr_team_header` + MODIFY `hr_team_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `hr_team_line` +-- +ALTER TABLE `hr_team_line` + MODIFY `hr_team_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `hr_timesheet_header` +-- +ALTER TABLE `hr_timesheet_header` + MODIFY `hr_timesheet_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `hr_timesheet_line` +-- +ALTER TABLE `hr_timesheet_line` + MODIFY `hr_timesheet_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `hr_timesheet_period` +-- +ALTER TABLE `hr_timesheet_period` + MODIFY `hr_timesheet_period_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `inventory` +-- +ALTER TABLE `inventory` + MODIFY `inventory_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `inv_abc_assignment_header` +-- +ALTER TABLE `inv_abc_assignment_header` + MODIFY `inv_abc_assignment_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `inv_abc_assignment_line` +-- +ALTER TABLE `inv_abc_assignment_line` + MODIFY `inv_abc_assignment_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=254; +-- +-- AUTO_INCREMENT for table `inv_abc_valuation` +-- +ALTER TABLE `inv_abc_valuation` + MODIFY `inv_abc_valuation_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `inv_abc_valuation_result` +-- +ALTER TABLE `inv_abc_valuation_result` + MODIFY `inv_abc_valuation_result_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=635; +-- +-- AUTO_INCREMENT for table `inv_count_abc_ref` +-- +ALTER TABLE `inv_count_abc_ref` + MODIFY `inv_count_abc_ref_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34; +-- +-- AUTO_INCREMENT for table `inv_count_entries` +-- +ALTER TABLE `inv_count_entries` + MODIFY `inv_count_entries_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; +-- +-- AUTO_INCREMENT for table `inv_count_header` +-- +ALTER TABLE `inv_count_header` + MODIFY `inv_count_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; +-- +-- AUTO_INCREMENT for table `inv_count_schedule` +-- +ALTER TABLE `inv_count_schedule` + MODIFY `inv_count_schedule_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4261; +-- +-- AUTO_INCREMENT for table `inv_interorg_transfer_header` +-- +ALTER TABLE `inv_interorg_transfer_header` + MODIFY `inv_interorg_transfer_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=105; +-- +-- AUTO_INCREMENT for table `inv_interorg_transfer_line` +-- +ALTER TABLE `inv_interorg_transfer_line` + MODIFY `inv_interorg_transfer_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=110; +-- +-- AUTO_INCREMENT for table `inv_item_relation` +-- +ALTER TABLE `inv_item_relation` + MODIFY `inv_item_relation_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `inv_item_revision` +-- +ALTER TABLE `inv_item_revision` + MODIFY `inv_item_revision_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; +-- +-- AUTO_INCREMENT for table `inv_location_default` +-- +ALTER TABLE `inv_location_default` + MODIFY `inv_location_default_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `inv_lot_number` +-- +ALTER TABLE `inv_lot_number` + MODIFY `inv_lot_number_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37; +-- +-- AUTO_INCREMENT for table `inv_lot_onhand` +-- +ALTER TABLE `inv_lot_onhand` + MODIFY `inv_lot_onhand_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42; +-- +-- AUTO_INCREMENT for table `inv_lot_transaction` +-- +ALTER TABLE `inv_lot_transaction` + MODIFY `inv_lot_transaction_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=191; +-- +-- AUTO_INCREMENT for table `inv_moveorder_header` +-- +ALTER TABLE `inv_moveorder_header` + MODIFY `inv_moveorder_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `inv_moveorder_line` +-- +ALTER TABLE `inv_moveorder_line` + MODIFY `inv_moveorder_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `inv_receipt_header` +-- +ALTER TABLE `inv_receipt_header` + MODIFY `inv_receipt_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=177; +-- +-- AUTO_INCREMENT for table `inv_receipt_line` +-- +ALTER TABLE `inv_receipt_line` + MODIFY `inv_receipt_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=191; +-- +-- AUTO_INCREMENT for table `inv_reservation` +-- +ALTER TABLE `inv_reservation` + MODIFY `inv_reservation_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=138; +-- +-- AUTO_INCREMENT for table `inv_serial_number` +-- +ALTER TABLE `inv_serial_number` + MODIFY `inv_serial_number_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=322; +-- +-- AUTO_INCREMENT for table `inv_serial_transaction` +-- +ALTER TABLE `inv_serial_transaction` + MODIFY `inv_serial_transaction_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=300; +-- +-- AUTO_INCREMENT for table `inv_transaction` +-- +ALTER TABLE `inv_transaction` + MODIFY `inv_transaction_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1510; +-- +-- AUTO_INCREMENT for table `item` +-- +ALTER TABLE `item` + MODIFY `item_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10242; +-- +-- AUTO_INCREMENT for table `item_status` +-- +ALTER TABLE `item_status` + MODIFY `item_status_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `legal` +-- +ALTER TABLE `legal` + MODIFY `legal_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `locator` +-- +ALTER TABLE `locator` + MODIFY `locator_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19; +-- +-- AUTO_INCREMENT for table `mdm_bank_account` +-- +ALTER TABLE `mdm_bank_account` + MODIFY `mdm_bank_account_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `mdm_bank_header` +-- +ALTER TABLE `mdm_bank_header` + MODIFY `mdm_bank_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `mdm_bank_site` +-- +ALTER TABLE `mdm_bank_site` + MODIFY `mdm_bank_site_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `mdm_price_list_detail` +-- +ALTER TABLE `mdm_price_list_detail` + MODIFY `mdm_price_list_detail_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `mdm_price_list_header` +-- +ALTER TABLE `mdm_price_list_header` + MODIFY `mdm_price_list_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `mdm_price_list_line` +-- +ALTER TABLE `mdm_price_list_line` + MODIFY `mdm_price_list_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32; +-- +-- AUTO_INCREMENT for table `mdm_tax_code` +-- +ALTER TABLE `mdm_tax_code` + MODIFY `mdm_tax_code_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `mdm_tax_region` +-- +ALTER TABLE `mdm_tax_region` + MODIFY `mdm_tax_region_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `mdm_tax_rule` +-- +ALTER TABLE `mdm_tax_rule` + MODIFY `mdm_tax_rule_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `module` +-- +ALTER TABLE `module` + MODIFY `module_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; +-- +-- AUTO_INCREMENT for table `onhand` +-- +ALTER TABLE `onhand` + MODIFY `onhand_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=224; +-- +-- AUTO_INCREMENT for table `option_detail` +-- +ALTER TABLE `option_detail` + MODIFY `option_detail_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37; +-- +-- AUTO_INCREMENT for table `option_header` +-- +ALTER TABLE `option_header` + MODIFY `option_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=270; +-- +-- AUTO_INCREMENT for table `option_line` +-- +ALTER TABLE `option_line` + MODIFY `option_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1396; +-- +-- AUTO_INCREMENT for table `org` +-- +ALTER TABLE `org` + MODIFY `org_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; +-- +-- AUTO_INCREMENT for table `page` +-- +ALTER TABLE `page` + MODIFY `page_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=73; +-- +-- AUTO_INCREMENT for table `path` +-- +ALTER TABLE `path` + MODIFY `path_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=878; +-- +-- AUTO_INCREMENT for table `payment_term` +-- +ALTER TABLE `payment_term` + MODIFY `payment_term_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `payment_term_discount` +-- +ALTER TABLE `payment_term_discount` + MODIFY `payment_term_discount_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; +-- +-- AUTO_INCREMENT for table `payment_term_schedule` +-- +ALTER TABLE `payment_term_schedule` + MODIFY `payment_term_schedule_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; +-- +-- AUTO_INCREMENT for table `pm_formula_byproduct` +-- +ALTER TABLE `pm_formula_byproduct` + MODIFY `pm_formula_byproduct_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `pm_formula_header` +-- +ALTER TABLE `pm_formula_header` + MODIFY `pm_formula_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `pm_formula_ingredient` +-- +ALTER TABLE `pm_formula_ingredient` + MODIFY `pm_formula_ingredient_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `pm_formula_line` +-- +ALTER TABLE `pm_formula_line` + MODIFY `pm_formula_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `pm_process_operation_header` +-- +ALTER TABLE `pm_process_operation_header` + MODIFY `pm_process_operation_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `pm_process_operation_line` +-- +ALTER TABLE `pm_process_operation_line` + MODIFY `pm_process_operation_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `pm_process_routing_header` +-- +ALTER TABLE `pm_process_routing_header` + MODIFY `pm_process_routing_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `pm_process_routing_line` +-- +ALTER TABLE `pm_process_routing_line` + MODIFY `pm_process_routing_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `pm_recipe_customer` +-- +ALTER TABLE `pm_recipe_customer` + MODIFY `pm_recipe_customer_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `pm_recipe_header` +-- +ALTER TABLE `pm_recipe_header` + MODIFY `pm_recipe_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `pm_recipe_line` +-- +ALTER TABLE `pm_recipe_line` + MODIFY `pm_recipe_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `pm_recipe_material_header` +-- +ALTER TABLE `pm_recipe_material_header` + MODIFY `pm_recipe_material_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `pm_recipe_material_line` +-- +ALTER TABLE `pm_recipe_material_line` + MODIFY `pm_recipe_material_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `pos_barcode_list_header` +-- +ALTER TABLE `pos_barcode_list_header` + MODIFY `pos_barcode_list_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `pos_barcode_list_line` +-- +ALTER TABLE `pos_barcode_list_line` + MODIFY `pos_barcode_list_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `pos_inv_control` +-- +ALTER TABLE `pos_inv_control` + MODIFY `pos_inv_control_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `pos_terminal` +-- +ALTER TABLE `pos_terminal` + MODIFY `pos_terminal_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `pos_transaction_header` +-- +ALTER TABLE `pos_transaction_header` + MODIFY `pos_transaction_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32; +-- +-- AUTO_INCREMENT for table `pos_transaction_line` +-- +ALTER TABLE `pos_transaction_line` + MODIFY `pos_transaction_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24; +-- +-- AUTO_INCREMENT for table `po_asl_document` +-- +ALTER TABLE `po_asl_document` + MODIFY `po_asl_document_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `po_asl_header` +-- +ALTER TABLE `po_asl_header` + MODIFY `po_asl_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `po_asl_line` +-- +ALTER TABLE `po_asl_line` + MODIFY `po_asl_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `po_detail` +-- +ALTER TABLE `po_detail` + MODIFY `po_detail_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=278; +-- +-- AUTO_INCREMENT for table `po_header` +-- +ALTER TABLE `po_header` + MODIFY `po_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=292; +-- +-- AUTO_INCREMENT for table `po_line` +-- +ALTER TABLE `po_line` + MODIFY `po_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=299; +-- +-- AUTO_INCREMENT for table `po_purchasing_control` +-- +ALTER TABLE `po_purchasing_control` + MODIFY `po_purchasing_control_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `po_quote_detail` +-- +ALTER TABLE `po_quote_detail` + MODIFY `po_quote_detail_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26; +-- +-- AUTO_INCREMENT for table `po_quote_header` +-- +ALTER TABLE `po_quote_header` + MODIFY `po_quote_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `po_quote_line` +-- +ALTER TABLE `po_quote_line` + MODIFY `po_quote_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; +-- +-- AUTO_INCREMENT for table `po_requisition_detail` +-- +ALTER TABLE `po_requisition_detail` + MODIFY `po_requisition_detail_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=98; +-- +-- AUTO_INCREMENT for table `po_requisition_header` +-- +ALTER TABLE `po_requisition_header` + MODIFY `po_requisition_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49; +-- +-- AUTO_INCREMENT for table `po_requisition_interface` +-- +ALTER TABLE `po_requisition_interface` + MODIFY `po_requisition_interface_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=127; +-- +-- AUTO_INCREMENT for table `po_requisition_line` +-- +ALTER TABLE `po_requisition_line` + MODIFY `po_requisition_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=106; +-- +-- AUTO_INCREMENT for table `po_rfq_detail` +-- +ALTER TABLE `po_rfq_detail` + MODIFY `po_rfq_detail_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; +-- +-- AUTO_INCREMENT for table `po_rfq_header` +-- +ALTER TABLE `po_rfq_header` + MODIFY `po_rfq_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `po_rfq_line` +-- +ALTER TABLE `po_rfq_line` + MODIFY `po_rfq_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `po_sourcing_rule_header` +-- +ALTER TABLE `po_sourcing_rule_header` + MODIFY `po_sourcing_rule_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `po_sourcing_rule_line` +-- +ALTER TABLE `po_sourcing_rule_line` + MODIFY `po_sourcing_rule_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `prj_agreement_header` +-- +ALTER TABLE `prj_agreement_header` + MODIFY `prj_agreement_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `prj_agreement_line` +-- +ALTER TABLE `prj_agreement_line` + MODIFY `prj_agreement_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `prj_bem` +-- +ALTER TABLE `prj_bem` + MODIFY `prj_bem_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `prj_budget_detail` +-- +ALTER TABLE `prj_budget_detail` + MODIFY `prj_budget_detail_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `prj_budget_header` +-- +ALTER TABLE `prj_budget_header` + MODIFY `prj_budget_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; +-- +-- AUTO_INCREMENT for table `prj_budget_line` +-- +ALTER TABLE `prj_budget_line` + MODIFY `prj_budget_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; +-- +-- AUTO_INCREMENT for table `prj_budget_rev_header` +-- +ALTER TABLE `prj_budget_rev_header` + MODIFY `prj_budget_rev_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `prj_budget_rev_line` +-- +ALTER TABLE `prj_budget_rev_line` + MODIFY `prj_budget_rev_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `prj_burden_costcode` +-- +ALTER TABLE `prj_burden_costcode` + MODIFY `prj_burden_costcode_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `prj_burden_cost_base` +-- +ALTER TABLE `prj_burden_cost_base` + MODIFY `prj_burden_cost_base_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `prj_burden_expenditure` +-- +ALTER TABLE `prj_burden_expenditure` + MODIFY `prj_burden_expenditure_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=97; +-- +-- AUTO_INCREMENT for table `prj_burden_list_header` +-- +ALTER TABLE `prj_burden_list_header` + MODIFY `prj_burden_list_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `prj_burden_list_line` +-- +ALTER TABLE `prj_burden_list_line` + MODIFY `prj_burden_list_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `prj_burden_structure_costcode` +-- +ALTER TABLE `prj_burden_structure_costcode` + MODIFY `prj_burden_structure_costcode_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `prj_burden_structure_expendituretype` +-- +ALTER TABLE `prj_burden_structure_expendituretype` + MODIFY `prj_burden_structure_expendituretype_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; +-- +-- AUTO_INCREMENT for table `prj_burden_structure_header` +-- +ALTER TABLE `prj_burden_structure_header` + MODIFY `prj_burden_structure_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `prj_category_header` +-- +ALTER TABLE `prj_category_header` + MODIFY `prj_category_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `prj_category_line` +-- +ALTER TABLE `prj_category_line` + MODIFY `prj_category_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; +-- +-- AUTO_INCREMENT for table `prj_category_value` +-- +ALTER TABLE `prj_category_value` + MODIFY `prj_category_value_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `prj_default_account` +-- +ALTER TABLE `prj_default_account` + MODIFY `prj_default_account_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; +-- +-- AUTO_INCREMENT for table `prj_event_header` +-- +ALTER TABLE `prj_event_header` + MODIFY `prj_event_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `prj_event_line` +-- +ALTER TABLE `prj_event_line` + MODIFY `prj_event_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `prj_event_type` +-- +ALTER TABLE `prj_event_type` + MODIFY `prj_event_type_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `prj_expenditure_header` +-- +ALTER TABLE `prj_expenditure_header` + MODIFY `prj_expenditure_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29; +-- +-- AUTO_INCREMENT for table `prj_expenditure_line` +-- +ALTER TABLE `prj_expenditure_line` + MODIFY `prj_expenditure_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27; +-- +-- AUTO_INCREMENT for table `prj_expenditure_type_header` +-- +ALTER TABLE `prj_expenditure_type_header` + MODIFY `prj_expenditure_type_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `prj_expenditure_type_line` +-- +ALTER TABLE `prj_expenditure_type_line` + MODIFY `prj_expenditure_type_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `prj_invoice_header` +-- +ALTER TABLE `prj_invoice_header` + MODIFY `prj_invoice_header_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `prj_invoice_line` +-- +ALTER TABLE `prj_invoice_line` + MODIFY `prj_invoice_line_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `prj_milestone` +-- +ALTER TABLE `prj_milestone` + MODIFY `prj_milestone_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `prj_nlr_header` +-- +ALTER TABLE `prj_nlr_header` + MODIFY `prj_nlr_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `prj_nlr_line` +-- +ALTER TABLE `prj_nlr_line` + MODIFY `prj_nlr_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `prj_percent_header` +-- +ALTER TABLE `prj_percent_header` + MODIFY `prj_percent_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `prj_percent_headerrev` +-- +ALTER TABLE `prj_percent_headerrev` + MODIFY `prj_percent_headerrev_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; +-- +-- AUTO_INCREMENT for table `prj_percent_line` +-- +ALTER TABLE `prj_percent_line` + MODIFY `prj_percent_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `prj_project_control` +-- +ALTER TABLE `prj_project_control` + MODIFY `prj_project_control_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `prj_project_header` +-- +ALTER TABLE `prj_project_header` + MODIFY `prj_project_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; +-- +-- AUTO_INCREMENT for table `prj_project_line` +-- +ALTER TABLE `prj_project_line` + MODIFY `prj_project_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=84; +-- +-- AUTO_INCREMENT for table `prj_project_member` +-- +ALTER TABLE `prj_project_member` + MODIFY `prj_project_member_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `prj_project_type_billing` +-- +ALTER TABLE `prj_project_type_billing` + MODIFY `prj_project_type_billing_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `prj_project_type_header` +-- +ALTER TABLE `prj_project_type_header` + MODIFY `prj_project_type_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `prj_project_type_line` +-- +ALTER TABLE `prj_project_type_line` + MODIFY `prj_project_type_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `prj_rate_schedule_header` +-- +ALTER TABLE `prj_rate_schedule_header` + MODIFY `prj_rate_schedule_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `prj_rate_schedule_line` +-- +ALTER TABLE `prj_rate_schedule_line` + MODIFY `prj_rate_schedule_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `prj_resource_list_header` +-- +ALTER TABLE `prj_resource_list_header` + MODIFY `prj_resource_list_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `prj_resource_list_line` +-- +ALTER TABLE `prj_resource_list_line` + MODIFY `prj_resource_list_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `prj_revenue_header` +-- +ALTER TABLE `prj_revenue_header` + MODIFY `prj_revenue_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `prj_revenue_line` +-- +ALTER TABLE `prj_revenue_line` + MODIFY `prj_revenue_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; +-- +-- AUTO_INCREMENT for table `prj_role` +-- +ALTER TABLE `prj_role` + MODIFY `prj_role_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `prj_status_header` +-- +ALTER TABLE `prj_status_header` + MODIFY `prj_status_header_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `prj_status_line` +-- +ALTER TABLE `prj_status_line` + MODIFY `prj_status_line_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `prj_status_next` +-- +ALTER TABLE `prj_status_next` + MODIFY `prj_status_next_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `prj_work_type` +-- +ALTER TABLE `prj_work_type` + MODIFY `prj_work_type_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `qa_ce_action_type` +-- +ALTER TABLE `qa_ce_action_type` + MODIFY `qa_ce_action_type_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `qa_ce_bgm_calibration_reading` +-- +ALTER TABLE `qa_ce_bgm_calibration_reading` + MODIFY `qa_ce_bgm_calibration_reading_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `qa_ce_enc_rating` +-- +ALTER TABLE `qa_ce_enc_rating` + MODIFY `qa_ce_enc_rating_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `qa_ce_higher_bandwidth1` +-- +ALTER TABLE `qa_ce_higher_bandwidth1` + MODIFY `qa_ce_higher_bandwidth1_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `qa_ce_lower_bandwidth1` +-- +ALTER TABLE `qa_ce_lower_bandwidth1` + MODIFY `qa_ce_lower_bandwidth1_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `qa_ce_lower_bandwidth2` +-- +ALTER TABLE `qa_ce_lower_bandwidth2` + MODIFY `qa_ce_lower_bandwidth2_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `qa_ce_quality_rating` +-- +ALTER TABLE `qa_ce_quality_rating` + MODIFY `qa_ce_quality_rating_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `qa_ce_spectra_reading` +-- +ALTER TABLE `qa_ce_spectra_reading` + MODIFY `qa_ce_spectra_reading_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `qa_ce_spectrum_range` +-- +ALTER TABLE `qa_ce_spectrum_range` + MODIFY `qa_ce_spectrum_range_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `qa_collection_element_action` +-- +ALTER TABLE `qa_collection_element_action` + MODIFY `qa_collection_element_action_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `qa_collection_element_header` +-- +ALTER TABLE `qa_collection_element_header` + MODIFY `qa_collection_element_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `qa_collection_element_line` +-- +ALTER TABLE `qa_collection_element_line` + MODIFY `qa_collection_element_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `qa_cp_assignment_header` +-- +ALTER TABLE `qa_cp_assignment_header` + MODIFY `qa_cp_assignment_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `qa_cp_assignment_line` +-- +ALTER TABLE `qa_cp_assignment_line` + MODIFY `qa_cp_assignment_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `qa_cp_header` +-- +ALTER TABLE `qa_cp_header` + MODIFY `qa_cp_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `qa_cp_line` +-- +ALTER TABLE `qa_cp_line` + MODIFY `qa_cp_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; +-- +-- AUTO_INCREMENT for table `qa_specification_header` +-- +ALTER TABLE `qa_specification_header` + MODIFY `qa_specification_header_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `qa_specification_line` +-- +ALTER TABLE `qa_specification_line` + MODIFY `qa_specification_line_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `role_access` +-- +ALTER TABLE `role_access` + MODIFY `role_access_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=68; +-- +-- AUTO_INCREMENT for table `role_path` +-- +ALTER TABLE `role_path` + MODIFY `role_path_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19; +-- +-- AUTO_INCREMENT for table `sd_delivery_header` +-- +ALTER TABLE `sd_delivery_header` + MODIFY `sd_delivery_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=254; +-- +-- AUTO_INCREMENT for table `sd_delivery_line` +-- +ALTER TABLE `sd_delivery_line` + MODIFY `sd_delivery_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=250; +-- +-- AUTO_INCREMENT for table `sd_document_relation` +-- +ALTER TABLE `sd_document_relation` + MODIFY `mdm_price_list_header_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `sd_document_type` +-- +ALTER TABLE `sd_document_type` + MODIFY `sd_document_type_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `sd_lead` +-- +ALTER TABLE `sd_lead` + MODIFY `sd_lead_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `sd_opportunity` +-- +ALTER TABLE `sd_opportunity` + MODIFY `sd_opportunity_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `sd_quote_header` +-- +ALTER TABLE `sd_quote_header` + MODIFY `sd_quote_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `sd_quote_line` +-- +ALTER TABLE `sd_quote_line` + MODIFY `sd_quote_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `sd_sales_control` +-- +ALTER TABLE `sd_sales_control` + MODIFY `sd_sales_control_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `sd_shipping_control` +-- +ALTER TABLE `sd_shipping_control` + MODIFY `sd_shipping_control_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `sd_so_header` +-- +ALTER TABLE `sd_so_header` + MODIFY `sd_so_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=127; +-- +-- AUTO_INCREMENT for table `sd_so_line` +-- +ALTER TABLE `sd_so_line` + MODIFY `sd_so_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=194; +-- +-- AUTO_INCREMENT for table `sd_store` +-- +ALTER TABLE `sd_store` + MODIFY `sd_store_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `sd_store_subinventory` +-- +ALTER TABLE `sd_store_subinventory` + MODIFY `sd_store_subinventory_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; +-- +-- AUTO_INCREMENT for table `sf_item_file1` +-- +ALTER TABLE `sf_item_file1` + MODIFY `sf_item_file1_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `sf_item_image1` +-- +ALTER TABLE `sf_item_image1` + MODIFY `sf_item_image1_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `sf_item_image2` +-- +ALTER TABLE `sf_item_image2` + MODIFY `sf_item_image2_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=64; +-- +-- AUTO_INCREMENT for table `sf_item_inv_category` +-- +ALTER TABLE `sf_item_inv_category` + MODIFY `sf_item_inv_category_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=99; +-- +-- AUTO_INCREMENT for table `sf_item_pur_category` +-- +ALTER TABLE `sf_item_pur_category` + MODIFY `sf_item_pur_category_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=99; +-- +-- AUTO_INCREMENT for table `subinventory` +-- +ALTER TABLE `subinventory` + MODIFY `subinventory_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42; +-- +-- AUTO_INCREMENT for table `supplier` +-- +ALTER TABLE `supplier` + MODIFY `supplier_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34; +-- +-- AUTO_INCREMENT for table `supplier_bu` +-- +ALTER TABLE `supplier_bu` + MODIFY `supplier_bu_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; +-- +-- AUTO_INCREMENT for table `supplier_site` +-- +ALTER TABLE `supplier_site` + MODIFY `supplier_site_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=64; +-- +-- AUTO_INCREMENT for table `system_path` +-- +ALTER TABLE `system_path` + MODIFY `path_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `sys_catalog_header` +-- +ALTER TABLE `sys_catalog_header` + MODIFY `sys_catalog_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `sys_catalog_line` +-- +ALTER TABLE `sys_catalog_line` + MODIFY `sys_catalog_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26; +-- +-- AUTO_INCREMENT for table `sys_catalog_value` +-- +ALTER TABLE `sys_catalog_value` + MODIFY `sys_catalog_value_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=60; +-- +-- AUTO_INCREMENT for table `sys_document_sequence` +-- +ALTER TABLE `sys_document_sequence` + MODIFY `sys_document_sequence_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `sys_dynamic_block_header` +-- +ALTER TABLE `sys_dynamic_block_header` + MODIFY `sys_dynamic_block_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `sys_dynamic_block_line` +-- +ALTER TABLE `sys_dynamic_block_line` + MODIFY `sys_dynamic_block_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `sys_extra_field` +-- +ALTER TABLE `sys_extra_field` + MODIFY `sys_extra_field_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; +-- +-- AUTO_INCREMENT for table `sys_extra_field_instance` +-- +ALTER TABLE `sys_extra_field_instance` + MODIFY `sys_extra_field_instance_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=54; +-- +-- AUTO_INCREMENT for table `sys_hold` +-- +ALTER TABLE `sys_hold` + MODIFY `sys_hold_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `sys_hold_reference` +-- +ALTER TABLE `sys_hold_reference` + MODIFY `sys_hold_reference_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19; +-- +-- AUTO_INCREMENT for table `sys_message_format` +-- +ALTER TABLE `sys_message_format` + MODIFY `sys_message_format_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `sys_notification` +-- +ALTER TABLE `sys_notification` + MODIFY `sys_notification_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=109; +-- +-- AUTO_INCREMENT for table `sys_notification_group` +-- +ALTER TABLE `sys_notification_group` + MODIFY `sys_notification_group_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `sys_pd_header` +-- +ALTER TABLE `sys_pd_header` + MODIFY `sys_pd_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `sys_pd_process_flow_action` +-- +ALTER TABLE `sys_pd_process_flow_action` + MODIFY `sys_pd_process_flow_action_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `sys_pd_process_flow_action_value` +-- +ALTER TABLE `sys_pd_process_flow_action_value` + MODIFY `sys_pd_process_flow_action_value_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `sys_permission` +-- +ALTER TABLE `sys_permission` + MODIFY `sys_permission_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `sys_printer` +-- +ALTER TABLE `sys_printer` + MODIFY `sys_printer_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `sys_process_flow_action` +-- +ALTER TABLE `sys_process_flow_action` + MODIFY `sys_process_flow_action_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; +-- +-- AUTO_INCREMENT for table `sys_process_flow_action_value` +-- +ALTER TABLE `sys_process_flow_action_value` + MODIFY `sys_process_flow_action_value_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `sys_process_flow_header` +-- +ALTER TABLE `sys_process_flow_header` + MODIFY `sys_process_flow_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `sys_process_flow_line` +-- +ALTER TABLE `sys_process_flow_line` + MODIFY `sys_process_flow_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44; +-- +-- AUTO_INCREMENT for table `sys_profile_header` +-- +ALTER TABLE `sys_profile_header` + MODIFY `sys_profile_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; +-- +-- AUTO_INCREMENT for table `sys_profile_line` +-- +ALTER TABLE `sys_profile_line` + MODIFY `sys_profile_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31; +-- +-- AUTO_INCREMENT for table `sys_program` +-- +ALTER TABLE `sys_program` + MODIFY `sys_program_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=885; +-- +-- AUTO_INCREMENT for table `sys_program_schedule` +-- +ALTER TABLE `sys_program_schedule` + MODIFY `sys_program_schedule_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; +-- +-- AUTO_INCREMENT for table `sys_program_status` +-- +ALTER TABLE `sys_program_status` + MODIFY `sys_program_status_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `sys_rfid_interface` +-- +ALTER TABLE `sys_rfid_interface` + MODIFY `sys_rfid_interface_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=93; +-- +-- AUTO_INCREMENT for table `sys_role_permission` +-- +ALTER TABLE `sys_role_permission` + MODIFY `sys_role_permission_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `sys_secondary_field` +-- +ALTER TABLE `sys_secondary_field` + MODIFY `sys_secondary_field_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `sys_secondary_field_instance` +-- +ALTER TABLE `sys_secondary_field_instance` + MODIFY `sys_secondary_field_instance_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `sys_spd_header` +-- +ALTER TABLE `sys_spd_header` + MODIFY `sys_spd_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; +-- +-- AUTO_INCREMENT for table `sys_spd_process_flow_action` +-- +ALTER TABLE `sys_spd_process_flow_action` + MODIFY `sys_spd_process_flow_action_id` int(12) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `sys_value_group_header` +-- +ALTER TABLE `sys_value_group_header` + MODIFY `sys_value_group_header_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; +-- +-- AUTO_INCREMENT for table `sys_value_group_line` +-- +ALTER TABLE `sys_value_group_line` + MODIFY `sys_value_group_line_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1950; +-- +-- AUTO_INCREMENT for table `transaction_type` +-- +ALTER TABLE `transaction_type` + MODIFY `transaction_type_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29; +-- +-- AUTO_INCREMENT for table `uom` +-- +ALTER TABLE `uom` + MODIFY `uom_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47; +-- +-- AUTO_INCREMENT for table `user` +-- +ALTER TABLE `user` + MODIFY `user_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=111; +-- +-- AUTO_INCREMENT for table `user_dashboard_config` +-- +ALTER TABLE `user_dashboard_config` + MODIFY `user_dashboard_config_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; +-- +-- AUTO_INCREMENT for table `user_favourite` +-- +ALTER TABLE `user_favourite` + MODIFY `user_favourite_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `user_group` +-- +ALTER TABLE `user_group` + MODIFY `user_group_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT for table `user_group_access` +-- +ALTER TABLE `user_group_access` + MODIFY `user_group_access_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; +-- +-- AUTO_INCREMENT for table `user_password_reset` +-- +ALTER TABLE `user_password_reset` + MODIFY `user_password_reset_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25; +-- +-- AUTO_INCREMENT for table `user_role` +-- +ALTER TABLE `user_role` + MODIFY `user_role_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50; +-- +-- AUTO_INCREMENT for table `user_supplier` +-- +ALTER TABLE `user_supplier` + MODIFY `user_supplier_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `view` +-- +ALTER TABLE `view` + MODIFY `view_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; +-- +-- AUTO_INCREMENT for table `view_path` +-- +ALTER TABLE `view_path` + MODIFY `view_path_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; +-- +-- AUTO_INCREMENT for table `wip_accounting_group` +-- +ALTER TABLE `wip_accounting_group` + MODIFY `wip_accounting_group_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `wip_control` +-- +ALTER TABLE `wip_control` + MODIFY `wip_control_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `wip_move_transaction` +-- +ALTER TABLE `wip_move_transaction` + MODIFY `wip_move_transaction_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=165; +-- +-- AUTO_INCREMENT for table `wip_resource_transaction` +-- +ALTER TABLE `wip_resource_transaction` + MODIFY `wip_resource_transaction_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=275; +-- +-- AUTO_INCREMENT for table `wip_wol_transaction` +-- +ALTER TABLE `wip_wol_transaction` + MODIFY `wip_wol_transaction_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=79; +-- +-- AUTO_INCREMENT for table `wip_wo_bom` +-- +ALTER TABLE `wip_wo_bom` + MODIFY `wip_wo_bom_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=302; +-- +-- AUTO_INCREMENT for table `wip_wo_header` +-- +ALTER TABLE `wip_wo_header` + MODIFY `wip_wo_header_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=157; +-- +-- AUTO_INCREMENT for table `wip_wo_routing_detail` +-- +ALTER TABLE `wip_wo_routing_detail` + MODIFY `wip_wo_routing_detail_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=279; +-- +-- AUTO_INCREMENT for table `wip_wo_routing_line` +-- +ALTER TABLE `wip_wo_routing_line` + MODIFY `wip_wo_routing_line_id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=262; +-- +-- Constraints for dumped tables +-- + +-- +-- Constraints for table `coa_combination` +-- +ALTER TABLE `coa_combination` + ADD CONSTRAINT `coa_combination_ibfk_1` FOREIGN KEY (`coa_id`) REFERENCES `coa` (`coa_id`); -- -- Constraints for table `option_line` diff --git a/inoerp/extensions/user/user_login.php b/inoerp/extensions/user/user_login.php index c89d05cc0..182bf2055 100644 --- a/inoerp/extensions/user/user_login.php +++ b/inoerp/extensions/user/user_login.php @@ -1,10 +1,11 @@ login_status()) { +if ($session->login_status()) { redirect_to(HOME_URL); } ?> save(); $new_user->_after_save(); $dbc->confirm(); - }else{ + } else { $msg .= '
Account creation failed!. Contact the admin.
'; redirect_to(HOME_URL . "extensions/user/user_login.php?error_message=email_error"); } @@ -118,7 +119,18 @@ //Social login }//end of if post submit ?> - @@ -188,4 +200,11 @@ } ?> - \ No newline at end of file + \ No newline at end of file diff --git a/inoerp/files/051913-070543_images3.jpg b/inoerp/files/051913-070543_images3.jpg deleted file mode 100644 index ffd916b89..000000000 Binary files a/inoerp/files/051913-070543_images3.jpg and /dev/null differ diff --git a/inoerp/files/massuploads/massupload_files.txt b/inoerp/files/massuploads/massupload_files.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/inoerp/files/outputs/output_files.txt b/inoerp/files/outputs/output_files.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/inoerp/files/temp_images/tempimages.txt b/inoerp/files/temp_images/tempimages.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/inoerp/includes/js/basics.js b/inoerp/includes/js/basics.js index f38bf132c..df5ac9037 100644 --- a/inoerp/includes/js/basics.js +++ b/inoerp/includes/js/basics.js @@ -3282,9 +3282,9 @@ $(document).ready(function () { }); } - if (localStorage.getItem("close_field_class") !== null ) { + if (localStorage.getItem("close_field_class") !== null) { var close_field_class = localStorage.getItem("close_field_class"); - if (localStorage.getItem("close_div_class") !== null){ + if (localStorage.getItem("close_div_class") !== null) { var close_div_class = localStorage.getItem("close_div_class"); } var opener_elemenType = window.opener.$(close_field_class).parent().prop('tagName'); @@ -3697,7 +3697,7 @@ $(document).ready(function () { localStorage.setItem("set_value_for_one_div", true); var close_div_class = '.' + $(this).closest('ul').parent().prop('class').replace(/\s+/g, '.'); localStorage.setItem("close_div_class", close_div_class); - var close_field_class = '.' + $(this).parent().find(':input').not('.hidden').prop('class').replace(/\s+/g, '.'); + var close_field_class = '.' + $(this).parent().find(':input').not('.hidden').prop('class').replace(/\s+/g, '.'); localStorage.setItem("close_field_class", close_field_class); void window.open('select.php?class_name=address&mode=2', '_blank', @@ -4050,7 +4050,94 @@ $(document).ready(function () { //Popup for print $(".print").click(function () { - window.print(); +// window.print(); + + var pContent = ''; + var printContenet = ''; + printContenet += 'Print it!'; + printContenet += ''; + printContenet += ''; + printContenet += pContent; + printContenet += '<' + '/body' + '><' + '/html' + '>'; + var popupWin = window.open("", "_blank", "width=1300,height=800,TOOLBAR=no,MENUBAR=no,SCROLLBARS=yes,RESIZABLE=yes,LOCATION=no,DIRECTORIES=no,STATUS=no"); + popupWin.document.writeln('' + printContenet + ''); + popupWin.document.close(); + popupWin.focus(); + popupWin.print(); + popupWin.close(); }); //all download $('#export_excel_allResult').on('click', function () { diff --git a/inoerp/includes/js/reload.js b/inoerp/includes/js/reload.js index 440e0e13c..b15cb446d 100644 --- a/inoerp/includes/js/reload.js +++ b/inoerp/includes/js/reload.js @@ -262,9 +262,101 @@ $(document).ready(function () { $("[required]").addClass('required'); $("[readonly]").addClass('readonly'); //Popup for print - $(".print").click(function () { - window.print(); - }); +$(".print").click(function () { +// window.print(); + + var pContent = ''; + + var printContenet = ''; + printContenet += 'Print it!'; + + printContenet += ''; + + printContenet += ''; + printContenet += pContent; + printContenet += '<' + '/body' + '><' + '/html' + '>'; + + var popupWin = window.open("", "_blank", "width=1300,height=800,TOOLBAR=no,MENUBAR=no,SCROLLBARS=yes,RESIZABLE=yes,LOCATION=no,DIRECTORIES=no,STATUS=no"); + popupWin.document.writeln('' + printContenet + ''); + popupWin.document.close(); + popupWin.focus(); + popupWin.print(); + + popupWin.close(); + }); //all download $('#export_excel_allResult').on('click', function () { $('#download_all').submit(); @@ -510,8 +602,8 @@ $(document).ready(function () { json_url: 'modules/inv/item/json_item.php', primary_column1: 'org_id' }); - - //vaidation field auto complete + + //vaidation field auto complete $('.val_field').inoAutoCompleteElement({ json_url: 'includes/json/json_validation_field.php', primary_column1: 'bu_org_id', diff --git a/inoerp/includes/template/json_multi_select_template.inc b/inoerp/includes/template/json_multi_select_template.inc index 15f583b20..773b26dad 100644 --- a/inoerp/includes/template/json_multi_select_template.inc +++ b/inoerp/includes/template/json_multi_select_template.inc @@ -148,7 +148,7 @@ if ((!empty($multi_selct_input_fields) && is_array($multi_selct_input_fields)) && (in_array($all_columns[$k], $multi_selct_input_fields))) { $value = null; } else { - $value = $records->$all_columns[$k]; + $value = $records->{$all_columns[$k]}; } echo " "; } else { diff --git a/inoerp/locale/docs/All List - Copy.docx b/inoerp/locale/docs/All List - Copy.docx deleted file mode 100644 index d4bc9d72d..000000000 Binary files a/inoerp/locale/docs/All List - Copy.docx and /dev/null differ diff --git a/inoerp/locale/docs/English_Chinese_China.xlsx b/inoerp/locale/docs/English_Chinese_China.xlsx deleted file mode 100644 index b223ab86d..000000000 Binary files a/inoerp/locale/docs/English_Chinese_China.xlsx and /dev/null differ diff --git a/inoerp/modules/fp/kanban/kanban_template.php b/inoerp/modules/fp/kanban/kanban_template.php index 3d3bafa1f..38c31c266 100644 --- a/inoerp/modules/fp/kanban/kanban_template.php +++ b/inoerp/modules/fp/kanban/kanban_template.php @@ -171,6 +171,7 @@
  • +
  • diff --git a/inoerp/modules/pm/batch/batch.inc b/inoerp/modules/pm/batch/batch.inc new file mode 100644 index 000000000..93c274e3d --- /dev/null +++ b/inoerp/modules/pm/batch/batch.inc @@ -0,0 +1 @@ +pm_recipe_header_id)) { $pm_recipe_i = pm_recipe_all_v::find_by_id($$class->pm_recipe_header_id); $$class->recipe_name = $pm_recipe_i->recipe_name; $$class->routing_name = $pm_recipe_i->routing_name; $$class->formula_name = $pm_recipe_i->formula_name; } else { $$class->routing_name = $$class->formula_name = null; } if (empty($pm_batch_ingredient_object) && !empty($$class->pm_batch_header_id)) { $pm_batch_ingredient_object = pm_batch_ingredient::find_by_parent_id($$class->pm_batch_header_id); } if (empty($pm_batch_ingredient_object)) { $pm_batch_ingredient_object = array(new pm_batch_ingredient()); } if (empty($pm_batch_byproduct_object) && !empty($$class->pm_batch_header_id)) { $pm_batch_byproduct_object = pm_batch_byproduct::find_by_parent_id($$class->pm_batch_header_id); } if (empty($pm_batch_byproduct_object)) { $pm_batch_byproduct_object = array(new pm_batch_byproduct()); } if ((!empty($$class->arproval_status)) && ($$class->arproval_status == 'CANCELLED')) { $mode = 2; $readonly = 1; } $add_to_order_a = []; $pageno = !empty($_GET['pageno']) ? $_GET['pageno'] : 1; $per_page = !empty($_GET['per_page']) ? $_GET['per_page'] : 10; $total_count = count($pm_batch_line_object); $pagination = new pagination($pageno, $per_page, $total_count); $pagination->setProperty('_path', 'form'); $position = ($pageno - 1) * $per_page; ?> \ No newline at end of file diff --git a/inoerp/modules/pm/batch/batch.js b/inoerp/modules/pm/batch/batch.js new file mode 100644 index 000000000..b80141ea2 --- /dev/null +++ b/inoerp/modules/pm/batch/batch.js @@ -0,0 +1,52 @@ +function beforeContextMenu() { + $('.line_status').val(''); + $('.picked_quantity').val(''); + $('.shipped_quantity').val(''); + $('.schedule_ship_date').val(''); + $('#so_number').val(''); + return true; +} + +$(document).ready(function () { + //add new lines + $("#content tbody.form_data_line_tbody2").on("click", ".add_row_img", function () { + var addNewRow = new add_new_rowMain(); + addNewRow.trClass = 'pm_batch_ingredient'; + addNewRow.tbodyClass = 'form_data_line_tbody2'; + addNewRow.noOfTabs = 1; + addNewRow.removeDefault = true; + addNewRow.add_new_row(); + }); + + //add new lines + $("#content tbody.form_data_line_tbody3").on("click", ".add_row_img", function () { + var addNewRow = new add_new_rowMain(); + addNewRow.trClass = 'pm_batch_byproduct'; + addNewRow.tbodyClass = 'form_data_line_tbody3'; + addNewRow.noOfTabs = 1; + addNewRow.removeDefault = true; + addNewRow.add_new_row(); + }); + +//setting the first line & shipment number + if (!($('.lines_number:first').val())) { + $('.lines_number:first').val('1'); + } + + $('#pm_batch_line, #pm_batch_ingredient, #pm_batch_byproduct').on('click', ':input', function () { + if (!$('#pm_batch_header_id').val()) { + alert('No header details in database : Enter/Save header data'); + } + }); + + $('body').off('change', '#action').on('change', '#action', function () { + if ($(this).val() == 'PROCESS_ACTUALS') { + $('#add_to_order').prop('disabled', false); + } else { + $('#add_to_order').prop('disabled', true); + } + }); + + + +}); \ No newline at end of file diff --git a/inoerp/modules/pm/batch/batch_template.php b/inoerp/modules/pm/batch/batch_template.php new file mode 100644 index 000000000..3b7bd495a --- /dev/null +++ b/inoerp/modules/pm/batch/batch_template.php @@ -0,0 +1,326 @@ + +
    +
    +
    +
      +
    • +
    • +
    • +
    • +
    • +
    +
    +
    +
      +
    • l_text_field_dr_withSearch('pm_batch_header_id') ?> + " class="show document_id pm_batch_header_id"> +
    • +
    • l_text_field_d('batch_name'); ?>
    • +
    • l_val_field_dm('recipe_name', 'pm_recipe_all_v', 'recipe_name', '', 'vf_select_recipe_name'); + echo $f->hidden_field_withId('pm_recipe_header_id', $$class->pm_recipe_header_id); + ?>
    • +
    • l_select_field_from_object('org_id', org::find_all_inventory(), 'org_id', 'org', $$class->org_id, 'org_id', $readonly1, '', ''); ?>
    • +
    • l_select_field_from_object('wip_accounting_group_id', wip_accounting_group::find_by_woType('PROCESS'), 'wip_accounting_group_id', 'wip_accounting_group', $$class->wip_accounting_group_id, 'wip_accounting_group_id', '', 1, 'readonly1'); ?>
    • +
    • l_text_field_d('revision'); ?>
    • +
    • l_text_field_d('comment'); ?>
    • +
    • text_field_d('pm_employee_name', 'employee_name'); ?> + hidden_field_withId('owner_employee_id', $$class->owner_employee_id); ?> + +
    • +
    • l_text_field_d('routing_name') ?>
    • +
    • l_text_field_d('formula_name') ?>
    • +
    • l_text_field_d('description') ?>
    • +
    +
    +
    +
      +
    • l_date_fieldFromToday_d('planned_start_date', $$class->planned_start_date) ?>
    • +
    • l_date_fieldFromToday_d('planned_completion_date', $$class->planned_completion_date) ?>
    • +
    • l_date_fieldFromToday_dm('required_completion_date', $$class->required_completion_date) ?>
    • +
    • l_date_fieldFromToday_d('actual_completion_date', $$class->actual_completion_date) ?>
    • +
    • l_date_fieldFromToday_d('actual_start_date', $$class->actual_start_date) ?>
    • +
    • l_text_field_d('terminate_reason') ?>
    • +
    • l_checkBox_field_dr('batch_exploded_cb'); ?>
    • +
    +
    +
    +
    +
    +
    + +
    +
    + pm_batch_header_id; + ?> +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
      +
    • + select_field_from_array('action', $$class->action_a, '', 'action'); ?> +
    • +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + seek($position); + while ($pm_batch_line_object_ai->valid()) { + $pm_batch_line = $pm_batch_line_object_ai->current(); + if (!empty($pm_batch_line->item_id_m)) { + $item_f = item::find_by_item_id_m($pm_batch_line->item_id_m); + $$class_second->item_number = $item_f->item_number; + $$class_second->item_description = $item_f->item_description; + } else { + $$class_second->item_number = $$class_second->item_description = null; + } + ?> + + + + + + + + + + + + + next(); + if ($pm_batch_line_object_ai->key() == $position + $per_page) { + break; + } + $count = $count + 1; + } + ?> + +
    ##
    + pm_batch_line_id, array('pm_batch_header_id' => $pm_batch_header->pm_batch_header_id)); + ?> + text_field_wid2sr('pm_batch_line_id', 'line_id'); ?>number_field('line_no', $$class_second->line_no, '', '', 'lines_number small ', 1, $readonly); ?>val_field_wid2('item_number', 'item', 'item_number', 'receving_org_id'); + echo $f->hidden_field_withCLass('item_id_m', $$class_second->item_id_m, 'dont_copy_r'); + ?> + uom_id, '', '', 'uom_id'); ?>number_field('quantity', $$class_second->quantity, '', '', 'allow_change'); ?>select_field_from_array('yield_type', pm_formula_line::$yield_type_a, $$class_second->yield_type, '', 'medium'); ?>select_field_from_array('scale_type', pm_formula_line::$scale_type_a, $$class_second->scale_type, '', 'medium') ?>text_field_wid2('cost_allocation'); ?>
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + item_id_m)) { + $item_ig = item::find_by_item_id_m($pm_batch_ingredient->item_id_m); + $$class_third->item_number = $item_f->item_number; + $$class_third->item_description = $item_f->item_description; + } else { + $$class_third->item_number = $$class_second->item_description = null; + } + ?> + + + + + + + + + + + + + + + + + +
    #
    +
      +
    • +
    • +
    • +
    • pm_batch_header_id); ?>
    • +
    +
    number_field('line_no', $$class_third->line_no, '', '', 'lines_number small ', 1, $readonly); ?>val_field_wid3('item_number', 'item', 'item_number', 'org_id'); + echo $f->hidden_field_withCLass('item_id_m', $$class_third->item_id_m, 'dont_copy_r'); + echo $f->hidden_field_withCLass('purchased_cb', '1', 'popup_value'); + ?> + uom_id, '', '', 'uom_id'); ?>number_field('quantity', $$class_third->quantity, '', '', 'allow_change small'); ?>select_field_from_array('scale_type', pm_formula_line::$scale_type_a, $$class_third->scale_type, '', 'medium') ?>checkBox_field('contribute_yield_cb', $$class_third->contribute_yield_cb); ?>select_field_from_array('consumption_type', pm_formula_ingredient::$consumption_type_a, $$class_third->consumption_type, '', 'medium'); ?>checkBox_field('buffer_cb', $$class_third->buffer_cb); ?>text_field_wid3('phantom_type'); ?>text_field_wid3('required_qty'); ?>
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + item_id_m)) { + $item_bp = item::find_by_item_id_m($pm_batch_byproduct->item_id_m); + $$class_fourth->item_number = $item_bp->item_number; + $$class_fourth->item_description = $item_bp->item_description; + } else { + $$class_fourth->item_number = $$class_fourth->item_description = null; + } + ?> + + + + + + + + + + + + + + +
    #
    +
      +
    • +
    • +
    • +
    • pm_batch_header_id); ?>
    • +
    +
    number_field('line_no', $$class_third->line_no, '', '', 'lines_number small ', 1, $readonly); ?>val_field_wid4('item_number', 'item', 'item_number', 'org_id'); + echo $f->hidden_field_withCLass('item_id_m', $$class_fourth->item_id_m, 'dont_copy_r'); + echo $f->hidden_field('processing_lt', ''); + ?> + uom_id, '', '', 'uom_id'); ?>number_field('quantity', $$class_fourth->quantity, '', '', 'allow_change'); ?>select_field_from_array('scale_type', pm_formula_line::$scale_type_a, $$class_fourth->scale_type, '', 'medium') ?>select_field_from_array('yield_type', pm_formula_line::$yield_type_a, $$class_fourth->yield_type, '', 'medium'); ?>select_field_from_array('byproduct_type', pm_formula_byproduct::$byproduct_type_a, $$class_fourth->byproduct_type, '', 'medium'); ?>
    +
    +
    +
    +
    +
    + +
    + +
    + + +
    + + +
    \ No newline at end of file diff --git a/inoerp/modules/pm/batch/class_pm_batch_byproduct.inc b/inoerp/modules/pm/batch/class_pm_batch_byproduct.inc new file mode 100644 index 000000000..cf626b50a --- /dev/null +++ b/inoerp/modules/pm/batch/class_pm_batch_byproduct.inc @@ -0,0 +1,64 @@ + 'Rework', + 'SAMPLE' => 'Sample', + 'WASTE' => 'Waste', + 'YIELD' => 'Yield', + ]; +// data base variables as stored database column name + public $field_a = [ + 'pm_formula_byproduct_id', + 'pm_formula_header_id', + 'line_no', + 'line_type', + 'item_id_m', + 'uom_id', + 'quantity', + 'description', + 'scale_type', + 'yield_type', + 'byproduct_type', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; +//variables used for showing data + public $fields_inForm_notInDataBase = [ + "member_username", + ]; + public $fields_inHeader_needsToBeInserted_inPOST = [ + 'pm_batch_header_id' + ]; + public $requiredField = [ + 'pm_batch_header_id', + 'item_id_m', + ]; + public $pm_formula_byproduct_id; + public $pm_formula_header_id; + public $line_no; + public $line_type; + public $item_id_m; + public $uom_id; + public $quantity; + public $description; + public $scale_type; + public $yield_type; + public $byproduct_type; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + +} + +//end of pm_batch_byproduct class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/batch/class_pm_batch_header.inc b/inoerp/modules/pm/batch/class_pm_batch_header.inc new file mode 100644 index 000000000..ddcfe7b31 --- /dev/null +++ b/inoerp/modules/pm/batch/class_pm_batch_header.inc @@ -0,0 +1,206 @@ + 'batch', + 'number' => '6214', + 'description' => 'Create & Mainten Process Batch', + 'version' => '0.1.1', + 'db_version' => '1001', + 'mod_version' => '1.1.1', + 'dependent_class' => array('pm_batch_line', 'pm_batch_ingredient', 'pm_batch_byproduct'), + 'primary_entity_cb' => '', + 'module_name' => 'prj', + 'weight' => 1 + ]; + public $action_a = [ + 'APPROVE' => 'Approve', + 'PRINT' => 'Print Estimates', + 'CANCEL' => 'Cancel', + 'CLOSE' => 'Close', + 'CREATE_WO' => 'Create Work Order', + 'COPY_ESTIMATES' => 'Copy Estimates to Actuals', + 'COPY_WO' => 'Copy WO Charges to Actuals', + 'PROCESS_LOGISTICS' => 'Process Logistics', + 'PROCESS_ACTUALS' => 'Process Actuals', + ]; + public $field_a = [ + 'pm_batch_header_id', + 'batch_name', + 'org_id', + 'pm_recipe_header_id', + 'wip_accounting_group_id', + 'recipe_version', + 'comment', + 'status', + 'description', + 'terminate_reason', + 'planned_start_date', + 'planned_completion_date', + 'required_completion_date', + 'actual_completion_date', + 'actual_start_date', + 'update_invnetory_cb', + 'batch_exploded_cb', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; + public $initial_search = [ + 'batch_name', + 'description', + ]; + public $requiredField = [ + 'org_id', + 'pm_recipe_header_id', + ]; + public static $json_label_fields = [ + 'batch_name', + 'description', + 'status', + 'org_id', + ]; + public $fields_inForm_notInDataBase = [ + 'recipe_name', + "routing_name", + 'formula_name' + ]; + public $profile_default = [ + 'org_id' => 'org_inv_name_default', + ]; + public $search = [ + '_show_update_path' => 1, + '_show_view_path' => 1, + ]; + public $pageTitle = " Production Batch "; //page Title + public $pm_batch_header_id; + public $org_id; + public $batch_name; + public $pm_recipe_header_id; + public $wip_accounting_group_id; + public $recipe_version; + public $comment; + public $status; + public $description; + public $terminate_reason; + public $planned_start_date; + public $planned_completion_date; + public $required_completion_date; + public $actual_completion_date; + public $actual_start_date; + public $update_invnetory_cb; + public $batch_exploded_cb; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + public $action; + public $recipe_name; + private $_pm_formula_header_id; + + private function _do_action() { + + switch ($this->action) { + case 'APPROVE': + $this->approval_status = 'APPROVED'; + break; + + default : + echo $this->action; + break; + } + } + + public function _before_save() { + if (!empty($this->action)) { + $this->_do_action(); + } + + if (empty($this->approval_status)) { + $this->approval_status = 'ENTERED'; + } + } + + public function _after_save() { + + if ((!empty($this->pm_batch_header_id)) && empty($this->batch_name)) { + $this->batch_name = $this->org_id . '-' . $this->pm_batch_header_id; + echo ' System generated Batch number is ' . $this->batch_name; + $this->save(); + } + + //copy line details + if ((!empty($this->pm_recipe_header_id)) && (empty($this->batch_exploded_cb))) { + $this->_copy_batch_lines(); + } + } + + private function _copy_batch_lines() { + $recipe_details = pm_recipe_header::find_by_id($this->pm_recipe_header_id); + $this->_pm_formula_header_id = $recipe_details->pm_formula_header_id; + + $this->_copy_batch_products(); + $this->_copy_batch_ingredients(); + $this->_copy_batch_byproducts(); + } + + private function _copy_batch_products() { + $all_product_lines = pm_formula_line::find_by_parent_id($this->_pm_formula_header_id); + + } + + private function _copy_batch_byproducts() { + + } + + private function _copy_batch_ingredients() { + + } + + public static function find_financial_details_from_projectHeaderId($pm_batch_header_id) { + $sql = " + SELECT org.org_id, org.legal_org_id, legal.ledger_id, + gl.ledger, gl.description as ledger_description, gl.coa_id, gl.calendar_option_line_code, gl.currency_code, legal.balancing_segments, + org.org, org.code,org.type, org.description as org_description, pph.pm_batch_header_id, pph.project_number + FROM org, + legal, + gl_ledger gl, + pm_batch_header pph + WHERE org.legal_org_id = legal.org_id + AND gl.gl_ledger_id = legal.ledger_id + AND org.org_id = pph.bu_org_id + AND pph.pm_batch_header_id = '{$pm_batch_header_id}' + LIMIT 1 + " + ; + + $result = self::find_by_sql($sql); + + return !empty($result) ? array_pop($result) : false; + } + +} + +//end of pm_batch_header class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/batch/class_pm_batch_ingredient.inc b/inoerp/modules/pm/batch/class_pm_batch_ingredient.inc new file mode 100644 index 000000000..d5a9cbbe5 --- /dev/null +++ b/inoerp/modules/pm/batch/class_pm_batch_ingredient.inc @@ -0,0 +1,105 @@ + 'Estimates', + 'WORK_ORDER' => 'Work Order', + ]; + public static $consumption_type_a = [ + 'AUTO' => 'Automatic', + 'MANUAL' => 'Manual', + 'INC' => 'Incremental', + 'AUTOBS' => 'Auto By Step', + ]; +// data base variables as stored database column name + public $field_a = [ + 'pm_batch_ingredient_id', + 'pm_batch_header_id', + 'line_no', + 'revision_name', + 'item_id_m', + 'uom_id', + 'planned_quantity', + 'description', + 'wip_planned_quantity', + 'scale_type', + 'contribute_yield_cb', + 'byproduct_type', + 'consumption_type', + 'phantom_type', + 'required_quantity', + 'actual_quantity', + 'requirement_date', + 'subinventory_id', + 'locator_id', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; +//variables used for showing data + public $fields_inForm_notInDataBase = [ + ]; + public $fields_inHeader_needsToBeInserted_inPOST = [ + 'pm_batch_header_id' + ]; + public $requiredField = [ + 'pm_batch_header_id', + 'item_id_m' + ]; +public $pm_batch_ingredient_id; +public $pm_batch_header_id; +public $line_no; +public $revision_name; +public $item_id_m; +public $uom_id; +public $planned_quantity; +public $description; +public $wip_planned_quantity; +public $scale_type; +public $contribute_yield_cb; +public $byproduct_type; +public $consumption_type; +public $phantom_type; +public $required_quantity; +public $actual_quantity; +public $requirement_date; +public $subinventory_id; +public $locator_id; +public $created_by; +public $creation_date; +public $last_update_by; +public $last_update_date; + + + public static function find_allLine_byHeaderId($header_id) { + $sql = " SELECT +pfi.pm_batch_ingredient_id, pfi.pm_batch_header_id, pfi.line_no, pfi.revision_name, pfi.item_id_m, +pfi.uom_id, pfi.quantity, pfi.description, pfi.scale_type, pfi.contribute_yield_cb, pfi.consumption_type, +pfi.buffer_cb, pfi.phantom_type, pfi.required_qty, +item.item_number, item.item_description + +from pm_batch_ingredient pfi, +pm_batch_header pfh, +item + +WHERE item.item_id_m = pfi.item_id_m +and pfh.pm_batch_header_id =pfi.pm_batch_header_id +and pfh.org_id =item.org_id +and pfi.pm_batch_header_id = '{$header_id}' +"; + + $result_array = self::find_by_sql($sql); + return !empty($result_array) ? $result_array : false; + } + +} + +//end of pm_batch_ingredient class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/batch/class_pm_batch_line.inc b/inoerp/modules/pm/batch/class_pm_batch_line.inc new file mode 100644 index 000000000..d275a9c98 --- /dev/null +++ b/inoerp/modules/pm/batch/class_pm_batch_line.inc @@ -0,0 +1,94 @@ + \ No newline at end of file diff --git a/inoerp/modules/pm/formula/class_pm_formula_byproduct.inc b/inoerp/modules/pm/formula/class_pm_formula_byproduct.inc new file mode 100644 index 000000000..e62e5d3a5 --- /dev/null +++ b/inoerp/modules/pm/formula/class_pm_formula_byproduct.inc @@ -0,0 +1,66 @@ + 'Rework', + 'SAMPLE' => 'Sample', + 'WASTE' => 'Waste', + 'YIELD' => 'Yield', + ]; +// data base variables as stored database column name + public $field_a = [ + 'pm_formula_byproduct_id', + 'pm_formula_header_id', + 'line_no', + 'line_type', + 'item_id_m', + 'uom_id', + 'quantity', + 'description', + 'scale_type', + 'yield_type', + 'byproduct_type', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; +//variables used for showing data + public $fields_inForm_notInDataBase = [ + "member_username", + ]; + public $fields_inHeader_needsToBeInserted_inPOST = [ + 'pm_formula_header_id' + ]; + public $requiredField = [ + 'pm_formula_header_id', + 'item_id_m', + ]; + public $pm_formula_byproduct_id; + public $pm_formula_header_id; + public $line_no; + public $line_type; + public $item_id_m; + public $uom_id; + public $quantity; + public $description; + public $yield_contribution_cb; + public $scale_type; + public $yield_type; + public $byproduct_type; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + + +} + +//end of pm_formula_byproduct class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/formula/class_pm_formula_header.inc b/inoerp/modules/pm/formula/class_pm_formula_header.inc new file mode 100644 index 000000000..faf66f962 --- /dev/null +++ b/inoerp/modules/pm/formula/class_pm_formula_header.inc @@ -0,0 +1,153 @@ + 'Formula', + 'number' => '6014', + 'description' => 'Create & Mainten Formula', + 'version' => '0.1.1', + 'db_version' => '1001', + 'mod_version' => '1.1.1', + 'dependent_class' => array('pm_formula_line', 'pm_formula_ingredient', 'pm_formula_byproduct'), + 'primary_entity_cb' => '', + 'module_name' => 'prj', + 'weight' => 1 + ]; + public $action_a = [ + 'APPROVE' => 'Approve', + 'PRINT' => 'Print Estimates', + 'CANCEL' => 'Cancel', + 'CLOSE' => 'Close', + 'CREATE_WO' => 'Create Work Order', + 'COPY_ESTIMATES' => 'Copy Estimates to Actuals', + 'COPY_WO' => 'Copy WO Charges to Actuals', + 'PROCESS_LOGISTICS' => 'Process Logistics', + 'PROCESS_ACTUALS' => 'Process Actuals', + ]; + public $field_a = [ + 'pm_formula_header_id', + 'org_id', + 'formula_name', + 'type', + 'revision', + 'comment', + 'status', + 'description', + 'owner_employee_id', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; + public $initial_search = [ + 'formula_name', + 'type', + ]; + public $requiredField = [ + 'org_id', + 'formula_name', + ]; + public $fields_inForm_notInDataBase = [ + 'action', + 'pm_employee_name' + ]; + public static $json_label_fields = [ + 'formula_name', + 'description', + 'status', + 'type', + 'org_id', + ]; + public $profile_default = [ + 'org_id' => 'org_inv_name_default', + ]; + public $search = [ + '_show_update_path' => 1, + '_show_view_path' => 1, + ]; + public $pageTitle = " Formula "; //page Title + public $pm_formula_header_id; + public $org_id; + public $formula_name; + public $type; + public $revision; + public $comment; + public $status; + public $description; + public $owner_employee_id; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + public $pm_employee_name; + public $action; + + private function _do_action() { + + switch ($this->action) { + case 'APPROVE': + $this->approval_status = 'APPROVED'; + break; + + default : + echo $this->action; + break; + } + } + + public function _before_save() { + if (!empty($this->action)) { + $this->_do_action(); + } + + if (empty($this->approval_status)) { + $this->approval_status = 'ENTERED'; + } + } + + public static function find_financial_details_from_projectHeaderId($pm_formula_header_id) { + $sql = " + SELECT org.org_id, org.legal_org_id, legal.ledger_id, + gl.ledger, gl.description as ledger_description, gl.coa_id, gl.calendar_option_line_code, gl.currency_code, legal.balancing_segments, + org.org, org.code,org.type, org.description as org_description, pph.pm_formula_header_id, pph.project_number + FROM org, + legal, + gl_ledger gl, + pm_formula_header pph + WHERE org.legal_org_id = legal.org_id + AND gl.gl_ledger_id = legal.ledger_id + AND org.org_id = pph.bu_org_id + AND pph.pm_formula_header_id = '{$pm_formula_header_id}' + LIMIT 1 + " + ; + + $result = self::find_by_sql($sql); + + return !empty($result) ? array_pop($result) : false; + } + +} + +//end of pm_formula_header class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/formula/class_pm_formula_ingredient.inc b/inoerp/modules/pm/formula/class_pm_formula_ingredient.inc new file mode 100644 index 000000000..50482a670 --- /dev/null +++ b/inoerp/modules/pm/formula/class_pm_formula_ingredient.inc @@ -0,0 +1,95 @@ + 'Estimates', + 'WORK_ORDER' => 'Work Order', + ]; + public static $consumption_type_a = [ + 'AUTO' => 'Automatic', + 'MANUAL' => 'Manual', + 'INC' => 'Incremental', + 'AUTOBS' => 'Auto By Step', + ]; +// data base variables as stored database column name + public $field_a = [ + 'pm_formula_ingredient_id', + 'pm_formula_header_id', + 'line_no', + 'revision_name', + 'item_id_m', + 'uom_id', + 'quantity', + 'description', + 'scale_type', + 'contribute_yield_cb', + 'consumption_type', + 'buffer_cb', + 'phantom_type', + 'required_qty', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; +//variables used for showing data + public $fields_inForm_notInDataBase = [ + ]; + public $fields_inHeader_needsToBeInserted_inPOST = [ + 'pm_formula_header_id' + ]; + public $requiredField = [ + 'pm_formula_header_id', + 'item_id_m' + ]; + public $pm_formula_byproduct_id; + public $pm_formula_header_id; + public $line_no; + public $line_type; + public $item_id_m; + public $uom_id; + public $quantity; + public $description; + public $contribute_yield_cb; + public $scale_type; + public $yield_type; + public $step_qty_cb; + public $consumption_type; + public $phantom_type; + public $required_qty; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + + public static function find_allLine_byHeaderId($header_id) { + $sql = " SELECT +pfi.pm_formula_ingredient_id, pfi.pm_formula_header_id, pfi.line_no, pfi.revision_name, pfi.item_id_m, +pfi.uom_id, pfi.quantity, pfi.description, pfi.scale_type, pfi.contribute_yield_cb, pfi.consumption_type, +pfi.buffer_cb, pfi.phantom_type, pfi.required_qty, +item.item_number, item.item_description + +from pm_formula_ingredient pfi, +pm_formula_header pfh, +item + +WHERE item.item_id_m = pfi.item_id_m +and pfh.pm_formula_header_id =pfi.pm_formula_header_id +and pfh.org_id =item.org_id +and pfi.pm_formula_header_id = '{$header_id}' +"; + + $result_array = self::find_by_sql($sql); + return !empty($result_array) ? $result_array : false; + } + +} + +//end of pm_formula_ingredient class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/formula/class_pm_formula_line.inc b/inoerp/modules/pm/formula/class_pm_formula_line.inc new file mode 100644 index 000000000..2a66df794 --- /dev/null +++ b/inoerp/modules/pm/formula/class_pm_formula_line.inc @@ -0,0 +1,150 @@ + 'Automatic', + 'MANUAL' => 'Manual', + 'INC' => 'Incremental', + 'AUTOBS' => 'Auto By Step', + ]; + + public static $scale_type_a = [ + 'FIX' => 'Fixed', + 'PROP' => 'Proportional', + ]; + + public $field_a = [ + 'pm_formula_line_id', + 'pm_formula_header_id', + 'line_no', + 'line_type', + 'item_id_m', + 'uom_id', + 'quantity', + 'description', + 'cost_allocation', + 'scale_type', + 'yield_type', + 'byproduct_type', + 'consumption_type', + 'phantom_type', + 'required_qty', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; + public $requiredField = [ + 'pm_formula_header_id', + 'item_id_m', + 'uom_id', + 'quantity', + ]; + public $fields_inHeader_needsToBeInserted_inPOST = [ + "pm_formula_header_id" + ]; + public $fields_inForm_notInDataBase = [ + 'item_description', + ]; +public $pm_formula_line_id; +public $pm_formula_header_id; +public $line_no; +public $line_type; +public $item_id_m; +public $uom_id; +public $quantity; +public $description; +public $cost_allocation; +public $scale_type; +public $yield_type; +public $byproduct_type; +public $consumption_type; +public $phantom_type; +public $required_qty; +public $created_by; +public $creation_date; +public $last_update_by; +public $last_update_date; + + public $time; + public $msg; +public $item_description; + + +// public function findBy_parentId($pm_formula_header_id, $order_by_field = '', $order_by_seq = '') { +// /* +// * 1. Find all where parent project task number is null +// */ +// $final_result = []; +// if (!ino_validate_num($pm_formula_header_id)) { +// return false; +// } +// $this->pm_formula_header_id = $pm_formula_header_id; +// $sql = " SELECT * FROM pm_formula_line WHERE pm_formula_header_id = '{$pm_formula_header_id}' AND parent_prj_task_num IS NULL "; +// $sql .= " ORDER BY task_level_weight ASC "; +// $result = self::find_by_sql($sql); +// +// if ($result) { +// foreach ($result as $result_line) { +// $child_final_result = []; +// $this->_find_all_childs($result_line, $child_final_result); +// array_push($final_result, $result_line); +// if (!empty($child_final_result)) { +// foreach ($child_final_result as $k => $obj) { +// array_push($final_result, $obj); +// } +// } +// } +// } +//// pa($final_result); +// return $final_result; +// } + + private function _find_all_childs($result_line, &$child_final_result) { + $sql = " SELECT * FROM pm_formula_line WHERE pm_formula_header_id = '{$this->pm_formula_header_id}' AND parent_prj_task_num ='{$result_line->task_number}' "; + $sql .= " ORDER BY task_level_weight ASC "; + $result = self::find_by_sql($sql); + if ($result) { + foreach ($result as $result_line_l) { + $child_final_result_a = []; + $this->_find_all_childs($result_line_l, $child_final_result_a); + array_push($child_final_result, $result_line_l); + if (!empty($child_final_result_a)) { + foreach ($child_final_result_a as $k => $obj) { + array_push($child_final_result, $obj); + } + } + } + } + } + + public static function find_allLine_byHeaderId($header_id) { + $sql = " SELECT +pfl.pm_formula_line_id, pfl.pm_formula_header_id, pfl.line_no, pfl.line_type, pfl.item_id_m, pfl.uom_id, pfl.quantity, +pfl.description, pfl.cost_allocation, pfl.scale_type, pfl.yield_type, pfl.byproduct_type, pfl.consumption_type, pfl.phantom_type, +pfl.required_qty, item.item_number, item.item_description + +from pm_formula_line pfl, +pm_formula_header pfh, +item + +WHERE item.item_id_m = pfl.item_id_m +and pfh.pm_formula_header_id = pfl.pm_formula_header_id +and pfh.org_id =item.org_id +and pfl.pm_formula_header_id = '{$header_id}' +"; + + $result_array = self::find_by_sql($sql); + return !empty($result_array) ? $result_array : false; + } + +} + +//end of pm_formula_line class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/formula/formula.inc b/inoerp/modules/pm/formula/formula.inc new file mode 100644 index 000000000..ae9e13803 --- /dev/null +++ b/inoerp/modules/pm/formula/formula.inc @@ -0,0 +1 @@ +service_person_employee_id)) { $emp_details = hr_employee::find_by_id($$class->service_person_employee_id); $$class->service_person = $emp_details->first_name . ' ' . $emp_details->last_name; } if (empty($pm_formula_ingredient_object) && !empty($$class->pm_formula_header_id)) { $pm_formula_ingredient_object = pm_formula_ingredient::find_by_parent_id($$class->pm_formula_header_id); } if (empty($pm_formula_ingredient_object)) { $pm_formula_ingredient_object = array(new pm_formula_ingredient()); } if (empty($pm_formula_byproduct_object) && !empty($$class->pm_formula_header_id)) { $pm_formula_byproduct_object = pm_formula_byproduct::find_by_parent_id($$class->pm_formula_header_id); } if (empty($pm_formula_byproduct_object)) { $pm_formula_byproduct_object = array(new pm_formula_byproduct()); } if ((!empty($$class->arproval_status)) && ($$class->arproval_status == 'CANCELLED')) { $mode = 2; $readonly = 1; } $add_to_order_a = []; // foreach ($pm_formula_line_object as $pm_formula_line) { // if(!in_array($pm_formula_line->sd_so_header_id, $add_to_order_a)){ // $add_to_order_a[$pm_formula_line->sd_so_header_id] = $pm_formula_line->sd_so_header_id; // } // } $pageno = !empty($_GET['pageno']) ? $_GET['pageno'] : 1; $per_page = !empty($_GET['per_page']) ? $_GET['per_page'] : 10; $total_count = count($pm_formula_line_object); $pagination = new pagination($pageno, $per_page, $total_count); $pagination->setProperty('_path', 'form'); $position = ($pageno - 1) * $per_page; ?> \ No newline at end of file diff --git a/inoerp/modules/pm/formula/formula.js b/inoerp/modules/pm/formula/formula.js new file mode 100644 index 000000000..d438909a3 --- /dev/null +++ b/inoerp/modules/pm/formula/formula.js @@ -0,0 +1,46 @@ +function beforeContextMenu() { + $('.line_status').val(''); + $('.picked_quantity').val(''); + $('.shipped_quantity').val(''); + $('.schedule_ship_date').val(''); + $('#so_number').val(''); + return true; +} + +$(document).ready(function () { + //add new lines + $("#content tbody.form_data_line_tbody2").on("click", ".add_row_img", function () { + var addNewRow = new add_new_rowMain(); + addNewRow.trClass = 'pm_formula_ingredient'; + addNewRow.tbodyClass = 'form_data_line_tbody2'; + addNewRow.noOfTabs = 1; + addNewRow.removeDefault = true; + addNewRow.add_new_row(); + }); + + //add new lines + $("#content tbody.form_data_line_tbody3").on("click", ".add_row_img", function () { + var addNewRow = new add_new_rowMain(); + addNewRow.trClass = 'pm_formula_byproduct'; + addNewRow.tbodyClass = 'form_data_line_tbody3'; + addNewRow.noOfTabs = 1; + addNewRow.removeDefault = true; + addNewRow.add_new_row(); + }); + +//setting the first line & shipment number + if (!($('.lines_number:first').val())) { + $('.lines_number:first').val('1'); + } + + $('body').off('change', '#action').on('change', '#action', function () { + if ($(this).val() == 'PROCESS_ACTUALS') { + $('#add_to_order').prop('disabled', false); + } else { + $('#add_to_order').prop('disabled', true); + } + }); + + + +}); \ No newline at end of file diff --git a/inoerp/modules/pm/formula/formula_template.php b/inoerp/modules/pm/formula/formula_template.php new file mode 100644 index 000000000..6b65a9cca --- /dev/null +++ b/inoerp/modules/pm/formula/formula_template.php @@ -0,0 +1,310 @@ + +
    +
    +
    +
      +
    • +
    • +
    • +
    • +
    +
    +
    +
      +
    • l_text_field_dr_withSearch('pm_formula_header_id') ?> + " class="show document_id pm_formula_header_id"> +
    • +
    • l_text_field_d('formula_name'); ?>
    • +
    • l_select_field_from_object('org_id', org::find_all_inventory(), 'org_id', 'org', $$class->org_id, 'org_id', $readonly1, '', ''); ?>
    • +
    • l_select_field_from_object('type', option_header::find_options_byName('PM_FORMULA_TYPE'), 'option_line_code', 'option_line_value', $$class->type, 'type'); ?>
    • +
    • l_text_field_d('revision'); ?>
    • +
    • l_text_field_d('comment'); ?>
    • +
    • text_field_d('pm_employee_name', 'employee_name'); ?> +hidden_field_withId('owner_employee_id', $$class->owner_employee_id); ?> + +
    • +
    • l_text_field_d('description') ?>
    • +
    +
    +
    +
    +
    +
    + +
    +
    + pm_formula_header_id; + ?> +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
      +
    • +select_field_from_array('action', $$class->action_a, '', 'action'); ?> +
    • +
    +
    +
    + +
    +
    +
    + + + +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + seek($position); + while ($pm_formula_line_object_ai->valid()) { + $pm_formula_line = $pm_formula_line_object_ai->current(); + if (!empty($pm_formula_line->item_id_m)) { + $item_f = item::find_by_item_id_m($pm_formula_line->item_id_m); + $$class_second->item_number = $item_f->item_number; + $$class_second->item_description = $item_f->item_description; + } else { + $$class_second->item_number = $$class_second->item_description = null; + } + ?> + + + + + + + + + + + + + next(); + if ($pm_formula_line_object_ai->key() == $position + $per_page) { + break; + } + $count = $count + 1; + } + ?> + +
    ##
    + pm_formula_line_id, array('pm_formula_header_id' => $pm_formula_header->pm_formula_header_id)); + ?> + text_field_wid2sr('pm_formula_line_id', 'line_id'); ?>number_field('line_no', $$class_second->line_no, '', '', 'lines_number small ', 1, $readonly); ?>val_field_wid2('item_number', 'item', 'item_number', 'receving_org_id'); + echo $f->hidden_field_withCLass('item_id_m', $$class_second->item_id_m, 'dont_copy_r'); + ?> + uom_id, '', '', 'uom_id'); ?>number_field('quantity', $$class_second->quantity, '', '', 'allow_change'); ?>select_field_from_array('yield_type', pm_formula_line::$yield_type_a, $$class_second->yield_type, '', 'medium'); ?>select_field_from_array('scale_type', pm_formula_line::$scale_type_a, $$class_second->scale_type, '', 'medium') ?>text_field_wid2('cost_allocation'); ?>
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + item_id_m)) { + $item_ig = item::find_by_item_id_m($pm_formula_ingredient->item_id_m); + $$class_third->item_number = $item_f->item_number; + $$class_third->item_description = $item_f->item_description; + } else { + $$class_third->item_number = $$class_second->item_description = null; + } + ?> + + + + + + + + + + + + + + + + + +
    #
    +
      +
    • +
    • +
    • +
    • pm_formula_header_id); ?>
    • +
    +
    number_field('line_no', $$class_third->line_no, '', '', 'lines_number small ', 1, $readonly); ?>val_field_wid3('item_number', 'item', 'item_number', 'org_id'); + echo $f->hidden_field_withCLass('item_id_m', $$class_third->item_id_m, 'dont_copy_r'); + echo $f->hidden_field_withCLass('purchased_cb', '1', 'popup_value'); + ?> + uom_id, '', '', 'uom_id'); ?>number_field('quantity', $$class_third->quantity, '', '', 'allow_change small'); ?>select_field_from_array('scale_type', pm_formula_line::$scale_type_a, $$class_third->scale_type, '', 'medium') ?>checkBox_field('contribute_yield_cb', $$class_third->contribute_yield_cb); ?>select_field_from_array('consumption_type', pm_formula_ingredient::$consumption_type_a, $$class_third->consumption_type, '', 'medium'); ?>checkBox_field('buffer_cb', $$class_third->buffer_cb); ?>text_field_wid3('phantom_type'); ?>text_field_wid3('required_qty'); ?>
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + item_id_m)) { + $item_bp = item::find_by_item_id_m($pm_formula_byproduct->item_id_m); + $$class_fourth->item_number = $item_bp->item_number; + $$class_fourth->item_description = $item_bp->item_description; + } else { + $$class_fourth->item_number = $$class_fourth->item_description = null; + } + ?> + + + + + + + + + + + + + + +
    #
    +
      +
    • +
    • +
    • +
    • pm_formula_header_id); ?>
    • +
    +
    number_field('line_no', $$class_third->line_no, '', '', 'lines_number small ', 1, $readonly); ?>val_field_wid4('item_number', 'item', 'item_number', 'org_id'); + echo $f->hidden_field_withCLass('item_id_m', $$class_fourth->item_id_m, 'dont_copy_r'); + echo $f->hidden_field('processing_lt', ''); + ?> + uom_id, '', '', 'uom_id'); ?>number_field('quantity', $$class_fourth->quantity, '', '', 'allow_change'); ?>select_field_from_array('scale_type', pm_formula_line::$scale_type_a, $$class_fourth->scale_type, '', 'medium') ?>select_field_from_array('yield_type', pm_formula_line::$yield_type_a, $$class_fourth->yield_type, '', 'medium'); ?>select_field_from_array('byproduct_type', pm_formula_byproduct::$byproduct_type_a, $$class_fourth->byproduct_type, '', 'medium'); ?>
    +
    +
    +
    +
    +
    + +
    + +
    + + +
    + + +
    \ No newline at end of file diff --git a/inoerp/modules/pm/ingredients/asl_document.inc b/inoerp/modules/pm/ingredients/asl_document.inc new file mode 100644 index 000000000..aebeb5319 --- /dev/null +++ b/inoerp/modules/pm/ingredients/asl_document.inc @@ -0,0 +1 @@ +po_asl_header_id); // pa($po_asl_header); $bu_org_id = $po_asl_header->bu_org_id; $item_id_m = $po_asl_header->item_id_m; $item_number =item::find_by_item_id_m($po_asl_header->item_id_m)->item_number; $supplier_details = supplier_all_v::find_by_supplier_siteId($po_asl_line->supplier_site_id); $supplier_site_id = $po_asl_line->supplier_site_id; $supplier_id = $po_asl_line->supplier_id; $supplier_name = $supplier_details->supplier_name; $supplier_site_name = $supplier_details->supplier_site_name; $asl_document_object = po_asl_document::find_by_po_asl_lineId($_GET['po_asl_line_id']); // echo "



    $bu_org_id, $supplier_site_id, $item_id_m"; $document_number_obj = po_blanket_v::find_all_active_bpa($bu_org_id, $supplier_site_id, $item_id_m); if ($document_number_obj) { foreach ($document_number_obj as $obj){ $document_number_a[$obj->po_line_id] = $obj->po_number . ' Line# ' . $obj->po_line_number; } } // pa($document_number_obj); // pa($document_number_a); } else { $po_asl_line_id_h = null; $bu_org_id = null; $supplier_site_id = null; $supplier_id = null; $supplier_name = null; $supplier_site_name = null; $item_id_m = null; $item_number = null; } if(empty($asl_document_object)){ $asl_document_object = array(new po_asl_document); } ?> \ No newline at end of file diff --git a/inoerp/modules/pm/ingredients/asl_document.js b/inoerp/modules/pm/ingredients/asl_document.js new file mode 100644 index 000000000..32fb0efcc --- /dev/null +++ b/inoerp/modules/pm/ingredients/asl_document.js @@ -0,0 +1,33 @@ +function setValFromSelectPage(po_asl_line_id) { + this.po_asl_line_id = po_asl_line_id; +} + +setValFromSelectPage.prototype.setVal = function() { + if (this.po_asl_line_id) { + $('#po_asl_line_id').val(this.po_asl_line_id); + } +}; + +$(document).ready(function() { + + $('body').off('change', '#content').on('change', '#content' , '.document_type', function() { + if ($('#bu_org_id').val() && $('#supplier_site_id').val() && $('#item_id_m').val()) { + getBPAList({ + 'bu_org_id': $('#bu_org_id').val(), + 'supplier_site_id': $('#supplier_site_id').val(), + 'item_id_m': $('#item_id_m').val(), + 'field_name': 'document_line_id', + 'replacing_field': 'document_line_id', + 'trclass': $(this).closest('tr').attr('class'), + }); + } + }); + + $(".po_asl_line_id.select_popup").click(function() { + void window.open('select.php?class_name=po_asl_line', '_blank', + 'width=1000,height=800,TOOLBAR=no,MENUBAR=no,SCROLLBARS=yes,RESIZABLE=yes,LOCATION=no,DIRECTORIES=no,STATUS=no'); + return false; + }); + + +}); \ No newline at end of file diff --git a/inoerp/modules/pm/ingredients/asl_document_template.php b/inoerp/modules/pm/ingredients/asl_document_template.php new file mode 100644 index 000000000..914b01538 --- /dev/null +++ b/inoerp/modules/pm/ingredients/asl_document_template.php @@ -0,0 +1,117 @@ + +
    +
    +
    + +
    +
      +
    • +
    +
    +
    +
      +
    • + text_field('po_asl_line_id', $po_asl_line_id_h, '', 'po_asl_line_id'); ?> + " class="show document_id po_asl_document_id"> + +
    • +
    • l_select_field_from_object('bu_org_id', org::find_all_business(), 'org_id', 'org', $bu_org_id, 'bu_org_id', '', 1, 1); ?>
    • +
    • + text_field('supplier_name', $supplier_name); + echo $f->hidden_field_withId('supplier_id', $supplier_id) + ?>
    • +
    • text_field('supplier_site_name', $supplier_site_name); + echo $f->hidden_field_withId('supplier_site_id', $supplier_site_id) + ?>
    • +
    • + text_field('item_number', $item_number); + echo $f->hidden_field_withId('item_id_m', $item_id_m) + ?>
    • +
    +
    +
    + +
    +
    +
    +
      +
    • +
    • +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ##
    + po_asl_document_id, array('po_asl_line_id' => $po_asl_line_id_h)); + ?> + seq_field_d($count) ?>text_field_widsr('po_asl_document_id') ?>select_field_from_array('document_type', po_asl_document::$document_type_a, $$class->document_type, '', 'medium', 1, '', $readonly1); ?>select_field_from_array('document_line_id', $document_number_a, $$class->document_line_id); ?>date_fieldAnyDay('start_date', $$class->start_date); ?>date_fieldAnyDay('end_date', $$class->end_date); ?>text_field_wid('priority'); ?>
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    + + +
    \ No newline at end of file diff --git a/inoerp/modules/pm/ingredients/class_po_asl_document.inc b/inoerp/modules/pm/ingredients/class_po_asl_document.inc new file mode 100644 index 000000000..1ac253191 --- /dev/null +++ b/inoerp/modules/pm/ingredients/class_po_asl_document.inc @@ -0,0 +1,63 @@ + 'Blanket Purchase Agreement' + ]; + public $field_a = [ + 'po_asl_document_id', + 'po_asl_line_id', + 'document_type', +// 'document_header_id', + 'document_line_id', + 'start_date', + 'end_date', + 'priority', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; + public $initial_search = [ + 'po_asl_line_id', + 'document_type', + 'document_line_id', + ]; + public $requiredField = [ + 'po_asl_line_id', + 'document_type', + 'document_line_id', + ]; + public $po_asl_document_id; + public $po_asl_line_id; + public $document_type; +// public $document_header_id; + public $document_line_id; + public $start_date; + public $end_date; + public $priority; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + public $search = [ + '_show_update_path' => 1, + '_show_view_path' => 1, + ]; + public $pageTitle = " PO ASL Document "; //page Title + + Public static function find_by_po_asl_lineId($po_asl_line_id) { + $sql = " SELECT * FROM " . self::$table_name . " WHERE po_asl_line_id = '{$po_asl_line_id}' "; + $result = self::find_by_sql($sql); + return !empty($result) ? $result : null; + } + + } + +//end of po_asl_document class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/process_operation/class_pm_process_operation_header.inc b/inoerp/modules/pm/process_operation/class_pm_process_operation_header.inc new file mode 100644 index 000000000..bf833754b --- /dev/null +++ b/inoerp/modules/pm/process_operation/class_pm_process_operation_header.inc @@ -0,0 +1,106 @@ + 'Service Activity', + 'number' => '5108', + 'description' => 'Create & Mainten Process operation', + 'version' => '0.1.1', + 'db_version' => '1001', + 'mod_version' => '1.1.1', + 'dependent_class' => array('pm_process_operation_line'), + 'primary_entity_cb' => '', + 'module_name' => 'hd', + 'weight' => 1 + ]; + public static $line_category_a = [ + 'ORDER' => 'Order', + 'RETURN' => 'Return' + ]; + public $field_a = [ + 'pm_process_operation_header_id', + 'operation_name', + 'org_id', + 'operation_class', + 'description', + 'version', + 'start_date', + 'end_date', + 'status', + 'min_quantity', + 'department', + "material_ac_id", + "material_oh_ac_id", + "overhead_ac_id", + "resource_ac_id", + "osp_ac_id", + "expense_ac_id", + 'uom_id', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; + public $initial_search = [ + 'operation_name', + 'status', + 'description', + ]; + public $requiredField = [ + 'operation_name', + 'org_id', + ]; + public $fields_inForm_notInDataBase = [ + 'action', + ]; + public $search = [ + '_show_update_path' => 1, + '_show_view_path' => 1 + ]; + public $pageTitle = "Operation Header "; //page Title + public $pm_process_operation_header_id; + public $operation_name; + public $org_id; + public $operation_class; + public $description; + public $version; + public $start_date; + public $end_date; + public $status; + public $min_quantity; + public $uom_id; + public $material_ac_id; + public $material_oh_ac_id; + public $overhead_ac_id; + public $resource_ac_id; + public $osp_ac_id; + public $expense_ac_id; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + +} + +//end of pm_process_operation_header class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/process_operation/class_pm_process_operation_line.inc b/inoerp/modules/pm/process_operation/class_pm_process_operation_line.inc new file mode 100644 index 000000000..88fe72ef6 --- /dev/null +++ b/inoerp/modules/pm/process_operation/class_pm_process_operation_line.inc @@ -0,0 +1,61 @@ + 'Automatic', + 'MANUAL' => 'Manual' + ]; + public $field_a = [ + 'pm_process_operation_line_id', + 'pm_process_operation_header_id', + 'activity_code', + 'description', + 'activity_factror', + 'sequence_dependency_cb', + 'offset_interval', + 'breakable_cb', + 'material_scheduled_cb', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; + public $requiredField = [ + 'pm_process_operation_header_id', + 'activity_code' + ]; + public $fields_inHeader_needsToBeInserted_inPOST = [ + "pm_process_operation_header_id" + ]; + public $pm_process_operation_line_id; + public $pm_process_operation_header_id; + public $activity_code; + public $description; + public $activity_factror; + public $sequence_dependency_cb; + public $offset_interval; + public $breakable_cb; + public $material_scheduled_cb; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + + public static function find_by_headerId_and_buOrgId($pm_process_operation_header_id, $bu_org_id) { + $sql = "SELECT * FROM " . + self::$table_name . + " where pm_process_operation_header_id= '{$pm_process_operation_header_id}' AND bu_org_id= '{$bu_org_id}' LIMIT 1 "; + $result = self::find_by_sql($sql); + return !empty($result) ? array_pop($result) : false; + } + +} + +//end of pm_process_operation_line class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/process_operation/process_operation_template.php b/inoerp/modules/pm/process_operation/process_operation_template.php new file mode 100644 index 000000000..4091b6f59 --- /dev/null +++ b/inoerp/modules/pm/process_operation/process_operation_template.php @@ -0,0 +1,137 @@ + +
    +
    +
    +
      +
    • +
    • +
    • +
    • +
    +
    +
    +
      +
    • l_text_field_dr_withSearch('pm_process_operation_header_id') ?> + " class="show document_id pm_process_operation_header_id"> +
    • +
    • l_text_field_d('operation_name'); ?>
    • +
    • l_select_field_from_object('org_id', org::find_all_inventory(), 'org_id', 'org', $$class->org_id, 'org_id', $readonly1, '', ''); ?>
    • +
    • l_text_field_d('description'); ?>
    • +
    • l_text_field_d('status'); ?>
    • +
    • l_text_field_d('revision'); ?>
    • +
    • l_date_fieldAnyDay('start_date', $$class->start_date) ?>
    • +
    • l_date_fieldAnyDay('end_date', $$class->end_date) ?>
    • +
    • l_text_field_d('operation_class'); ?>
    • +
    • l_text_field_d('min_quantity'); ?>
    • +
    • l_select_field_from_object('uom_id', uom::find_all(), 'uom_id', 'uom_name', $$class->uom_id, '', 'uom_id medium', 1); ?>
    • +
    +
    +
    +
    +
    +
    + +
    +
    + pm_process_operation_header_id; + ?> +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
      +
    • +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ???
    + pm_process_operation_line_id, array('pm_process_operation_header_id' => $$class->pm_process_operation_header_id)); + ?> + select_field_from_object('activity_code', option_header::find_options_byName('PM_OPERATION_ACTIVITY' ), 'option_line_code' , 'option_line_value', $$class_second->activity_code ,'','medium'); ?>text_field_wid2('description'); ?>text_field_wid2('activity_factror'); ?>checkBox_field_wid2('sequence_dependency_cb'); ?>text_field_wid2('offset_interval'); ?>checkBox_field_wid2('breakable_cb'); ?>checkBox_field_wid2('material_scheduled_cb'); ?>
    +
    +
    +
    +
    + +
    + +
    + + +
    \ No newline at end of file diff --git a/inoerp/modules/pm/process_routing/class_pm_process_routing_header.inc b/inoerp/modules/pm/process_routing/class_pm_process_routing_header.inc new file mode 100644 index 000000000..ea44e4735 --- /dev/null +++ b/inoerp/modules/pm/process_routing/class_pm_process_routing_header.inc @@ -0,0 +1,130 @@ + 'Process Routing', + 'number' => '5108', + 'description' => 'Create & Mainten Process Routing', + 'version' => '0.1.1', + 'db_version' => '1001', + 'mod_version' => '1.1.1', + 'dependent_class' => array('pm_process_routing_line'), + 'primary_entity_cb' => '', + 'module_name' => 'hd', + 'weight' => 1 + ]; + public static $line_category_a = [ + 'ORDER' => 'Order', + 'RETURN' => 'Return' + ]; + public static $status_a = [ + 'APPROVED' => 'Approved', + 'PEND_APPROVAL' => 'Pening Approval', + 'ON_HOLD' => 'On Hold', + 'INACTIVE' => 'In Active', + ]; + public $field_a = [ + 'pm_process_routing_header_id', + 'routing_name', + 'org_id', + 'status', + 'description', + 'revision', + 'start_date', + 'end_date', + 'routing_class', + 'quantity', + 'uom_id', + 'planned_loss', + 'theoretical_loss', + 'fixed_loss', + 'owner_employee_id', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; + public $initial_search = [ + 'routing_name', + 'status', + 'description', + ]; + public $requiredField = [ + 'routing_name', + 'org_id', + ]; + public $fields_inForm_notInDataBase = [ + 'action', + ]; + public $search = [ + '_show_update_path' => 1, + '_show_view_path' => 1 + ]; + + public static $json_label_fields = [ + 'routing_name', + 'description', + 'routing_class', + 'status', + 'org_id', + ]; + public $pageTitle = " Routing Header "; //page Title + public $pm_process_routing_header_id; + public $routing_name; + public $org_id; + public $status; + public $description; + public $revision; + public $start_date; + public $end_date; + public $routing_class; + public $owner_employee_id; + public $quantity; + public $uom_id; + public $planned_loss; + public $theoretical_loss; + public $fixed_loss; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + + public static function find_all_activity_of_serviceType($service_type_id) { + $sql = "SELECT sah.activity_name, sah.activity_description, +sah.line_category, +stl.billing_type, stl.service_activity_id, stl.description, stl.hd_service_type_line_id, stl.hd_service_type_header_id + +FROM hd_service_type_line stl, +pm_process_routing_header sah + +WHERE sah.pm_process_routing_header_id =stl.service_activity_id +AND sah.pm_process_routing_header_id ='{$service_type_id}' +"; + $result = self::find_by_sql($sql); + return !empty($result) ? ($result) : false; + } + +} + +//end of pm_process_routing_header class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/process_routing/class_pm_process_routing_line.inc b/inoerp/modules/pm/process_routing/class_pm_process_routing_line.inc new file mode 100644 index 000000000..a3b87edfe --- /dev/null +++ b/inoerp/modules/pm/process_routing/class_pm_process_routing_line.inc @@ -0,0 +1,102 @@ + 'Automatic', + 'MANUAL' => 'Manual' + ]; + public $field_a = [ + 'pm_process_routing_line_id', + 'pm_process_routing_header_id', + 'step_no', + 'pm_process_operation_header_id', + 'uom_id', + 'release_type', + 'min_quantity', + 'description', + 'step_quantity', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; + public $requiredField = [ + 'pm_process_routing_header_id', + 'step_no' + ]; + public $fields_inHeader_needsToBeInserted_inPOST = [ + "pm_process_routing_header_id" + ]; + public $pm_process_routing_line_id; + public $pm_process_routing_header_id; + public $step_no; + public $pm_operion_header_id; + public $uom_id; + public $release_type; + public $min_quantity; + public $description; + public $step_quantity; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + + public static function find_by_headerId_and_buOrgId($pm_process_routing_header_id, $bu_org_id) { + $sql = "SELECT * FROM " . + self::$table_name . + " where pm_process_routing_header_id= '{$pm_process_routing_header_id}' AND bu_org_id= '{$bu_org_id}' LIMIT 1 "; + $result = self::find_by_sql($sql); + return !empty($result) ? array_pop($result) : false; + } + + public static function find_allLine_byHeaderId($header_id) { + $sql = " SELECT +pprl.pm_process_routing_line_id, pprl.pm_process_routing_header_id, pprl.step_no, pprl.pm_process_operation_header_id, +pprl.uom_id, pprl.release_type, pprl.min_quantity, pprl.description, pprl.step_quantity, +ppoh.operation_name, ppoh.description as operation_description + +FROM pm_process_routing_line pprl, +pm_process_operation_header ppoh + +WHERE ppoh.pm_process_operation_header_id = pprl.pm_process_operation_header_id +and pprl.pm_process_routing_header_id = '{$header_id}' +"; + +//echo $sql; + + $result_array = self::find_by_sql($sql); + return !empty($result_array) ? $result_array : false; + } + + + public static function find_allLine_byRecipeHeaderId($header_id) { + $sql = " SELECT +pprl.pm_process_routing_line_id, pprl.pm_process_routing_header_id, pprl.step_no, pprl.pm_process_operation_header_id, +pprl.uom_id, pprl.release_type, pprl.min_quantity, pprl.description, pprl.step_quantity, +ppoh.operation_name, ppoh.description as operation_description + +FROM pm_process_routing_line pprl, +pm_process_operation_header ppoh, +pm_recipe_header prh + +WHERE ppoh.pm_process_operation_header_id = pprl.pm_process_operation_header_id +and prh.pm_process_routing_header_id = pprl.pm_process_routing_header_id +and prh.pm_recipe_header_id = '{$header_id}' +"; + +//echo $sql; + + $result_array = self::find_by_sql($sql); + return !empty($result_array) ? $result_array : false; + } + +} + +//end of pm_process_routing_line class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/process_routing/pm_process_routing.inc b/inoerp/modules/pm/process_routing/pm_process_routing.inc new file mode 100644 index 000000000..7aae8953c --- /dev/null +++ b/inoerp/modules/pm/process_routing/pm_process_routing.inc @@ -0,0 +1 @@ +org_id) ? pm_process_operation_header::find_by_fieldVal(['org_id' => $$class->org_id]) : pm_process_operation_header::find_all(); if (empty($$class->status)) { $$class->status = 'APPROVED'; } ?> \ No newline at end of file diff --git a/inoerp/modules/pm/process_routing/process_routing.js b/inoerp/modules/pm/process_routing/process_routing.js new file mode 100644 index 000000000..a2cf5589b --- /dev/null +++ b/inoerp/modules/pm/process_routing/process_routing.js @@ -0,0 +1,18 @@ +$(document).ready(function () { + $('body').off('change', '#org_id').on('change', '#org_id', function () { + var org_id = $(this).val(); + $('form#pm_process_routing_line .pm_operion_header_id').find('option').remove(); + $('form#pm_process_routing_line .pm_operion_header_id').append($('#pm_operion_header_id').html()); + $('form#pm_process_routing_line').find('.pm_operion_header_id').each(function (i, op_obj) { + $(op_obj).find('option').each(function (i, opt) { + if ($(opt).data('org_id') != org_id) { + $(this).remove(); + } + }); + }); + }); + + + + +}); \ No newline at end of file diff --git a/inoerp/modules/pm/process_routing/process_routing_template.php b/inoerp/modules/pm/process_routing/process_routing_template.php new file mode 100644 index 000000000..c7413d840 --- /dev/null +++ b/inoerp/modules/pm/process_routing/process_routing_template.php @@ -0,0 +1,144 @@ + +
    +
    +
    +
      +
    • +
    • +
    • +
    +
    +
    +
      +
    • l_text_field_dr_withSearch('pm_process_routing_header_id') ?> + " class="show document_id pm_process_routing_header_id"> +
    • +
    • l_text_field_d('routing_name'); ?>
    • +
    • l_select_field_from_object('org_id', org::find_all_inventory(), 'org_id', 'org', $$class->org_id, 'org_id', $readonly1, 1, ''); ?>
    • +
    • l_text_field_d('description'); ?>
    • +
    • l_select_field_from_array('status', pm_process_routing_header::$status_a, $$class->status); ?>
    • +
    • l_text_field_d('revision'); ?>
    • +
    • l_date_fieldAnyDay('start_date', $$class->start_date) ?>
    • +
    • l_date_fieldAnyDay('end_date', $$class->end_date) ?>
    • +
    • l_text_field_d('routing_class'); ?>
    • +
    • l_text_field_d('quantity'); ?>
    • +
    • l_select_field_from_object('uom_id', uom::find_all(), 'uom_id', 'uom_name', $$class->uom_id, '', '', 'uom_id medium'); ?>
    • +
    • l_text_field_d('planned_loss'); ?>
    • +
    • l_text_field_d('theoretical_loss'); ?>
    • +
    • l_text_field_d('fixed_loss'); ?>
    • +
    • text_field_d('pm_employee_name', 'employee_name'); ?> + hidden_field_withId('owner_employee_id', $$class->owner_employee_id); ?> + +
    • +
    +
    +
    +
    +
    +
    + +
    +
    + pm_process_routing_header_id; + ?> +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
      +
    • +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #
    + pm_process_routing_line_id, array('pm_process_routing_header_id' => $$class->pm_process_routing_header_id)); + ?> + seq_field_d($count) ?>text_field_wid2('step_no'); ?>select_field_from_object('pm_process_operation_header_id', $all_operation_objs, 'pm_process_operation_header_id', array('operation_name' ,'org_id') , $$class_second->pm_process_operation_header_id, '', 'medium' ,'','','','','','org_id'); ?>text_field_wid2('description'); ?>text_field_wid2('step_quantity'); ?>select_field_from_object('uom_id', uom::find_all(), 'uom_id', 'uom_name', $$class_second->uom_id, '', '', 'uom_id medium'); ?>text_field_wid2('min_quantity'); ?>select_field_from_array('release_type', pm_process_routing_line::$release_type_a, $$class_second->release_type, '', 'uom_id medium'); ?>
    +
    +
    +
    +
    + +
    + +
    + + +
    \ No newline at end of file diff --git a/inoerp/modules/pm/recipe/class_pm_recipe_customer.inc b/inoerp/modules/pm/recipe/class_pm_recipe_customer.inc new file mode 100644 index 000000000..96f222937 --- /dev/null +++ b/inoerp/modules/pm/recipe/class_pm_recipe_customer.inc @@ -0,0 +1,44 @@ + \ No newline at end of file diff --git a/inoerp/modules/pm/recipe/class_pm_recipe_header.inc b/inoerp/modules/pm/recipe/class_pm_recipe_header.inc new file mode 100644 index 000000000..f90d6e5c8 --- /dev/null +++ b/inoerp/modules/pm/recipe/class_pm_recipe_header.inc @@ -0,0 +1,103 @@ + 'recipe', + 'number' => '6014', + 'description' => 'Create & Mainten recipe', + 'version' => '0.1.1', + 'db_version' => '1001', + 'mod_version' => '1.1.1', + 'dependent_class' => array('pm_recipe_line', 'pm_recipe_customer'), + 'primary_entity_cb' => '', + 'module_name' => 'prj', + 'weight' => 1 + ]; + public static $recipe_type_a = [ + 'GENERAL' => 'General', + 'SITE' => 'Site', + 'MASTER' => 'Master', + ]; + public $action_a = []; + public $field_a = [ + 'pm_recipe_header_id', + 'org_id', + 'recipe_name', + 'pm_formula_header_id', + 'pm_process_routing_header_id', + 'recipe_type', + 'revision', + 'item_id_m', + 'status', + 'description', + 'owner_employee_id', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; + public $initial_search = [ + 'recipe_name', + 'description', + ]; + public $requiredField = [ + 'org_id', + 'recipe_name', + 'pm_formula_header_id', + ]; + public $profile_default = [ + 'org_id' => 'org_inv_name_default', + ]; + public $search = [ + '_show_update_path' => 1, + '_show_view_path' => 1, + ]; + public $fields_inForm_notInDataBase = [ + "routing_name", + 'formula_name' + ]; + + public $pageTitle = " Recipe "; //page Title + public $pm_recipe_header_id; + public $org_id; + public $recipe_name; + public $recipe_type; + public $pm_formula_header_id; + public $pm_process_routing_header_id; + public $revision; + public $item_id_m; + public $status; + public $description; + public $owner_employee_id; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + public $action; + public $routing_name; + public $formula_name; + +} + +//end of pm_recipe_header class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/recipe/class_pm_recipe_line.inc b/inoerp/modules/pm/recipe/class_pm_recipe_line.inc new file mode 100644 index 000000000..a22b9d316 --- /dev/null +++ b/inoerp/modules/pm/recipe/class_pm_recipe_line.inc @@ -0,0 +1,60 @@ + 'Plant', + 'LABORATORY' => 'Laboratory' + ]; + public $field_a = [ + 'pm_recipe_line_id', + 'pm_recipe_header_id', + 'org_id', + 'org_type', + 'planned_loss', + 'fixed_loss_uom_id', + 'fixed_loss', + 'description', + 'contiguous_cb', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; + public $requiredField = [ + 'pm_recipe_header_id', + 'org_id', + ]; + public $fields_inHeader_needsToBeInserted_inPOST = [ + "pm_recipe_header_id" + ]; + public $fields_inForm_notInDataBase = [ + 'item_description', + ]; + + public $pm_recipe_line_id; + public $pm_recipe_header_id; + public $org_id; + public $org_type; + public $planned_loss; + public $fixed_loss_uom_id; + public $fixed_loss; + public $description; + public $contiguous_cb; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + + + + +} + +//end of pm_recipe_line class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/recipe/recipe.inc b/inoerp/modules/pm/recipe/recipe.inc new file mode 100644 index 000000000..e00484d3a --- /dev/null +++ b/inoerp/modules/pm/recipe/recipe.inc @@ -0,0 +1 @@ +pm_recipe_header_id)) { $pm_recipe_customer_object = pm_recipe_customer::find_by_parent_id($$class->pm_recipe_header_id); } if (empty($pm_recipe_customer_object)) { $pm_recipe_customer_object = array(new pm_recipe_customer()); } if (!empty($$class->pm_process_routing_header_id)) { $$class->routing_name = pm_process_routing_header::find_by_id($$class->pm_process_routing_header_id)->routing_name; } if (!empty($$class->pm_formula_header_id)) { $$class->formula_name = pm_formula_header::find_by_id($$class->pm_formula_header_id)->formula_name; } $pageno = !empty($_GET['pageno']) ? $_GET['pageno'] : 1; $per_page = !empty($_GET['per_page']) ? $_GET['per_page'] : 10; $total_count = count($pm_recipe_line_object); $pagination = new pagination($pageno, $per_page, $total_count); $pagination->setProperty('_path', 'form'); $position = ($pageno - 1) * $per_page; ?> \ No newline at end of file diff --git a/inoerp/modules/pm/recipe/recipe.js b/inoerp/modules/pm/recipe/recipe.js new file mode 100644 index 000000000..add711f90 --- /dev/null +++ b/inoerp/modules/pm/recipe/recipe.js @@ -0,0 +1,19 @@ +$(document).ready(function () { + //add new lines + $("#content tbody.form_data_line_tbody2").on("click", ".add_row_img", function () { + var addNewRow = new add_new_rowMain(); + addNewRow.trClass = 'pm_recipe_customer'; + addNewRow.tbodyClass = 'form_data_line_tbody2'; + addNewRow.noOfTabs = 1; + addNewRow.removeDefault = true; + addNewRow.add_new_row(); + }); + + +//setting the first line & shipment number + if (!($('.lines_number:first').val())) { + $('.lines_number:first').val('1'); + } + + +}); \ No newline at end of file diff --git a/inoerp/modules/pm/recipe/recipe_template.php b/inoerp/modules/pm/recipe/recipe_template.php new file mode 100644 index 000000000..7ffacb46b --- /dev/null +++ b/inoerp/modules/pm/recipe/recipe_template.php @@ -0,0 +1,222 @@ + +
    +
    +
    +
      +
    • +
    • +
    • +
    • +
    +
    +
    +
      +
    • l_text_field_dr_withSearch('pm_recipe_header_id') ?> + " class="show document_id pm_recipe_header_id"> +
    • +
    • l_text_field_d('recipe_name'); ?>
    • +
    • l_select_field_from_object('org_id', org::find_all_inventory(), 'org_id', 'org', $$class->org_id, 'org_id', $readonly1, '', ''); ?>
    • +
    • l_val_field_dm('formula_name', 'pm_formula_header', 'formula_name', '', 'formula_name', 'vf_select_formula_name'); + echo $f->hidden_field_withId('pm_formula_header_id', $$class->pm_formula_header_id); + ?>
    • +
    • l_val_field_dm('routing_name', 'pm_process_routing_header', 'routing_name', '', 'routing_name', 'vf_select_routing_name'); + echo $f->hidden_field_withId('pm_process_routing_header_id', $$class->pm_process_routing_header_id); + echo $f->hidden_field_withCLass('org_id', $$class->org_id, 'popup_value org_id'); + ?>
    • +
    • l_select_field_from_array('recipe_type', pm_recipe_header::$recipe_type_a, $$class->recipe_type); ?>
    • +
    • l_text_field_d('revision'); ?>
    • +
    • l_text_field_d('comment'); ?>
    • +
    • text_field_d('pm_employee_name', 'employee_name'); ?> +hidden_field_withId('owner_employee_id', $$class->owner_employee_id); ?> + +
    • +
    • l_text_field_d('description') ?>
    • +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + pm_recipe_header_id; + ?> +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + + + seek($position); + while ($pm_recipe_line_object_ai->valid()) { + $pm_recipe_line = $pm_recipe_line_object_ai->current(); + ?> + + + + + + + + + + + + next(); + if ($pm_recipe_line_object_ai->key() == $position + $per_page) { + break; + } + $count = $count + 1; + } + ?> + +
    ?
    + pm_recipe_line_id, array('pm_recipe_header_id' => $pm_recipe_header->pm_recipe_header_id)); + ?> + text_field_wid2sr('pm_recipe_line_id', 'line_id'); ?>select_field_from_object('org_id', org::find_all_inventory(), 'org_id', 'org', $$class_second->org_id, '', '', 1, $readonly1); ?>select_field_from_array('org_type', pm_recipe_line::$org_type_a, $$class_second->org_type, '', 'medium'); ?>text_field_wid2('description'); ?>number_field('planned_loss', $$class_second->planned_loss, '', '', 'allow_change'); ?>fixed_loss_uom_id, '', '', 'uom_id'); ?>number_field('fixed_loss', $$class_second->fixed_loss, '', '', 'allow_change'); ?>checkBox_field('contiguous_cb', $$class_second->contiguous_cb, '', 'dontCopy'); ?>
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + ar_customer_id)) { + $pm_recipe_customer->customer_name = ar_customer::find_by_id($pm_recipe_customer->ar_customer_id)->customer_name; + } + if (!empty($$class_third->ar_customer_site_id)) { + $arc = new ar_customer_site(); + $arc_i = $arc->findBy_id($$class_third->ar_customer_site_id); + array_push($customer_site_obj, $arc_i); + } + ?> + + + + + + + + + + +
    +
      +
    • +
    • +
    • +
    • pm_recipe_header_id); ?>
    • +
    +
    select_field_from_object('org_id', org::find_all_business(), 'org_id', 'org', $$class_third->org_id, '', 'large', '', $readonly); ?> val_field('customer_name', $pm_recipe_customer->customer_name ,'ar_customer', 'customer_name', '', 'customer_name', 'vf_select_customer_name large'); + echo $f->hidden_field_withId('ar_customer_id', $$class_third->ar_customer_id); + ?>select_field_from_object('ar_customer_site_id', $customer_site_obj, 'ar_customer_site_id', 'customer_site_name', $$class_third->ar_customer_site_id, '', 'large'); ?> text_field_wid3('description', 'large'); ?>
    +
    +
    +
    +
    +
    + +
    + +
    + + +
    + + +
    \ No newline at end of file diff --git a/inoerp/modules/pm/recipe_all/class_pm_recipe_all_v.inc b/inoerp/modules/pm/recipe_all/class_pm_recipe_all_v.inc new file mode 100644 index 000000000..09e9e601c --- /dev/null +++ b/inoerp/modules/pm/recipe_all/class_pm_recipe_all_v.inc @@ -0,0 +1,103 @@ + 'PO All View', + 'number' => '2220', + 'description' => 'View for all PO Information', + 'version' => '0.1.1', + 'db_version' => '1001', + 'mod_version' => '1.1.1', + 'primary_entity_cb' => '', + 'module_name' => 'po', + 'weight' => 1 + ]; + public $field_a = [ + 'pm_recipe_header_id', + 'org_id', + 'recipe_name', + 'pm_formula_header_id', + 'pm_process_routing_header_id', + 'item_id_m', + 'formula_name', + 'formula_description', + 'routing_name', + 'routing_description', + 'item_number', + 'item_description', + 'org' + ]; + public $initial_search = [ + "recipe_name", + "formula_name", + 'routing_name', + "item_number", + + ]; + public static $json_label_fields = [ + "recipe_name", + "formula_name", + 'routing_name', + "item_number", + 'org' + ]; + public $search = [ + '_update_path' => 'form.php?class_name=pm_recipe_header', + '_show_update_path' => 1, + '_update_action_meassge' => 'Update', + '_view_path' => 'form.php?class_name=pm_recipe_header_id', + '_show_view_path' => 1, + ]; + public $pageTitle = " All Recipes "; //page Title + public $search_functions = [ + 'Organization' => 'search_org_name', + ]; + public $pm_recipe_header_id; + public $org_id; + public $recipe_name; + public $pm_formula_header_id; + public $pm_process_routing_header_id; + public $item_id_m; + public $formula_name; + public $formula_description; + public $routing_name; + public $routing_description; + public $item_number; + public $item_description; + public $org; + + private function create_pm_recipe_all_v() { + $sql = " +CREATE OR REPLACE VIEW pm_recipe_all_v +( +pm_recipe_header_id, org_id, recipe_name, pm_formula_header_id, pm_process_routing_header_id, item_id_m, +formula_name, formula_description, routing_name, routing_description, +item_number, item_description, org +) +AS +SELECT +prh.pm_recipe_header_id, prh.org_id, prh.recipe_name, prh.pm_formula_header_id, prh.pm_process_routing_header_id, prh.item_id_m, +pfh.formula_name, pfh.description as formula_description, pprh.routing_name, pprh.description as routing_description, +item.item_number, item.item_description as item_description, org.org +FROM +pm_recipe_header prh +LEFT JOIN item ON item.item_id_m = prh.item_id_m AND item.org_id = prh.org_id , +pm_formula_header pfh, +pm_process_routing_header pprh, +org + +WHERE prh.pm_formula_header_id = pfh.pm_formula_header_id +AND prh.pm_process_routing_header_id = pprh.pm_process_routing_header_id +AND org.org_id = prh.org_id + +"; + } + +} + +//end of po_detail class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/recipe_material/class_pm_recipe_material_header.inc b/inoerp/modules/pm/recipe_material/class_pm_recipe_material_header.inc new file mode 100644 index 000000000..494fdc263 --- /dev/null +++ b/inoerp/modules/pm/recipe_material/class_pm_recipe_material_header.inc @@ -0,0 +1,104 @@ + 'Recipe Material', + 'number' => '5118', + 'description' => 'Create & Mainten Recipe Material', + 'version' => '0.1.1', + 'db_version' => '1001', + 'mod_version' => '1.1.1', + 'dependent_class' => array('pm_recipe_material_line'), + 'primary_entity_cb' => '', + 'module_name' => 'hd', + 'weight' => 1 + ]; + public static $line_category_a = [ + 'ORDER' => 'Order', + 'RETURN' => 'Return' + ]; + public static $status_a = [ + 'APPROVED' => 'Approved', + 'PEND_APPROVAL' => 'Pening Approval', + 'ON_HOLD' => 'On Hold', + 'INACTIVE' => 'In Active', + ]; + public $field_a = [ + 'pm_recipe_material_header_id', + 'pm_recipe_header_id', + 'status', + 'description', + 'created_by', + 'creation_date', + 'last_update_by', + 'last_update_date', + ]; + public $initial_search = [ + 'routing_name', + 'status', + 'description', + ]; + public $requiredField = [ + 'pm_recipe_header_id', + ]; + public $fields_inForm_notInDataBase = [ + 'action', + 'recipe_name', + 'routing_name', + 'formula_name', + 'routing_description', + 'formula_description', + 'pm_process_routing_header_id', + ]; + public $search = [ + '_show_update_path' => 1, + '_show_view_path' => 1 + ]; + public static $json_label_fields = [ + 'routing_name', + 'description', + 'routing_class', + 'status', + 'org_id', + ]; + public $pageTitle = " Recipe Header "; //page Title + public $pm_recipe_material_header_id; + public $pm_recipe_header_id; + public $status; + public $description; + public $created_by; + public $creation_date; + public $last_update_by; + public $last_update_date; + public $pm_process_routing_header_id; + + public $recipe_name; + public $routing_name; + public $formula_name; + public $routing_description; + public $formula_description; + +} + +//end of pm_recipe_material_header class +?> \ No newline at end of file diff --git a/inoerp/modules/pm/recipe_material/class_pm_recipe_material_line.inc b/inoerp/modules/pm/recipe_material/class_pm_recipe_material_line.inc new file mode 100644 index 000000000..9d6ff16e3 --- /dev/null +++ b/inoerp/modules/pm/recipe_material/class_pm_recipe_material_line.inc @@ -0,0 +1,56 @@ + \ No newline at end of file diff --git a/inoerp/modules/pm/recipe_material/recipe_material.inc b/inoerp/modules/pm/recipe_material/recipe_material.inc new file mode 100644 index 000000000..869216525 --- /dev/null +++ b/inoerp/modules/pm/recipe_material/recipe_material.inc @@ -0,0 +1 @@ +pm_recipe_material_header_id) && !empty($_GET['pm_recipe_header_id'])) { $pm_recipe_material_header_obj_x = pm_recipe_material_header::find_by_fieldVal(['pm_recipe_material_header_id' => $_GET['pm_recipe_header_id']]); if ($pm_recipe_material_header_obj_x) { foreach ($$class->field_a as $f_k => $f_v) { if (property_exists($pm_recipe_material_header_obj_x[0], $f_v)) { $$class->$f_v = $pm_recipe_material_header_obj_x[0]->$f_v; } } } } if (!empty($$class->pm_recipe_header_id)) { $pm_recipe_all_obj_arr = pm_recipe_all_v::find_by_fieldVal(['pm_recipe_header_id' => $$class->pm_recipe_header_id]); if ($pm_recipe_all_obj_arr) { $pm_recipe_all_obj = $pm_recipe_all_obj_arr[0]; $$class->recipe_name = $pm_recipe_all_obj->recipe_name; $$class->routing_name = $pm_recipe_all_obj->routing_name; $$class->formula_name = $pm_recipe_all_obj->formula_name; $$class->routing_description = $pm_recipe_all_obj->routing_description; $$class->formula_description = $pm_recipe_all_obj->formula_description; $forumla_ingredients = pm_formula_ingredient::find_allLine_byHeaderId($pm_recipe_all_obj->pm_formula_header_id); } } if (!empty($$class->pm_recipe_header_id)) { $pm_process_routing_lines = pm_process_routing_line::find_allLine_byRecipeHeaderId( $$class->pm_recipe_header_id); } //pa($forumla_ingredients); $all_operation_objs = !empty($$class->org_id) ? pm_process_operation_header::find_by_fieldVal(['org_id' => $$class->org_id]) : pm_process_operation_header::find_all(); if (empty($$class->status)) { $$class->status = 'APPROVED'; } ?> \ No newline at end of file diff --git a/inoerp/modules/pm/recipe_material/recipe_material.js b/inoerp/modules/pm/recipe_material/recipe_material.js new file mode 100644 index 000000000..a1871370b --- /dev/null +++ b/inoerp/modules/pm/recipe_material/recipe_material.js @@ -0,0 +1,19 @@ +$(document).ready(function () { + $('body').off('click', 'a.pm_recipe_material_header_id_withRecipeName').on('click', 'a.pm_recipe_material_header_id_withRecipeName', function (e) { + e.preventDefault(); + var pm_recipe_header_id = $('#pm_recipe_header_id').val(); + var urlLink = $(this).attr('href'); + var urlLink_a = urlLink.split('?'); + var formUrl = 'includes/json/json_form.php?' + urlLink_a[1] + '&pm_recipe_header_id=' + pm_recipe_header_id ; + getFormDetails(formUrl); + }).one(); + + +$('#form_line').on('change', '.pm_formula_ingredient_id', function(){ + var trClass = '.' + $(this).closest('tr').attr('class').replace(/\s+/,'.'); + $(trClass).find('.uom_id').val($(this).find('option:selected').data('uom_id')); + $(trClass).find('.quantity').val($(this).find('option:selected').data('quantity')); + +}) + +}); \ No newline at end of file diff --git a/inoerp/modules/pm/recipe_material/recipe_material_template.php b/inoerp/modules/pm/recipe_material/recipe_material_template.php new file mode 100644 index 000000000..138cdfc6a --- /dev/null +++ b/inoerp/modules/pm/recipe_material/recipe_material_template.php @@ -0,0 +1,142 @@ + +
    +
    +
    +
      +
    • +
    • +
    • +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + pm_recipe_material_header_id; + ?> +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
      +
    • +
    • +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #
    + pm_recipe_material_line_id, array('pm_recipe_material_header_id' => $$class->pm_recipe_material_header_id)); + ?> + seq_field_d($count) ?>text_field_wid2('step'); ?>select_field_from_object('pm_formula_ingredient_id', $forumla_ingredients, 'pm_formula_ingredient_id', ['item_number', 'revision_name', 'item_description', 'description'], $$class_second->pm_formula_ingredient_id, '', 'large', 1, '', '', '', '', ['quantity' ,'uom_id']); ?>select_field_from_object('uom_id', uom::find_all(), 'uom_id', 'uom_name', $$class_second->uom_id, '', 'small always_readonly' , '', '1'); ?>select_field_from_object('pm_process_routing_line_id', $pm_process_routing_lines, 'pm_process_routing_line_id', ['operation_name', 'operation_description'], $$class_second->pm_process_routing_line_id, '', 'large', 1); ?>text_field_wid2('description', 'large'); ?>
    +
    +
    + +
    +
    +
    +
    + +
    + +
    + + +
    \ No newline at end of file diff --git a/inoerp/modules/pos/tt_with_search/pos_tt_template.php b/inoerp/modules/pos/tt_with_search/pos_tt_template.php index 64e6a8c26..b8e6da495 100644 --- a/inoerp/modules/pos/tt_with_search/pos_tt_template.php +++ b/inoerp/modules/pos/tt_with_search/pos_tt_template.php @@ -88,9 +88,9 @@
    diff --git a/inoerp/modules/sys/profile/class_sys_profile_header.inc b/inoerp/modules/sys/profile/class_sys_profile_header.inc index 5b24ba1ff..c54fe18fa 100644 --- a/inoerp/modules/sys/profile/class_sys_profile_header.inc +++ b/inoerp/modules/sys/profile/class_sys_profile_header.inc @@ -47,7 +47,7 @@ class sys_profile_header extends dbObject { 'sys_profile_header_id', 'access_level', 'profile_name', - 'class_name', + 'profile_class_name', 'description', 'created_by', 'creation_date', @@ -67,7 +67,7 @@ class sys_profile_header extends dbObject { 'description', ]; public $requiredField = [ - 'class_name', + 'profile_class_name', 'access_level', 'profile_name', ]; @@ -82,7 +82,7 @@ class sys_profile_header extends dbObject { public $sys_profile_header_id; public $access_level; public $profile_name; - public $class_name; + public $profile_class_name; public $profile_level; public $description; public $created_by; @@ -98,9 +98,6 @@ class sys_profile_header extends dbObject { // $this->field_a = $prepare->fetchAll(PDO::FETCH_COLUMN, 0); // } - public function __set($name, $value) { - $this->$name = $value; - } } diff --git a/inoerp/modules/sys/profile/class_sys_profile_line.inc b/inoerp/modules/sys/profile/class_sys_profile_line.inc index 62295db73..d3192bcab 100644 --- a/inoerp/modules/sys/profile/class_sys_profile_line.inc +++ b/inoerp/modules/sys/profile/class_sys_profile_line.inc @@ -142,7 +142,7 @@ } public function findAll_profile($profile_name) { - $sql = " SELECT sph.profile_name,sph.description,sph.class_name, + $sql = " SELECT sph.profile_name,sph.description,sph.profile_class_name, spl.sys_profile_line_id, spl.sys_profile_header_id, spl.profile_level, spl.level_name, spl.level_value FROM sys_profile_header sph LEFT JOIN sys_profile_line spl ON spl.sys_profile_header_id = sph.sys_profile_header_id diff --git a/inoerp/modules/sys/profile/profile.inc b/inoerp/modules/sys/profile/profile.inc index b8d0142c6..6d8f882d5 100644 --- a/inoerp/modules/sys/profile/profile.inc +++ b/inoerp/modules/sys/profile/profile.inc @@ -1 +1 @@ -profile_level = $_GET['profile_level']; } else { $profile_level = $$class->profile_level = 'SITE'; } $org = new org(); if (empty($$class->sys_profile_header_id)) { return; } if (!empty($$class->class_name)) { $obj_class_name = $$class->class_name; $profile_method = 'profile_' . $$class->profile_name; if (method_exists($$class->class_name, $profile_method)) { $line_values_array = call_user_func(array($$class->class_name, $profile_method)); $line_values = $line_values_array['line_values']; $line_key = $line_values_array['line_key']; $line_desc = $line_values_array['line_desc']; } else { $line_values = null; } } else { $line_values = null; } if (!empty($profile_level) && !empty($$class->sys_profile_header_id)) { $sys_profile_line_object = []; $lines = $$class_second->findBy_headerId_profileLevel($$class->sys_profile_header_id, $profile_level); if (!empty($lines)) { $sys_profile_line_object = $lines; } else { $sys_pl = new sys_profile_line(); array_push($sys_profile_line_object, $sys_pl); } } ?> \ No newline at end of file +profile_level = $_GET['profile_level']; } else { $profile_level = $$class->profile_level = 'SITE'; } $org = new org(); if (empty($$class->sys_profile_header_id)) { return; } if (!empty($$class->profile_class_name)) { $obj_class_name = $$class->profile_class_name; $profile_method = 'profile_' . $$class->profile_name; if (method_exists($$class->profile_class_name, $profile_method)) { $line_values_array = call_user_func(array($$class->profile_class_name, $profile_method)); $line_values = $line_values_array['line_values']; $line_key = $line_values_array['line_key']; $line_desc = $line_values_array['line_desc']; } else { $line_values = null; } } else { $line_values = null; } if (!empty($profile_level) && !empty($$class->sys_profile_header_id)) { $sys_profile_line_object = []; $lines = $$class_second->findBy_headerId_profileLevel($$class->sys_profile_header_id, $profile_level); if (!empty($lines)) { $sys_profile_line_object = $lines; } else { $sys_pl = new sys_profile_line(); array_push($sys_profile_line_object, $sys_pl); } } ?> \ No newline at end of file diff --git a/inoerp/modules/sys/profile/profile_template.php b/inoerp/modules/sys/profile/profile_template.php index 2a3fd9d68..9bd9e0a94 100644 --- a/inoerp/modules/sys/profile/profile_template.php +++ b/inoerp/modules/sys/profile/profile_template.php @@ -12,7 +12,7 @@
  • l_text_field_dr_withSearch('sys_profile_header_id'); ?>
  • l_select_field_from_array('access_level', sys_profile_header::$access_level_a, $$class->access_level); ?>
  • l_text_field_dm('profile_name'); ?>
  • -
  • l_text_field_dm('class_name'); ?>
  • +
  • l_text_field_dm('profile_class_name'); ?>
  • l_text_field_d('description'); ?>
  • l_select_field_from_array('profile_level', sys_profile_header::$profile_level_a, $$class->profile_level, 'profile_level'); ?> " class="show2 document_id sys_profile_header_id"> diff --git a/inoerp/themes/darkgrey/modules/po_template.php b/inoerp/themes/darkgrey/modules/po_template.php deleted file mode 100644 index 7f3e1c2a4..000000000 --- a/inoerp/themes/darkgrey/modules/po_template.php +++ /dev/null @@ -1,492 +0,0 @@ -
    -

    From Default Theme

    -
    -
    -
    -
    -
    -
    -
    - -
    - - - -
    -
    -
    - -
    -
    -
    -
      -
    • - bu_org_id, 'bu_org_id', $readonly, '', ''); ?> -
    • -
    • - po_type, 'po_type', $readonly, '', ''); ?> -
    • -
    • - po_header_id, '15', '25', '', 'System Number', 'po_header_id', $readonly) ?> - - -
    • -
    • - -
    • -
    • - - -
    • -
    • - -
    • -
    • - -
    • -
    • - - - -
    • -
    • - ef_id, '10', $readonly); ?> -
    • -
    • - po_status) ? $$class->po_status : ""; ?> -
    • -
    • - rev_enabled_cb, 'rev_enabled_cb', $readonly); ?> -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    -
    -
    -
    -
    -
      -
    • - -
    • -
    • - -
    • -
    • - agreement_start_date) ?> -
    • -
    • - agreement_start_date) ?> -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    -
    -
    -
    -
    -
      -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    -
    - -
    -
    - -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
      -
    • - " >Print PO -
    • -
    • - po_status, 'set_po_status', $readonly, '', ''); ?> -
    • -
    • - -
    • -
    • - -
    • -
    - -
    -
    -
    -
    -
    - -
    -
    -
    - -
    PO Lines & Shipments -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ActionLine IdLine NumberTypeItem IdItem NumberItem DescriptionUOMQuantityShipment Details
    -
      -
    • add new line
    • -
    • remove this line
    • -
    • -
    • po_header_id); ?>
    • -
    -
    line_number, '8', '20', 1, 'Auto no', '', $readonly, 'lines_number'); ?>line_type, 'line_type', $readonly); ?>uom, 'uom');; ?>add detail values - - po_line_id; - if (!empty($po_line_id)) { - $po_detail_object = po_detail::find_by_po_lineId($po_line_id); - } else { - $po_detail_object = array(); - } - if (count($po_detail_object) == 0) { - $po_detail = new po_detail(); - $po_detail_object = array(); - array_push($po_detail_object, $po_detail); - } - ?> - -
    -
    Detail Data -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ActionShipment IdShipment NumberInventoryShip To LocationQuantityNeed By DatePromise Date
    -
      -
    • add new line
    • -
    • remove this line
    • -
    • -
    • po_line_id); ?>
    • -
    • po_header_id); ?>
    • - -
    -
    ship_to_inventory, '', $readonly); ?>need_by_date)); ?>promise_date)); ?>
    -
    -
    - - - - - - - - - - - - - - - - - -
    Sub inventoryLocatorRequestor
    -
    -
    - - - - - - - - - - - - - - - - - - - -
    Charge AcAccrual AcBudget AcPPV Ac
    -
    -
    - Quantities - - - - - - - - - - - - - - - - - - - - -
    ReceivedAcceptedDeliveredInvoicedPaid
    -
    - -
    -
    - - -
    - -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - -
    Unit PriceLine PriceLine DescriptionRef Doc TypeRef Number
    -
    -
    - - - - - - - - - - - - - - - - -
    Comments
    -
    -
    -
    -
    - -
    - - -
    -
    - -
    -
    -
    -
    -
    - -
    - - diff --git a/inoerp/themes/darkgrey/template/xx_admin_po_header_template.php b/inoerp/themes/darkgrey/template/xx_admin_po_header_template.php deleted file mode 100644 index f1798cf56..000000000 --- a/inoerp/themes/darkgrey/template/xx_admin_po_header_template.php +++ /dev/null @@ -1,167 +0,0 @@ - -
    - - - - -
    - -
    -
    -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    -
    -
    -
      -
    • l_text_field_dr_withSearch('po_header_id') ?> - " class="show document_id po_header_id"> -
    • -
    • l_select_field_from_object('bu_org_id', org::find_all_business(), 'org_id', 'org', $$class->bu_org_id, 'bu_org_id', '', 1, $readonly1); ?>
    • -
    • l_select_field_from_array('po_type', po_header::$po_type_a, $$class->po_type, 'po_type', '', 1, $readonly1, $readonly1); ?>
    • -
    • l_text_field_d('po_number', 'primary_column2'); ?>
    • -
    • l_text_field_d('release_number'); ?>
    • -
    • l_select_field_from_object('status', po_header::po_status(), 'option_line_code', 'option_line_value', $$class->po_status, 'po_status', 'dont_copy', '', 1); ?>
    • -
    • hidden_field_withId('ref_po_header_id', $$class->ref_po_header_id); ?> - hidden_field_withId('supplier_id', $$class->supplier_id); ?> - text_field('supplier_name', $$class->supplier_name, '20', 'supplier_name', 'select_supplier_name', 1, $readonly1); ?>
    • -
    • l_text_field_d('supplier_number'); ?>
    • -
    • supplier_id) ? supplier_site::find_by_parent_id($$class->supplier_id) : array(); - echo $f->select_field_from_object('supplier_site_id', $supplier_site_obj, 'supplier_site_id', 'supplier_site_name', $$class->supplier_site_id, 'supplier_site_id', '', '', $readonly1); - ?>
    • -
    • l_text_field_d('rev_number'); ?>
    • -
    • l_checkBox_field_d('multi_bu_cb'); ?>
    • -
    • l_text_field_d('buyer'); ?>
    • -
    • l_text_field_d('description'); ?>
    • -
    -
    -
    -
    -
      -
    • l_date_fieldFromToday('agreement_start_date', $$class->agreement_start_date) ?>
    • -
    • l_date_fieldFromToday('agreement_end_date', $$class->agreement_start_date) ?>
    • -
    • l_select_field_from_object('doc_currency', option_header::currencies(), 'option_line_code', 'option_line_code', $$class->doc_currency, 'doc_currency', '', 1, $readonly); ?>
    • -
    • l_select_field_from_object('currency', option_header::currencies(), 'option_line_code', 'option_line_code', $$class->currency, 'currency', '', 1, 1); ?>
    • -
    • l_select_field_from_object('exchange_rate_type', gl_currency_conversion::currency_conversion_type(), 'option_line_code', 'option_line_code', $$class->exchange_rate_type, 'exchange_rate_type', '', 1, $readonly); ?>
    • -
    • l_number_field('exchange_rate', $$class->exchange_rate, '', 'exchange_rate'); ?>
    • -
    • l_select_field_from_object('price_list_header_id', mdm_price_list_header::find_all_purchasing_pl(), 'mdm_price_list_header_id', 'price_list', $$class->price_list_header_id); ?>
    • -
    • l_number_field('header_amount', $$class->header_amount, '15', 'header_amount'); ?>
    • -
    • l_number_field('tax_amount', $$class->tax_amount, '15', 'tax_amount'); ?>
    • -
    • l_select_field_from_object('payment_term_id', payment_term::find_all(), 'payment_term_id', 'payment_term', $$class->payment_term_id, 'payment_term_id', '', 1, $readonly1); ?>
    • -
    -
    -
    -
    -
    -
      -
    • text_field_d('ship_to_id', 'address_id site_address_id'); ?> -
    • -
    • l_text_field_dr('ship_to_address_name', 'address_name'); ?>
    • -
    • l_text_field_dr('ship_to_address', 'address'); ?>
    • -
    • l_text_field_dr('ship_to_country', 'country'); ?>
    • -
    • l_text_field_dr('ship_to_postal_code', 'postal_code'); ?>
    • -
    -
    -
    -
      -
    • - text_field_d('bill_to_id', 'address_id site_address_id'); ?> -
    • -
    • l_text_field_dr('bill_to_address_name', 'address_name'); ?>
    • -
    • l_text_field_dr('bill_to_address', 'address'); ?>
    • -
    • l_text_field_dr('bill_to_country', 'country'); ?>
    • -
    • l_text_field_dr('bill_to_postal_code', 'postal_code'); ?>
    • -
    -
    -
    -
    -
    -
    - -
    -
    - po_header_id; - ?> -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
      -
    • - " >Print PO -
    • -
    • - select_field_from_array('action', $$class->action_a, '', 'action', '', '', $readonly, $action_readonly) - ?> -
    • -
    - -
    -
    -
    -
    -
    - -
    -
    -
    - po_type == 'CONTRACT') { - echo '
  • '; - include_template('footer.inc'); - return; - } - ?> - - - -
    - - -
    \ No newline at end of file diff --git a/inoerp/themes/darkgrey/template/xx_po_header_template.php b/inoerp/themes/darkgrey/template/xx_po_header_template.php deleted file mode 100644 index ba76c54fe..000000000 --- a/inoerp/themes/darkgrey/template/xx_po_header_template.php +++ /dev/null @@ -1,167 +0,0 @@ - -
    - - - - -
    - -
    -
    -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    -
    -
    -
      -
    • l_text_field_dr_withSearch('po_header_id') ?> - " class="show document_id po_header_id"> -
    • -
    • l_select_field_from_object('bu_org_id', org::find_all_business(), 'org_id', 'org', $$class->bu_org_id, 'bu_org_id', '', 1, $readonly1); ?>
    • -
    • l_select_field_from_array('po_type', po_header::$po_type_a, $$class->po_type, 'po_type', '', 1, $readonly1, $readonly1); ?>
    • -
    • l_text_field_d('po_number', 'primary_column2'); ?>
    • -
    • l_text_field_d('release_number'); ?>
    • -
    • l_select_field_from_object('status', po_header::po_status(), 'option_line_code', 'option_line_value', $$class->po_status, 'po_status', 'dont_copy', '', 1); ?>
    • -
    • hidden_field_withId('ref_po_header_id', $$class->ref_po_header_id); ?> - hidden_field_withId('supplier_id', $$class->supplier_id); ?> - text_field('supplier_name', $$class->supplier_name, '20', 'supplier_name', 'select_supplier_name', 1, $readonly1); ?>
    • -
    • l_text_field_d('supplier_number'); ?>
    • -
    • supplier_id) ? supplier_site::find_by_parent_id($$class->supplier_id) : array(); - echo $f->select_field_from_object('supplier_site_id', $supplier_site_obj, 'supplier_site_id', 'supplier_site_name', $$class->supplier_site_id, 'supplier_site_id', '', '', $readonly1); - ?>
    • -
    • l_text_field_d('rev_number'); ?>
    • -
    • l_checkBox_field_d('multi_bu_cb'); ?>
    • -
    • l_text_field_d('buyer'); ?>
    • -
    • l_text_field_d('description'); ?>
    • -
    -
    -
    -
    -
      -
    • l_date_fieldFromToday('agreement_start_date', $$class->agreement_start_date) ?>
    • -
    • l_date_fieldFromToday('agreement_end_date', $$class->agreement_start_date) ?>
    • -
    • l_select_field_from_object('doc_currency', option_header::currencies(), 'option_line_code', 'option_line_code', $$class->doc_currency, 'doc_currency', '', 1, $readonly); ?>
    • -
    • l_select_field_from_object('currency', option_header::currencies(), 'option_line_code', 'option_line_code', $$class->currency, 'currency', '', 1, 1); ?>
    • -
    • l_select_field_from_object('exchange_rate_type', gl_currency_conversion::currency_conversion_type(), 'option_line_code', 'option_line_code', $$class->exchange_rate_type, 'exchange_rate_type', '', 1, $readonly); ?>
    • -
    • l_number_field('exchange_rate', $$class->exchange_rate, '', 'exchange_rate'); ?>
    • -
    • l_select_field_from_object('price_list_header_id', mdm_price_list_header::find_all_purchasing_pl(), 'mdm_price_list_header_id', 'price_list', $$class->price_list_header_id); ?>
    • -
    • l_number_field('header_amount', $$class->header_amount, '15', 'header_amount'); ?>
    • -
    • l_number_field('tax_amount', $$class->tax_amount, '15', 'tax_amount'); ?>
    • -
    • l_select_field_from_object('payment_term_id', payment_term::find_all(), 'payment_term_id', 'payment_term', $$class->payment_term_id, 'payment_term_id', '', 1, $readonly1); ?>
    • -
    -
    -
    -
    -
    -
      -
    • text_field_d('ship_to_id', 'address_id site_address_id'); ?> -
    • -
    • l_text_field_dr('ship_to_address_name', 'address_name'); ?>
    • -
    • l_text_field_dr('ship_to_address', 'address'); ?>
    • -
    • l_text_field_dr('ship_to_country', 'country'); ?>
    • -
    • l_text_field_dr('ship_to_postal_code', 'postal_code'); ?>
    • -
    -
    -
    -
      -
    • - text_field_d('bill_to_id', 'address_id site_address_id'); ?> -
    • -
    • l_text_field_dr('bill_to_address_name', 'address_name'); ?>
    • -
    • l_text_field_dr('bill_to_address', 'address'); ?>
    • -
    • l_text_field_dr('bill_to_country', 'country'); ?>
    • -
    • l_text_field_dr('bill_to_postal_code', 'postal_code'); ?>
    • -
    -
    -
    -
    -
    -
    - -
    -
    - po_header_id; - ?> -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
      -
    • - " >Print PO -
    • -
    • - select_field_from_array('action', $$class->action_a, '', 'action', '', '', $readonly, $action_readonly) - ?> -
    • -
    - -
    -
    -
    -
    -
    - -
    -
    -
    - po_type == 'CONTRACT') { - echo '
    '; - include_template('footer.inc'); - return; - } - ?> - - - -
    - - -
    \ No newline at end of file diff --git a/inoerp/themes/default/header.inc b/inoerp/themes/default/header.inc index c35da2510..0d95d6b11 100644 --- a/inoerp/themes/default/header.inc +++ b/inoerp/themes/default/header.inc @@ -64,7 +64,7 @@ js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); -