mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
formulario direcciones presupuestos 2
This commit is contained in:
@ -127,6 +127,26 @@ class ClienteDireccionesModel extends \App\Models\GoBaseModel
|
||||
->groupEnd();
|
||||
}
|
||||
|
||||
public function getDireccion($id = -1)
|
||||
{
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.id AS id, t1.cliente_id AS cliente_id, t2.nombre as cliente_nombre, t1.att AS att, t1.alias AS alias,
|
||||
t1.email AS email, t1.direccion AS direccion, t1.pais_id AS pais_id, t3.nombre AS pais,
|
||||
t1.ccaa_id AS ccaa_id, t4.nombre AS ccaa_nombre,
|
||||
t1.municipio AS municipio, t1.provincia AS provincia, t1.cp AS cp, t1.telefono AS telefono"
|
||||
);
|
||||
|
||||
$builder->where('t1.id', $id);
|
||||
$builder->join("clientes t2", "t1.cliente_id = t2.id", "left");
|
||||
$builder->join("lg_paises t3", "t1.pais_id = t3.id", "left");
|
||||
$builder->join("lg_comunidades_autonomas t4", "t1.ccaa_id = t4.id", "left");
|
||||
|
||||
|
||||
return $builder->get()->getResultObject();
|
||||
}
|
||||
|
||||
public function getMenuDirecciones($cliente_id=-1){
|
||||
|
||||
$builder =
|
||||
|
||||
Reference in New Issue
Block a user