* Fix bug#36946.
This commit is contained in:
@@ -2588,8 +2588,16 @@ class executionModel extends model
|
||||
->andWhere('status')->in('closed,cancel')
|
||||
->fetch('totalLeft');
|
||||
|
||||
$totalHours = $this->dao->select('sum(t1.days * t1.hours) AS totalHours')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')
|
||||
->on('t1.account=t2.account')
|
||||
->where('t1.root')->eq($execution->id)
|
||||
->andWhere('t1.type')->eq('execution')
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fetch('totalHours');
|
||||
|
||||
$execution->totalHours = $totalHours;
|
||||
$execution->days = $execution->days ? $execution->days : '';
|
||||
$execution->totalHours = $this->dao->select('sum(days * hours) AS totalHours')->from(TABLE_TEAM)->where('root')->eq($execution->id)->andWhere('type')->eq('execution')->fetch('totalHours');
|
||||
$execution->totalEstimate = round((float)$total->totalEstimate, 1);
|
||||
$execution->totalConsumed = round((float)$total->totalConsumed, 1);
|
||||
$execution->totalLeft = round((float)($total->totalLeft - $closedTotalLeft), 1);
|
||||
|
||||
@@ -533,9 +533,11 @@ class projectModel extends model
|
||||
$workhour = new stdclass();
|
||||
$workhour->totalHours = $this->dao->select('sum(t1.days * t1.hours) AS totalHours')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.root=t2.id')
|
||||
->leftJoin(TABLE_USER)->alias('t3')->on('t1.account=t3.account')
|
||||
->where('t2.id')->in($projectID)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t1.type')->eq('project')
|
||||
->andWhere('t3.deleted')->eq(0)
|
||||
->fetch('totalHours');
|
||||
$workhour->totalEstimate = $total->totalEstimate;
|
||||
$workhour->totalConsumed = $totalConsumed;
|
||||
|
||||
Reference in New Issue
Block a user