algunas mejoras para cuando no hay servicios defecto

This commit is contained in:
2024-12-24 17:43:44 +01:00
parent 446f071dd2
commit bd92842877
2 changed files with 11 additions and 3 deletions

View File

@ -76,13 +76,16 @@ class TipoPresupuestoServiciosDefectoModel extends \App\Models\BaseModel
return [];
}
$where = "(t1.solapas IS NULL OR t1.solapas='" . $solapas . "')";
$where = "(t1.solapas IS NULL OR t1.solapas=" . $solapas . ")";
$builder->where($where);
$builder->where("t1.is_deleted", 0);
$builder->where("t2.is_deleted", 0);
$builder->select("t1.tarifa_id AS tarifa_id, t2.nombre AS tarifa_nombre");
return $builder->get()->getResultArray();
$data = $builder->get()->getResultArray();
// DEBUG
$query = $this->db->getLastQuery();
return $data;
}
}