From f5add0b4c596d39ca7847b0923388fb7299060b6 Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Fri, 29 Nov 2024 16:15:15 -0300 Subject: [PATCH] FIX: No existe valor de terreno en BD --- app/resources/views/ventas/facturacion/show.blade.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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')}}'),