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

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

tagICMSPart Grupo de Partilha do ICMS entre a UF de origem e UF de destino ou a UF definida na legislação. N10a pai N01 tag NFe/infNFe/det[]/imposto/ICMS/ICMSPart
public tagICMSPart ( string $nItem = '', string $orig = '', string $cst = '', string $modBC = '', string $vBC = '', string $pRedBC = '', string $pICMS = '', string $vICMS = '', string $modBCST = '', string $pMVAST = '', string $pRedBCST = '', string $vBCST = '', string $pICMSST = '', string $vICMSST = '', string $pBCOp = '', string $ufST = '' ) : DOMElement
$nItem string
$orig string
$cst string
$modBC string
$vBC string
$pRedBC string
$pICMS string
$vICMS string
$modBCST string
$pMVAST string
$pRedBCST string
$vBCST string
$pICMSST string
$vICMSST string
$pBCOp string
$ufST string
Результат DOMElement
    public function tagICMSPart($nItem = '', $orig = '', $cst = '', $modBC = '', $vBC = '', $pRedBC = '', $pICMS = '', $vICMS = '', $modBCST = '', $pMVAST = '', $pRedBCST = '', $vBCST = '', $pICMSST = '', $vICMSST = '', $pBCOp = '', $ufST = '')
    {
        $icmsPart = $this->dom->createElement("ICMSPart");
        $this->dom->addChild($icmsPart, 'orig', $orig, true, "[item {$nItem}] Origem da mercadoria");
        $this->dom->addChild($icmsPart, 'CST', $cst, true, "[item {$nItem}] Tributação do ICMS 10 ou 90");
        $this->dom->addChild($icmsPart, 'modBC', $modBC, true, "[item {$nItem}] Modalidade de determinação da BC do ICMS");
        $this->dom->addChild($icmsPart, 'vBC', $vBC, true, "[item {$nItem}] Valor da BC do ICMS");
        $this->dom->addChild($icmsPart, 'pRedBC', $pRedBC, false, "[item {$nItem}] Percentual da Redução de BC");
        $this->dom->addChild($icmsPart, 'pICMS', $pICMS, true, "[item {$nItem}] Alíquota do imposto");
        $this->dom->addChild($icmsPart, 'vICMS', $vICMS, true, "[item {$nItem}] Valor do ICMS");
        $this->dom->addChild($icmsPart, 'modBCST', $modBCST, true, "[item {$nItem}] Modalidade de determinação da BC do ICMS ST");
        $this->dom->addChild($icmsPart, 'pMVAST', $pMVAST, false, "[item {$nItem}] Percentual da margem de valor Adicionado do ICMS ST");
        $this->dom->addChild($icmsPart, 'pRedBCST', $pRedBCST, false, "[item {$nItem}] Percentual da Redução de BC do ICMS ST");
        $this->dom->addChild($icmsPart, 'vBCST', $vBCST, true, "[item {$nItem}] Valor da BC do ICMS ST");
        $this->dom->addChild($icmsPart, 'pICMSST', $pICMSST, true, "[item {$nItem}] Alíquota do imposto do ICMS ST");
        $this->dom->addChild($icmsPart, 'vICMSST', $vICMSST, true, "[item {$nItem}] Valor do ICMS ST");
        $this->dom->addChild($icmsPart, 'pBCOp', $pBCOp, true, "[item {$nItem}] Percentual da BC operação própria");
        $this->dom->addChild($icmsPart, 'UFST', $ufST, true, "[item {$nItem}] UF para qual é devido o ICMS ST");
        //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, $icmsPart, "Inserindo ICMSPart em ICMS[{$nItem}]");
        $this->aICMS[$nItem] = $tagIcms;
        return $tagIcms;
    }

Usage Example

Пример #1
0
 /**
  * n10aEntity
  * Cria a tag ICMSPart
  *
  * @param array $aCampos
  */
 protected function n10aEntity($aCampos)
 {
     //N10a|orig|CST|modBC|vBC|pRedBC|pICMS|vICMS|modBCST|pMVAST|pRedBCST|vBCST|pICMSST|vICMSST|pBCOp|UFST|
     $this->make->tagICMSPart($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]);
 }