* Fix bug#36946.

This commit is contained in:
chaideqing
2023-08-01 02:11:01 +00:00
parent 6c5f4f1cc2
commit 96484ba618
2 changed files with 11 additions and 1 deletions
+9 -1
View File
@@ -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);