* adjust code.

This commit is contained in:
wangyidong
2023-01-04 13:31:58 +08:00
parent 9d013b80c5
commit 2f03f91cf4

View File

@@ -80,11 +80,12 @@ class weekly extends control
->where('deleted')->eq(0)
->andWhere('type')->eq('project')
->fetchPairs();
$date = helper::today();
$date = helper::today();
$weekStart = $this->weekly->getThisMonday($date);
foreach($projects as $projectID => $project)
{
$weekStart = $this->weekly->getThisMonday($date);
$this->dao->delete()->from(TABLE_WEEKLYREPORT)->where('project')->eq($projectID)->andWhere('weekStart')->eq($weekStart)->exec();
$this->weekly->save($projectID, $date);
}