NEW LIST AGENT FOR USER

main
nocode 1 year ago
parent bb1584c1ba
commit 0d10ad5801
  1. 1
      Modules/Agents/Services/AgentService.php

@ -58,6 +58,7 @@ class AgentService
// tìm các dữ liệu từ ngày hiện tại trừ đi không được quá 15 ngày
$customerAgentAll = $this->modelCustomer->where('phone', $dataInput['phone'])->where('agent_id', '<>', $agentId)->where('created_at', '>=', $dateNotToo)->latest()->first();
$dataInsert['created_at'] = now();
if (!empty($customerAgentAll)) {
// chưa quá 15 ngày thì lấy cái agent_id cũ, đang trực thuộc

Loading…
Cancel
Save