NFePHP\NFe\MakeNFe::tagrefNF PHP Method

tagrefNF() public method

tagrefNF Informação da NF modelo 1/1A referenciada BA03 pai BA01 tag NFe/infNFe/ide/NFref/NF DOMNode
public tagrefNF ( string $cUF = '', string $aamm = '', string $cnpj = '', string $mod = '', string $serie = '', string $nNF = '' ) : DOMElement
$cUF string
$aamm string
$cnpj string
$mod string
$serie string
$nNF string
return DOMElement
    public function tagrefNF($cUF = '', $aamm = '', $cnpj = '', $mod = '', $serie = '', $nNF = '')
    {
        $identificador = 'BA03 <refNF> - ';
        $num = $this->zTagNFref();
        $refNF = $this->dom->createElement("refNF");
        $this->dom->addChild($refNF, "cUF", $cUF, true, $identificador . "Código da UF do emitente");
        $this->dom->addChild($refNF, "AAMM", $aamm, true, $identificador . "Ano e Mês de emissão da NF-e");
        $this->dom->addChild($refNF, "CNPJ", $cnpj, true, $identificador . "CNPJ do emitente");
        $this->dom->addChild($refNF, "mod", $mod, true, $identificador . "Modelo do Documento Fiscal");
        $this->dom->addChild($refNF, "serie", $serie, true, $identificador . "Série do Documento Fiscal");
        $this->dom->addChild($refNF, "nNF", $nNF, true, $identificador . "Número do Documento Fiscal");
        $this->dom->appChild($this->aNFref[$num - 1], $refNF);
        return $refNF;
    }

Usage Example

Example #1
0
 /**
  * ba03Entity
  * Cria a tag refNF
  *
  * @param array $aCampos
  */
 protected function ba03Entity($aCampos)
 {
     //BA03|cUF|AAMM|CNPJ|mod|serie|nNF|
     $this->make->tagrefNF($aCampos[1], $aCampos[2], $aCampos[3], $aCampos[4], $aCampos[5], $aCampos[6]);
 }