IceHrm v18.0

This commit is contained in:
Thilina Hasantha
2016-08-04 14:27:59 +05:30
parent 9e243073df
commit a10fbba14a
882 changed files with 90619 additions and 2546 deletions

View File

@@ -87,6 +87,20 @@ if (!class_exists('CompanyStructure')) {
}
}
}
public static function isHeadOfCompanyStructure($companyStructureId, $profileId){
$companyStructure = new CompanyStructure();
$companyStructure->Load("id = ?",array($companyStructureId));
if(isset($companyStructure->heads) && !empty($companyStructure->heads)){
$heads = json_decode($companyStructure->heads);
if(is_array($heads) && !empty($heads) && in_array($profileId, $heads)){
return true;
}
}
return false;
}
}
}
@@ -108,4 +122,4 @@ if (!class_exists('Timezone')) {
}
}
}
}