| durationestimation->people;?> | durationestimation->members;?> | ||
|---|---|---|---|
| workestimation->duration;?> | diff --git a/module/common/lang/de.php b/module/common/lang/de.php index 71df050fca..5eeed15559 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -684,8 +684,6 @@ $lang->navGroup->compile = 'project'; $lang->navGroup->report = 'project'; $lang->navGroup->measrecord = 'project'; -$lang->navGroup->durationestimation = 'project'; - $lang->navGroup->sqlbuilder = 'system'; $lang->navGroup->auditcl = 'system'; $lang->navGroup->cmcl = 'system'; @@ -947,7 +945,6 @@ $lang->cm = new stdclass(); $lang->nc = new stdclass(); $lang->pssp = new stdclass(); $lang->stakeholder = new stdclass(); -$lang->durationestimation = new stdclass(); $lang->projectstory = new stdclass(); $lang->workestimation->menu = new stdclass(); @@ -961,14 +958,11 @@ $lang->cm->menu = new stdclass(); $lang->pssp->menu = new stdclass(); $lang->stakeholder->menu = new stdclass(); $lang->waterfallproduct->menu = new stdclass(); -$lang->durationestimation->menu = new stdclass(); $lang->projectstory->menu = new stdclass(); $lang->workestimation->menu->workestimation = 'Work Estimation|workestimation|index|project={PROJECT}'; -$lang->workestimation->menu->duration = array('link' => 'Duration Estimation|durationestimation|index|project={PROJECT}', 'subModule' => 'durationestimation'); $lang->workestimation->menu->budget = array('link' => 'Budget|budget|summary|', 'subModule' => 'budget'); -$lang->durationestimation->menu = $lang->workestimation->menu; $lang->budget->menu = $lang->workestimation->menu; $lang->stakeholder->menu->list = array('link' => 'Stakeholder List|stakeholder|browse|', 'alias' => 'create,edit,view,batchcreate'); diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 7e3404d3d0..a0785018aa 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -684,8 +684,6 @@ $lang->navGroup->compile = 'project'; $lang->navGroup->report = 'project'; $lang->navGroup->measrecord = 'project'; -$lang->navGroup->durationestimation = 'project'; - $lang->navGroup->sqlbuilder = 'system'; $lang->navGroup->auditcl = 'system'; $lang->navGroup->cmcl = 'system'; @@ -947,7 +945,6 @@ $lang->cm = new stdclass(); $lang->nc = new stdclass(); $lang->pssp = new stdclass(); $lang->stakeholder = new stdclass(); -$lang->durationestimation = new stdclass(); $lang->projectstory = new stdclass(); $lang->workestimation->menu = new stdclass(); @@ -961,14 +958,11 @@ $lang->cm->menu = new stdclass(); $lang->pssp->menu = new stdclass(); $lang->stakeholder->menu = new stdclass(); $lang->waterfallproduct->menu = new stdclass(); -$lang->durationestimation->menu = new stdclass(); $lang->projectstory->menu = new stdclass(); $lang->workestimation->menu->workestimation = 'Work Estimation|workestimation|index|project={PROJECT}'; -$lang->workestimation->menu->duration = array('link' => 'Duration Estimation|durationestimation|index|project={PROJECT}', 'subModule' => 'durationestimation'); $lang->workestimation->menu->budget = array('link' => 'Budget|budget|summary|', 'subModule' => 'budget'); -$lang->durationestimation->menu = $lang->workestimation->menu; $lang->budget->menu = $lang->workestimation->menu; $lang->stakeholder->menu->list = array('link' => 'Stakeholder List|stakeholder|browse|', 'alias' => 'create,edit,view,batchcreate'); diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index 599a9e7dfd..2f78bd8ca5 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -684,8 +684,6 @@ $lang->navGroup->compile = 'project'; $lang->navGroup->report = 'project'; $lang->navGroup->measrecord = 'project'; -$lang->navGroup->durationestimation = 'project'; - $lang->navGroup->sqlbuilder = 'system'; $lang->navGroup->auditcl = 'system'; $lang->navGroup->cmcl = 'system'; @@ -947,7 +945,6 @@ $lang->cm = new stdclass(); $lang->nc = new stdclass(); $lang->pssp = new stdclass(); $lang->stakeholder = new stdclass(); -$lang->durationestimation = new stdclass(); $lang->projectstory = new stdclass(); $lang->workestimation->menu = new stdclass(); @@ -961,14 +958,11 @@ $lang->cm->menu = new stdclass(); $lang->pssp->menu = new stdclass(); $lang->stakeholder->menu = new stdclass(); $lang->waterfallproduct->menu = new stdclass(); -$lang->durationestimation->menu = new stdclass(); $lang->projectstory->menu = new stdclass(); $lang->workestimation->menu->workestimation = 'Work Estimation|workestimation|index|project={PROJECT}'; -$lang->workestimation->menu->duration = array('link' => 'Duration Estimation|durationestimation|index|project={PROJECT}', 'subModule' => 'durationestimation'); $lang->workestimation->menu->budget = array('link' => 'Budget|budget|summary|', 'subModule' => 'budget'); -$lang->durationestimation->menu = $lang->workestimation->menu; $lang->budget->menu = $lang->workestimation->menu; $lang->stakeholder->menu->list = array('link' => 'Stakeholder List|stakeholder|browse|', 'alias' => 'create,edit,view,batchcreate'); diff --git a/module/common/lang/vi.php b/module/common/lang/vi.php index 8f8c64b959..61b62b204b 100644 --- a/module/common/lang/vi.php +++ b/module/common/lang/vi.php @@ -684,8 +684,6 @@ $lang->navGroup->compile = 'project'; $lang->navGroup->report = 'project'; $lang->navGroup->measrecord = 'project'; -$lang->navGroup->durationestimation = 'project'; - $lang->navGroup->sqlbuilder = 'system'; $lang->navGroup->auditcl = 'system'; $lang->navGroup->cmcl = 'system'; @@ -946,7 +944,6 @@ $lang->cm = new stdclass(); $lang->nc = new stdclass(); $lang->pssp = new stdclass(); $lang->stakeholder = new stdclass(); -$lang->durationestimation = new stdclass(); $lang->projectstory = new stdclass(); $lang->workestimation->menu = new stdclass(); @@ -960,14 +957,11 @@ $lang->cm->menu = new stdclass(); $lang->pssp->menu = new stdclass(); $lang->stakeholder->menu = new stdclass(); $lang->waterfallproduct->menu = new stdclass(); -$lang->durationestimation->menu = new stdclass(); $lang->projectstory->menu = new stdclass(); $lang->workestimation->menu->workestimation = 'Work Estimation|workestimation|index|project={PROJECT}'; -$lang->workestimation->menu->duration = array('link' => 'Duration Estimation|durationestimation|index|project={PROJECT}', 'subModule' => 'durationestimation'); $lang->workestimation->menu->budget = array('link' => 'Budget|budget|summary|', 'subModule' => 'budget'); -$lang->durationestimation->menu = $lang->workestimation->menu; $lang->budget->menu = $lang->workestimation->menu; $lang->stakeholder->menu->list = array('link' => 'Stakeholder List|stakeholder|browse|', 'alias' => 'create,edit,view,batchcreate'); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 615526c81f..0bedde05ed 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -682,8 +682,6 @@ $lang->navGroup->compile = 'project'; $lang->navGroup->report = 'project'; $lang->navGroup->measrecord = 'project'; -$lang->navGroup->durationestimation = 'project'; - $lang->navGroup->sqlbuilder = 'system'; $lang->navGroup->auditcl = 'system'; $lang->navGroup->cmcl = 'system'; @@ -945,7 +943,6 @@ $lang->cm = new stdclass(); $lang->nc = new stdclass(); $lang->pssp = new stdclass(); $lang->stakeholder = new stdclass(); -$lang->durationestimation = new stdclass(); $lang->projectstory = new stdclass(); $lang->workestimation->menu = new stdclass(); @@ -959,14 +956,11 @@ $lang->cm->menu = new stdclass(); $lang->pssp->menu = new stdclass(); $lang->stakeholder->menu = new stdclass(); $lang->waterfallproduct->menu = new stdclass(); -$lang->durationestimation->menu = new stdclass(); $lang->projectstory->menu = new stdclass(); $lang->workestimation->menu->workestimation = '工作量估算|workestimation|index|project={PROJECT}'; -$lang->workestimation->menu->duration = array('link' => '工期估算|durationestimation|index|project={PROJECT}', 'subModule' => 'durationestimation'); $lang->workestimation->menu->budget = array('link' => '费用估算|budget|summary|', 'subModule' => 'budget'); -$lang->durationestimation->menu = $lang->workestimation->menu; $lang->budget->menu = $lang->workestimation->menu; $lang->stakeholder->menu->list = array('link' => '干系人列表|stakeholder|browse|', 'alias' => 'create,edit,view,batchcreate'); diff --git a/module/durationestimation/config.php b/module/durationestimation/config.php deleted file mode 100644 index 8a42d3deee..0000000000 --- a/module/durationestimation/config.php +++ /dev/null @@ -1,6 +0,0 @@ -durationestimation = new stdclass(); -$config->durationestimation->index = new stdclass(); -$config->durationestimation->index->requiredFields = 'scale,productivity,scale,duration,unitLaborCost,totalLaborCost'; - -$config->durationestimation->workloadTotal = 100; diff --git a/module/durationestimation/control.php b/module/durationestimation/control.php deleted file mode 100644 index b26826300a..0000000000 --- a/module/durationestimation/control.php +++ /dev/null @@ -1,137 +0,0 @@ - - * @package durationestimation - * @version $Id$ - * @link http://www.zentao.net - */ -class durationestimation extends control -{ - /** - * Project duration estimation. - * - * @param int $projectID - * @access public - * @return void - */ - public function index($projectID) - { - $workestimation = $this->loadModel('workestimation')->getBudget($projectID); - if(empty($workestimation)) - { - echo js::alert($this->lang->durationestimation->setWorkestimation); - die(js::locate($this->createLink('workestimation', 'index', "projectID=$projectID"))); - } - - $this->app->loadLang('programplan'); - $project = $this->loadModel('program')->getPRJByID($projectID); - $stages = $this->loadModel('stage')->getStages('id_asc'); - - $estimationList = $this->durationestimation->getListByProject($projectID); - if(empty($estimationList)) $this->locate(inlink('create', "projectID=$projectID")); - - $this->view->title = $this->lang->durationestimation->common . $this->lang->colon . $project->name; - $this->view->position[] = $this->lang->durationestimation->common; - $this->view->workestimation = $workestimation; - $this->view->estimationList = $estimationList; - $this->view->project = $project; - $this->view->stages = $stages; - $this->display(); - } - - /** - * Save the project duration estimate. - * - * @param int $projectID - * @access public - * @return void - */ - public function create($projectID = 0) - { - $workestimation = $this->loadModel('workestimation')->getBudget($projectID); - if(empty($workestimation)) - { - echo js::alert($this->lang->durationestimation->setWorkestimation); - die(js::locate($this->createLink('workestimation', 'index', "projectID=$projectID"))); - } - - $this->app->loadLang('programplan'); - if(!empty($_POST)) - { - $total = 0; - foreach($this->post->workload as $value) $total += $value; - - $workloadTotal = $this->config->durationestimation->workloadTotal; - if($total != $workloadTotal) $this->send(array('result' => 'fail', 'message' => $this->lang->durationestimation->workloadError)); - - $this->durationestimation->save($projectID); - - if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError())); - $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('index', "projectID={$projectID}"))); - } - - $project = $this->loadModel('program')->getPRJByID($projectID); - - $this->view->title = $this->lang->durationestimation->common . $this->lang->colon . $project->name; - $this->view->position[] = $this->lang->durationestimation->common; - $this->view->project = $project; - $this->view->stages = $this->loadModel('stage')->getStages('id_asc'); - $this->view->estimationList = $this->durationestimation->getListByProject($projectID); - $this->view->workestimation = $workestimation; - - $this->display(); - } - - /** - * Calculate the end time of the duration. - * - * @param int $projectID - * @param int $stage - * @param int $workload - * @param int $worktimeRate - * @param int $people - * @param string $startDate - * @access public - * @return void - */ - public function ajaxGetDuration($projectID, $stage, $workload, $worktimeRate, $people, $startDate) - { - $startDate = str_replace('_', '-', $startDate); - if($startDate == '0000-00-00') $this->send(array('result' => 'success', 'endDate' => '0000-00-00')); - - $estimation = $this->loadModel('workestimation')->getBudget($projectID); - $duration = $estimation->duration * $workload / 100; - $divisor = ($people == 0 || $estimation->dayHour == 0) ? 0 : $worktimeRate / 100 * $people * $estimation->dayHour; - $duration = $divisor == 0 ? 0 : $duration / $divisor; - if(!$divisor) $this->send(array('result' => 'fail')); - - $holidays = array(); - $workDays = array(); - $i = 0; - - $this->loadModel('project'); - - $startedTime = strtotime($startDate); - $days = 0; - for($i = 0; $days < $duration; $i ++) - { - $day = date('N', strtotime("+ $i days", $startedTime)); - if($this->config->project->weekend == 2) - { - if($day > 5) continue; - } - if($this->config->project->weekend == 1) - { - if($day > 6) continue; - } - $lastDay = date('Y-m-d', strtotime("+ $i days", $startedTime)); - $days ++; - } - - $this->send(array('result' => 'success', 'endDate' => $lastDay)); - } -} diff --git a/module/durationestimation/js/create.js b/module/durationestimation/js/create.js deleted file mode 100644 index 3951f85f7a..0000000000 --- a/module/durationestimation/js/create.js +++ /dev/null @@ -1,55 +0,0 @@ -$().ready(function() -{ - $(':input[name*=people]').change(function() - { - var peopleNumber = 0; - $(':input[name*=people]').each(function() - { - var people = $(this).val(); - if(people) peopleNumber += parseInt(people); - }); - $('#totalStaff').html(peopleNumber); - }); - - $(':input[name*=workload]').change(function() - { - rate = parseFloat($(this).val()); - workload = estimation.scale * rate / 100; - $(this).parents('td').next().find(':input').val(workload); - totalWorkload = 0; - $(':input[name*=workload]').each(function() - { - rate = parseFloat($(this).val()); - workload = estimation.scale * rate / 100; - totalWorkload += workload; - }); - $('#totalWorkload').html(totalWorkload.toFixed(2)); - }); - - - $(':input').change(function() - { - var that = $(this); - projectID = project.id; - stage = $(this).parents('tr').find('[name*=stage]').val(); - workload = $(this).parents('tr').find('[name*=workload]').val(); - worktimeRate = $(this).parents('tr').find('[name*=worktimeRate]').val(); - people = $(this).parents('tr').find('[name*=people]').val(); - startDate = $(this).parents('tr').find('[name*=startDate]').val(); - if(startDate) startDate = startDate.replace(/-/g, '_'); - - if(isNaN(workload) || isNaN(worktimeRate) || isNaN(people) || startDate == '') return false; - url = createLink('durationestimation', 'ajaxGetDuration', 'projectID=' + projectID + '&stage=' + stage + '&workload=' + workload + '&worktimeRate=' + worktimeRate + '&people=' + people + '&startDate=' + startDate), - $.getJSON( - url, - function(response) - { - if(response.result == 'success') - { - that.parents('tr').find('[name*=endDate]').val(response.endDate); - } - } - ); - }); - $(':input').change(); -}) diff --git a/module/durationestimation/lang/de.php b/module/durationestimation/lang/de.php deleted file mode 100644 index f7230ba90b..0000000000 --- a/module/durationestimation/lang/de.php +++ /dev/null @@ -1,24 +0,0 @@ -durationestimation->index = 'Duration Home'; -$lang->durationestimation->create = 'Settings'; -$lang->durationestimation->common = 'Estimate Duration'; -$lang->durationestimation->stage = 'Stage'; -$lang->durationestimation->workloadRate = 'Workload %'; -$lang->durationestimation->workload = 'Workload'; -$lang->durationestimation->worktimeRate = 'Full-time %'; -$lang->durationestimation->people = 'Estimated Man'; -$lang->durationestimation->members = 'Actual Man'; -$lang->durationestimation->startDate = 'Begin'; -$lang->durationestimation->endDate = 'End'; -$lang->durationestimation->setting = 'Settings'; - -$lang->durationestimation->setWorkestimation = "Enter the estimated workload information first."; -$lang->durationestimation->summary = "Project scale: %s {$lang->hourCommon}; Estimated workload: 0; Total number of men: 0"; -$lang->durationestimation->workloadError = "The sum of the workload % should be 100%."; - -$lang->durationestimation->placeholder = new stdclass(); -$lang->durationestimation->placeholder->scale = ''; -$lang->durationestimation->placeholder->productivity = ''; -$lang->durationestimation->placeholder->duration = ''; -$lang->durationestimation->placeholder->unitLaborCost = ''; -$lang->durationestimation->placeholder->totalLaborCost = ''; diff --git a/module/durationestimation/lang/en.php b/module/durationestimation/lang/en.php deleted file mode 100644 index f7230ba90b..0000000000 --- a/module/durationestimation/lang/en.php +++ /dev/null @@ -1,24 +0,0 @@ -durationestimation->index = 'Duration Home'; -$lang->durationestimation->create = 'Settings'; -$lang->durationestimation->common = 'Estimate Duration'; -$lang->durationestimation->stage = 'Stage'; -$lang->durationestimation->workloadRate = 'Workload %'; -$lang->durationestimation->workload = 'Workload'; -$lang->durationestimation->worktimeRate = 'Full-time %'; -$lang->durationestimation->people = 'Estimated Man'; -$lang->durationestimation->members = 'Actual Man'; -$lang->durationestimation->startDate = 'Begin'; -$lang->durationestimation->endDate = 'End'; -$lang->durationestimation->setting = 'Settings'; - -$lang->durationestimation->setWorkestimation = "Enter the estimated workload information first."; -$lang->durationestimation->summary = "Project scale: %s {$lang->hourCommon}; Estimated workload: 0; Total number of men: 0"; -$lang->durationestimation->workloadError = "The sum of the workload % should be 100%."; - -$lang->durationestimation->placeholder = new stdclass(); -$lang->durationestimation->placeholder->scale = ''; -$lang->durationestimation->placeholder->productivity = ''; -$lang->durationestimation->placeholder->duration = ''; -$lang->durationestimation->placeholder->unitLaborCost = ''; -$lang->durationestimation->placeholder->totalLaborCost = ''; diff --git a/module/durationestimation/lang/fr.php b/module/durationestimation/lang/fr.php deleted file mode 100644 index f7230ba90b..0000000000 --- a/module/durationestimation/lang/fr.php +++ /dev/null @@ -1,24 +0,0 @@ -durationestimation->index = 'Duration Home'; -$lang->durationestimation->create = 'Settings'; -$lang->durationestimation->common = 'Estimate Duration'; -$lang->durationestimation->stage = 'Stage'; -$lang->durationestimation->workloadRate = 'Workload %'; -$lang->durationestimation->workload = 'Workload'; -$lang->durationestimation->worktimeRate = 'Full-time %'; -$lang->durationestimation->people = 'Estimated Man'; -$lang->durationestimation->members = 'Actual Man'; -$lang->durationestimation->startDate = 'Begin'; -$lang->durationestimation->endDate = 'End'; -$lang->durationestimation->setting = 'Settings'; - -$lang->durationestimation->setWorkestimation = "Enter the estimated workload information first."; -$lang->durationestimation->summary = "Project scale: %s {$lang->hourCommon}; Estimated workload: 0; Total number of men: 0"; -$lang->durationestimation->workloadError = "The sum of the workload % should be 100%."; - -$lang->durationestimation->placeholder = new stdclass(); -$lang->durationestimation->placeholder->scale = ''; -$lang->durationestimation->placeholder->productivity = ''; -$lang->durationestimation->placeholder->duration = ''; -$lang->durationestimation->placeholder->unitLaborCost = ''; -$lang->durationestimation->placeholder->totalLaborCost = ''; diff --git a/module/durationestimation/lang/vi.php b/module/durationestimation/lang/vi.php deleted file mode 100644 index f7230ba90b..0000000000 --- a/module/durationestimation/lang/vi.php +++ /dev/null @@ -1,24 +0,0 @@ -durationestimation->index = 'Duration Home'; -$lang->durationestimation->create = 'Settings'; -$lang->durationestimation->common = 'Estimate Duration'; -$lang->durationestimation->stage = 'Stage'; -$lang->durationestimation->workloadRate = 'Workload %'; -$lang->durationestimation->workload = 'Workload'; -$lang->durationestimation->worktimeRate = 'Full-time %'; -$lang->durationestimation->people = 'Estimated Man'; -$lang->durationestimation->members = 'Actual Man'; -$lang->durationestimation->startDate = 'Begin'; -$lang->durationestimation->endDate = 'End'; -$lang->durationestimation->setting = 'Settings'; - -$lang->durationestimation->setWorkestimation = "Enter the estimated workload information first."; -$lang->durationestimation->summary = "Project scale: %s {$lang->hourCommon}; Estimated workload: 0; Total number of men: 0"; -$lang->durationestimation->workloadError = "The sum of the workload % should be 100%."; - -$lang->durationestimation->placeholder = new stdclass(); -$lang->durationestimation->placeholder->scale = ''; -$lang->durationestimation->placeholder->productivity = ''; -$lang->durationestimation->placeholder->duration = ''; -$lang->durationestimation->placeholder->unitLaborCost = ''; -$lang->durationestimation->placeholder->totalLaborCost = ''; diff --git a/module/durationestimation/lang/zh-cn.php b/module/durationestimation/lang/zh-cn.php deleted file mode 100644 index ca14a4ac9c..0000000000 --- a/module/durationestimation/lang/zh-cn.php +++ /dev/null @@ -1,24 +0,0 @@ -durationestimation->index = '工期估算首页'; -$lang->durationestimation->create = '工期估算设置'; -$lang->durationestimation->common = '项目工期估算'; -$lang->durationestimation->stage = '阶段'; -$lang->durationestimation->workloadRate = '工作量占比'; -$lang->durationestimation->workload = '工作量'; -$lang->durationestimation->worktimeRate = '全时率'; -$lang->durationestimation->people = '估算人数'; -$lang->durationestimation->members = '投入人数'; -$lang->durationestimation->startDate = '开始日期'; -$lang->durationestimation->endDate = '结束日期'; -$lang->durationestimation->setting = '设置'; - -$lang->durationestimation->setWorkestimation = "请先录入工作量估算信息"; -$lang->durationestimation->summary = "项目规模: %s {$lang->hourCommon}, 估算工作量: 0, 总投入人数: 0"; -$lang->durationestimation->workloadError = "工作量占比之和必须是100%"; - -$lang->durationestimation->placeholder = new stdclass(); -$lang->durationestimation->placeholder->scale = ''; -$lang->durationestimation->placeholder->productivity = ''; -$lang->durationestimation->placeholder->duration = ''; -$lang->durationestimation->placeholder->unitLaborCost = ''; -$lang->durationestimation->placeholder->totalLaborCost = ''; diff --git a/module/durationestimation/lang/zh-tw.php b/module/durationestimation/lang/zh-tw.php deleted file mode 100644 index cee927d8f5..0000000000 --- a/module/durationestimation/lang/zh-tw.php +++ /dev/null @@ -1,24 +0,0 @@ -durationestimation->index = '工期估算首頁'; -$lang->durationestimation->create = '工期估算設置'; -$lang->durationestimation->common = '項目工期估算'; -$lang->durationestimation->stage = '階段'; -$lang->durationestimation->workloadRate = '工作量占比'; -$lang->durationestimation->workload = '工作量'; -$lang->durationestimation->worktimeRate = '全時率'; -$lang->durationestimation->people = '估算人數'; -$lang->durationestimation->members = '投入人數'; -$lang->durationestimation->startDate = '開始日期'; -$lang->durationestimation->endDate = '結束日期'; -$lang->durationestimation->setting = '設置'; - -$lang->durationestimation->setWorkestimation = "請先錄入工作量估算信息"; -$lang->durationestimation->summary = "項目規模: %s {$lang->hourCommon}, 估算工作量: 0, 總投入人數: 0"; -$lang->durationestimation->workloadError = "工作量占比之和必須是100%"; - -$lang->durationestimation->placeholder = new stdclass(); -$lang->durationestimation->placeholder->scale = ''; -$lang->durationestimation->placeholder->productivity = ''; -$lang->durationestimation->placeholder->duration = ''; -$lang->durationestimation->placeholder->unitLaborCost = ''; -$lang->durationestimation->placeholder->totalLaborCost = ''; diff --git a/module/durationestimation/model.php b/module/durationestimation/model.php deleted file mode 100644 index afb5abe32e..0000000000 --- a/module/durationestimation/model.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @package durationestimation - * @version $Id$ - * @link http://www.zentao.net - */ -class durationestimationModel extends model -{ - /** - * Get the project duration estimate. - * - * @param int $projectID - * @access public - * @return void - */ - public function getListByProject($projectID) - { - return $this->dao->select('*')->from(TABLE_DURATIONESTIMATION)->where('PRJ')->eq($projectID)->fetchAll('stage'); - } - - /** - * Save the project duration estimate. - * - * @param int $projectID - * @access public - * @return void - */ - public function save($projectID) - { - $this->dao->delete()->from(TABLE_DURATIONESTIMATION)->where('PRJ')->eq($projectID); - foreach($this->post->stage as $i => $stage) - { - $data = new stdclass; - $data->PRJ = $projectID; - $data->stage = $stage; - $data->workload = $this->post->workload[$i]; - $data->worktimeRate = $this->post->worktimeRate[$i]; - $data->people = $this->post->people[$i]; - $data->startDate = $this->post->startDate[$i]; - $data->endDate = $this->post->endDate[$i]; - $this->dao->insert(TABLE_DURATIONESTIMATION)->data($data)->exec(); - } - - return !dao::isError(); - } -} diff --git a/module/durationestimation/view/create.html.php b/module/durationestimation/view/create.html.php deleted file mode 100644 index b27f3abfb6..0000000000 --- a/module/durationestimation/view/create.html.php +++ /dev/null @@ -1,66 +0,0 @@ - - - - |