Valor debiese ser el último precio.

This commit is contained in:
Juan Pablo Vial
2025-04-22 15:24:11 -04:00
parent 4f4e69f0c3
commit 5736a346e7

View File

@ -96,9 +96,7 @@ class PropiedadUnidad
try {
$unidad->precios = $this->precioService->getByUnidad($unidad->id);
$unidad->currentPrecio = $this->precioService->getVigenteByUnidad($unidad->id);
if ($unidad->valor === null or $unidad->valor === 0) {
$unidad->valor = $unidad->currentPrecio->valor;
}
$unidad->valor = $unidad->currentPrecio->valor;
} catch (Read) {}
return $unidad;
}