Skip to content

Somatorio de FCP ao ICMS #608

Description

@twynroque

Boa tarde.
Segue o código para uma config onde clientes que não demonstram o total de ICMS com o FCP somado, possam ter essa flexibilidade na impressão da DANFE. Se possível, por favor, realizar a implementação.

nfephp-org/sped-da/src/NFe/Danfe.php

image

       /**
     * Parâmetro para exibir o FCP somado ao ICMS.
     *
     * @var boolean
     */
    public $exibirSomatorioFcp = true;

image

           if($this->exibirSomatorioFcp == true){
               if ($campoImposto == 'vICMS') { // soma junto ao ICMS o FCP
                    $the_field_aux = $this->ICMSTot->getElementsByTagName('vFCP')->item(0);
                    if (isset($the_field_aux)) {
                        $value2 = $the_field_aux->nodeValue;
                    }
                } elseif ($campoImposto == 'vST') { // soma junto ao ICMS ST o FCP ST
                    $the_field_aux = $this->ICMSTot->getElementsByTagName('vFCPST')->item(0);
                    if (isset($the_field_aux)) {
                        $value2 = $the_field_aux->nodeValue;
                    }
                }
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions