NFePHP\NFe\MakeNFe::tagreboque PHP Method

tagreboque() public method

tagreboque Grupo Reboque X22 pai X17.1 tag NFe/infNFe/transp/reboque (opcional)
public tagreboque ( string $placa = '', string $siglaUF = '', string $rntc = '', string $vagao = '', string $balsa = '' ) : DOMElement
$placa string
$siglaUF string
$rntc string
$vagao string
$balsa string
return DOMElement
    public function tagreboque($placa = '', $siglaUF = '', $rntc = '', $vagao = '', $balsa = '')
    {
        $reboque = $this->dom->createElement("reboque");
        $this->dom->addChild($reboque, "placa", $placa, true, "Placa do Veículo Reboque");
        $this->dom->addChild($reboque, "UF", $siglaUF, true, "Sigla da UF do Veículo Reboque");
        $this->dom->addChild($reboque, "RNTC", $rntc, false, "Registro Nacional de Transportador de Carga (ANTT) do Veículo Reboque");
        $this->dom->addChild($reboque, "vagao", $vagao, false, "Identificação do vagão do Veículo Reboque");
        $this->dom->addChild($reboque, "balsa", $balsa, false, "Identificação da balsa do Veículo Reboque");
        $this->aReboque[] = $reboque;
        $this->dom->appChild($this->transp, $reboque, 'A tag transp deveria ter sido carregada primeiro.');
        return $reboque;
    }

Usage Example

Example #1
0
 /**
  * x22Entity
  * Cria a tag reboque
  *
  * @param array $aCampos
  */
 protected function x22Entity($aCampos)
 {
     //X22|placa|UF|RNTC|vagao|balsa|
     $this->make->tagreboque($aCampos[1], $aCampos[3], $aCampos[4], $aCampos[5], $aCampos[6]);
 }