From 27ace68b1d6958db3f3b66f25afdbda7aaf72bfa Mon Sep 17 00:00:00 2001 From: Aldarien Date: Tue, 8 Mar 2022 10:57:28 -0300 Subject: [PATCH] FIX: cuando UF = 0 --- incoviba/modelos/src/old/Venta/Pago.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/incoviba/modelos/src/old/Venta/Pago.php b/incoviba/modelos/src/old/Venta/Pago.php index a14b6b3..9b2d4ed 100644 --- a/incoviba/modelos/src/old/Venta/Pago.php +++ b/incoviba/modelos/src/old/Venta/Pago.php @@ -80,6 +80,9 @@ class Pago extends Model if ($uf == 1 and method_exists($this->fuente()[0]->obj, 'uf')) { $uf = $this->fuente()[0]->obj->uf(); } + if ($uf == 0) { + $uf = 1; + } $valor /= $uf; if ($this->asociado() and $this->asociado == 0) { $valor += $this->asociado()->valor('ufs');