From 61e008191df5f379d07e508d2b70e95a83e24ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Guimar=C3=A3es?= Date: Fri, 22 Mar 2024 08:36:56 -0300 Subject: [PATCH] Update C195.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quando nao infomado o atributo quant_bc_cofins (enviar '') dispara a seguinte exception.. mandando valor zerado, nao da exception porém da erro no validador da Sefaz "file": "/var/www/pdvx-web/vendor/nfephp-org/sped-efd/src/Elements/Contribuicoes/C195.php", "line": 113, "status": "error", "message": "Undefined property: stdClass::$quant_bc_cofins" --- src/Elements/Contribuicoes/C195.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Elements/Contribuicoes/C195.php b/src/Elements/Contribuicoes/C195.php index e5b5015..3f7250d 100755 --- a/src/Elements/Contribuicoes/C195.php +++ b/src/Elements/Contribuicoes/C195.php @@ -110,7 +110,7 @@ public function postValidation() { $multiplicacao = $this->values->vl_bc_cofins * $this->values->aliq_cofins; - if ($this->values->quant_bc_cofins > 0) { + if (isset($this->values->quant_bc_cofins) && $this->values->quant_bc_cofins > 0) { $multiplicacao = $this->values->quant_bc_cofins * $this->values->aliq_cofins_quant; }