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