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

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

tagautXML Pessoas autorizadas para o download do XML da NF-e G50 pai A01 tag NFe/infNFe/autXML (somente versão 3.1)
public tagautXML ( string $cnpj = '', string $cpf = '' ) : array
$cnpj string
$cpf string
Результат array
    public function tagautXML($cnpj = '', $cpf = '')
    {
        $identificador = 'G50 <autXML> - ';
        if (intval($this->versao, 10) > 2) {
            $autXML = $this->dom->createElement("autXML");
            if ($cnpj != '') {
                $this->dom->addChild($autXML, "CNPJ", $cnpj, true, $identificador . "CNPJ do Cliente Autorizado");
            } else {
                $this->dom->addChild($autXML, "CPF", $cpf, true, $identificador . "CPF do Cliente Autorizado");
            }
            $this->aAutXML[] = $autXML;
            return $autXML;
        } else {
            return array();
        }
    }

Usage Example

Пример #1
0
 /**
  * ga03Entity
  * Cria a tag autXML com CPF
  *
  * @param array $aCampos
  */
 protected function ga03Entity($aCampos)
 {
     //GA03|CPF|
     $this->make->tagautXML('', $aCampos[1]);
 }