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

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

tagICMS Informações do ICMS da Operação própria e ST N01 pai M01 tag NFe/infNFe/det[]/imposto/ICMS
public tagICMS ( string $nItem = '', string $orig = '', $cst = '', string $modBC = '', $pRedBC = '', string $vBC = '', string $pICMS = '', string $vICMS = '', string $vICMSDeson = '', string $motDesICMS = '', string $modBCST = '', string $pMVAST = '', string $pRedBCST = '', string $vBCST = '', string $pICMSST = '', string $vICMSST = '', string $pDif = '', string $vICMSDif = '', string $vICMSOp = '', string $vBCSTRet = '', string $vICMSSTRet = '' ) : DOMElement
$nItem string
$orig string
$modBC string
$vBC string
$pICMS string
$vICMS string
$vICMSDeson string
$motDesICMS string
$modBCST string
$pMVAST string
$pRedBCST string
$vBCST string
$pICMSST string
$vICMSST string
$pDif string
$vICMSDif string
$vICMSOp string
$vBCSTRet string
$vICMSSTRet string
Результат DOMElement
    public function tagICMS($nItem = '', $orig = '', $cst = '', $modBC = '', $pRedBC = '', $vBC = '', $pICMS = '', $vICMS = '', $vICMSDeson = '', $motDesICMS = '', $modBCST = '', $pMVAST = '', $pRedBCST = '', $vBCST = '', $pICMSST = '', $vICMSST = '', $pDif = '', $vICMSDif = '', $vICMSOp = '', $vBCSTRet = '', $vICMSSTRet = '')
    {
        $identificador = 'N01 <ICMSxx> - ';
        switch ($cst) {
            case '00':
                $icms = $this->dom->createElement("ICMS00");
                $this->dom->addChild($icms, 'orig', $orig, true, "{$identificador} [item {$nItem}] Origem da mercadoria");
                $this->dom->addChild($icms, 'CST', $cst, true, "{$identificador} [item {$nItem}] Tributação do ICMS = 00");
                $this->dom->addChild($icms, 'modBC', $modBC, true, "{$identificador} [item {$nItem}] Modalidade de determinação da BC do ICMS");
                $this->dom->addChild($icms, 'vBC', $vBC, true, "{$identificador} [item {$nItem}] Valor da BC do ICMS");
                $this->dom->addChild($icms, 'pICMS', $pICMS, true, "{$identificador} [item {$nItem}] Alíquota do imposto");
                $this->dom->addChild($icms, 'vICMS', $vICMS, true, "{$identificador} [item {$nItem}] Valor do ICMS");
                break;
            case '10':
                $icms = $this->dom->createElement("ICMS10");
                $this->dom->addChild($icms, 'orig', $orig, true, "{$identificador} [item {$nItem}] Origem da mercadoria");
                $this->dom->addChild($icms, 'CST', $cst, true, "{$identificador} [item {$nItem}] Tributação do ICMS = 10");
                $this->dom->addChild($icms, 'modBC', $modBC, true, "{$identificador} [item {$nItem}] Modalidade de determinação da BC do ICMS");
                $this->dom->addChild($icms, 'vBC', $vBC, true, "{$identificador} [item {$nItem}] Valor da BC do ICMS");
                $this->dom->addChild($icms, 'pICMS', $pICMS, true, "{$identificador} [item {$nItem}] Alíquota do imposto");
                $this->dom->addChild($icms, 'vICMS', $vICMS, true, "{$identificador} [item {$nItem}] Valor do ICMS");
                $this->dom->addChild($icms, 'modBCST', $modBCST, true, "{$identificador} [item {$nItem}] Modalidade de determinação da BC do ICMS ST");
                $this->dom->addChild($icms, 'pMVAST', $pMVAST, false, "{$identificador} [item {$nItem}] Percentual da margem de valor Adicionado do ICMS ST");
                $this->dom->addChild($icms, 'pRedBCST', $pRedBCST, false, "{$identificador} [item {$nItem}] Percentual da Redução de BC do ICMS ST");
                $this->dom->addChild($icms, 'vBCST', $vBCST, true, "{$identificador} [item {$nItem}] Valor da BC do ICMS ST");
                $this->dom->addChild($icms, 'pICMSST', $pICMSST, true, "{$identificador} [item {$nItem}] Alíquota do imposto do ICMS ST");
                $this->dom->addChild($icms, 'vICMSST', $vICMSST, true, "{$identificador} [item {$nItem}] Valor do ICMS ST");
                break;
            case '20':
                $icms = $this->dom->createElement("ICMS20");
                $this->dom->addChild($icms, 'orig', $orig, true, "{$identificador} [item {$nItem}] Origem da mercadoria");
                $this->dom->addChild($icms, 'CST', $cst, true, "{$identificador} [item {$nItem}] Tributação do ICMS = 20");
                $this->dom->addChild($icms, 'modBC', $modBC, true, "{$identificador} [item {$nItem}] Modalidade de determinação da BC do ICMS");
                $this->dom->addChild($icms, 'pRedBC', $pRedBC, true, "{$identificador} [item {$nItem}] Percentual da Redução de BC");
                $this->dom->addChild($icms, 'vBC', $vBC, true, "{$identificador} [item {$nItem}] Valor da BC do ICMS");
                $this->dom->addChild($icms, 'pICMS', $pICMS, true, "{$identificador} [item {$nItem}] Alíquota do imposto");
                $this->dom->addChild($icms, 'vICMS', $vICMS, true, "{$identificador} [item {$nItem}] Valor do ICMS");
                $this->dom->addChild($icms, 'vICMSDeson', $vICMSDeson, false, "{$identificador} [item {$nItem}] Valor do ICMS desonerado");
                $this->dom->addChild($icms, 'motDesICMS', $motDesICMS, false, "{$identificador} [item {$nItem}] Motivo da desoneração do ICMS");
                break;
            case '30':
                $icms = $this->dom->createElement("ICMS30");
                $this->dom->addChild($icms, 'orig', $orig, true, "{$identificador} [item {$nItem}] Origem da mercadoria");
                $this->dom->addChild($icms, 'CST', $cst, true, "{$identificador} [item {$nItem}] Tributação do ICMS = 30");
                $this->dom->addChild($icms, 'modBCST', $modBCST, true, "{$identificador} [item {$nItem}] Modalidade de determinação da BC do ICMS ST");
                $this->dom->addChild($icms, 'pMVAST', $pMVAST, false, "{$identificador} [item {$nItem}] Percentual da margem de valor Adicionado do ICMS ST");
                $this->dom->addChild($icms, 'pRedBCST', $pRedBCST, false, "{$identificador} [item {$nItem}] Percentual da Redução de BC do ICMS ST");
                $this->dom->addChild($icms, 'vBCST', $vBCST, true, "{$identificador} [item {$nItem}] Valor da BC do ICMS ST");
                $this->dom->addChild($icms, 'pICMSST', $pICMSST, true, "{$identificador} [item {$nItem}] Alíquota do imposto do ICMS ST");
                $this->dom->addChild($icms, 'vICMSST', $vICMSST, true, "{$identificador} [item {$nItem}] Valor do ICMS ST");
                $this->dom->addChild($icms, 'vICMSDeson', $vICMSDeson, false, "{$identificador} [item {$nItem}] Valor do ICMS desonerado");
                $this->dom->addChild($icms, 'motDesICMS', $motDesICMS, false, "{$identificador} [item {$nItem}] Motivo da desoneração do ICMS");
                break;
            case '40':
            case '41':
            case '50':
                $icms = $this->dom->createElement("ICMS40");
                $this->dom->addChild($icms, 'orig', $orig, true, "{$identificador} [item {$nItem}] Origem da mercadoria");
                $this->dom->addChild($icms, 'CST', $cst, true, "{$identificador} [item {$nItem}] Tributação do ICMS {$cst}");
                $this->dom->addChild($icms, 'vICMSDeson', $vICMSDeson, false, "{$identificador} [item {$nItem}] Valor do ICMS desonerado");
                $this->dom->addChild($icms, 'motDesICMS', $motDesICMS, false, "{$identificador} [item {$nItem}] Motivo da desoneração do ICMS");
                break;
            case '51':
                $icms = $this->dom->createElement("ICMS51");
                $this->dom->addChild($icms, 'orig', $orig, true, "{$identificador} [item {$nItem}] Origem da mercadoria");
                $this->dom->addChild($icms, 'CST', $cst, true, "{$identificador} [item {$nItem}] Tributação do ICMS = 51");
                $this->dom->addChild($icms, 'modBC', $modBC, false, "{$identificador} [item {$nItem}] Modalidade de determinação da BC do ICMS");
                $this->dom->addChild($icms, 'pRedBC', $pRedBC, false, "{$identificador} [item {$nItem}] Percentual da Redução de BC");
                $this->dom->addChild($icms, 'vBC', $vBC, false, "{$identificador} [item {$nItem}] Valor da BC do ICMS");
                $this->dom->addChild($icms, 'pICMS', $pICMS, false, "{$identificador} [item {$nItem}] Alíquota do imposto");
                $this->dom->addChild($icms, 'vICMSOp', $vICMSOp, false, "{$identificador} [item {$nItem}] Valor do ICMS da Operação");
                $this->dom->addChild($icms, 'pDif', $pDif, false, "{$identificador} [item {$nItem}] Percentual do diferimento");
                $this->dom->addChild($icms, 'vICMSDif', $vICMSDif, false, "{$identificador} [item {$nItem}] Valor do ICMS diferido");
                $this->dom->addChild($icms, 'vICMS', $vICMS, false, "{$identificador} [item {$nItem}] Valor do ICMS realmente devido");
                break;
            case '60':
                $icms = $this->dom->createElement("ICMS60");
                $this->dom->addChild($icms, 'orig', $orig, true, "{$identificador} [item {$nItem}] Origem da mercadoria");
                $this->dom->addChild($icms, 'CST', $cst, true, "{$identificador} [item {$nItem}] Tributação do ICMS = 60");
                $this->dom->addChild($icms, 'vBCSTRet', $vBCSTRet, false, "{$identificador} [item {$nItem}] Valor da BC do ICMS ST retido");
                $this->dom->addChild($icms, 'vICMSSTRet', $vICMSSTRet, false, "{$identificador} [item {$nItem}] Valor do ICMS ST retido");
                break;
            case '70':
                $icms = $this->dom->createElement("ICMS70");
                $this->dom->addChild($icms, 'orig', $orig, true, "{$identificador} [item {$nItem}] Origem da mercadoria");
                $this->dom->addChild($icms, 'CST', $cst, true, "{$identificador} [item {$nItem}] Tributação do ICMS = 70");
                $this->dom->addChild($icms, 'modBC', $modBC, true, "{$identificador} [item {$nItem}] Modalidade de determinação da BC do ICMS");
                $this->dom->addChild($icms, 'pRedBC', $pRedBC, true, "{$identificador} [item {$nItem}] Percentual da Redução de BC");
                $this->dom->addChild($icms, 'vBC', $vBC, true, "{$identificador} [item {$nItem}] Valor da BC do ICMS");
                $this->dom->addChild($icms, 'pICMS', $pICMS, true, "{$identificador} [item {$nItem}] Alíquota do imposto");
                $this->dom->addChild($icms, 'vICMS', $vICMS, true, "{$identificador} [item {$nItem}] Valor do ICMS");
                $this->dom->addChild($icms, 'modBCST', $modBCST, true, "{$identificador} [item {$nItem}] Modalidade de determinação da BC do ICMS ST");
                $this->dom->addChild($icms, 'pMVAST', $pMVAST, false, "{$identificador} [item {$nItem}] Percentual da margem de valor Adicionado do ICMS ST");
                $this->dom->addChild($icms, 'pRedBCST', $pRedBCST, false, "{$identificador} [item {$nItem}] Percentual da Redução de BC do ICMS ST");
                $this->dom->addChild($icms, 'vBCST', $vBCST, true, "{$identificador} [item {$nItem}] Valor da BC do ICMS ST");
                $this->dom->addChild($icms, 'pICMSST', $pICMSST, true, "{$identificador} [item {$nItem}] Alíquota do imposto do ICMS ST");
                $this->dom->addChild($icms, 'vICMSST', $vICMSST, true, "{$identificador} [item {$nItem}] Valor do ICMS ST");
                $this->dom->addChild($icms, 'vICMSDeson', $vICMSDeson, false, "{$identificador} [item {$nItem}] Valor do ICMS desonerado");
                $this->dom->addChild($icms, 'motDesICMS', $motDesICMS, false, "{$identificador} [item {$nItem}] Motivo da desoneração do ICMS");
                break;
            case '90':
                $icms = $this->dom->createElement("ICMS90");
                $this->dom->addChild($icms, 'orig', $orig, true, "{$identificador} [item {$nItem}] Origem da mercadoria");
                $this->dom->addChild($icms, 'CST', $cst, true, "{$identificador} [item {$nItem}] Tributação do ICMS = 90");
                $this->dom->addChild($icms, 'modBC', $modBC, true, "{$identificador} [item {$nItem}] Modalidade de determinação da BC do ICMS");
                $this->dom->addChild($icms, 'vBC', $vBC, true, "{$identificador} [item {$nItem}] Valor da BC do ICMS");
                $this->dom->addChild($icms, 'pRedBC', $pRedBC, false, "{$identificador} [item {$nItem}] Percentual da Redução de BC");
                $this->dom->addChild($icms, 'pICMS', $pICMS, true, "{$identificador} [item {$nItem}] Alíquota do imposto");
                $this->dom->addChild($icms, 'vICMS', $vICMS, true, "{$identificador} [item {$nItem}] Valor do ICMS");
                $this->dom->addChild($icms, 'modBCST', $modBCST, true, "{$identificador} [item {$nItem}] Modalidade de determinação da BC do ICMS ST");
                $this->dom->addChild($icms, 'pMVAST', $pMVAST, false, "{$identificador} [item {$nItem}] Percentual da margem de valor Adicionado do ICMS ST");
                $this->dom->addChild($icms, 'pRedBCST', $pRedBCST, false, "{$identificador} [item {$nItem}] Percentual da Redução de BC do ICMS ST");
                $this->dom->addChild($icms, 'vBCST', $vBCST, true, "{$identificador} [item {$nItem}] Valor da BC do ICMS ST");
                $this->dom->addChild($icms, 'pICMSST', $pICMSST, true, "{$identificador} [item {$nItem}] Alíquota do imposto do ICMS ST");
                $this->dom->addChild($icms, 'vICMSST', $vICMSST, true, "{$identificador} [item {$nItem}] Valor do ICMS ST");
                $this->dom->addChild($icms, 'vICMSDeson', $vICMSDeson, false, "{$identificador} [item {$nItem}] Valor do ICMS desonerado");
                $this->dom->addChild($icms, 'motDesICMS', $motDesICMS, false, "{$identificador} [item {$nItem}] Motivo da desoneração do ICMS");
                break;
        }
        $tagIcms = $this->dom->createElement('ICMS');
        if (isset($icms)) {
            $tagIcms->appendChild($icms);
        }
        $this->aICMS[$nItem] = $tagIcms;
        return $tagIcms;
    }

Usage Example

Пример #1
0
 /**
  * zLinhaNEntity
  * Cria a tag ICMS
  *
  * @param array $aCampos
  */
 protected function zLinhaNEntity($aCampos)
 {
     //Nxx|orig|cst|modBC|pRedBC|vBC|pICMS|vICMS|vICMSDeson|motDesICMS|modBCST
     //   |pMVAST|pRedBCST|vBCST|pICMSST|vICMSST|pDif|vICMSDif|vICMSOp
     //   |BCSTRet|vICMSSTRet|
     $this->make->tagICMS($this->nItem, $aCampos[1], $aCampos[2], $aCampos[3], $aCampos[4], $aCampos[5], $aCampos[6], $aCampos[7], $aCampos[8], $aCampos[9], $aCampos[10], $aCampos[11], $aCampos[12], $aCampos[13], $aCampos[14], $aCampos[15], $aCampos[16], $aCampos[17], $aCampos[18], $aCampos[19], $aCampos[20]);
 }
All Usage Examples Of NFePHP\NFe\MakeNFe::tagICMS