Precio = valor propiedad o precio

This commit is contained in:
2023-11-29 21:14:55 -03:00
parent e347aaabe9
commit 0761be6613

View File

@ -151,7 +151,7 @@
terreno: {{$IPC->readjust($venta->proyecto()->terreno->valor, $venta->proyecto()->terreno->date, $venta->currentEstado()->fecha)}}, terreno: {{$IPC->readjust($venta->proyecto()->terreno->valor, $venta->proyecto()->terreno->date, $venta->currentEstado()->fecha)}},
uf: {{$UF->get($venta->currentEstado()->fecha)}}, uf: {{$UF->get($venta->currentEstado()->fecha)}},
unidades: JSON.parse('{!! json_encode(array_map(function(Incoviba\Model\Venta\PropiedadUnidad $unidad) use ($venta, $UF, $format) { unidades: JSON.parse('{!! json_encode(array_map(function(Incoviba\Model\Venta\PropiedadUnidad $unidad) use ($venta, $UF, $format) {
$precio = $unidad->valor; $precio = ($unidad->valor > 0) ? $unidad->valor : $unidad->precio($venta->currentEstado())->valor;
return [ return [
'pu_id' => $unidad->pu_id, 'pu_id' => $unidad->pu_id,
'descripcion' => ucwords($unidad->proyectoTipoUnidad->tipoUnidad->descripcion) . ' ' . $unidad->descripcion, 'descripcion' => ucwords($unidad->proyectoTipoUnidad->tipoUnidad->descripcion) . ' ' . $unidad->descripcion,