public function taginfNFe($chave = '', $versao = '')
{
$this->infNFe = $this->dom->createElement("infNFe");
$this->infNFe->setAttribute("Id", 'NFe' . $chave);
$this->infNFe->setAttribute("versao", $versao);
//$this->infNFe->setAttribute("pk_nItem",'');
$this->versao = $versao;
$this->chNFe = $chave;
return $this->infNFe;
}
/** * aEntity * Cria a tag infNFe * * @param array $aCampos * @throws Exception\RuntimeException */ protected function aEntity($aCampos) { //A|versao|Id|pk_nItem| if ($aCampos[1] != $this->version) { $msg = "A conversão somente para a versão {$this->version} !"; throw new Exception\RuntimeException($msg); } $chave = preg_replace('/[^0-9]/', '', $aCampos[2]); $this->make->taginfNFe($chave, $aCampos[1]); }