diff --git a/Modules/Agents/Services/AgentService.php b/Modules/Agents/Services/AgentService.php index adc7eea..ab1d22b 100644 --- a/Modules/Agents/Services/AgentService.php +++ b/Modules/Agents/Services/AgentService.php @@ -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'])) + continue; // skip + } // lay danh sach 2 con cua parent $processPath = $this->processParentPath($agentId, $vAgent->parent_path); if (!empty($processPath) && in_array($vAgent->agent_id, $processPath)) {