Skip to content

Commit

Permalink
Merge pull request #619 from MarcosBrendonDePaula/master
Browse files Browse the repository at this point in the history
Corrige validação ao gerar MDF-e quando RNTRC não é obrigatório #576
  • Loading branch information
robmachado authored Dec 20, 2024
2 parents 306a8aa + dbc05f3 commit fd37946
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/MDFe/Damdfe.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ private function loadDoc($xml)
if (!empty($this->rodo)) {
$this->RNTRC = "";
$infANTT = $this->rodo->getElementsByTagName("infANTT")->item(0);
if (!empty($infANTT) && isset($infANTT->getElementsByTagName("RNTRC")->item(0)->nodeValue)) {
$this->RNTRC = $infANTT->getElementsByTagName("RNTRC")->item(0)->nodeValue;
if(isset($infANTT)){
if (isset($infANTT->getElementsByTagName("RNTRC")->item(0)->nodeValue)) {
$this->RNTRC = $infANTT->getElementsByTagName("RNTRC")->item(0)->nodeValue;
}
}
}
$this->ciot = "";
Expand Down

0 comments on commit fd37946

Please sign in to comment.