FIX_THZ_ASSENEES
This commit is contained in:
parent
ae364f6b94
commit
3baf97203b
@ -75,6 +75,9 @@ class ThzController extends BaseController
|
||||
} else {
|
||||
|
||||
$text = "create";
|
||||
if(!isset($data['assign_to'])){
|
||||
$data['assign_to'] = $this->getAcmIdUsingClientId($data['client_id'] ?? null);
|
||||
}
|
||||
$insertID = $this->insertTicket($data);
|
||||
$result = true;
|
||||
$references = "";
|
||||
@ -664,7 +667,23 @@ class ThzController extends BaseController
|
||||
return $old['status'] . " - " . $data['status'];
|
||||
}
|
||||
|
||||
private function getAcmIdUsingClientId($client_id)
|
||||
{
|
||||
if(!empty($client_id)){
|
||||
|
||||
$acm_data = $this->cientRmModel->where('is_active', 1)->where('level', 3)->where('client_id', $client_id)->orderBy('id', 'asc')->first();
|
||||
if($acm_data){
|
||||
return $acm_data['user_id'];
|
||||
}
|
||||
|
||||
$this->myLogger->logme('error', 'Account Manager data not found');
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
$this->myLogger->logme('error', 'client id is null');
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user