diff --git a/src/Traits/TraitEPECNfce.php b/src/Traits/TraitEPECNfce.php index aeefa0d2..a4d42d5d 100644 --- a/src/Traits/TraitEPECNfce.php +++ b/src/Traits/TraitEPECNfce.php @@ -92,7 +92,7 @@ public function sefazEpecNfce(string &$xml, string $verAplic = null): string $tpNF = $dom->getElementsByTagName('tpNF')->item(0)->nodeValue; $emitIE = $emit->getElementsByTagName('IE')->item(0)->nodeValue; $destUF = $uf; - if (!empty($dest)) { + if (!empty($dest) && isset($dest->getElementsByTagName('UF')->item(0)->nodeValue)) { $destUF = $dest->getElementsByTagName('UF')->item(0)->nodeValue; } $total = $dom->getElementsByTagName('total')->item(0);