|
|
@ -64,6 +64,7 @@ class AgentService |
|
|
|
// chưa quá 15 ngày thì lấy cái agent_id cũ, đang trực thuộc |
|
|
|
// chưa quá 15 ngày thì lấy cái agent_id cũ, đang trực thuộc |
|
|
|
$dataInsert['agent_id'] = $customerInAgent->agent_id; |
|
|
|
$dataInsert['agent_id'] = $customerInAgent->agent_id; |
|
|
|
$result = $this->modelCustomer->insert($dataInsert); |
|
|
|
$result = $this->modelCustomer->insert($dataInsert); |
|
|
|
|
|
|
|
$this->modelCustomer->where('phone', $dataInput['phone'])->where('agent_id', '<>', $customerInAgent->agent_id)->delete(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// quá 15 ngày thì lấy agent_id check ra từ mã đại lý |
|
|
|
// quá 15 ngày thì lấy agent_id check ra từ mã đại lý |
|
|
|
$dataInsert['agent_id'] = $agentId; |
|
|
|
$dataInsert['agent_id'] = $agentId; |
|
|
|