* Finish task #36871.

This commit is contained in:
tianshujie98
2021-03-22 17:17:56 +08:00
parent 98ad1b4529
commit d664d60a7f
10 changed files with 169 additions and 167 deletions
+6 -6
View File
@@ -360,16 +360,16 @@ $lang->doc->menuOrder[30] = 'create';
/* Report menu.*/
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => "{$lang->report->annual}|report|annualData|year=&dept=&userID=" . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => "{$lang->product->common}|report|productsummary");
$lang->report->menu->execution = array('link' => "{$lang->execution->common}|report|executiondeviation");
$lang->report->menu->test = array('link' => "{$lang->qa->common}|report|bugcreate", 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => "{$lang->system->common}|report|workload");
$lang->report->menu->annual = array('link' => "{$lang->report->annual}|report|annualData|year=&dept=&userID=" . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => "{$lang->product->common}|report|productsummary");
$lang->report->menu->project = array('link' => "{$lang->project->common}|report|projectdeviation");
$lang->report->menu->test = array('link' => "{$lang->qa->common}|report|bugcreate", 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => "{$lang->system->common}|report|workload");
/* Report menu order. */
$lang->report->menuOrder[5] = 'annual';
$lang->report->menuOrder[10] = 'product';
$lang->report->menuOrder[15] = 'execution';
$lang->report->menuOrder[15] = 'project';
$lang->report->menuOrder[20] = 'test';
$lang->report->menuOrder[25] = 'staff';
+9 -9
View File
@@ -37,7 +37,7 @@ class report extends control
}
/**
* The index of report, goto execution deviation.
* The index of report, goto project deviation.
*
* @access public
* @return void
@@ -48,23 +48,23 @@ class report extends control
}
/**
* Execution deviation report.
* Project deviation report.
*
* @access public
* @return void
*/
public function executionDeviation($begin = 0, $end = 0)
public function projectDeviation($begin = 0, $end = 0)
{
$begin = $begin ? date('Y-m-d', strtotime($begin)) : '';
$end = $end ? date('Y-m-d', strtotime($end)) : '';
$this->view->title = $this->lang->report->executionDeviation;
$this->view->position[] = $this->lang->report->executionDeviation;
$this->view->title = $this->lang->report->projectDeviation;
$this->view->position[] = $this->lang->report->projectDeviation;
$this->view->executions = $this->report->getExecutions($begin, $end);
$this->view->begin = $begin;
$this->view->end = $end;
$this->view->submenu = 'execution';
$this->view->projects = $this->report->getProjects($begin, $end);
$this->view->begin = $begin;
$this->view->end = $end;
$this->view->submenu = 'project';
$this->display();
}
@@ -23,6 +23,6 @@ function changeDate(begin, end)
end = end + endarray[i];
}
}
link = createLink('report', 'executiondeviation', 'begin=' + begin + '&end=' + end);
link = createLink('report', 'projectdeviation', 'begin=' + begin + '&end=' + end);
location.href=link;
}
+19 -19
View File
@@ -18,7 +18,7 @@ $lang->report->percent = '%';
$lang->report->undefined = 'Undefiniert';
$lang->report->query = 'Abfrage';
$lang->report->annual = 'Annual Summary';
$lang->report->executionCommon = 'Execution';
$lang->report->project = 'Project';
$lang->report->colors[] = 'AFD8F8';
$lang->report->colors[] = 'F6BD0F';
@@ -38,30 +38,30 @@ $lang->report->assign['assign'] = 'Zugeordnet';
$lang->report->singleColor[] = 'F6BD0F';
$lang->report->executionDeviation = 'Durchgeführt Abweichung';
$lang->report->productSummary = $lang->productCommon . ' Zusammenfassung';
$lang->report->bugCreate = 'Bug gemeldet';
$lang->report->bugAssign = 'Bug zugeordnet';
$lang->report->workload = 'Team Arbeitslast ';
$lang->report->workloadAB = 'Arbeitslast';
$lang->report->bugOpenedDate = 'Bug gemeldet am';
$lang->report->beginAndEnd = ' : von';
$lang->report->begin = 'Begin';
$lang->report->end = 'End';
$lang->report->dept = 'Abteilung';
$lang->report->deviationChart = 'Durchgeführt Abweichnungs Chart';
$lang->report->projectDeviation = 'Projektabweichungsbericht';
$lang->report->productSummary = $lang->productCommon . ' Zusammenfassung';
$lang->report->bugCreate = 'Bug gemeldet';
$lang->report->bugAssign = 'Bug zugeordnet';
$lang->report->workload = 'Team Arbeitslast ';
$lang->report->workloadAB = 'Arbeitslast';
$lang->report->bugOpenedDate = 'Bug gemeldet am';
$lang->report->beginAndEnd = ' : von';
$lang->report->begin = 'Begin';
$lang->report->end = 'End';
$lang->report->dept = 'Abteilung';
$lang->report->deviationChart = 'Projektabweichungskurve';
$lang->reportList = new stdclass();
$lang->reportList->execution = new stdclass();
$lang->reportList->project = new stdclass();
$lang->reportList->product = new stdclass();
$lang->reportList->test = new stdclass();
$lang->reportList->staff = new stdclass();
$lang->reportList->execution->lists[10] = 'Durchgeführt Abweichnung|report|executiondeviation';
$lang->reportList->product->lists[10] = $lang->productCommon . ' Zusammenfassung|report|productsummary';
$lang->reportList->test->lists[10] = 'Bugs gemeldet|report|bugcreate';
$lang->reportList->test->lists[13] = 'Bugs zugeordnet|report|bugassign';
$lang->reportList->staff->lists[10] = 'Team Arbeitslast|report|workload';
$lang->reportList->project->lists[10] = 'Durchgeführt Abweichnung|reportprojectdeviation';
$lang->reportList->product->lists[10] = $lang->productCommon . ' Zusammenfassung|report|productsummary';
$lang->reportList->test->lists[10] = 'Bugs gemeldet|report|bugcreate';
$lang->reportList->test->lists[13] = 'Bugs zugeordnet|report|bugassign';
$lang->reportList->staff->lists[10] = 'Team Arbeitslast|report|workload';
$lang->report->id = 'ID';
$lang->report->execution = $lang->executionCommon;
+22 -22
View File
@@ -18,7 +18,7 @@ $lang->report->percent = '%';
$lang->report->undefined = 'Undefined';
$lang->report->query = 'Query';
$lang->report->annual = 'Annual Summary';
$lang->report->executionCommon = 'Execution';
$lang->report->project = 'Project';
$lang->report->colors[] = 'AFD8F8';
$lang->report->colors[] = 'F6BD0F';
@@ -38,30 +38,30 @@ $lang->report->assign['assign'] = 'Assigned';
$lang->report->singleColor[] = 'F6BD0F';
$lang->report->executionDeviation = 'Execution Deviation';
$lang->report->productSummary = $lang->productCommon . ' Summary';
$lang->report->bugCreate = 'Bug Reported Summary';
$lang->report->bugAssign = 'Bug Assigned Summary';
$lang->report->workload = 'Team Workload Summary';
$lang->report->workloadAB = 'Workload';
$lang->report->bugOpenedDate = 'Bug reported from';
$lang->report->begin = 'Begin';
$lang->report->end = 'End';
$lang->report->beginAndEnd = ' From';
$lang->report->dept = 'Department';
$lang->report->deviationChart = 'Execution Deviation Chart';
$lang->report->projectDeviation = 'Project Deviation';
$lang->report->productSummary = $lang->productCommon . ' Summary';
$lang->report->bugCreate = 'Bug Reported Summary';
$lang->report->bugAssign = 'Bug Assigned Summary';
$lang->report->workload = 'Team Workload Summary';
$lang->report->workloadAB = 'Workload';
$lang->report->bugOpenedDate = 'Bug reported from';
$lang->report->begin = 'Begin';
$lang->report->end = 'End';
$lang->report->beginAndEnd = ' From';
$lang->report->dept = 'Department';
$lang->report->deviationChart = 'Project Deviation Chart';
$lang->reportList = new stdclass();
$lang->reportList->execution = new stdclass();
$lang->reportList->product = new stdclass();
$lang->reportList->test = new stdclass();
$lang->reportList->staff = new stdclass();
$lang->reportList->project = new stdclass();
$lang->reportList->product = new stdclass();
$lang->reportList->test = new stdclass();
$lang->reportList->staff = new stdclass();
$lang->reportList->execution->lists[10] = 'Execution Deviation|report|executiondeviation';
$lang->reportList->product->lists[10] = $lang->productCommon . ' Summary|report|productsummary';
$lang->reportList->test->lists[10] = 'Bug Reported Summary|report|bugcreate';
$lang->reportList->test->lists[13] = 'Bug Assigned Summary|report|bugassign';
$lang->reportList->staff->lists[10] = 'Team Workload Summary|report|workload';
$lang->reportList->project->lists[10] = 'Execution Deviation|report|projectdeviation';
$lang->reportList->product->lists[10] = $lang->productCommon . ' Summary|report|productsummary';
$lang->reportList->test->lists[10] = 'Bug Reported Summary|report|bugcreate';
$lang->reportList->test->lists[13] = 'Bug Assigned Summary|report|bugassign';
$lang->reportList->staff->lists[10] = 'Team Workload Summary|report|workload';
$lang->report->id = 'ID';
$lang->report->execution = $lang->executionCommon;
+22 -22
View File
@@ -18,7 +18,7 @@ $lang->report->percent = '%';
$lang->report->undefined = 'N/D';
$lang->report->query = 'Requête';
$lang->report->annual = 'Résumé Annuel';
$lang->report->executionCommon = 'Execution';
$lang->report->project = 'Project';
$lang->report->colors[] = 'AFD8F8';
$lang->report->colors[] = 'F6BD0F';
@@ -38,30 +38,30 @@ $lang->report->assign['assign'] = 'Affecté';
$lang->report->singleColor[] = 'F6BD0F';
$lang->report->executionDeviation = 'Dérive Effectué';
$lang->report->productSummary = 'Résumé ' . $lang->productCommon;
$lang->report->bugCreate = 'Résumé remontée Bugs';
$lang->report->bugAssign = 'Résumé affectation Bugs';
$lang->report->workload = 'Résumé charge travail';
$lang->report->workloadAB = 'Charge Travail';
$lang->report->bugOpenedDate = 'Bugs signalés de';
$lang->report->beginAndEnd = ' de';
$lang->report->begin = 'Begin';
$lang->report->end = 'End';
$lang->report->dept = 'Compartiment';
$lang->report->deviationChart = 'Graphique de Dérive d uEffectué' ;
$lang->report->projectDeviation = 'Rapport de déviation du projet';
$lang->report->productSummary = 'Résumé ' . $lang->productCommon;
$lang->report->bugCreate = 'Résumé remontée Bugs';
$lang->report->bugAssign = 'Résumé affectation Bugs';
$lang->report->workload = 'Résumé charge travail';
$lang->report->workloadAB = 'Charge Travail';
$lang->report->bugOpenedDate = 'Bugs signalés de';
$lang->report->beginAndEnd = ' de';
$lang->report->begin = 'Begin';
$lang->report->end = 'End';
$lang->report->dept = 'Compartiment';
$lang->report->deviationChart = 'Courbe de déviation du projet';
$lang->reportList = new stdclass();
$lang->reportList->execution = new stdclass();
$lang->reportList->product = new stdclass();
$lang->reportList->test = new stdclass();
$lang->reportList->staff = new stdclass();
$lang->reportList->project = new stdclass();
$lang->reportList->product = new stdclass();
$lang->reportList->test = new stdclass();
$lang->reportList->staff = new stdclass();
$lang->reportList->execution->lists[10] = 'Dériv Effectué|report|executiondeviation';
$lang->reportList->product->lists[10] = 'Résumé ' . $lang->productCommon . '|report|productsummary';
$lang->reportList->test->lists[10] = 'Résumé remontée Bugs|report|bugcreate';
$lang->reportList->test->lists[13] = 'Résumé affectation Bugs|report|bugassign';
$lang->reportList->staff->lists[10] = 'Résumé charge travail|report|workload';
$lang->reportList->project->lists[10] = 'Dériv Effectué|report|projectdeviation';
$lang->reportList->product->lists[10] = 'Résumé ' . $lang->productCommon . '|report|productsummary';
$lang->reportList->test->lists[10] = 'Résumé remontée Bugs|report|bugcreate';
$lang->reportList->test->lists[13] = 'Résumé affectation Bugs|report|bugassign';
$lang->reportList->staff->lists[10] = 'Résumé charge travail|report|workload';
$lang->report->id = 'ID';
$lang->report->execution = $lang->executionCommon;
+31 -31
View File
@@ -9,16 +9,16 @@
* @version $Id: vi.php 5080 2013-07-10 00:46:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
$lang->report->common = 'Báo cáo';
$lang->report->index = 'Trang báo cáo';
$lang->report->list = 'Báo cáo';
$lang->report->item = 'Hạng mục';
$lang->report->value = 'Giá trị';
$lang->report->percent = '%';
$lang->report->undefined = 'Chưa định nghĩa';
$lang->report->query = 'Truy vấn';
$lang->report->annual = 'Tóm tắt theo năm';
$lang->report->executionCommon = 'Execution';
$lang->report->common = 'Báo cáo';
$lang->report->index = 'Trang báo cáo';
$lang->report->list = 'Báo cáo';
$lang->report->item = 'Hạng mục';
$lang->report->value = 'Giá trị';
$lang->report->percent = '%';
$lang->report->undefined = 'Chưa định nghĩa';
$lang->report->query = 'Truy vấn';
$lang->report->annual = 'Tóm tắt theo năm';
$lang->report->project = 'Project';
$lang->report->colors[] = 'AFD8F8';
$lang->report->colors[] = 'F6BD0F';
@@ -38,30 +38,30 @@ $lang->report->assign['assign'] = 'Đã giao';
$lang->report->singleColor[] = 'F6BD0F';
$lang->report->executionDeviation = 'Độ lệch thực hiện';
$lang->report->productSummary = 'Tóm tắt '.$lang->productCommon;
$lang->report->bugCreate = 'Báo cáo Bug';
$lang->report->bugAssign = 'Bàn giao Bug';
$lang->report->workload = 'Lượng công việc đội nhóm';
$lang->report->workloadAB = 'Lượng công việc';
$lang->report->bugOpenedDate = 'Bug được báo cáo từ';
$lang->report->beginAndEnd = ' từ';
$lang->report->begin = 'Begin';
$lang->report->end = 'End';
$lang->report->dept = 'Phòng/Ban';
$lang->report->deviationChart = 'Biểu đồ chênh lệcthực hiệnh';
$lang->report->projectDeviation = 'Độ lệch thực hiện';
$lang->report->productSummary = 'Tóm tắt '.$lang->productCommon;
$lang->report->bugCreate = 'Báo cáo Bug';
$lang->report->bugAssign = 'Bàn giao Bug';
$lang->report->workload = 'Lượng công việc đội nhóm';
$lang->report->workloadAB = 'Lượng công việc';
$lang->report->bugOpenedDate = 'Bug được báo cáo từ';
$lang->report->beginAndEnd = ' từ';
$lang->report->begin = 'Begin';
$lang->report->end = 'End';
$lang->report->dept = 'Phòng/Ban';
$lang->report->deviationChart = 'Biểu đồ chênh lệcthực hiệnh';
$lang->reportList = new stdclass();
$lang->reportList->execution = new stdclass();
$lang->reportList->product = new stdclass();
$lang->reportList->test = new stdclass();
$lang->reportList->staff = new stdclass();
$lang->reportList->project = new stdclass();
$lang->reportList->product = new stdclass();
$lang->reportList->test = new stdclass();
$lang->reportList->staff = new stdclass();
$lang->reportList->execution->lists[10] = 'Chênh lệchthực hiện|report|executiondeviation';
$lang->reportList->product->lists[10] = 'Tóm tắt '.$lang->productCommon . '|report|productsummary';
$lang->reportList->test->lists[10] = 'Báo cáo Bug|report|bugcreate';
$lang->reportList->test->lists[13] = 'Bàn giao Bug|report|bugassign';
$lang->reportList->staff->lists[10] = 'Lượng công việc đội nhóm|report|workload';
$lang->reportList->project->lists[10] = 'Chênh lệchthực hiện|reportprojectdeviation';
$lang->reportList->product->lists[10] = 'Tóm tắt '.$lang->productCommon . '|report|productsummary';
$lang->reportList->test->lists[10] = 'Báo cáo Bug|report|bugcreate';
$lang->reportList->test->lists[13] = 'Bàn giao Bug|report|bugassign';
$lang->reportList->staff->lists[10] = 'Lượng công việc đội nhóm|report|workload';
$lang->report->id = 'ID';
$lang->report->execution = $lang->executionCommon;
+31 -31
View File
@@ -9,16 +9,16 @@
* @version $Id: zh-cn.php 5080 2013-07-10 00:46:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
$lang->report->common = '统计视图';
$lang->report->index = '统计首页';
$lang->report->list = '统计报表';
$lang->report->item = '条目';
$lang->report->value = '值';
$lang->report->percent = '百分比';
$lang->report->undefined = '未设定';
$lang->report->query = '查询';
$lang->report->annual = '年度总结';
$lang->report->executionCommon = '执行';
$lang->report->common = '统计视图';
$lang->report->index = '统计首页';
$lang->report->list = '统计报表';
$lang->report->item = '条目';
$lang->report->value = '值';
$lang->report->percent = '百分比';
$lang->report->undefined = '未设定';
$lang->report->query = '查询';
$lang->report->annual = '年度总结';
$lang->report->project = '项目';
$lang->report->colors[] = 'AFD8F8';
$lang->report->colors[] = 'F6BD0F';
@@ -38,30 +38,30 @@ $lang->report->assign['assign'] = '已指派';
$lang->report->singleColor[] = 'F6BD0F';
$lang->report->executionDeviation = '执行偏差报表';
$lang->report->productSummary = $lang->productCommon . '汇总表';
$lang->report->bugCreate = 'Bug创建表';
$lang->report->bugAssign = 'Bug指派表';
$lang->report->workload = '员工负载表';
$lang->report->workloadAB = '工作负载';
$lang->report->bugOpenedDate = 'Bug创建时间';
$lang->report->beginAndEnd = '起止时间';
$lang->report->begin = '起始日期';
$lang->report->end = '结束日期';
$lang->report->dept = '部门';
$lang->report->deviationChart = '执行偏差曲线';
$lang->report->projectDeviation = '项目偏差报表';
$lang->report->productSummary = $lang->productCommon . '汇总表';
$lang->report->bugCreate = 'Bug创建表';
$lang->report->bugAssign = 'Bug指派表';
$lang->report->workload = '员工负载表';
$lang->report->workloadAB = '工作负载';
$lang->report->bugOpenedDate = 'Bug创建时间';
$lang->report->beginAndEnd = '起止时间';
$lang->report->begin = '起始日期';
$lang->report->end = '结束日期';
$lang->report->dept = '部门';
$lang->report->deviationChart = '项目偏差曲线';
$lang->reportList = new stdclass();
$lang->reportList->execution = new stdclass();
$lang->reportList->product = new stdclass();
$lang->reportList->test = new stdclass();
$lang->reportList->staff = new stdclass();
$lang->reportList->project = new stdclass();
$lang->reportList->product = new stdclass();
$lang->reportList->test = new stdclass();
$lang->reportList->staff = new stdclass();
$lang->reportList->execution->lists[10] = '执行偏差报表|report|executiondeviation';
$lang->reportList->product->lists[10] = $lang->productCommon . '汇总表|report|productsummary';
$lang->reportList->test->lists[10] = 'Bug创建表|report|bugcreate';
$lang->reportList->test->lists[13] = 'Bug指派表|report|bugassign';
$lang->reportList->staff->lists[10] = '员工负载表|report|workload';
$lang->reportList->project->lists[10] = '项目偏差报表|report|projectdeviation';
$lang->reportList->product->lists[10] = $lang->productCommon . '汇总表|report|productsummary';
$lang->reportList->test->lists[10] = 'Bug创建表|report|bugcreate';
$lang->reportList->test->lists[13] = 'Bug指派表|report|bugassign';
$lang->reportList->staff->lists[10] = '员工负载表|report|workload';
$lang->report->id = '编号';
$lang->report->execution = $lang->executionCommon;
+16 -14
View File
@@ -91,16 +91,18 @@ class reportModel extends model
/**
* Get executions.
*
* @param string $begin
* @param string $end
* @access public
* @return void
*/
public function getExecutions($begin = 0, $end = 0)
public function getProjects($begin = 0, $end = 0)
{
$tasks = $this->dao->select('t1.*,t2.name as executionName')->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id')
$tasks = $this->dao->select('t1.*,t2.name as projectName')->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t1.status')->ne('cancel')
->andWhere('t1.deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi()
->andWhere('t2.deleted')->eq(0)
->andWhere('t1.parent')->lt(1)
->andWhere('t2.status')->eq('closed')
@@ -109,23 +111,23 @@ class reportModel extends model
->orderBy('t2.end_desc')
->fetchAll();
$executions = array();
$projects = array();
foreach($tasks as $task)
{
$executionID = $task->execution;
if(!isset($executions[$executionID]))
$projectID = $task->project;
if(!isset($projects[$projectID]))
{
$executions[$executionID] = new stdclass();
$executions[$executionID]->estimate = 0;
$executions[$executionID]->consumed = 0;
$projects[$projectID] = new stdclass();
$projects[$projectID]->estimate = 0;
$projects[$projectID]->consumed = 0;
}
$executions[$executionID]->name = $task->executionName;
$executions[$executionID]->estimate += $task->estimate;
$executions[$executionID]->consumed += $task->consumed;
$projects[$projectID]->name = $task->executionName;
$projects[$projectID]->estimate += $task->estimate;
$projects[$projectID]->consumed += $task->consumed;
}
return $executions;
return $projects;
}
/**
@@ -11,19 +11,19 @@
<div class="row" id='conditions'>
<div class='w-220px col-md-3 col-sm-6'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->executionCommon . $lang->report->begin;?></span>
<span class='input-group-addon'><?php echo $lang->report->project . $lang->report->begin;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('date', $begin, "class='form-control form-date' onchange='changeDate(this.value, \"$end\")'");?></div>
</div>
</div>
<div class='w-220px col-md-3 col-sm-6'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->executionCommon . $lang->report->end;?></span>
<span class='input-group-addon'><?php echo $lang->report->project . $lang->report->end;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('date', $end, "class='form-control form-date' onchange='changeDate(\"$begin\", this.value)'");?></div>
</div>
</div>
</div>
</div>
<?php if(empty($executions)):?>
<?php if(empty($projects)):?>
<div class="cell">
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
@@ -37,11 +37,11 @@
<nav class="panel-actions btn-toolbar"></nav>
</div>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id='executionList'>
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id='projectList'>
<thead>
<tr class='colhead'>
<th class='w-id'><?php echo $lang->report->id;?></th>
<th><?php echo $lang->report->execution;?></th>
<th><?php echo $lang->report->project;?></th>
<th class="w-100px"><?php echo $lang->report->estimate;?></th>
<th class="w-100px"><?php echo $lang->report->consumed;?></th>
<th class="w-100px"><?php echo $lang->report->deviation;?></th>
@@ -49,13 +49,13 @@
</tr>
</thead>
<tbody>
<?php foreach($executions as $id =>$execution):?>
<?php foreach($projects as $id =>$project):?>
<tr class="text-center">
<td><?php echo $id;?></td>
<td class="text-left" title="<?php echo $execution->name;?>"><?php echo html::a($this->createLink('execution', 'view', "executionID=$id"), $execution->name);?></td>
<td><?php echo $execution->estimate;?></td>
<td><?php echo $execution->consumed;?></td>
<?php $deviation = $execution->consumed - $execution->estimate;?>
<td class="text-left" title="<?php echo $project->name;?>"><?php echo html::a($this->createLink('project', 'view', "projectID=$id"), $project->name);?></td>
<td><?php echo $project->estimate;?></td>
<td><?php echo $project->consumed;?></td>
<?php $deviation = $project->consumed - $project->estimate;?>
<td class="deviation">
<?php
if($deviation > 0)
@@ -74,7 +74,7 @@
</td>
<td class="deviation">
<?php
$num = $execution->estimate ? round($deviation / $execution->estimate * 100, 2) : 'n/a';
$num = $project->estimate ? round($deviation / $project->estimate * 100, 2) : 'n/a';
if($num >= 50)
{
echo '<span class="u50">' . $num . '%</span>';
@@ -108,7 +108,7 @@
echo '<span class="zero">' . abs($num) . '%</span>';
}
$chartData['labels'][] = $execution->name;
$chartData['labels'][] = $project->name;
$chartData['data'][] = $deviation;
?>
</td>