NFePHP\NFe\MakeNFe::taginfNFe PHP Метод

taginfNFe() публичный Метод

taginfNFe Informações da NF-e A01 pai NFe tag NFe/infNFe
public taginfNFe ( string $chave = '', string $versao = '' ) : DOMElement
$chave string
$versao string
Результат DOMElement
    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;
    }

Usage Example

Пример #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]);
 }
All Usage Examples Of NFePHP\NFe\MakeNFe::taginfNFe