finish.zentaomax.php 598 B

1234567891011121314
  1. <?php
  2. /* Update realDuration. */
  3. $finishedDate = $this->post->finishedDate;
  4. $taskInfo = $this->dao->select('realStarted')->from(TABLE_TASK)->where('id')->eq($oldTask->id)->fetch();
  5. $realStarted = $taskInfo->realStarted;
  6. if(!empty($realStarted) and $realStarted != '0000-00-00 00:00:00')
  7. {
  8. $realDuration = $this->loadModel('holiday')->getActualWorkingDays($realStarted, $finishedDate);
  9. $realDuration = count($realDuration);
  10. $this->dao->update(TABLE_TASK)->set('realDuration')->eq($realDuration)->where('id')->eq($oldTask->id)->exec();
  11. }
  12. ?>