* finish task #2567.

This commit is contained in:
chenfeiCF
2016-03-29 10:34:34 +08:00
parent 79096a6fdd
commit 8cd6978375
11 changed files with 54 additions and 1 deletions
+14
View File
@@ -713,6 +713,13 @@ class projectModel extends model
// Process the end time.
$project->end = date("Y-m-d", strtotime($project->end));
/* Judge whether the project is delayed. */
if($project->status != 'done')
{
$delay = helper::diffDate(helper::today(), $project->end);
if($delay > 0) $project->delay = $delay;
}
/* Process the burns. */
$project->burns = array();
$burnData = isset($burns[$project->id]) ? $burns[$project->id] : array();
@@ -818,6 +825,13 @@ class projectModel extends model
$project = $this->dao->findById((int)$projectID)->from(TABLE_PROJECT)->fetch();
if(!$project) return false;
/* Judge whether the project is delayed. */
if($project->status != 'done')
{
$delay = helper::diffDate(helper::today(), $project->end);
if($delay > 0) $project->delay = $delay;
}
$total = $this->dao->select('
SUM(estimate) AS totalEstimate,
SUM(consumed) AS totalConsumed,