diff --git a/app/resources/views/ventas/facturacion/show.blade.php b/app/resources/views/ventas/facturacion/show.blade.php index 3243187..b2146d9 100644 --- a/app/resources/views/ventas/facturacion/show.blade.php +++ b/app/resources/views/ventas/facturacion/show.blade.php @@ -1074,9 +1074,11 @@ fecha: new Date('{{$venta->currentEstado()->fecha->add(new DateInterval('P1D'))->format('Y-m-d')}}') }, terreno: { - fecha: new Date('{{$terreno->fecha->add(new DateInterval('P1D'))->format('Y-m-d')}}'), - valor: {{$terreno->valor}}, - reajustado: {{$terreno->valor * (1+$ipc)}} + @if ($terreno->fecha != null) fecha: new Date('{{$terreno->fecha->add(new DateInterval('P1D'))->format('Y-m-d')}}'), + @else fecha: null, + @endif + valor: {{$terreno->valor ?? 0}}, + reajustado: {{($terreno->valor ?? 0) * (1+$ipc)}} }, last: { dicember: new Date('{{(new DateTimeImmutable())->sub(new DateInterval('P1Y'))->format('Y-11-31')}}'),