NFePHP\NFe\MakeNFe::tagmed PHP Method

tagmed() public method

tagmed Detalhamento de medicamentos K01 pai I90 tag NFe/infNFe/det[]/prod/med (opcional)
public tagmed ( string $nItem = '', string $nLote = '', string $qLote = '', string $dFab = '', string $dVal = '', string $vPMC = '' ) : DOMElement
$nItem string
$nLote string
$qLote string
$dFab string
$dVal string
$vPMC string
return DOMElement
    public function tagmed($nItem = '', $nLote = '', $qLote = '', $dFab = '', $dVal = '', $vPMC = '')
    {
        $identificador = 'K01 <med> - ';
        $med = $this->dom->createElement("med");
        $this->dom->addChild($med, "nLote", $nLote, true, "{$identificador} [item {$nItem}] Número do Lote de medicamentos ou de matérias-primas farmacêuticas");
        $this->dom->addChild($med, "qLote", $qLote, true, "{$identificador} [item {$nItem}] Quantidade de produto no Lote de medicamentos ou de matérias-primas farmacêuticas");
        $this->dom->addChild($med, "dFab", $dFab, true, "{$identificador} [item {$nItem}] Data de fabricação");
        $this->dom->addChild($med, "dVal", $dVal, true, "{$identificador} [item {$nItem}] Data de validade");
        $this->dom->addChild($med, "vPMC", $vPMC, true, "{$identificador} [item {$nItem}] Preço máximo consumidor");
        $this->aMed[$nItem] = $med;
        return $med;
    }

Usage Example

Example #1
0
 /**
  * kEntity
  * Cria tag med
  *
  * @param array $aCampos
  */
 protected function kEntity($aCampos)
 {
     //K|nLote|qLote|dFab|dVal|vPMC|
     $this->make->tagmed($this->nItem, $aCampos[1], $aCampos[2], $aCampos[3], $aCampos[4], $aCampos[5]);
 }