NFePHP\NFe\MakeNFe::tagICMSST PHP Method

tagICMSST() public method

tagICMSST N10b pai N01 Grupo de Repasse de ICMS ST retido anteriormente em operações interestaduais com repasses através do Substituto Tributário
public tagICMSST ( string $nItem = '', string $orig = '', string $cst = '', string $vBCSTRet = '', string $vICMSSTRet = '', string $vBCSTDest = '', string $vICMSSTDest = '' ) : DOMElement
$nItem string
$orig string
$cst string
$vBCSTRet string
$vICMSSTRet string
$vBCSTDest string
$vICMSSTDest string
return DOMElement
    public function tagICMSST($nItem = '', $orig = '', $cst = '', $vBCSTRet = '', $vICMSSTRet = '', $vBCSTDest = '', $vICMSSTDest = '')
    {
        $icmsST = $this->dom->createElement("ICMSST");
        $this->dom->addChild($icmsST, 'orig', $orig, true, "[item {$nItem}] Origem da mercadoria");
        $this->dom->addChild($icmsST, 'CST', $cst, true, "[item {$nItem}] Tributação do ICMS 41");
        $this->dom->addChild($icmsST, 'vBCSTRet', $vBCSTRet, true, "[item {$nItem}] Valor do BC do ICMS ST retido na UF remetente");
        $this->dom->addChild($icmsST, 'vICMSSTRet', $vICMSSTRet, false, "[item {$nItem}] Valor do ICMS ST retido na UF remetente");
        $this->dom->addChild($icmsST, 'vBCSTDest', $vBCSTDest, true, "[item {$nItem}] Valor da BC do ICMS ST da UF destino");
        $this->dom->addChild($icmsST, 'vICMSSTDest', $vICMSSTDest, true, "[item {$nItem}] Valor do ICMS ST da UF destino");
        //caso exista a tag aICMS[$nItem] inserir nela caso contrario criar
        if (!empty($this->aICMS[$nItem])) {
            $tagIcms = $this->aICMS[$nItem];
        } else {
            $tagIcms = $this->dom->createElement('ICMS');
        }
        $this->dom->appChild($tagIcms, $icmsST, "Inserindo ICMSST em ICMS[{$nItem}]");
        $this->aICMS[$nItem] = $tagIcms;
        return $tagIcms;
    }

Usage Example

Example #1
0
 /**
  * n10bEntity
  * Cria tag ICMSST
  *
  * @param array $aCampos
  */
 protected function n10bEntity($aCampos)
 {
     //N10b|orig|CST|vBCSTRet|vICMSSTRet|vBCSTDest|vICMSSTDest|
     $this->make->tagICMSST($this->nItem, $aCampos[1], $aCampos[2], $aCampos[3], $aCampos[4], $aCampos[5], $aCampos[6]);
 }