FIX: cuando UF = 0

This commit is contained in:
2022-03-08 10:57:28 -03:00
parent b3577a7800
commit 27ace68b1d

View File

@ -80,6 +80,9 @@ class Pago extends Model
if ($uf == 1 and method_exists($this->fuente()[0]->obj, 'uf')) { if ($uf == 1 and method_exists($this->fuente()[0]->obj, 'uf')) {
$uf = $this->fuente()[0]->obj->uf(); $uf = $this->fuente()[0]->obj->uf();
} }
if ($uf == 0) {
$uf = 1;
}
$valor /= $uf; $valor /= $uf;
if ($this->asociado() and $this->asociado == 0) { if ($this->asociado() and $this->asociado == 0) {
$valor += $this->asociado()->valor('ufs'); $valor += $this->asociado()->valor('ufs');