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

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

tagemit Identificação do emitente da NF-e C01 pai A01 tag NFe/infNFe/emit
public tagemit ( string $cnpj = '', string $cpf = '', string $xNome = '', string $xFant = '', string $numIE = '', string $numIEST = '', string $numIM = '', string $cnae = '', string $crt = '' ) : DOMElement
$cnpj string
$cpf string
$xNome string
$xFant string
$numIE string
$numIEST string
$numIM string
$cnae string
$crt string
Результат DOMElement
    public function tagemit($cnpj = '', $cpf = '', $xNome = '', $xFant = '', $numIE = '', $numIEST = '', $numIM = '', $cnae = '', $crt = '')
    {
        $identificador = 'C01 <emit> - ';
        $this->emit = $this->dom->createElement("emit");
        if ($cnpj != '') {
            $this->dom->addChild($this->emit, "CNPJ", $cnpj, true, $identificador . "CNPJ do emitente");
        } else {
            $this->dom->addChild($this->emit, "CPF", $cpf, true, $identificador . "CPF do remetente");
        }
        $this->dom->addChild($this->emit, "xNome", $xNome, true, $identificador . "Razão Social ou Nome do emitente");
        $this->dom->addChild($this->emit, "xFant", $xFant, false, $identificador . "Nome fantasia do emitente");
        $this->dom->addChild($this->emit, "IE", $numIE, true, $identificador . "Inscrição Estadual do emitente");
        $this->dom->addChild($this->emit, "IEST", $numIEST, false, $identificador . "IE do Substituto Tributário do emitente");
        $this->dom->addChild($this->emit, "IM", $numIM, false, $identificador . "Inscrição Municipal do Prestador de Serviço do emitente");
        $this->dom->addChild($this->emit, "CNAE", $cnae, false, $identificador . "CNAE fiscal do emitente");
        $this->dom->addChild($this->emit, "CRT", $crt, true, $identificador . "Código de Regime Tributário do emitente");
        return $this->emit;
    }

Usage Example

Пример #1
0
 /**
  * zLinhaCEntity
  * Cria a tag emit
  *
  * @param array $aCampos
  */
 protected function zLinhaCEntity($aCampos)
 {
     //Cxx|XNome|XFant|IE|IEST|IM|CNAE|CRT|CNPJ|CPF|
     $this->make->tagemit($aCampos[8], $aCampos[9], $aCampos[1], $aCampos[2], $aCampos[3], $aCampos[4], $aCampos[5], $aCampos[6], $aCampos[7]);
 }
All Usage Examples Of NFePHP\NFe\MakeNFe::tagemit