* finish task #2313.
This commit is contained in:
@@ -737,7 +737,7 @@ class project extends control
|
||||
$baselineJSON = '[]';
|
||||
|
||||
$firstBurn = empty($sets) ? 0 : reset($sets);
|
||||
$firstTime = isset($firstBurn->value) ? $firstBurn->value : 0;
|
||||
$firstTime = isset($firstBurn->value) ? $firstBurn->value : $this->project->getTotalEstimate($projectInfo->id);
|
||||
$days = count($dateList) - 1;
|
||||
$rate = round($firstTime / $days, 2);
|
||||
$baselineJSON = '[';
|
||||
|
||||
@@ -1581,4 +1581,17 @@ class projectModel extends model
|
||||
|
||||
return array($dateList, $interval);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get total estimate.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return float
|
||||
*/
|
||||
public function getTotalEstimate($projectID)
|
||||
{
|
||||
$estimate = $this->dao->select('SUM(estimate) as estimate')->from(TABLE_TASK)->where('deleted')->eq('0')->andWhere('project')->eq($projectID)->fetch('estimate');
|
||||
return round($estimate);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user