add client nom in talk notification

This commit is contained in:
Narindra ezway 2025-04-24 11:05:33 +03:00
parent ec37cf9c81
commit 760ed6d000

View File

@ -607,7 +607,7 @@ class Bdd {
$sql = "SELECT ".$this->tableprefix."devis.id as devisid, ".$this->tableprefix."devis.version, ".$this->tableprefix."devis.comment, ".$this->tableprefix."devis.date, num," $sql = "SELECT ".$this->tableprefix."devis.id as devisid, ".$this->tableprefix."devis.version, ".$this->tableprefix."devis.comment, ".$this->tableprefix."devis.date, num,"
.$this->tableprefix."devis.id_nextcloud as didnextcloud,".$this->tableprefix."devis.id_client, id_lieu, id_thanato, return_to_siege, " .$this->tableprefix."devis.id_nextcloud as didnextcloud,".$this->tableprefix."devis.id_client, id_lieu, id_thanato, return_to_siege, "
.$this->tableprefix."defunt.id as id_defunt, ".$this->tableprefix."defunt.nom as nom_defunt," .$this->tableprefix."defunt.id as id_defunt, ".$this->tableprefix."defunt.nom as nom_defunt,"
.$this->tableprefix."client.id as clientid, ".$this->tableprefix."client.nom, " .$this->tableprefix."client.id as clientid, ".$this->tableprefix."client.nom as nom_client, "
.$this->tableprefix."client.prenom,legal_one, entreprise, telephone, mail, ".$this->tableprefix."client.adresse," .$this->tableprefix."client.prenom,legal_one, entreprise, telephone, mail, ".$this->tableprefix."client.adresse,"
.$this->tableprefix."lieu.nom as lieu, ".$this->tableprefix."lieu.adresse as adresse_soin ," .$this->tableprefix."lieu.nom as lieu, ".$this->tableprefix."lieu.adresse as adresse_soin ,"
.$this->tableprefix."lieu.portal_code as portal_code," .$this->tableprefix."lieu.portal_code as portal_code,"
@ -3382,12 +3382,12 @@ class Bdd {
return $response; return $response;
} }
private function getDevisTalkRoomClientContent($clientPrenom){ private function getDevisTalkRoomClientContent($clientFullName){
$message = "Pour PF: "; $message = "Pour PF: ";
$clientNameContent = "aucun"; $clientNameContent = "aucun";
$clientPrenomIsSet = $clientPrenom != null && $clientPrenom != "" && $clientPrenom != "-"; $clientFullNameIsSet = $clientFullName != null && $clientFullName != "" && $clientFullName != "-";
if($clientPrenomIsSet){ if($clientFullNameIsSet){
$clientNameContent = html_entity_decode($clientPrenom); $clientNameContent = html_entity_decode($clientFullName);
} }
$message .= $clientNameContent; $message .= $clientNameContent;
return $message; return $message;
@ -3450,7 +3450,7 @@ le '.$devisDate;
$message .= ' $message .= '
à '.html_entity_decode($devis->lieu). ' '. html_entity_decode($devis->adresse_soin); à '.html_entity_decode($devis->lieu). ' '. html_entity_decode($devis->adresse_soin);
$clientMessageContent = $this->getDevisTalkRoomClientContent($devis->prenom); $clientMessageContent = $this->getDevisTalkRoomClientContent($devis->nom_client. " " . $devis->prenom );
$message .= ' $message .= '
'.$clientMessageContent; '.$clientMessageContent;
$productMessage = $this->getDevisTalkRoomProductSectionMessage($devis->products); $productMessage = $this->getDevisTalkRoomProductSectionMessage($devis->products);