Ejemplo n.º 1
0
 /**
  * Update a timesheet
  *
  */
 public function updateAction()
 {
     $endtime = (int) $this->_getParam('endtime');
     $record = $this->byId($this->_getParam('id'), 'TimesheetRecord');
     // We need to get the record back from the system in case
     // the record we're timing against has changed. This can happen if
     // a record is timed and goes over a 24hr block, which we want to
     // prevent happening so that we don't have any HUGE blocks of
     // time records.
     $record = $this->projectService->updateTimesheetRecord($record, $endtime);
     $this->view->record = $record;
     $this->view->task = $this->projectService->getTask($this->_getParam('taskid'));
     $this->_response->setHeader('Content-type', 'text/javascript');
     $this->renderRawView('timesheet/update.php');
 }