mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
fix : notification clientes add where chat_department_id is not NULL
This commit is contained in:
@ -208,7 +208,8 @@ class ChatModel extends Model
|
|||||||
"pedidos.id as title"
|
"pedidos.id as title"
|
||||||
])
|
])
|
||||||
->join("chat_departments","chat_departments.id = chats.chat_department_id","left")
|
->join("chat_departments","chat_departments.id = chats.chat_department_id","left")
|
||||||
->join("pedidos","pedidos.id = chats.pedido_id","left");
|
->join("pedidos","pedidos.id = chats.pedido_id","left")
|
||||||
|
->where('chats.chat_department_id is NOT NULL', NULL, FALSE);
|
||||||
if(count($pedidos)>0){
|
if(count($pedidos)>0){
|
||||||
$q->whereIn("pedidos.id",$pedidos);
|
$q->whereIn("pedidos.id",$pedidos);
|
||||||
}else{
|
}else{
|
||||||
@ -240,7 +241,9 @@ class ChatModel extends Model
|
|||||||
"facturas.numero as title"
|
"facturas.numero as title"
|
||||||
])
|
])
|
||||||
->join("chat_departments","chat_departments.id = chats.chat_department_id","left")
|
->join("chat_departments","chat_departments.id = chats.chat_department_id","left")
|
||||||
->join("facturas","facturas.id = chats.factura_id","left");
|
->join("facturas","facturas.id = chats.factura_id","left")
|
||||||
|
->where('chats.chat_department_id is NOT NULL', NULL, FALSE);
|
||||||
|
|
||||||
if(count($facturas)>0){
|
if(count($facturas)>0){
|
||||||
$q->whereIn("facturas.id",$facturas);
|
$q->whereIn("facturas.id",$facturas);
|
||||||
}else{
|
}else{
|
||||||
@ -272,7 +275,9 @@ class ChatModel extends Model
|
|||||||
"presupuestos.titulo as title"
|
"presupuestos.titulo as title"
|
||||||
])
|
])
|
||||||
->join("chat_departments","chat_departments.id = chats.chat_department_id","left")
|
->join("chat_departments","chat_departments.id = chats.chat_department_id","left")
|
||||||
->join("presupuestos","presupuestos.id = chats.presupuesto_id","left");
|
->join("presupuestos","presupuestos.id = chats.presupuesto_id","left")
|
||||||
|
->where('chats.chat_department_id is NOT NULL', NULL, FALSE);
|
||||||
|
|
||||||
if(count($presupuestos)>0){
|
if(count($presupuestos)>0){
|
||||||
$q->whereIn("presupuestos.id",$presupuestos);
|
$q->whereIn("presupuestos.id",$presupuestos);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user