Skip to content

Commit

Permalink
Correçao para impressao das chaves de CTe vinculada em documentos de …
Browse files Browse the repository at this point in the history
…transporte anterior. (#27)

Co-authored-by: Gabriel K Rondon <[email protected]>
  • Loading branch information
vpereira13 and Gabriel K Rondon authored Sep 17, 2024
1 parent cceff8e commit 177c904
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/CTe/Dacte.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ private function loadDoc($xml)
$this->infNF = $this->dom->getElementsByTagName("infNF");
$this->infNFe = $this->dom->getElementsByTagName("infNFe");
$this->infOutros = $this->dom->getElementsByTagName("infOutros");
$this->idDocAntEle = $this->dom->getElementsByTagName("idDocAntEle");
$this->infCTeMultimodal = $this->dom->getElementsByTagName("infCTeMultimodal");
$this->compl = $this->dom->getElementsByTagName("compl");
$this->ICMS = $this->dom->getElementsByTagName("ICMS")->item(0);
Expand Down Expand Up @@ -2430,7 +2431,7 @@ protected function docOrig($x = 0, $y = 0)
}
foreach ($this->idDocAntEle as $k => $d) {
$tp = 'CT-e';
$chaveCTe = $this->idDocAntEle->item($k)->getElementsByTagName('chave')->item(0)->nodeValue;
$chaveCTe = $this->idDocAntEle->item($k)->getElementsByTagName('chCTe')->item(0)->nodeValue;
$numCTe = substr($chaveCTe, 25, 9);
$serieCTe = substr($chaveCTe, 22, 3);
$doc = $serieCTe . '/' . $numCTe;
Expand Down

0 comments on commit 177c904

Please sign in to comment.