mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
fix : contemplat que presupuesto_id es null
This commit is contained in:
@ -72,6 +72,25 @@ class ErrorPresupuesto extends Model
|
||||
]);
|
||||
return $updated;
|
||||
}
|
||||
public function getErrorPresupuestoForm(int $error_presupuesto_id) : array
|
||||
{
|
||||
$query = $this->builder()
|
||||
->select([
|
||||
"presupuesto_errores.id",
|
||||
"CONCAT(t1.first_name,' ',t1.last_name) as presupuestoUser",
|
||||
"CONCAT(t2.first_name,' ',t2.last_name) as lastUser",
|
||||
"presupuesto_errores.created_at",
|
||||
"presupuesto_errores.datos_presupuesto",
|
||||
"presupuesto_errores.error",
|
||||
"presupuesto_errores.visto",
|
||||
"presupuesto_errores.comment"
|
||||
])
|
||||
->join("users t1", "t1.id = presupuesto_errores.presupuesto_user_id", "left")
|
||||
->join("users t2", "t2.id = presupuesto_errores.last_user_id", "left")
|
||||
->where("presupuesto_errores.deleted_at", null)
|
||||
->where("presupuesto_errores.id",$error_presupuesto_id);
|
||||
return $query->get()->getResultObject();
|
||||
}
|
||||
public function getQueryDatatable(): BaseBuilder
|
||||
{
|
||||
$query = $this->builder()
|
||||
|
||||
Reference in New Issue
Block a user