add customer

main
nocode 1 year ago
parent 5c0960d33b
commit c2651d0830
  1. 2
      Modules/Agents/Services/AgentService.php

@ -76,6 +76,7 @@ class AgentService
if($differenceInDays > self::DISTANCE_DAY_DEFAULT){
$dataInsert['agent_id'] = $agentId;
$this->modelCustomer->insert($dataInsert);
$this->modelCustomer->byPhone($dataInput['phone'])->notAgent($agentId)->delete();
}else{
$dataInsert['agent_id'] = $customerAgentAllTime[0]->agent_id;
$this->modelCustomer->insert($dataInsert);
@ -83,6 +84,7 @@ class AgentService
}else{
$dataInsert['agent_id'] = $agentId;
$this->modelCustomer->insert($dataInsert);
$this->modelCustomer->byPhone($dataInput['phone'])->notAgent($agentId)->delete();
}
}

Loading…
Cancel
Save