copiada la rama presu_cliente_v2 en esta para poder hacer el merge al main

This commit is contained in:
2024-11-07 19:20:12 +01:00
parent aeb5f9106f
commit a880355012
84 changed files with 2983 additions and 1785 deletions

View File

@ -123,4 +123,21 @@ class PresupuestoDireccionesModel extends \App\Models\BaseModel
return $builder;
}
public function getDireccion($id = -1)
{
$builder = $this->db
->table($this->table . " t1")
->select(
"t1.id AS id, t1.att AS att,
t1.email AS email, t1.direccion AS direccion, t1.pais_id AS pais_id, t3.nombre AS pais,
t1.municipio AS municipio, t1.provincia AS provincia, t1.cp AS cp, t1.telefono AS telefono"
);
$builder->where('t1.id', $id);
$builder->join("lg_paises t3", "t1.pais_id = t3.id", "left");
return $builder->get()->getResultObject();
}
}