NFePHP\NFe\MakeNFe::tagide PHP Method

tagide() public method

tgaide Informações de identificação da NF-e B01 pai A01 tag NFe/infNFe/ide
public tagide ( string $cUF = '', string $cNF = '', string $natOp = '', string $indPag = '', string $mod = '', string $serie = '', string $nNF = '', string $dhEmi = '', string $dhSaiEnt = '', string $tpNF = '', string $idDest = '', string $cMunFG = '', string $tpImp = '', string $tpEmis = '', string $cDV = '', string $tpAmb = '', string $finNFe = '', string $indFinal = '0', string $indPres = '', string $procEmi = '', string $verProc = '', string $dhCont = '', string $xJust = '' ) : DOMElement
$cUF string
$cNF string
$natOp string
$indPag string
$mod string
$serie string
$nNF string
$dhEmi string
$dhSaiEnt string
$tpNF string
$idDest string
$cMunFG string
$tpImp string
$tpEmis string
$cDV string
$tpAmb string
$finNFe string
$indFinal string
$indPres string
$procEmi string
$verProc string
$dhCont string
$xJust string
return DOMElement
    public function tagide($cUF = '', $cNF = '', $natOp = '', $indPag = '', $mod = '', $serie = '', $nNF = '', $dhEmi = '', $dhSaiEnt = '', $tpNF = '', $idDest = '', $cMunFG = '', $tpImp = '', $tpEmis = '', $cDV = '', $tpAmb = '', $finNFe = '', $indFinal = '0', $indPres = '', $procEmi = '', $verProc = '', $dhCont = '', $xJust = '')
    {
        $this->tpAmb = $tpAmb;
        $identificador = 'B01 <ide> - ';
        $ide = $this->dom->createElement("ide");
        $this->dom->addChild($ide, "cUF", $cUF, true, $identificador . "Código da UF do emitente do Documento Fiscal");
        $this->dom->addChild($ide, "cNF", $cNF, true, $identificador . "Código Numérico que compõe a Chave de Acesso");
        $this->dom->addChild($ide, "natOp", $natOp, true, $identificador . "Descrição da Natureza da Operaçãoo");
        $this->dom->addChild($ide, "indPag", $indPag, true, $identificador . "Indicador da forma de pagamento");
        $this->dom->addChild($ide, "mod", $mod, true, $identificador . "Código do Modelo do Documento Fiscal");
        $this->dom->addChild($ide, "serie", $serie, true, $identificador . "Série do Documento Fiscal");
        $this->dom->addChild($ide, "nNF", $nNF, true, $identificador . "Número do Documento Fiscal");
        if ($dhEmi == '') {
            $dhEmi = DateTime::convertTimestampToSefazTime();
        }
        $this->dom->addChild($ide, "dhEmi", $dhEmi, true, $identificador . "Data e hora de emissão do Documento Fiscal");
        if ($mod == '55' && $dhSaiEnt != '') {
            $this->dom->addChild($ide, "dhSaiEnt", $dhSaiEnt, false, $identificador . "Data e hora de Saída ou da Entrada da Mercadoria/Produto");
        }
        $this->dom->addChild($ide, "tpNF", $tpNF, true, $identificador . "Tipo de Operação");
        $this->dom->addChild($ide, "idDest", $idDest, true, $identificador . "Identificador de local de destino da operação");
        $this->dom->addChild($ide, "cMunFG", $cMunFG, true, $identificador . "Código do Município de Ocorrência do Fato Gerador");
        $this->dom->addChild($ide, "tpImp", $tpImp, true, $identificador . "Formato de Impressão do DANFE");
        $this->dom->addChild($ide, "tpEmis", $tpEmis, true, $identificador . "Tipo de Emissão da NF-e");
        $this->dom->addChild($ide, "cDV", $cDV, true, $identificador . "Dígito Verificador da Chave de Acesso da NF-e");
        $this->dom->addChild($ide, "tpAmb", $tpAmb, true, $identificador . "Identificação do Ambiente");
        $this->dom->addChild($ide, "finNFe", $finNFe, true, $identificador . "Finalidade de emissão da NF-e");
        $this->dom->addChild($ide, "indFinal", $indFinal, true, $identificador . "Indica operação com Consumidor final");
        $this->dom->addChild($ide, "indPres", $indPres, true, $identificador . "Indicador de presença do comprador no estabelecimento comercial no momento da operação");
        $this->dom->addChild($ide, "procEmi", $procEmi, true, $identificador . "Processo de emissão da NF-e");
        $this->dom->addChild($ide, "verProc", $verProc, true, $identificador . "Versão do Processo de emissão da NF-e");
        if ($dhCont != '' && $xJust != '') {
            $this->dom->addChild($ide, "dhCont", $dhCont, true, $identificador . "Data e Hora da entrada em contingência");
            $this->dom->addChild($ide, "xJust", $xJust, true, $identificador . "Justificativa da entrada em contingência");
        }
        $this->mod = $mod;
        $this->ide = $ide;
        return $ide;
    }

Usage Example

Example #1
0
 /**
  * bEntity
  * Cria a tag ide
  *
  * @param array $aCampos
  */
 protected function bEntity($aCampos)
 {
     //B|cUF|cNF|natOp|indPag|mod|serie|nNF|dhEmi
     // |dhSaiEnt|tpNF|idDest|cMunFG|tpImp|tpEmis
     // |cDV|tp Amb|finNFe|indFinal
     // |indPres|procEmi|verProc|dhCont|xJust|
     $this->make->tagide($aCampos[1], $aCampos[2], $aCampos[3], $aCampos[4], $aCampos[5], $aCampos[6], $aCampos[7], $aCampos[8], $aCampos[9], $aCampos[10], $aCampos[11], $aCampos[12], $aCampos[13], $aCampos[14], $aCampos[15], $aCampos[16], $aCampos[17], $aCampos[18], $aCampos[19], $aCampos[20], $aCampos[21], $aCampos[22], $aCampos[23]);
 }
All Usage Examples Of NFePHP\NFe\MakeNFe::tagide