From d0d99eaa811c4e50bd74700d19ef0c568fa8cc68 Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Thu, 27 Jun 2024 12:33:02 -0400 Subject: [PATCH] FIX: IPC terreno hasta 2 meses antes de factura --- app/src/Controller/Ventas/Facturacion.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/Controller/Ventas/Facturacion.php b/app/src/Controller/Ventas/Facturacion.php index f5081e5..18203ef 100644 --- a/app/src/Controller/Ventas/Facturacion.php +++ b/app/src/Controller/Ventas/Facturacion.php @@ -29,7 +29,7 @@ class Facturacion extends Ideal\Controller $uf = $ufService->get($venta->currentEstado()->fecha); $terreno = $terrenoService->valor($venta->proyecto()->id); $lastNov = new DateTimeImmutable((new DateTimeImmutable())->sub(new DateInterval('P1Y'))->format('Y-11-1')); - $prevMonth = $venta->currentEstado()->fecha->sub(new DateInterval('P1M')); + $prevMonth = $venta->currentEstado()->fecha->sub(new DateInterval('P2M')); if ($prevMonth->format('m') === $venta->currentEstado()->fecha->format('m')) { $prevMonth = $prevMonth->sub(new DateInterval('P10D')); }