Valor PU -> ultimo precio

This commit is contained in:
2023-11-29 21:13:03 -03:00
parent fe3055708f
commit e347aaabe9

View File

@ -32,6 +32,9 @@ class PropiedadUnidad
try { try {
$unidad->precios = $this->precioService->getByUnidad($unidad->id); $unidad->precios = $this->precioService->getByUnidad($unidad->id);
$unidad->currentPrecio = $this->precioService->getVigenteByUnidad($unidad->id); $unidad->currentPrecio = $this->precioService->getVigenteByUnidad($unidad->id);
if ($unidad->valor === 0) {
$unidad->valor = $unidad->currentPrecio->valor;
}
} catch (EmptyResult) { } catch (EmptyResult) {
} }
return $unidad; return $unidad;