This commit is contained in:
Paula V. Quispe
2016-07-07 17:34:20 -04:00
parent b4168947a8
commit 8d9acedf52

View File

@@ -591,7 +591,17 @@ class Derivation
$userFields['USR_EMAIL'] = ''; $userFields['USR_EMAIL'] = '';
//get the report_to user & its full info //get the report_to user & its full info
$useruid = ($tasInfo["USER_UID"] != "")? $this->checkReplacedByUser($this->getDenpendentUser($tasInfo["USER_UID"])) : ""; $lastManager = $userTasInfo = $tasInfo["USER_UID"];
do {
$userTasInfo = $this->getDenpendentUser($userTasInfo);
$useruid = $this->checkReplacedByUser($userTasInfo);
//When the lastManager is INACTIVE/VACATION and does not have a Replace by, the REPORT_TO is himself
if($lastManager === $userTasInfo){
$useruid = $tasInfo["USER_UID"];
} else {
$lastManager = $userTasInfo;
}
} while ($useruid === '');
if (isset( $useruid ) && $useruid != '') { if (isset( $useruid ) && $useruid != '') {
$userFields = $this->getUsersFullNameFromArray( $useruid ); $userFields = $this->getUsersFullNameFromArray( $useruid );