function setUserDateID($id, $skip_check = FALSE) { $id = (int) trim($id); $udlf = new UserDateListFactory(); if ($skip_check == TRUE or $id > 0 and $this->Validator->isResultSetWithRows('user_date', $udlf->getByID($id), TTi18n::gettext('Invalid User/Date. Pay Period may be locked'))) { $this->data['user_date_id'] = $id; return TRUE; } return FALSE; }
function setUserDateID($id) { $id = trim($id); $udlf = new UserDateListFactory(); if ($this->Validator->isResultSetWithRows('user_date', $udlf->getByID($id), TTi18n::gettext('Invalid User Date ID'))) { if ($this->getUserDateID() !== $id and $this->getOldUserDateID() != $this->getUserDateID()) { Debug::Text(' Setting Old User Date ID... Current Old ID: ' . (int) $this->getOldUserDateID() . ' Current ID: ' . (int) $this->getUserDateID(), __FILE__, __LINE__, __METHOD__, 10); $this->setOldUserDateID($this->getUserDateID()); } $this->data['user_date_id'] = $id; return TRUE; } return FALSE; }
function setUserDateID($id = NULL) { $id = trim($id); $udlf = new UserDateListFactory(); if ($this->Validator->isResultSetWithRows('user_date', $udlf->getByID($id), TTi18n::gettext('Invalid User Date ID'))) { $this->data['user_date_id'] = $id; return TRUE; } return FALSE; }