taginfNFe() public method

taginfNFe Informações da NF-e A01 pai NFe tag NFe/infNFe
public taginfNFe ( string $chave = '', string $versao = '' ) : DOMElement
$chave string
$versao string
return DOMElement
Exemplo n.º 1
0
 /**
  * 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]);
 }
//3=Emissão NF-e pelo contribuinte com aplicativo fornecido pelo Fisco.
$verProc = '3.22.8';
//versão do aplicativo emissor
$dhCont = '';
//entrada em contingência AAAA-MM-DDThh:mm:ssTZD
$xJust = '';
//Justificativa da entrada em contingência
//Numero e versão da NFe (infNFe)
//$chave = '35140258716523000119550000000280051760377394';
$tempData = explode("-", $dhEmi);
$ano = $tempData[0] - 2000;
$mes = $tempData[1];
$cnpj = '58716523000119';
$chave = $nfe->montaChave($cUF, $ano, $mes, $cnpj, $mod, $serie, $nNF, $tpEmis, $cNF);
$versao = '3.10';
$resp = $nfe->taginfNFe($chave, $versao);
$cDV = substr($chave, -1);
//digito verificador
//tag IDE
$resp = $nfe->tagide($cUF, $cNF, $natOp, $indPag, $mod, $serie, $nNF, $dhEmi, $dhSaiEnt, $tpNF, $idDest, $cMunFG, $tpImp, $tpEmis, $cDV, $tpAmb, $finNFe, $indFinal, $indPres, $procEmi, $verProc, $dhCont, $xJust);
//refNFe NFe referenciada
//$refNFe = '12345678901234567890123456789012345678901234';
//$resp = $nfe->tagrefNFe($refNFe);
//refNF Nota Fiscal 1A referenciada
//$cUF = '35';
//$AAMM = '1312';
//$CNPJ = '12345678901234';
//$mod = '1A';
//$serie = '0';
//$nNF = '1234';
//$resp = $nfe->tagrefNF($cUF, $AAMM, $CNPJ, $mod, $serie, $nNF);