* code for task #81417.

This commit is contained in:
wangyidong
2022-12-27 11:01:08 +08:00
parent 2da63834b3
commit aed2c5e2a2

View File

@@ -447,9 +447,14 @@ class weeklyModel extends model
$report = $this->getFromDB($project, $date);
if(!empty($report)) return $report->ac;
if(!$date) $date = date('Y-m-d');
$lastDay = $this->getLastDay($date);
if(empty($lastDay)) $lastDay = $this->getThisMonday($date);
$AC = $this->dao->select('sum(consumed) as consumed')
->from(TABLE_EFFORT)
->where('project')->eq($project)
->andWhere('date')->le($lastDay)
->andWhere('deleted')->eq(0)
->fetch('consumed');