* finish task #7292.

This commit is contained in:
z
2020-06-19 10:36:17 +08:00
parent ab4ea17a99
commit 0158fdbccb
+5 -4
View File
@@ -1050,18 +1050,19 @@ class projectModel extends model
}
$total = $this->dao->select('
SUM(estimate) AS totalEstimate,
SUM(consumed) AS totalConsumed,
SUM(`left`) AS totalLeft')
ROUND(SUM(estimate), 1) AS totalEstimate,
ROUND(SUM(consumed), 1) AS totalConsumed,
ROUND(SUM(`left`), 1) AS totalLeft')
->from(TABLE_TASK)
->where('project')->eq((int)$projectID)
->andWhere('deleted')->eq(0)
->andWhere('parent')->lt(1)
->fetch();
$closedTotalLeft= (int)$this->dao->select('SUM(`left`) AS totalLeft')->from(TABLE_TASK)
$closedTotalLeft = $this->dao->select('ROUND(SUM(`left`), 1) AS totalLeft')->from(TABLE_TASK)
->where('project')->eq((int)$projectID)
->andWhere('deleted')->eq(0)
->andWhere('parent')->lt(1)
->andWhere('status')->in('closed,cancel')
->fetch('totalLeft');
$project->days = $project->days ? $project->days : '';