From eac6b7d1971170f3f71691d8bdf91e20299d8786 Mon Sep 17 00:00:00 2001 From: aldarien Date: Mon, 11 Apr 2022 11:01:35 -0400 Subject: [PATCH] FIX: null valor in format --- app/Helper/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Helper/functions.php b/app/Helper/functions.php index abafe62..2be4618 100644 --- a/app/Helper/functions.php +++ b/app/Helper/functions.php @@ -55,6 +55,9 @@ function uf($date, $async = false) { return (object) ['total' => 0]; } function format($tipo, $valor, $format = null, $print = false) { + if ($valor === null) { + $valor = 0; + } if (strtolower($tipo) == 'localdate') { $d = \Carbon\Carbon::parse($valor); $d->locale('es_ES');