fix/add-venta (#44)

FIXES:
 - cast Comuna.id to int in Propietario
 - Inmobiliaria without tipoSociedad not loading descripcion

Log exception processor
Get Money values when stored as 0

Co-authored-by: Juan Pablo Vial <jpvialb@incoviba.cl>
Reviewed-on: #44
This commit is contained in:
2025-10-03 12:13:02 -03:00
parent a668b6b7be
commit b0267320a1
11 changed files with 85 additions and 17 deletions

View File

@ -181,7 +181,8 @@ class Propietario extends Service
]);
$filtered_data = array_intersect_key($data, $fields);
try {
$direccion = $this->direccionRepository->fetchByCalleAndNumeroAndExtraAndComuna($filtered_data['calle'], $filtered_data['numero'], $filtered_data['extra'], $filtered_data['comuna']);
$direccion = $this->direccionRepository->fetchByCalleAndNumeroAndExtraAndComuna($filtered_data['calle'],
$filtered_data['numero'], $filtered_data['extra'], (int) $filtered_data['comuna']);
} catch (EmptyResult) {
try {
$direccion = $this->direccionRepository->create($filtered_data);