@ -293,6 +293,10 @@ class AgentService
if (strtolower($upGrant) != strtolower($input['up_grant']))
continue; // skip
}
if (!empty($input['agents_code'])) { // if existing up_geant
if (strtolower($vAgent->code) != strtolower($input['agents_code']))
// lay danh sach 2 con cua parent
$processPath = $this->processParentPath($agentId, $vAgent->parent_path);
if (!empty($processPath) && in_array($vAgent->agent_id, $processPath)) {