From 0ae8cfee83b0048d7e22b2cfe94c5cee226d8e3d Mon Sep 17 00:00:00 2001 From: JOAO PAULO FERNANDES DE ARAUJO Date: Thu, 25 Jul 2024 00:08:50 -0300 Subject: [PATCH] Update DacteOS.php mostrar as informacoes do Fisco Foi adicionado o campo ObsFisco para mostrar em USO EXCLUSIVO DO EMISSOR DO CT-E. --- src/CTe/DacteOS.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/CTe/DacteOS.php b/src/CTe/DacteOS.php index ead567df..a67d5a96 100644 --- a/src/CTe/DacteOS.php +++ b/src/CTe/DacteOS.php @@ -47,6 +47,7 @@ class DacteOS extends DaCommon protected $veic; protected $ferrov; protected $Comp; + protected $ObsFisco; protected $infNF; protected $infNFe; protected $compl; @@ -130,6 +131,7 @@ private function loadDoc($xml) $this->chaveCTeRef = $this->getTagValue($this->infCteComp, "chave"); $this->vPrest = $this->dom->getElementsByTagName("vPrest")->item(0); $this->Comp = $this->dom->getElementsByTagName("Comp"); + $this->ObsFisco = $this->dom->getElementsByTagName("ObsFisco"); $this->infNF = $this->dom->getElementsByTagName("infNF"); $this->infNFe = $this->dom->getElementsByTagName("infNFe"); $this->infOutros = $this->dom->getElementsByTagName("infOutros"); @@ -144,8 +146,12 @@ private function loadDoc($xml) $vTrib = 0; } $textoAdic = number_format($vTrib, 2, ",", "."); + $textoObsFisco = ""; + foreach($this->ObsFisco as $obsFisco){ + $textoObsFisco .= $this->getTagValue($obsFisco, "xTexto").". "; + } $this->textoAdic = "o valor aproximado de tributos incidentes sobre o preço deste serviço é de R$" - .$textoAdic; + .$textoAdic.'. '.$textoObsFisco; $this->toma = $this->dom->getElementsByTagName("toma")->item(0); $this->enderToma = $this->getTagValue($this->toma, "enderToma"); //modal aquaviário