diff --git a/.github/workflows/release-maven.yml b/.github/workflows/release-maven.yml index ac40da0c..59df2cc3 100644 --- a/.github/workflows/release-maven.yml +++ b/.github/workflows/release-maven.yml @@ -2,6 +2,10 @@ name: Liberar nova versão Maven on: workflow_dispatch: + inputs: + version: + description: 'Versao a publicar, ex.: 4.2.0' + required: true push: tags: - '4.*' @@ -25,12 +29,28 @@ jobs: distribution: 'temurin' cache: maven - - name: Set release version + - name: Verify release version run: | + # O pom e a fonte da verdade da versao. Reescrever o pom aqui, com + # versions:set, era desnecessario e deixava o deploy depender de uma + # etapa a mais; esta etapa so confere que pom e tag concordam. VERSION="${{ github.event.inputs.version }}" + if [ -z "$VERSION" ]; then + VERSION="${GITHUB_REF_NAME}" + fi + if [ -z "$VERSION" ]; then + echo "Versao nao determinada: informe o input ou use uma tag 4.x" >&2 + exit 1 + fi + mvn -v + POM_VERSION=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version) + if [ "$VERSION" != "$POM_VERSION" ]; then + echo "Versao pedida ($VERSION) difere da do pom ($POM_VERSION)." >&2 + echo "Ajuste o pom e refaca a tag; nada foi publicado." >&2 + exit 1 + fi + echo "Publicando versao $VERSION" echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV - mvn versions:set -DnewVersion=$VERSION - mvn versions:commit - name: Build and test with Java 8 run: | diff --git a/BUILD.md b/BUILD.md index dec7b625..68e67f10 100644 --- a/BUILD.md +++ b/BUILD.md @@ -1,6 +1,6 @@ -# Build & regeneração JAXB — v4.1.1 +# Build & regeneração JAXB -A partir da versão **4.1.1** todos os tipos JAXB foram consolidados em **2 packages** (antes ~48): +A partir da versão **4.1.*** todos os tipos JAXB foram consolidados em **2 packages** (antes ~48): | Package | Conteúdo | |---|---| @@ -123,6 +123,28 @@ A partir desta versão **cada evento individual tem sua própria classe** `DetEv Os arquivos top-level `DetEvento.java` (anônimo) **não existem mais** — qualquer arquivo de código deve referenciar a classe específica do evento que está manipulando. +## Pós-processamento: namespace XMLDSig em `schemas_eventos` + +Regressão da issue #352 (corrigida na PR #356) que **reaparece a cada regeneração** se não for tratada. + +Em `schemas`, o `xjc` gera os 8 tipos XMLDSig (`SignatureType`, `SignedInfoType`, +`SignatureValueType`, `KeyInfoType`, `X509DataType`, `ReferenceType`, `TransformType`, +`TransformsType`) com `namespace="http://www.w3.org/2000/09/xmldsig#"` nas anotações, +porque `leiauteNFe_v4.00.xsd` traz o xmldsig via ``. + +Em `schemas_eventos` um dos passes sobrescreve esses mesmos tipos **sem** o namespace. +Sem ele o unmarshal descarta silenciosamente `SignedInfo`, `SignatureValue` e `KeyInfo`, +e o procEvento sai com `` vazio. + +Como os dois pacotes geram tipos idênticos a menos da declaração de `package`, o script +copia a versão correta de `schemas` para `schemas_eventos` ao final, trocando apenas o +`package`. Isso acompanha automaticamente qualquer mudança futura no +`xmldsig-core-schema_v1.01.xsd`, sem depender de restauração manual via git. + +A regressão é coberta por `SignatureNamespaceTest`. Se o script abortar a cópia com +aviso (`... nao tem namespace xmldsig#`), significa que a geração de `schemas` também +perdeu o namespace — investigue o pass NFe antes de prosseguir. + ## O que verificar depois de regerar ```bash @@ -235,10 +257,14 @@ Quando a Sefaz publicar um novo evento ou documento: - Documentos que nao sao eventos (consultas, inutilizacoes) vao para `schemas`. - Se for documento no grupo `schemas`, insira **antes** do pass NFe (que deve continuar sendo o ÚLTIMO). 4. Rode `mvn exec:exec@regenerate-jaxb`. -5. Verifique que `DetEvento.java` nao foi alterado (se foi, restaure via git). +5. Rode `mvn test`. Atenção a dois tipos de quebra esperada: + - `SignatureNamespaceTest` → o pós-processamento XMLDSig falhou (ver seção acima). + - `IbsCbsTest` → golden files em `src/test/resources/IbsCbs*.xml` ficaram defasados. + Se a mudança no XML gerado for legítima, atualize o golden file. Lembre que mexer no + conteúdo invalida `DigestValue`/`SignatureValue`, que também precisam ser atualizados. 6. Commite: XSD(s) nova(s) + `.xjb` novo + linha no script + `.java` gerados. -## Migrando um projeto consumidor de v4.00.* para v4.1.1 +## Migrando um projeto consumidor de v4.00.* para v4.1.* Ver [`MIGRATION.md`](MIGRATION.md) e o script automático: diff --git a/CHANGELOG.md b/CHANGELOG.md index 67e98c30..1b53863a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,25 +1,71 @@ # Notas de versão -## v4.1.1 +### Correcoes do DANFE v2 -**Breaking changes** (ver [MIGRATION.md](MIGRATION.md) para script automático): +- **Modalidade do frete:** o quadro de transporte passa a sair sempre que o XML traz + `transp/modFrete`, que e obrigatorio. Antes, nota sem transportadora, veiculo e volumes + saia sem "FRETE POR CONTA". Quem usa `isExibirTransporte` em template proprio passa a + receber `true` nessas notas. +- **Valor unitario:** `vUnCom` passa a sair com todas as casas do XML (2 a 10, limite do + Schema), pelo novo `fmt.valorUnitario`. Antes, parava em 4 casas e arredondava: + `5.893217` saia `5,8932`. `fmt.quantidade` continua com 2 a 4 casas. -- Consolidação dos ~48 sub-packages JAXB em apenas 2: `schemas` (NFe e consultas) e `schemas_eventos` (todos os eventos SEFAZ). -- Classes de evento ambíguas (`TEnvEvento`, `TRetEnvEvento`, `TEvento`, `TProcEvento`) renomeadas por sufixo do tipo de evento (`TEnvEventoCancelamento`, `TEnvEventoCartaCorrecao`, etc.). -- `TProtNFe.InfProt.getDhRecbto()` agora retorna `String` (era `XMLGregorianCalendar`). -- `ResEvento` renomeada para `ResumoEvento`. -- Eventos individuais da Reforma Tributária (`e110001`, `e112110-150`, `e211110-150`, `e212110-120`, `e412120-130`, `e210200-240`, `110150`) agora geram classes top-level `DetEvento` com `@XmlRootElement` (permite marshalling direto via JAXB). +### Schemas: PL 010h v1.03 -**Correções:** +- Schemas atualizados para o **PL 010h v1.03**: `leiauteNFe_v4.00` e `DFeTiposBasicos_v1.00`, + mais o `e412140_v1.00` novo. `schemas.zip` regerado. Os demais arquivos do pacote + (`nfe_v4.00`, `tiposBasico_v4.00`, `xmldsig-core-schema_v1.01`, `e110001_v1.00`, + `e110300_v1.00` e `tiposBasico_v1.03`) nao mudaram em relacao ao PL 010g. +- **NT 2026.005 (Simples Nacional)**, que na v4.3.0 ficou sem implementacao por falta de + Schema: agora existe por inteiro. No leiaute entraram o `tpRegimeIBSCBS` (C21a) e o + `cAtivSN` (I17d); nos tipos basicos, o grupo `gTribSN` com o tipo `TTribSN` + (`gIBSSN`, `gCBSSN`, `pIBSSN`, `pCBSSN`, `vIBSSN`, `vCBSSN`), presente no `TTribNFe`, + no `TTribNFCe` e nos totais do `TIBSCBSMonoTot`; e o evento **412140** (Tributacao do + Simples Nacional), com as classes `DetEvento412140`, `TTotalSN` e `TTribItemSN`. + Implantacao em producao adiada de 16/11/2026 para 14/12/2026 pelo Comite Gestor do IBS. +- O `xs:selector` das constraints de unicidade do grupo YC (Vinculacao de Pagamento, + NT 2026.006) passou de `gPgto` para `./*`. Sem prefixo de namespace o seletor nao casava + em documento com namespace, entao a unicidade de `nPag` e `idTransacao` nao era checada. + Correcao do Schema, sem efeito no modelo. +- O `regenerate-jaxb.ps1` passa a gerar o `e412140`. -- Corrigido bug do `regenerate-jaxb` em que o `DetEvento` anônimo de cada evento sobrescrevia o anterior entre passes sequenciais. -- `package-info.java` de `schemas_eventos` agora aponta para o namespace correto (`http://www.portalfiscal.inf.br/nfe`) em vez de `xmldsig`. -- Calculos IBSCBS para Diferimento. -- Cacerts atualizados. -- Monofasia retida. -- Informações Fisco na impressão DANFE. +### Correcoes -**Outras melhorias:** +- O **Jackson** passa a ser declarado no `pom.xml` (`jackson-databind` 2.14.1, que traz o + `jackson-core` e o `jackson-annotations`). O `ConsultaTributacao` e o `IbsCbsUtil` usam + `ObjectMapper` e `TypeReference` para ler o `ibscbs.json`, entao o Jackson sempre foi + dependencia de runtime da biblioteca; ate a v4.3.0 ele nao era declarado e so entrava de + carona no `jasperreports`, que e `provided`. Quem usa a lib sem o Jasper recebia + `NoClassDefFoundError: com/fasterxml/jackson/core/type/TypeReference` ao construir o + `IbsCbsUtil`, e por ser `Error` e nao `Exception` escapava de `catch (Exception)` e + derrubava a emissao. -- Script de migração automática para projetos consumidores: `scripts/migrate.ps1` (PowerShell, cross-platform) e `scripts/migrate.sh` (bash, limitado). -- 2157 testes unitários, 0 falhas. +### Exemplos + +- `EnvioNfceIbsCbsProducaoTeste` novo: emite a mesma NFC-e de combustivel em homologacao e + em producao, com `-Dambiente`, `-Dgrupo` (`mono`, `semgrupo`, `nenhum`), `-Dserie`, + `-Dnumero` e `-Dqrcode`. Serve para medir, numa UF, se a producao ja aceita o layout + monofasico reformulado. Com o QR-Code v3 ele dispensa o CSC, e por isso **autoriza + documento fiscal de verdade**: cancele em seguida com o `CancelarTeste`. +- `CancelarTeste` ganhou `-Dambiente` e `-Dmotivo`, para cancelar em producao sem editar o + fonte. + +### Atencao: implantacao do monofasico nao e simultanea entre UFs + +A reformulacao do layout monofasico (NT 2025.002-RTC v1.50) tem producao em 03/11/2026, +mas cada UF sobe no seu tempo. Medido em Goias com o `EnvioNfceIbsCbsProducaoTeste`, +NFC-e modelo 65, mesmo XML, so mudando a data: + +| grupo IBSCBS no item | 14/11/2026 | 16/11/2026 | +|---|---|---| +| com `gIBSCBSMono` (`gIBSMonoAdValorem` / `gCBSMonoAdValorem`) | **225** | 100 autorizado | +| so `CST` + `cClassTrib` | 100 autorizado | 100 autorizado | + +Ate 14/11 a producao de GO ainda rodava o layout antigo e devolvia **225 - Falha no Schema +XML do lote de NFe**, derrubando o lote inteiro antes de avaliar a nota; homologacao, no +mesmo dia e com os mesmos bytes, aceitava. Em 16/11 GO subiu o layout novo. As duas formas +autorizam hoje, ou seja, o grupo passou a ser aceito mas ainda nao e exigido, coerente com +a UB12-10 seguir como implementacao futura. + +Se a sua UF ainda devolver 225 na monofasia, e isso: a UF nao subiu o Schema. Nao ha o que +corrigir na biblioteca. diff --git a/MIGRATION.md b/MIGRATION.md index ccffa7db..dcfcc4f9 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,12 +1,12 @@ -# Guia de migração — v4.00.* → v4.1.1 +# Guia de migração — v4.00.* → v4.1.* > 💡 **Resumo rápido:** rode `pwsh scripts/migrate.ps1 -ProjectRoot . -BumpPom` (ou o equivalente bash) no seu projeto consumidor da lib, depois `mvn test-compile`. Os detalhes abaixo cobrem o que muda e o que o script não consegue migrar automaticamente. ## O que mudou -A v4.1.1 consolidou ~48 sub-packages JAXB em **2 packages**: +A v4.1.* consolidou ~48 sub-packages JAXB em **2 packages**: -| Antes (v4.00.*) | Depois (v4.1.1) | +| Antes (v4.00.*) | Depois (v4.1.*) | |---------------------------------------------------------------|----------------------------------------------| | `br.com.swconsultoria.nfe.schema_4.enviNFe.*` | `br.com.swconsultoria.nfe.schemas.*` | | `br.com.swconsultoria.nfe.schema_4.consReciNFe.*` | `br.com.swconsultoria.nfe.schemas.*` | @@ -39,7 +39,7 @@ A v4.1.1 consolidou ~48 sub-packages JAXB em **2 packages**: Como todos os eventos agora vivem no mesmo package, os nomes genéricos colideriam. As classes foram renomeadas por evento: -| Classe v4.00.* | Classe v4.1.1 | Evento | +| Classe v4.00.* | Classe v4.1.* | Evento | |---------------------------------|--------------------------------------------------|---| | `TEnvEventoCancNFe` | `TEnvEventoCancelamento` | Cancelamento | | `TRetEnvEventoCancNFe` | `TRetEnvEventoCancelamento` | Cancelamento | @@ -70,7 +70,7 @@ Como todos os eventos agora vivem no mesmo package, os nomes genéricos colideri ## Outras classes que mudaram de nome -| Antes (v4.00.*) | Depois (v4.1.1) | Motivo | +| Antes (v4.00.*) | Depois (v4.1.*) | Motivo | |----------------------------------------------------------|-------------------------------------------------------|--------| | `br.com.swconsultoria.nfe.schema.resevento.ResEvento` | `br.com.swconsultoria.nfe.schemas_eventos.ResumoEvento` | Nome da classe foi normalizado | | `br.com.swconsultoria.nfe.schema_4.consSitNFe.TProcEvento` | `br.com.swconsultoria.nfe.schemas.TProcEventoConsSitNFe` | Conflito com `TProcEvento*` de `schemas_eventos` | @@ -127,8 +127,8 @@ bash scripts/migrate.sh src/test/java ## ⚠️ Breaking change de API -| API | Antes (v4.00.*) | Depois (v4.1.1) | O que fazer | -|---|---|---|---| +| API | Antes (v4.00.51) | Depois (v4.1.*) | O que fazer | +|---|----------------------------------|---|---| | `TProtNFe.InfProt.getDhRecbto()` | retornava `XMLGregorianCalendar` | retorna **`String`** (ISO 8601 com offset, ex. `"2024-01-15T10:30:00-03:00"`) | Atualize o caller. Para converter para `LocalDateTime`: `OffsetDateTime.parse(value).atZoneSameInstant(ZoneId.systemDefault()).toLocalDateTime()` | > Outras assinaturas podem ter mudado em casos isolados. Após `mvn test-compile`, qualquer "incompatible types" indica diferença de assinatura. diff --git a/README.md b/README.md index d5c9ca5f..bf3c233c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Java-NFe [![MIT License](https://img.shields.io/github/license/Samuel-Oliveira/Java_NFe.svg) ](https://github.com/Samuel-Oliveira/Java_NFe/blob/master/LICENSE) [![Maven Central](https://img.shields.io/maven-central/v/br.com.swconsultoria/java-nfe.svg?label=Maven%20Central)](https://search.maven.org/artifact/br.com.swconsultoria/java-nfe/4.1.1/jar) [![Coverage Status](https://coveralls.io/repos/github/Samuel-Oliveira/Java_NFe/badge.svg?branch=master)](https://coveralls.io/github/Samuel-Oliveira/Java_NFe?branch=master) +# Java-NFe [![MIT License](https://img.shields.io/github/license/Samuel-Oliveira/Java_NFe.svg) ](https://github.com/Samuel-Oliveira/Java_NFe/blob/master/LICENSE) [![Maven Central](https://img.shields.io/maven-central/v/br.com.swconsultoria/java-nfe.svg?label=Maven%20Central)](https://search.maven.org/artifact/br.com.swconsultoria/java-nfe/4.3.1/jar) [![Coverage Status](https://coveralls.io/repos/github/Samuel-Oliveira/Java_NFe/badge.svg?branch=master)](https://coveralls.io/github/Samuel-Oliveira/Java_NFe?branch=master) Biblioteca Java para consumo do WebService de NFe/NFCe ### Powered by @@ -22,7 +22,7 @@ Para Iniciar : br.com.swconsultoria java-nfe - 4.1.1 + 4.3.1 ``` @@ -34,7 +34,7 @@ repositories { } } dependencies { - implementation "br.com.swconsultoria:java-nfe:4.1.1" + implementation "br.com.swconsultoria:java-nfe:4.3.1" } ``` @@ -42,9 +42,9 @@ Veja a Wiki https://github.com/Samuel-Oliveira/Java_NFe/wiki, para ter um Tutori ________________________________________________________________________________________________ -## ⚠️ Atualizando de v4.00.x para v4.1.1? +## ⚠️ Atualizando de v4.00.x para v4.1.*? -A v4.1.1 **consolidou ~48 sub-packages JAXB em apenas 2** (`schemas` e `schemas_eventos`) +A v4.1.* **consolidou ~48 sub-packages JAXB em apenas 2** (`schemas` e `schemas_eventos`) e renomeou várias classes de evento para evitar colisões. Imports antigos como `schema_4.enviNFe.*`, `schema.envEventoCancNFe.*`, `schema.evento112110.DetEvento` **não compilam mais**. @@ -58,6 +58,29 @@ ________________________________________________________________________________ # Historico de Versões +## v4.3.1 - Schemas PL 010h +- Schemas atualizados para o PL 010h v1.03, com a NT 2026.005 (Simples Nacional): campos tpRegimeIBSCBS e cAtivSN, grupo gTribSN e evento 412140 +- Jackson passa a ser declarado no pom (quem usava a lib sem o Jasper tomava NoClassDefFoundError no IbsCbsUtil) +- Exemplo novo EnvioNfceIbsCbsProducaoTeste, para medir se a producao da UF ja aceita o layout monofasico reformulado + +## v4.3.0 - Schemas PL 010g +- Adicionado DANFE v2 da NF-e no leiaute da NT 2026.010 (Reforma Tributária: IBS/CBS/IS) com Thymeleaf no lugar do Jasper (Ver manual em [docs/MANUAL-DANFE-V2.md](docs/MANUAL-DANFE-V2.md) e exemplo em: https://github.com/Samuel-Oliveira/Java_NFe/blob/master/src/test/java/br/com/swconsultoria/nfe/impressao/TesteImpressaoDanfeV2.java) +- Atualizado Schemas + +## v4.2.0 - Schemas PL 010f NT 2025.002 v.1.50 e NT 2026.007 v.1.00 +- Alterado Schemas com novo modelo de monofasicos +- Melhorias no IbsCbsUtil +- Atualizado Cacert + +## v4.1.3 - Schemas PL 010e e RTC v1.40 +- Correcao de Base de calculo Cclasstrib icms 70 +- Correcao com reuso de cclasstrib +- Correcao proc Eventos sem signature + +## v4.1.2 - Schemas PL 010e e RTC v1.40 +- Atualizado Schemas PL 010e e RTC v1.40 +- Atualizado Cacert + ## v4.1.1 - Schemas PL.010d - **Consolidação de packages JAXB**: `~48 sub-packages → schemas + schemas_eventos` - Adicionado processamento de eventos individuais da Reforma Tributária (`DetEvento110001`, `DetEvento112110-150`, `DetEvento211110-150` etc.) gerados como classes top-level com `@XmlRootElement` diff --git a/docs/MANUAL-DANFE-V2.md b/docs/MANUAL-DANFE-V2.md new file mode 100644 index 00000000..abe75bc5 --- /dev/null +++ b/docs/MANUAL-DANFE-V2.md @@ -0,0 +1,470 @@ +# Manual de integração — DANFE v2 (java-nfe 4.3.*) + +Guia para implementar o novo DANFE da NF-e (modelo 55) num sistema que usa a biblioteca `java-nfe`. +O DANFE v2 segue a **NT 2026.010 — DANFE Reforma Tributária (IBS/CBS/IS)**, que entra em produção em **01/12/2026**. + +> Leia o documento inteiro antes de começar. A seção 9 traz um checklist de implementação e a seção 10 os testes de aceitação. + +--- + +## 1. O que mudou em relação à v1 + +| | v1 (atual) | v2 (nova) | +|---|---|---| +| Motor | JasperReports (`.jrxml`/`.jasper`) | Thymeleaf (HTML/CSS) → PDF via openhtmltopdf | +| Documentos | NF-e, NFC-e, CC-e | **Somente NF-e modelo 55** | +| Leiaute NF-e | Antigo (sem IBS/CBS/IS) | NT 2026.010: retrato e paisagem | +| Fonte de dados | XML | XML (sempre; não existe montagem manual de objeto) | +| Pacote | `br.com.swconsultoria.nfe.impressao` | `br.com.swconsultoria.nfe.impressao.v2` | +| Classes | `ImpressaoNfeUtil` + `ImpressaoDTO` | `ImpressaoDanfeV2Util` + `ImpressaoDanfeV2DTO` | +| Exceções | Checked (`JRException`, `IOException`...) | `DanfeException` (RuntimeException) | + +As duas versões **convivem no mesmo jar**. NFC-e e CC-e continuam usando a API v1 (Jasper). Só o DANFE da NF-e deve migrar para a v2. Todo o resto do `java-nfe` (envio, consultas, eventos, `IbsCbsUtil`...) é o mesmo da `4.2.0`. + +--- + +## 2. Dependência + +A v2 entra na versão `4.3.*`. Enquanto ela não estiver publicada no Maven Central (a última publicada é a `4.2.0`, que **não** tem a v2), gere-a a partir do código-fonte e instale no repositório Maven local, como descrito em "Gerar a versão local" abaixo. + +**Maven** +```xml + + br.com.swconsultoria + java-nfe + 4.3.0 + +``` + +**Gradle** (o `mavenLocal()` é necessário enquanto a versão vier do repositório local) +```groovy +repositories { mavenLocal(); mavenCentral() } +dependencies { implementation "br.com.swconsultoria:java-nfe:4.3.0" } +``` + +**Gerar a versão local** (a partir do checkout deste repositório): +```bash +mvn clean install -Dgpg.skip +``` +Isso instala `java-nfe-4.3.0.jar`, `-sources.jar`, `-javadoc.jar` e o `.pom` no repositório Maven local. O jar é "fino" (as dependências normais do `java-nfe`, como `java-certificado`, vêm por transitividade pelo `.pom`). `-Dgpg.skip` pula a assinatura GPG da fase `verify`. Os testes (mais de 2.200, incluindo os da v2) rodam no build; `-DskipTests` pula. Para um jar com todas as dependências (projetos sem Maven/Gradle) acrescente `-Passembly`: ele **substitui** o jar fino no `target/` e no repositório local, e mesmo assim **não** inclui as bibliotecas `provided` da seção 2.1, que precisam ir para o classpath à parte. + +### 2.1 Dependências que o projeto consumidor precisa declarar + +Como já acontece com o Jasper do DANFE v1, as bibliotecas de impressão são `provided` no `java-nfe`: **não vêm por transitividade**. Para a v2 declare no projeto consumidor: + +```xml + + org.thymeleaf + thymeleaf + 3.1.2.RELEASE + + + com.openhtmltopdf + openhtmltopdf-pdfbox + 1.0.10 + + + + net.sourceforge.barbecue + barbecue + 1.5-beta1 + + + com.google.zxing + core + 3.2.1 + + + com.google.zxing + javase + 3.2.1 + +``` + +No Gradle são as mesmas coordenadas com `implementation`. Se o DANFE v1 (Jasper) continuar em uso no mesmo sistema, mantenha também `jasperreports` e `jasperreports-fonts`. + +### 2.2 Requisitos e conflitos possíveis + +- **Java 8 ou superior**. A biblioteca é compilada para 1.8. +- Dependências transitivas das bibliotecas acima: + + | Biblioteca | Versão | + |---|---| + | `ognl` | 3.3.4 | + | `attoparser` | 2.0.7 | + | `unbescape` | 1.1.6 | + | `slf4j-api` | 2.0.7 | + | `org.apache.pdfbox:pdfbox` / `fontbox` / `xmpbox` | 2.0.24 | + +- Verifique conflitos no projeto consumidor: + - **Spring Boot 2.x** traz Thymeleaf 3.0.x. A v2 precisa da 3.1.x. Force `thymeleaf` 3.1.2 no `dependencyManagement` ou exclua a versão antiga. Spring Boot 3.x já usa a 3.1. + - **PDFBox 3.x** no projeto é incompatível com o openhtmltopdf 1.0.10, que precisa da 2.0.x. +- Se o projeto não tiver uma implementação de SLF4J, aparece o aviso `SLF4J: No SLF4J providers were found`. É inofensivo. +- **Log do openhtmltopdf:** a cada PDF ele registra várias linhas INFO pelo `java.util.logging`. A biblioteca **não altera** essa configuração, que pertence à aplicação. Para silenciar, na inicialização do sistema: + ```java + for (String logger : com.openhtmltopdf.util.XRLog.listRegisteredLoggers()) { + com.openhtmltopdf.util.XRLog.setLevel(logger, java.util.logging.Level.WARNING); + } + // ou, para desligar de vez: XRLog.setLoggingEnabled(false); + ``` +- **Thread-safety:** `ImpressaoDanfeV2Util` é stateless e pode ser chamado em paralelo. Crie um `ImpressaoDanfeV2DTO` por impressão. + +### 2.3 Teste rápido da dependência + +Antes de mexer no sistema, confirme que a versão local e as dependências `provided` estão corretas com uma classe descartável: + +```java +import br.com.swconsultoria.nfe.impressao.v2.ImpressaoDanfeV2DTO; +import br.com.swconsultoria.nfe.impressao.v2.ImpressaoDanfeV2Util; +import br.com.swconsultoria.nfe.util.XmlNfeUtil; + +public class TesteDanfeV2 { + public static void main(String[] args) throws Exception { + // DanfeV2Rtc.xml fica em src/test/resources deste repositório + String xml = XmlNfeUtil.leXml("caminho/para/DanfeV2Rtc.xml"); + ImpressaoDanfeV2DTO impressao = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml); + ImpressaoDanfeV2Util.impressaoPdfArquivo(impressao, "danfe-v2.pdf"); + } +} +``` + +Esperado: um PDF de 1 folha em retrato, com a marca "SEM VALOR FISCAL", o quadro "TOTAL DO IBS / CBS / IS" e o QR Code. Um `NoClassDefFoundError` aqui é dependência `provided` faltando (seção 11). + +--- + +## 3. Uso básico + +```java +import br.com.swconsultoria.nfe.impressao.v2.ImpressaoDanfeV2DTO; +import br.com.swconsultoria.nfe.impressao.v2.ImpressaoDanfeV2Util; + +String xml = /* XML autorizado (nfeProc) como String */; + +ImpressaoDanfeV2DTO impressao = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml); // logo padrão, orientação pelo tpImp, com canhoto + +byte[] pdf = ImpressaoDanfeV2Util.impressaoPdfByte(impressao); // PDF em memória +ImpressaoDanfeV2Util.impressaoPdfArquivo(impressao, "danfe.pdf"); // PDF em arquivo +ImpressaoDanfeV2Util.impressaoHtml(impressao, "danfe.html"); // HTML em arquivo +String html = ImpressaoDanfeV2Util.gerarHtml(impressao); // HTML em String +ImpressaoDanfeV2Util.impressaoDireta(impressao); // impressora padrão +ImpressaoDanfeV2Util.impressaoDireta(impressao, printService); // impressora específica (javax.print.PrintService) +``` + +**XML aceito:** `nfeProc` (com `protNFe`) ou `NFe` sem protocolo. Neste caso a chave vem do `infNFe/@Id` e o protocolo sai em branco. O XML deve vir como String já decodificada (`XmlNfeUtil.leXml` serve; o BOM de arquivos UTF-8 é descartado). Se você lê arquivos de outro jeito, use o charset correto (normalmente UTF-8). + +**Erros:** tudo lança `br.com.swconsultoria.nfe.exception.DanfeException` (a mesma da v1): +- XML vazio ou malformado; +- XML sem `infNFe`; +- template próprio inexistente ou inválido; +- falha ao gravar o arquivo; +- impressora não encontrada. + +--- + +## 4. Migração v1 → v2 (somente NF-e) + +| v1 | v2 | +|---|---| +| `ImpressaoNfeUtil.impressaoPadraoNFe(xml)` | `ImpressaoDanfeV2Util.impressaoPadraoNFe(xml)` | +| `ImpressaoNfeUtil.impressaoPdfArquivo(impressao, destino)` | `ImpressaoDanfeV2Util.impressaoPdfArquivo(impressao, destino)` | +| `ImpressaoNfeUtil.impressaoPdfByte(impressao)` | `ImpressaoDanfeV2Util.impressaoPdfByte(impressao)` | +| `ImpressaoNfeUtil.impressaoHtml(impressao, destino)` | `ImpressaoDanfeV2Util.impressaoHtml(impressao, destino)` | +| `ImpressaoNfeUtil.impressaoDireta(impressao[, impressora])` | `ImpressaoDanfeV2Util.impressaoDireta(impressao[, impressora])` | +| `ImpressaoNfeUtil.impressaoDireta(impressao, impressora, SimplePrintServiceExporterConfiguration)` | Não existe. Para controlar cópias e bandeja, gere o PDF (`impressaoPdfByte`) e imprima com PDFBox/`PrinterJob` no seu código | +| `ImpressaoNfeUtil.impressaoPreview(impressao)` (`JasperViewer`) | **Não existe.** Gere o PDF e abra num visualizador (`Desktop.getDesktop().open(arquivo)`, componente PDF da aplicação, navegador) | +| `impressao.getParametros().put("Logo", inputStream)` | `impressao.setLogo(inputStream)` | +| `impressao.setJasper(meuJasperReport)` | `impressao.setTemplate("caminho/meu-danfe.html")` | +| `throws JRException, IOException, ...` | `DanfeException` (unchecked) | + +Recomendação: deixe a escolha entre v1 e v2 configurável (feature flag) durante a transição, para poder voltar ao leiaute antigo se aparecer algum problema em produção. + +--- + +## 5. Personalização + +```java +ImpressaoDanfeV2DTO impressao = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml); + +// Logo (PNG, JPEG, GIF ou BMP). SVG não é suportado. +impressao.setLogo(inputStream); // lê e FECHA o stream +impressao.setLogo(bytes); +impressao.setLogoArquivo("c:/logos/empresa.png"); +impressao.removerLogo(); // sem logo (setLogo(null) não compila: há duas sobrecargas) + +// Orientação: AUTOMATICA (padrão, usa ide/tpImp: 2 = paisagem), RETRATO ou PAISAGEM +impressao.setOrientacao(OrientacaoDanfeEnum.PAISAGEM); + +// Canhoto (NT 2026.010 permite suprimir quando o emitente não usa) +impressao.setExibirCanhoto(false); + +// Parâmetros livres, disponíveis no template como ${parametros.nome} +impressao.getParametros().put(ImpressaoDanfeV2Util.PARAM_TIPO_REGIME_APURACAO, "..."); // usado pelo template padrão (ver 7.3) + +// Template próprio (arquivo .html Thymeleaf) +impressao.setTemplate("c:/templates/meu-danfe.html"); +``` + +> **Caminhos são configuração do servidor, nunca entrada do usuário final.** `setTemplate` e `setLogoArquivo` abrem o arquivo informado onde ele estiver (o template é procurado primeiro como caminho no sistema de arquivos e só depois no classpath), do mesmo modo que o `setJasper` da v1. Um caminho vindo de um campo de tela ou de uma requisição permitiria ler ou executar como template qualquer arquivo que a aplicação enxergue. + +### 5.1 Template próprio + +Use quando o leiaute padrão não atender, por exemplo para um bloco extra ou uma marca do cliente. O ponto de partida recomendado é copiar o template padrão, que está dentro do jar em `danfe/v2/danfe.html`, e alterá-lo. O código-fonte fica em `src/main/resources/danfe/v2/`. + +**Variáveis disponíveis no template:** + +| Variável | Tipo | Uso | +|---|---|---| +| `danfe` | `DanfeV2DTO` | Dados da nota (ver seção 6) | +| `fmt` | `FormatadorDanfeV2` | Formatação: `${fmt.valor(danfe.icmsTot.vNF)}` | +| `xml` | `XmlDanfeV2` | Qualquer campo do XML via XPath: `${xml.valor('//infNFe/ide/tpEmis')}` | +| `logo` | String (data URI) ou null | `` | +| `codigoBarras` | String (data URI) | Code-128C da chave (barbecue, o mesmo do `danfe.jrxml`) | +| `qrCode` | String (data URI) ou null | QR Code do `infNFeSupl/qrCode` (zxing) | +| `paisagem` | boolean | Orientação resolvida | +| `exibirCanhoto` | boolean | | +| `parametros` | `Map` | Valores livres de `getParametros()` | + +**Fragmentos reaproveitáveis** (arquivo `fragmentos.html` do jar). Um template próprio pode referenciá-los, porque os nomes que não existem como arquivo são buscados no classpath: +```html + +
+
+``` + +**Métodos de `fmt`:** +- valores: `valor`, `quantidade`, `valorUnitario` (2 a 10 casas, sem arredondar o XML), `aliquota` (já com `%`), `adRem` (R$ por unidade, 4 casas), `peso`; +- documentos e contato: `documento` (CNPJ/CPF), `cep`, `fone`, `chave` (grupos de 4); +- numeração: `numeroNota` (000.000.000), `serie` (000); +- datas: `data`, `hora`, `dataHora` (a partir de ISO), `competencia` (aaaa-mm para mm/aaaa); +- códigos: `modFrete`, `crt`, `cst(orig, cst)`; +- textos: `endereco(grupo)`, `primeiro(a, b)`, `complementoIbsCbs(item)` (retenção, retido, diferença e competência do IBS/CBS numa linha). + +Todos aceitam null e devolvem `""`. Os números arredondam HALF_UP. Ao concatenar valores do XML com `+`, passe-os por `fmt.primeiro(valor, '')` ou por outro método do `fmt`: o OGNL imprime `null` como texto quando a tag não existe. + +### 5.2 Regras obrigatórias para templates (openhtmltopdf + Thymeleaf) + +1. **O HTML precisa ser XHTML bem formado:** + - tags fechadas: `
`, ``, ``; + - atributos entre aspas; + - sem ` ` (use ` `). +2. **Use CSS 2.1 + paged media.** + - Não há flexbox nem grid. Faça o layout com `` e `table-layout: fixed`. + - Funcionam: `@page { size: A4 landscape; }`, `counter(page)`, `counter(pages)`, `position: running(...)`, `transform: rotate()` e `position: fixed`, que repete o elemento em todas as folhas. +3. **Não use `+` para juntar códigos numéricos.** O Thymeleaf soma strings que parecem números: `'0' + '00'` resulta em `0`. Use um método do `fmt` (como `fmt.cst`) ou literal com texto (`'Nº ' + ...`). +4. **Para repetir o `` dos itens em cada folha:** + - a tabela precisa de `-fs-table-paginate: paginate;` e `border-collapse: separate;`; + - **não** use `overflow: hidden` em `td`/`th` dessa tabela. +5. **`th:if` junto com `th:replace` no mesmo elemento não funciona:** o `th:replace` roda primeiro. Envolva com ``. +6. **Fontes:** só as padrão do PDF (Helvetica). Acentos funcionam. +7. **Nada pode passar da área da página.** Um elemento posicionado que ultrapassa a altura da folha gera uma folha em branco. +8. **O quadro do emitente tem altura fixa** (`.emitente-caixa`, 25 mm): o cabeçalho repetido nas folhas 2+ vive na margem superior fixa de 43 mm e não pode crescer com o texto. Nome com mais de 40 caracteres sai em fonte menor; o excedente é cortado. +9. **Na paisagem, a faixa de 25 mm do canhoto só existe com `exibirCanhoto`** (está num ` + + + + + +
SEM VALOR FISCAL
+ + +
+ +
+ +
+ +
+ +
+ + +
DESTINATÁRIO / REMETENTE
+
+
+ + + +
+ + + + + +
+ + + + + + +
+ + + + +
FATURA / DUPLICATAS
+
+ + + + + + +
+
+
+ + +
TOTAL DOS PRODUTOS E TOTAL DA NOTA
+
+ + + + + + +
+ + +
+
+ + +
TOTAL DO ICMS / IPI
+
+ + + + + + +
+ + + + + +
+ + + + + +
+
+ + + +
TOTAL DO IBS / CBS / IS
+
+ + + + + + +
+ + + + + +
+ + + +
+
+
+ + + +
CÁLCULO DO ISSQN
+
+ + + + + +
+
+
+ + + +
TRANSPORTADOR / VOLUMES TRANSPORTADOS
+
+ + + + + + + +
+ + + + + +
+ + + + + + + +
+
+
+ + +
DADOS DOS PRODUTOS / SERVIÇOS
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
DESCRIÇÃO DO PRODUTO / SERVIÇOCST / CFOPQTD / UNVLR UNITVLR TOTALBASES DE CÁLCULOALÍQUOTASVALOR DOS TRIBUTOS
+
Produto
+
informações adicionais
+ + +
complemento IBS/CBS
+
+
[NCM]
+
+
000
+
IBS/CBS 000
+
5102
+
+
1,00
+
[UN]
+
0,000,00 + + + + + +
ICMS
IBS/CBS
IS
IPI
+
+ + + + +
ICMSCBS
IBS UFIPI
IBS MUNIS
+
+ + + + +
ICMSCBS
IBS UFIPI
IBS MUNIS
+
+ + +
+
+
DADOS ADICIONAIS
+
+ + + + +
+
INFORMAÇÕES COMPLEMENTARES
+
informações complementares
+
+
RESERVADO AO FISCO
+
reservado ao fisco
+
+
QR CODE
+ QR Code +
+
+
+ + + + diff --git a/src/main/resources/danfe/v2/fragmentos.html b/src/main/resources/danfe/v2/fragmentos.html new file mode 100644 index 00000000..f62ab8c3 --- /dev/null +++ b/src/main/resources/danfe/v2/fragmentos.html @@ -0,0 +1,125 @@ + + + + + + + + +
+
RÓTULO
+
valor
+
+ + +
+ + + + + + +
+ +
+ +
+
EMPRESA
+
Rua, 100 - Bairro
+
Cidade/UF - CEP
+
Fone
+
+
+
+
DANFE
+
DOCUMENTO AUXILIAR DA NOTA FISCAL ELETRÔNICA
+ + + +
0 - ENTRADA
1 - SAÍDA
1
+
Nº 000.000.001
+
SÉRIE 001
+
FOLHA /
+
+
código de barras
+
+
CHAVE DE ACESSO
+
0000 0000
+
+
Consulte a autenticidade no portal nacional da NF-e www.nfe.fazenda.gov.br/portal ou no site da SEFAZ autorizadora
+
+ + + + + +
+
PROTOCOLO DE AUTORIZAÇÃO DE USO
+
000 - 00/00/0000
+
+ + + + + + +
+
CNPJ / CPF
+
00.000.000/0000-00
+
+ + + + + + +
+
+ + +
+ + + + + + + + + +
+
RECEBEMOS DE
+
+
NF-e
+
Nº
+
SÉRIE
+
+
+ + + + + + + + + +
+
NF-e
+
Nº
+
SÉRIE
+
+
RECEBEMOS DE
+
+
+
+ + + diff --git a/src/main/resources/jasper/nfce/danfce.jasper b/src/main/resources/jasper/nfce/danfce.jasper index 9baa8b0d..5c9835b7 100644 Binary files a/src/main/resources/jasper/nfce/danfce.jasper and b/src/main/resources/jasper/nfce/danfce.jasper differ diff --git a/src/main/resources/jasper/nfce/danfce.jrxml b/src/main/resources/jasper/nfce/danfce.jrxml index 1d0ff67a..332a7597 100644 --- a/src/main/resources/jasper/nfce/danfce.jrxml +++ b/src/main/resources/jasper/nfce/danfce.jrxml @@ -223,6 +223,9 @@ + + + @@ -300,18 +303,7 @@ - - - - - - - - - - - - + @@ -329,40 +321,132 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + - + + + + + + + + + + + + + + - + + - + - - - + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -460,62 +544,15 @@ $F{tPag}.equals("21")?" Crédito Loja": - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -524,7 +561,7 @@ $F{tPag}.equals("21")?" Crédito Loja": - + @@ -533,7 +570,7 @@ $F{tPag}.equals("21")?" Crédito Loja": - + diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/CancelarTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/CancelarTeste.java index 5d95555a..64e01cd2 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/CancelarTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/CancelarTeste.java @@ -27,19 +27,20 @@ public static void main(String[] args) { try { // Inicia As Configurações - ConfiguracoesNfe config = ConfiguracaoTeste.iniciaConfiguracoes(EstadosEnum.GO, AmbienteEnum.HOMOLOGACAO); + ConfiguracoesNfe config = ConfiguracaoTeste.iniciaConfiguracoes(EstadosEnum.GO, + AmbienteEnum.valueOf(System.getProperty("ambiente", "HOMOLOGACAO"))); //Agora o evento pode aceitar uma lista de cancelaemntos para envio em Lote. //Para isso Foi criado o Objeto Cancela Evento cancela = new Evento(); //Informe a chave da Nota a ser Cancelada - cancela.setChave("52260610732644000128550010000927581162933910"); + cancela.setChave(System.getProperty("chave", "52260610732644000128550010000927581162933910")); //Informe o protocolo da Nota a ser Cancelada - cancela.setProtocolo("152260027418507"); + cancela.setProtocolo(System.getProperty("protocolo", "152260027418507")); //Informe o CNPJ do emitente cancela.setCnpj("10732644000128"); //Informe o Motivo do Cancelamento - cancela.setMotivo("Teste de Cancelamento"); + cancela.setMotivo(System.getProperty("motivo", "Teste de Cancelamento")); //Informe a data do Cancelamento cancela.setDataEvento(LocalDateTime.now()); diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/CartaCorrecaoTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/CartaCorrecaoTeste.java index f523c351..36e21320 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/CartaCorrecaoTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/CartaCorrecaoTeste.java @@ -32,7 +32,7 @@ public static void main(String[] args) { //Para isso Foi criado o Objeto Cancela Evento cce = new Evento(); //Informe a chave da Nota a ser feita a CArta de Correção - cce.setChave("52250810732644000128550010000927501960446967"); + cce.setChave(System.getProperty("chave", "52250810732644000128550010000927501960446967")); //Informe o CNPJ do emitente cce.setCnpj("10732644000128"); //Informe o Texto da Carta de Correção @@ -40,7 +40,7 @@ public static void main(String[] args) { //Informe a data da Carta de Correção cce.setDataEvento(LocalDateTime.now()); //Informe a sequencia do Evento - cce.setSequencia(1); + cce.setSequencia(Integer.parseInt(System.getProperty("cceSequencia", "1"))); // Monta o Evento TEnvEventoCartaCorrecao envEvento = CartaCorrecaoUtil.montaCCe(cce,config); diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/ConfiguracaoTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/ConfiguracaoTeste.java index d7308a6a..04816b03 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/ConfiguracaoTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/ConfiguracaoTeste.java @@ -27,7 +27,11 @@ public static ConfiguracoesNfe iniciaConfiguracoes(EstadosEnum estado, AmbienteE Logger.getLogger("").setLevel(Level.WARNING); } - Certificado certificado = CertificadoService.certificadoPfx("d:/teste/certificado.pfx", "123456"); + // Caminho e senha podem vir por -Dcertificado e -DsenhaCertificado, para + // rodar os exemplos sem editar o fonte. Os valores abaixo sao o padrao. + Certificado certificado = CertificadoService.certificadoPfx( + System.getProperty("certificado", "d:/teste/certificado.pfx"), + System.getProperty("senhaCertificado", "123456")); return ConfiguracoesNfe.criarConfiguracoes(estado, ambiente, certificado, "./schemas"); } diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/ConsultaCadastroTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/ConsultaCadastroTeste.java index 30f052fe..dcc2b5ed 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/ConsultaCadastroTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/ConsultaCadastroTeste.java @@ -23,7 +23,7 @@ public static void main(String[] args) { try { //Envia a Consulta - TRetConsCad retorno = Nfe.consultaCadastro(config, PessoaEnum.JURIDICA, "30081357000617", EstadosEnum.GO); + TRetConsCad retorno = Nfe.consultaCadastro(config, PessoaEnum.JURIDICA, System.getProperty("cnpjConsulta", "10732644000128"), EstadosEnum.GO); //Valida o Retorno da Consulta Cadastro RetornoUtil.validaConsultaCadastro(retorno); diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/ConsultaXmlCancelamentoTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/ConsultaXmlCancelamentoTeste.java index b1d9447b..517595c5 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/ConsultaXmlCancelamentoTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/ConsultaXmlCancelamentoTeste.java @@ -29,7 +29,7 @@ public static void main(String[] args) { ConfiguracoesNfe config = ConfiguracaoTeste.iniciaConfiguracoes(EstadosEnum.GO, AmbienteEnum.HOMOLOGACAO); //Informe a chave a ser Consultada - String chave = "52240610732644000128550010000927431392573498"; + String chave = System.getProperty("chave", "52240610732644000128550010000927431392573498"); //Efetua a consulta TRetConsSitNFe retorno = Nfe.consultaXml(config, chave, DocumentoEnum.NFE); @@ -62,8 +62,8 @@ public static void main(String[] args) { retCance.setInfEvento(infEvento); Evento cancela = new Evento(); - cancela.setChave("52240610732644000128550010000927431392573498"); - cancela.setProtocolo("152230024577165"); + cancela.setChave(System.getProperty("chave", "52240610732644000128550010000927431392573498")); + cancela.setProtocolo(System.getProperty("protocolo", "152230024577165")); cancela.setCnpj("10732644000128"); cancela.setMotivo("Teste de Cancelamento"); cancela.setDataEvento(LocalDateTime.of(2024,6,13,15,4,50)); diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/ConsultaXmlTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/ConsultaXmlTeste.java index a7b75e0b..d1a24ad3 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/ConsultaXmlTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/ConsultaXmlTeste.java @@ -22,7 +22,7 @@ public static void main(String[] args) { ConfiguracoesNfe config = ConfiguracaoTeste.iniciaConfiguracoes(EstadosEnum.GO, AmbienteEnum.HOMOLOGACAO); //Informe a chave a ser Consultada - String chave = "52260610732644000128550010000927561865874165"; + String chave = System.getProperty("chave", "52260610732644000128550010000927561865874165"); //Efetua a consulta TRetConsSitNFe retorno = Nfe.consultaXml(config, chave, DocumentoEnum.NFE); diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceCombustivelTest.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceCombustivelTest.java new file mode 100644 index 00000000..43d4ce03 --- /dev/null +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceCombustivelTest.java @@ -0,0 +1,106 @@ +package br.com.swconsultoria.nfe.exemplos; + +import br.com.swconsultoria.certificado.Certificado; +import br.com.swconsultoria.certificado.CertificadoService; +import br.com.swconsultoria.nfe.Validar; +import br.com.swconsultoria.nfe.dom.ConfiguracoesNfe; +import br.com.swconsultoria.nfe.dom.enuns.AmbienteEnum; +import br.com.swconsultoria.nfe.dom.enuns.EstadosEnum; +import br.com.swconsultoria.nfe.dom.enuns.ServicosEnum; +import br.com.swconsultoria.nfe.schemas.TEnviNFe; +import br.com.swconsultoria.nfe.util.XmlNfeUtil; +import org.junit.jupiter.api.Test; + +import java.net.URI; +import java.nio.file.Paths; +import java.util.Objects; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Valida a NFCe de combustiveis montada por {@link EnvioNfceTeste} sem enviar para a + * SEFAZ: confere a estrutura dos grupos monofasicos de IBS/CBS e roda o XML completo + * contra o XSD, que e o mesmo arquivo que a SEFAZ usa para rejeitar na recepcao. + */ +class EnvioNfceCombustivelTest { + + /** CNPJ do NAO_UTILIZE.pfx; a assinatura exige que bata com o emitente. */ + private static final String CNPJ_CERTIFICADO = "99999999999999"; + + /** Data fixa: o dhEmi e o ano da monofasia precisam casar, e nao podem seguir o relogio. */ + private static final java.time.LocalDateTime DATA_EMISSAO = + java.time.LocalDateTime.of(2026, 6, 15, 10, 0); + + @Test + void deveMontarNfceDeCombustivelValidaContraOSchema() throws Exception { + String xml = XmlNfeUtil.objectToXml(EnvioNfceTeste.montaEnviNFe(configuracoes(), CNPJ_CERTIFICADO, DATA_EMISSAO)); + + String xsd = Paths.get("schemas", ServicosEnum.ENVIO.getXsd()).toString(); + assertTrue(new Validar().isValidXml(xsd, xml), + "A NFCe de combustivel deve validar contra o XSD de envio"); + } + + @Test + void deveEmitirGrupoMonofasicoRetidoParaOsTresCombustiveis() throws Exception { + TEnviNFe enviNFe = EnvioNfceTeste.montaEnviNFe(configuracoes(), CNPJ_CERTIFICADO, DATA_EMISSAO); + String xml = XmlNfeUtil.objectToXml(enviNFe); + + assertEquals(3, enviNFe.getNFe().get(0).getInfNFe().getDet().size(), + "a nota deve ter gasolina, etanol e diesel"); + assertEquals(3, contar(xml, ""), "cada item deve ter o grupo monofasico"); + // Em 2026 os dois eixos sao ad valorem (NT 2025.002-RTC, UB85a-10 e UB95a-10). + // Informar ad rem neste ano e rejeitado com cStat 1219 (IBS) ou 1245 (CBS), + // confirmado em homologacao da SEFAZ-GO. A partir de 2027 a CBS passa a ad rem. + assertEquals(3, contar(xml, ""), "em 2026 o IBS e ad valorem"); + assertEquals(3, contar(xml, ""), "em 2026 a CBS e ad valorem"); + assertEquals(0, contar(xml, ""), "ad rem do IBS so a partir de 2029"); + assertEquals(0, contar(xml, ""), "ad rem da CBS so a partir de 2027"); + + // cClassTrib 620006 e monofasia retida anteriormente: so sai o gMonoRet + assertEquals(0, contar(xml, ""), "620006 nao tem monofasia padrao"); + assertEquals(0, contar(xml, ""), "620006 nao e sujeito a retencao"); + + assertTrue(xml.contains("320102001"), "gasolina comum"); + assertTrue(xml.contains("810101001"), "etanol comum"); + assertTrue(xml.contains("820101012"), "oleo diesel"); + } + + @Test + void naoDeveInformarValorNoRetidoAnteriormentePorqueASefazCalcula() throws Exception { + TEnviNFe enviNFe = EnvioNfceTeste.montaEnviNFe(configuracoes(), CNPJ_CERTIFICADO, DATA_EMISSAO); + String xml = XmlNfeUtil.objectToXml(enviNFe); + + assertTrue(xml.contains(""), "os totais de IBS/CBS devem estar presentes"); + + // Na monofasia retida anteriormente a SEFAZ calcula o valor e rejeita (cStat 1240) + // quando o informado diverge. Com o grupo zerado a nota e autorizada. + assertEquals(3, contar(xml, "0.00"), "IBS retido sai zerado"); + assertEquals(3, contar(xml, "0.00"), "CBS retido sai zerado"); + + // Consequencia: como nada acumula valor, o gMono dos totais nao e emitido. + // O XSD permite a ausencia (minOccurs=0) e a SEFAZ autorizou assim. + assertFalse(xml.contains(""), + "sem valor monofasico acumulado, o gMono dos totais nao deve ser emitido"); + } + + private static int contar(String texto, String trecho) { + int n = 0; + int i = texto.indexOf(trecho); + while (i >= 0) { + n++; + i = texto.indexOf(trecho, i + trecho.length()); + } + return n; + } + + /** Usa o certificado de teste do repositorio, nao o certificado local do desenvolvedor. */ + private static ConfiguracoesNfe configuracoes() throws Exception { + URI uri = Objects.requireNonNull(EnvioNfceCombustivelTest.class.getClassLoader() + .getResource("NAO_UTILIZE.pfx")).toURI(); + Certificado certificado = CertificadoService.certificadoPfx(Paths.get(uri).toString(), "123456"); + return ConfiguracoesNfe.criarConfiguracoes( + EstadosEnum.GO, AmbienteEnum.HOMOLOGACAO, certificado, "./schemas"); + } +} diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceContingenciaTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceContingenciaTeste.java index 37583b2b..1929c741 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceContingenciaTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceContingenciaTeste.java @@ -48,7 +48,7 @@ public static void main(String[] args) { LocalDateTime start = LocalDateTime.now(); //Informe o Numero da NFCe - int numeroNFCe = 7812559; + int numeroNFCe = Integer.parseInt(System.getProperty("numeroNFCeContingencia", "7812559")); //Informe o CNPJ do Emitente da NFCe String cnpj = "10732644000128"; //Informe a data de Emissao da NFCe diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceIbsCbsProducaoTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceIbsCbsProducaoTeste.java new file mode 100644 index 00000000..839e2019 --- /dev/null +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceIbsCbsProducaoTeste.java @@ -0,0 +1,209 @@ +package br.com.swconsultoria.nfe.exemplos; + +import br.com.swconsultoria.nfe.Nfe; +import br.com.swconsultoria.nfe.dom.ConfiguracoesNfe; +import br.com.swconsultoria.nfe.dom.enuns.AmbienteEnum; +import br.com.swconsultoria.nfe.dom.enuns.DocumentoEnum; +import br.com.swconsultoria.nfe.dom.enuns.EstadosEnum; +import br.com.swconsultoria.nfe.dom.enuns.ServicosEnum; +import br.com.swconsultoria.nfe.schemas.TEnviNFe; +import br.com.swconsultoria.nfe.schemas.TNFe; +import br.com.swconsultoria.nfe.schemas.TRetEnviNFe; +import br.com.swconsultoria.nfe.util.ChaveUtil; +import br.com.swconsultoria.nfe.util.NFCeUtil; +import br.com.swconsultoria.nfe.util.WebServiceUtil; +import br.com.swconsultoria.nfe.util.XmlNfeUtil; + +import java.time.LocalDateTime; + +/** + * Reproduz a NFC-e de combustivel que o cliente nao conseguiu autorizar, com a + * MESMA estrutura de IBS/CBS, para separar duas hipoteses sobre a rejeicao 225 + * (Falha no Schema XML do lote de NF-e): + * + * a) a producao da SEFAZ ainda roda o layout monofasico ANTIGO (PL 010e) e + * recusa o reformulado (gIBSMonoAdValorem / gCBSMonoAdValorem) do PL 010g; + * b) a estrutura que a lib monta esta errada, e seria recusada em qualquer + * ambiente. + * + * Rode nos dois ambientes e compare: + * -Dambiente=HOMOLOGACAO e -Dambiente=PRODUCAO + * Homologacao aceitando e producao devolvendo 225 confirma (a). As duas + * devolvendo 225 confirma (b). + * + * ATENCAO: com o QR-Code v3 (padrao, ver abaixo) este teste AUTORIZA documento + * fiscal de verdade em producao. Cancele em seguida com o CancelarTeste, + * passando -Dambiente=PRODUCAO, -Dchave e -Dprotocolo. + * + * Resultado medido em 14/11/2026, GO, serie 2, QR-Code v3: + * + * grupo HOMOLOGACAO PRODUCAO + * mono 104 / nota 373 225 (lote, nem chega na nota) + * semgrupo 104 / nota 373 104 / nota 100 AUTORIZADO + * nenhum 104 / nota 373 104 / nota 100 AUTORIZADO + * + * O 373 e regra so de homologacao (xProd do primeiro item tem de ser o literal + * "NOTA FISCAL EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL"). + * + * O QR-Code v3 (NT 2025.001) e so `?p=|3|`, sem CSC nem idToken, + * o que permite testar sem o segredo do contribuinte. Com -Dqrcode=2 a nota + * para em 464 (Codigo de Hash no QR-Code difere do calculado), porque o CSC + * embutido aqui e o de homologacao. + * + * CUIDADO COM A SERIE: GO devolve 999 (Erro nao catalogado) no lote inteiro + * para serie 890, em qualquer ambiente e com qualquer conteudo. Series 1 e 2 + * passam. Nao use serie alta aqui achando que e so para evitar colisao de + * numeracao - use um numero alto e uma serie baixa. + */ +public class EnvioNfceIbsCbsProducaoTeste { + + private static final String CNPJ_EMIT = System.getProperty("cnpjEmit", "10732644000128"); + private static final String IE_EMIT = System.getProperty("ieEmit", "104519304"); + private static final String NOME_EMIT = System.getProperty("nomeEmit", "POSTO PARK XIII LTDA"); + private static final String SERIE = System.getProperty("serie", "890"); + private static final String NUMERO = System.getProperty("numero", "999999"); + private static final String ID_TOKEN = System.getProperty("idToken", "000001"); + private static final String CSC = System.getProperty("csc", "5875f1ced69b589a"); + + public static void main(String[] args) { + try { + AmbienteEnum ambiente = AmbienteEnum.valueOf(System.getProperty("ambiente", "HOMOLOGACAO")); + EstadosEnum estado = EstadosEnum.valueOf(System.getProperty("uf", "GO")); + ConfiguracoesNfe config = ConfiguracaoTeste.iniciaConfiguracoes(estado, ambiente); + + LocalDateTime agora = LocalDateTime.now(); + String cNF = "00000001"; + ChaveUtil chaveUtil = new ChaveUtil(estado, CNPJ_EMIT, DocumentoEnum.NFCE.getModelo(), + Integer.parseInt(SERIE), Integer.parseInt(NUMERO), "1", cNF, agora); + String id = chaveUtil.getChaveNF(); + + String xml = montaXml(id, cNF, XmlNfeUtil.dataNfe(agora, null), ambiente.getCodigo(), estado); + TEnviNFe enviNFe = XmlNfeUtil.xmlToObject(xml, TEnviNFe.class); + + System.out.println("# Ambiente : " + ambiente + " (tpAmb=" + ambiente.getCodigo() + ")"); + System.out.println("# Chave : " + id.substring(3)); + + // Assina e valida contra o schema local antes de sair da maquina. + enviNFe = Nfe.montaNfe(config, enviNFe, true); + System.out.println("# Schema local: OK"); + + // QR-Code v3 (NT 2025.001): so chave, versao e ambiente, sem CSC nem idToken. + // O v2 (getCodeQRCode) esta @Deprecated na lib e exige o hash do CSC. + String urlQr = WebServiceUtil.getUrl(config, DocumentoEnum.NFCE, ServicosEnum.URL_QRCODE); + String qrCode = "2".equals(System.getProperty("qrcode", "3")) + ? NFCeUtil.getCodeQRCode(id.substring(3), ambiente.getCodigo(), ID_TOKEN, CSC, urlQr) + : NFCeUtil.getCodeQRCodeV3(id.substring(3), ambiente.getCodigo(), urlQr); + System.out.println("# QRCode : " + qrCode); + + TNFe.InfNFeSupl supl = new TNFe.InfNFeSupl(); + supl.setQrCode(qrCode); + supl.setUrlChave(WebServiceUtil.getUrl(config, DocumentoEnum.NFCE, ServicosEnum.URL_CONSULTANFCE)); + enviNFe.getNFe().get(0).setInfNFeSupl(supl); + + TRetEnviNFe retorno = Nfe.enviarNfe(config, enviNFe, DocumentoEnum.NFCE); + + System.out.println("# Lote : " + retorno.getCStat() + " - " + retorno.getXMotivo()); + if (retorno.getProtNFe() != null) { + System.out.println("# Nota : " + retorno.getProtNFe().getInfProt().getCStat() + + " - " + retorno.getProtNFe().getInfProt().getXMotivo()); + System.out.println("# Protocolo: " + retorno.getProtNFe().getInfProt().getNProt()); + } + + } catch (Exception e) { + System.err.println("# Erro: " + e.getMessage()); + e.printStackTrace(); + } + } + + /** + * Item unico de R$ 1,00: 0,1495 L a R$ 6,69. O grupo IBSCBS e copia fiel do + * XML que o cliente enviou, inclusive os zeros do gMonoRet. + */ + private static String montaXml(String id, String cNF, String dhEmi, String tpAmb, EstadosEnum estado) { + return "" + + "11" + + "" + + "" + estado.getCodigoUF() + "" + cNF + "" + + "VENDA DE COMBUSTIVEL OU LUBRIFICANTE" + + "65" + SERIE + "" + NUMERO + "" + + "" + dhEmi + "11" + + "521975341" + + "" + id.substring(id.length() - 1) + "" + tpAmb + "" + + "111" + + "0teste-225" + + "" + CNPJ_EMIT + "" + NOME_EMIT + "" + + "AV SANTO ANTONIO0PQ STO ANTONIO" + + "5219753SANTO ANTONIO DO DESCOBERTO" + estado + "" + + "729000001058Brasil" + + "" + IE_EMIT + "3" + + "" + + "820101034SEM GTINDIESEL S10 COMUM" + + "271019210600600" + + "" + System.getProperty("cBenef", "GO890004") + "5656" + + "LT0.15006.66666666671.00" + + "SEM GTINL0.1500" + + "6.66666666671" + + "820101034DIESEL S10 COMUM" + + "" + estado + "" + + "11" + + "1000.0001000.150" + + "27.0000" + + "0" + estado.getCodigoUF() + "" + + "100" + + "0.27" + + "0610.1500" + + "1.17000.18" + + "04" + + "04" + + grupoIbsCbs() + "" + + "0.000.000.00" + + "0.000.000.000.00" + + "0.000.150.18" + + "1.000.000.000.00" + + "0.000.000.000.00" + + "0.000.001.000.27" + + totaisIbsCbs() + "" + + "9" + + "011.00" + + "32330160000195Samuel Oliveira" + + "samuel@swconsultoria.com.br62993066546" + + ""; + } + + /** + * Variantes do grupo IBSCBS no item, para isolar o que a producao recusa. + * -Dgrupo=mono : o que a lib monta hoje (PL 010g, ad valorem/ad rem separados) + * -Dgrupo=semgrupo : so CST e cClassTrib, sem nenhum grupo de calculo + * -Dgrupo=nenhum : sem o elemento IBSCBS + */ + private static String grupoIbsCbs() { + String variante = System.getProperty("grupo", "mono"); + if ("nenhum".equals(variante)) { + return ""; + } + String cabecalho = "620620006"; + if ("semgrupo".equals(variante)) { + return cabecalho + ""; + } + return cabecalho + + "" + + "0.00" + + "0.00" + + "0.000.00" + + ""; + } + + /** Sem IBSCBS no item nao faz sentido mandar IBSCBSTot nem vNFTot. */ + private static String totaisIbsCbs() { + if ("nenhum".equals(System.getProperty("grupo", "mono"))) { + return ""; + } + return "0.00" + + "0.000.000.00" + + "0.000.000.00" + + "0.000.000.00" + + "0.000.000.00" + + "0.000.00" + + "1.00"; + } +} diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceTeste.java index 2cff1e57..b60b575d 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfceTeste.java @@ -7,28 +7,26 @@ import br.com.swconsultoria.nfe.dom.ConfiguracoesNfe; import br.com.swconsultoria.nfe.dom.enuns.*; import br.com.swconsultoria.nfe.exception.NfeException; -import br.com.swconsultoria.nfe.schemas.TRetConsReciNFe; -import br.com.swconsultoria.nfe.schemas.TUf; -import br.com.swconsultoria.nfe.schemas.TUfEmi; import br.com.swconsultoria.nfe.schemas.*; import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe; import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.*; import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Det.Imposto; import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Det.Imposto.COFINS; -import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Det.Imposto.COFINS.COFINSAliq; import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Det.Imposto.ICMS; import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Det.Imposto.PIS; -import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Det.Imposto.PIS.PISAliq; import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Det.Prod; import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Total.ICMSTot; import br.com.swconsultoria.nfe.util.*; import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; +import java.io.IOException; +import java.math.BigDecimal; +import java.math.RoundingMode; import java.security.NoSuchAlgorithmException; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; -import java.util.Collections; +import java.util.ArrayList; import java.util.List; import java.util.Random; @@ -45,72 +43,8 @@ public static void main(String[] args) { LocalDateTime start = LocalDateTime.now(); - //Informe o Numero da NFCe - int numeroNFCe = 9410; - //Informe o CNPJ do Emitente da NFCe - String cnpj = "10732644000128"; - //Informe a data de Emissao da NFCe - LocalDateTime dataEmissao = LocalDateTime.now(); - //Informe o cnf da NFCe com 8 digitos - String cnf = String.format("%08d", new Random().nextInt(99999999)); - //Informe o modelo da NFCe - String modelo = DocumentoEnum.NFCE.getModelo(); - //Informe a Serie da NFCe - int serie = 1; - //Informe o tipo de Emissao da NFCe - String tipoEmissao = "1"; - - // MontaChave a NFCe - ChaveUtil chaveUtil = new ChaveUtil(config.getEstado(), cnpj, modelo, serie, numeroNFCe, tipoEmissao, cnf, dataEmissao); - String chave = chaveUtil.getChaveNF(); - String cdv = chaveUtil.getDigitoVerificador(); - - InfNFe infNFe = new InfNFe(); - infNFe.setId(chave); - infNFe.setVersao(ConstantesUtil.VERSAO.NFE); - -// TInfRespTec respTec = new TInfRespTec(); -// respTec.setCNPJ("99999999999999"); -// respTec.setEmail("email@dominio.com.br"); -// respTec.setFone("99999999999"); -// respTec.setXContato("Nome do Resposavel"); -// respTec.setIdCSRT("01"); -// respTec.setHashCSRT(NFCeUtil.geraHashCSRT("Chave Da Nota", "CSRT fornecido pela SEFAZ")); -// infNFe.setInfRespTec(respTec); - - //Preenche IDE - infNFe.setIde(preencheIde(config, cnf, numeroNFCe, tipoEmissao, modelo, serie, cdv, dataEmissao)); - - //Preenche Emitente - infNFe.setEmit(preencheEmitente(config, cnpj)); - - //Preenche o Destinatario - infNFe.setDest(preencheDestinatario()); - - //Preenche os dados do Produto da NFCe e adiciona a Lista - infNFe.getDet().addAll(preencheDet()); - - //Preenche totais da NFCe - infNFe.setTotal(preencheTotal()); - - //Preenche os dados de Transporte - infNFe.setTransp(preencheTransporte()); - - // Preenche dados Pagamento - infNFe.setPag(preenchePag()); - - TNFe nfe = new TNFe(); - nfe.setInfNFe(infNFe); - - // Monta EnviNfe - TEnviNFe enviNFe = new TEnviNFe(); - enviNFe.setVersao(ConstantesUtil.VERSAO.NFE); - enviNFe.setIdLote("1"); - enviNFe.setIndSinc("1"); - enviNFe.getNFe().add(nfe); - // Monta e Assina o XML - enviNFe = Nfe.montaNfe(config, enviNFe, true); + TEnviNFe enviNFe = montaEnviNFe(config); //Monta QRCode String qrCode = preencheQRCode(enviNFe, config); @@ -268,21 +202,222 @@ private static Dest preencheDestinatario() { /** * Preenche Det NFCe */ - private static List preencheDet() { + /** + * Combustiveis vendidos na NFCe de teste. Os dados de produto (ANP, NCM, CEST, + * adRemICMSRet, pBio) vieram de NFCe reais autorizadas de um posto em GO. + * + * adRemTotal e a aliquota ad rem IBS+CBS da tabela de aliquotas especificas de + * combustiveis (R$ por unidade de medida). A tabela publica o valor TOTAL; a + * reparticao entre IBS e CBS usa {@link #PERCENTUAL_IBS}. + */ + private enum Combustivel { + // ANP descANP NCM CEST CFOP vUnCom qCom adRemTotal icmsAdRem pBio nBico nTanque vEncIni + GASOLINA("320102001", "GASOLINA COMUM", "27101259", "0600200", "5656", "6.09", "20.0000", "0.7925", "1.5700", "12.0000", "21", "2", "109813.421", "GO890004"), + ETANOL("810101001", "ETANOL COMUM", "22071090", "0600101", "5656", "4.98", "30.0000", "0.1922", null, null, "17", "1", "48195.000", null), + DIESEL("820101012", "OLEO DIESEL B S500-COMUM", "27101921", "0600600", "5656", "7.19", "25.0000", "0.3515", "1.1700", "27.0000", "4", "4", "28474.440", "GO890004"); + + final String anp; + final String descAnp; + final String ncm; + final String cest; + final String cfop; + final BigDecimal vUnCom; + final BigDecimal qCom; + final BigDecimal adRemTotal; + /** Aliquota ad rem do ICMS retido (ICMS61). Nulo quando o produto usa ICMS60. */ + final String icmsAdRemRet; + /** Percentual de biocombustivel na mistura. Nulo quando nao se aplica. */ + final String pBio; + /** Bico, tanque e leitura inicial do encerrante, obrigatorios na NFCe de posto. */ + final String nBico; + final String nTanque; + final BigDecimal vEncIni; + /** Codigo de beneficio fiscal, exigido pela UF quando o CST do ICMS tem beneficio. */ + final String cBenef; + + Combustivel(String anp, String descAnp, String ncm, String cest, String cfop, + String vUnCom, String qCom, String adRemTotal, String icmsAdRemRet, String pBio, + String nBico, String nTanque, String vEncIni, String cBenef) { + this.anp = anp; + this.descAnp = descAnp; + this.ncm = ncm; + this.cest = cest; + this.cfop = cfop; + this.vUnCom = new BigDecimal(vUnCom); + this.qCom = new BigDecimal(qCom); + this.adRemTotal = new BigDecimal(adRemTotal); + this.icmsAdRemRet = icmsAdRemRet; + this.pBio = pBio; + this.nBico = nBico; + this.nTanque = nTanque; + this.vEncIni = new BigDecimal(vEncIni); + this.cBenef = cBenef; + } + + /** A leitura final do encerrante avanca exatamente a quantidade vendida. */ + BigDecimal vEncFin() { + return vEncIni.add(qCom).setScale(3, RoundingMode.HALF_UP); + } + + BigDecimal vProd() { + return vUnCom.multiply(qCom).setScale(2, RoundingMode.HALF_UP); + } + + /** Parcela IBS da aliquota ad rem. */ + BigDecimal adRemIBS() { + return adRemTotal.multiply(PERCENTUAL_IBS).setScale(4, RoundingMode.HALF_UP); + } + + /** Parcela CBS da aliquota ad rem. */ + BigDecimal adRemCBS() { + return adRemTotal.subtract(adRemIBS()).setScale(4, RoundingMode.HALF_UP); + } + + /** Valor do ICMS monofasico retido anteriormente (ICMS61). */ + BigDecimal vIcmsMonoRet() { + return qCom.multiply(new BigDecimal(icmsAdRemRet)).setScale(2, RoundingMode.HALF_UP); + } + } + + /** + * Fracao da aliquota ad rem que cabe ao IBS; o restante vai para a CBS. + * 0,10 segue a proporcao das aliquotas de referencia do periodo de teste + * (IBS 0,1% e CBS 0,9%), que sao tambem os defaults do IbsCbsUtil. + * Ajuste conforme a reparticao oficial antes de uso fiscal. + */ + private static final BigDecimal PERCENTUAL_IBS = new BigDecimal("0.10"); + + /** + * cClassTrib da operacao. O padrao 620006 e o do posto revendedor (monofasia + * retida anteriormente). Pode ser trocado por -DcClassTrib=620001 para testar + * outras classificacoes contra a SEFAZ. + */ + private static final String C_CLASS_TRIB = System.getProperty("cClassTrib", "620006"); + + /** + * Ano de emissao, que define a modalidade da monofasia pela NT 2025.002-RTC: + * 2026 IBS e CBS ad valorem; 2027-2028 IBS ad valorem e CBS ad rem; 2029 ambos + * ad rem. O -DanoEmissao=2027 move tambem o dhEmi, para que os dois nunca + * divirjam; serve para inspecionar o XML gerado, nao para enviar a SEFAZ, que + * rejeitaria pela data de emissao futura. + */ + private static final int ANO_EMISSAO = + Integer.parseInt(System.getProperty("anoEmissao", String.valueOf(java.time.LocalDate.now().getYear()))); + + private static final String CST_IBSCBS = "620"; + + /** Preenchido por {@link #preencheDet(InfNFe)} e consumido por {@link #preencheTotal()}. */ + private static IbsCbsUtil ibsCbsUtil; + + + /** + * Monta e assina a NFCe de combustiveis (gasolina, etanol e diesel) com os grupos + * monofasicos de IBS/CBS. Separado do envio para permitir validar o XML contra o + * XSD sem precisar de certificado de producao nem de rede. + */ + static TEnviNFe montaEnviNFe(ConfiguracoesNfe config) throws Exception { + return montaEnviNFe(config, "10732644000128"); + } + + static TEnviNFe montaEnviNFe(ConfiguracoesNfe config, String cnpj) throws Exception { + return montaEnviNFe(config, cnpj, LocalDateTime.now().withYear(ANO_EMISSAO)); + } - //O Preenchimento deve ser feito por produto, Então deve ocorrer uma LIsta - Det det = new Det(); - //O numero do Item deve seguir uma sequencia - det.setNItem("1"); + /** + * O CNPJ precisa bater com o do certificado usado na assinatura. + * + * A modalidade da monofasia e derivada do ano desta data, e nao de um parametro + * separado: a SEFAZ valida pelo dhEmi, entao os dois nao podem divergir. + */ + static TEnviNFe montaEnviNFe(ConfiguracoesNfe config, String cnpj, LocalDateTime dataEmissao) throws Exception { + //Informe o Numero da NFCe + int numeroNFCe = Integer.parseInt(System.getProperty("numeroNFCe", "9511")); + //Informe o cnf da NFCe com 8 digitos + String cnf = String.format("%08d", new Random().nextInt(99999999)); + //Informe o modelo da NFCe + String modelo = DocumentoEnum.NFCE.getModelo(); + //Informe a Serie da NFCe + int serie = 1; + //Informe o tipo de Emissao da NFCe + String tipoEmissao = "1"; + + // MontaChave a NFCe + ChaveUtil chaveUtil = new ChaveUtil(config.getEstado(), cnpj, modelo, serie, numeroNFCe, tipoEmissao, cnf, dataEmissao); + String chave = chaveUtil.getChaveNF(); + String cdv = chaveUtil.getDigitoVerificador(); + + InfNFe infNFe = new InfNFe(); + infNFe.setId(chave); + infNFe.setVersao(ConstantesUtil.VERSAO.NFE); + + //Preenche IDE + infNFe.setIde(preencheIde(config, cnf, numeroNFCe, tipoEmissao, modelo, serie, cdv, dataEmissao)); + + //Preenche Emitente + infNFe.setEmit(preencheEmitente(config, cnpj)); + + //Preenche o Destinatario + infNFe.setDest(preencheDestinatario()); + + //Preenche os dados do Produto da NFCe e adiciona a Lista + // o ano sai do dhEmi do ide desta nota: um so lugar, sem divergir + infNFe.getDet().addAll(preencheDet(infNFe)); + + //Preenche totais da NFCe + infNFe.setTotal(preencheTotal()); + + //Preenche os dados de Transporte + infNFe.setTransp(preencheTransporte()); + + // Preenche dados Pagamento + infNFe.setPag(preenchePag()); + + TNFe nfe = new TNFe(); + nfe.setInfNFe(infNFe); + + // Monta EnviNfe + TEnviNFe enviNFe = new TEnviNFe(); + enviNFe.setVersao(ConstantesUtil.VERSAO.NFE); + enviNFe.setIdLote("1"); + enviNFe.setIndSinc("1"); + enviNFe.getNFe().add(nfe); + + return Nfe.montaNfe(config, enviNFe, true); + } - // Preenche dados do Produto - det.setProd(preencheProduto()); + private static List preencheDet(InfNFe infNFe) throws NfeException, IOException { - //Preenche dados do Imposto - det.setImposto(preencheImposto()); + ibsCbsUtil = new IbsCbsUtil(XmlNfeUtil.leXml("src/test/resources/ibscbs.json"), + DocumentoEnum.NFCE, infNFe); - //Retorna a Lista de Det - return Collections.singletonList(det); + List itens = new ArrayList<>(); + int nItem = 1; + + for (Combustivel c : Combustivel.values()) { + Det det = new Det(); + det.setNItem(String.valueOf(nItem++)); + det.setProd(preencheProduto(c)); + det.setImposto(preencheImposto(c)); + + // Na monofasia retida anteriormente a SEFAZ calcula o valor por conta + // propria (regra UB93a-10) e rejeita com cStat 1240 se o informado divergir. + // Como as tabelas de referencia dessa formula ainda nao foram publicadas + // ("Implementacao Futura" na NT), o grupo vai zerado no ad valorem. + ibsCbsUtil.setPAliqMonoUF(BigDecimal.ZERO); + ibsCbsUtil.setPAliqMonoMun(BigDecimal.ZERO); + ibsCbsUtil.setPAliqMonoCBS(BigDecimal.ZERO); + // Ad rem usa a aliquota especifica do combustivel, repartida entre IBS e CBS + ibsCbsUtil.setAdRemIBS(c.adRemIBS()); + ibsCbsUtil.setAdRemCBS(c.adRemCBS()); + + TTribNFe ibsCbs = ibsCbsUtil.montaImpostosDet(C_CLASS_TRIB, det); + det.getImposto().getContent() + .add(new JAXBElement<>(new QName("IBSCBS"), TTribNFe.class, ibsCbs)); + + itens.add(det); + } + + return itens; } /** @@ -290,72 +425,90 @@ private static List preencheDet() { * * @return */ - private static Prod preencheProduto() { + private static Prod preencheProduto(Combustivel c) { Prod prod = new Prod(); - prod.setCProd("7898480650104"); - prod.setCEAN("7898480650104"); + prod.setCProd(c.anp); + prod.setCEAN("SEM GTIN"); prod.setXProd("NOTA FISCAL EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL"); - prod.setNCM("27101932"); - prod.setCEST("0600500"); - prod.setIndEscala("S"); - prod.setCFOP("5102"); - prod.setUCom("UN"); - prod.setQCom("1.0000"); - prod.setVUnCom("13.0000"); - prod.setVProd("13.00"); - prod.setCEANTrib("7898480650104"); - prod.setUTrib("UN"); - prod.setQTrib("1.0000"); - prod.setVUnTrib("13.0000"); + prod.setNCM(c.ncm); + prod.setCEST(c.cest); + if (c.cBenef != null) { + prod.setCBenef(c.cBenef); + } + prod.setCFOP(c.cfop); + prod.setUCom("LT"); + prod.setQCom(ObjetoUtil.getValor4Casas(c.qCom)); + prod.setVUnCom(ObjetoUtil.getValor4Casas(c.vUnCom)); + prod.setVProd(ObjetoUtil.getValor2Casas(c.vProd())); + prod.setCEANTrib("SEM GTIN"); + prod.setUTrib("L"); + prod.setQTrib(ObjetoUtil.getValor4Casas(c.qCom)); + prod.setVUnTrib(ObjetoUtil.getValor4Casas(c.vUnCom)); prod.setIndTot("1"); + Prod.Comb comb = new Prod.Comb(); + comb.setCProdANP(c.anp); + comb.setDescANP(c.descAnp); + comb.setUFCons(TUf.GO); + + // NFCe de posto e rejeitada (378) sem o encerrante da bomba + Prod.Comb.Encerrante encerrante = new Prod.Comb.Encerrante(); + encerrante.setNBico(c.nBico); + encerrante.setNTanque(c.nTanque); + encerrante.setVEncIni(c.vEncIni.setScale(3, RoundingMode.HALF_UP).toPlainString()); + encerrante.setVEncFin(c.vEncFin().toPlainString()); + comb.setEncerrante(encerrante); + + if (c.pBio != null) { + comb.setPBio(c.pBio); + } + prod.setComb(comb); + return prod; } /** - * Preenche dados do Imposto da NFCe + * Preenche dados do Imposto da NFCe. * - * @return + * Combustivel sai com PIS/COFINS nao tributados (CST 04) e ICMS ja retido: + * ICMS61 (monofasico, com aliquota ad rem) para gasolina e diesel, ICMS60 + * (substituicao tributaria) para o etanol, como nas notas reais do posto. */ - private static Imposto preencheImposto() { + private static Imposto preencheImposto(Combustivel c) { Imposto imposto = new Imposto(); ICMS icms = new ICMS(); - - ICMS.ICMS00 icms00 = new ICMS.ICMS00(); - icms00.setOrig("0"); - icms00.setCST("00"); - icms00.setModBC("0"); - icms00.setVBC("13.00"); - icms00.setPICMS("7.00"); - icms00.setVICMS("0.91"); - - icms.setICMS00(icms00); + if (c.icmsAdRemRet != null) { + ICMS.ICMS61 icms61 = new ICMS.ICMS61(); + icms61.setOrig("0"); + icms61.setCST("61"); + icms61.setQBCMonoRet(ObjetoUtil.getValor4Casas(c.qCom)); + icms61.setAdRemICMSRet(c.icmsAdRemRet); + icms61.setVICMSMonoRet(ObjetoUtil.getValor2Casas(c.vIcmsMonoRet())); + icms.setICMS61(icms61); + } else { + ICMS.ICMS60 icms60 = new ICMS.ICMS60(); + icms60.setOrig("0"); + icms60.setCST("60"); + icms60.setVBCSTRet("0.00"); + icms60.setPST("0.00"); + icms60.setVICMSSTRet("0.00"); + icms.setICMS60(icms60); + } PIS pis = new PIS(); - PISAliq pisAliq = new PISAliq(); - pisAliq.setCST("01"); - pisAliq.setVBC("13.00"); - pisAliq.setPPIS("1.65"); - pisAliq.setVPIS("0.21"); - pis.setPISAliq(pisAliq); + PIS.PISNT pisnt = new PIS.PISNT(); + pisnt.setCST("04"); + pis.setPISNT(pisnt); COFINS cofins = new COFINS(); - COFINSAliq cofinsAliq = new COFINSAliq(); - cofinsAliq.setCST("01"); - cofinsAliq.setVBC("13.00"); - cofinsAliq.setPCOFINS("7.60"); - cofinsAliq.setVCOFINS("0.99"); - cofins.setCOFINSAliq(cofinsAliq); - - JAXBElement icmsElement = new JAXBElement(new QName("ICMS"), ICMS.class, icms); - imposto.getContent().add(icmsElement); - - JAXBElement pisElement = new JAXBElement(new QName("PIS"), PIS.class, pis); - imposto.getContent().add(pisElement); + COFINS.COFINSNT cofinsnt = new COFINS.COFINSNT(); + cofinsnt.setCST("04"); + cofins.setCOFINSNT(cofinsnt); - JAXBElement cofinsElement = new JAXBElement(new QName("COFINS"), COFINS.class, cofins); - imposto.getContent().add(cofinsElement); + imposto.getContent().add(new JAXBElement<>(new QName("ICMS"), ICMS.class, icms)); + imposto.getContent().add(new JAXBElement<>(new QName("PIS"), PIS.class, pis)); + imposto.getContent().add(new JAXBElement<>(new QName("COFINS"), COFINS.class, cofins)); return imposto; } @@ -366,32 +519,61 @@ private static Imposto preencheImposto() { * @return */ private static Total preencheTotal() { + BigDecimal vProd = BigDecimal.ZERO; + BigDecimal vIcmsMonoRet = BigDecimal.ZERO; + BigDecimal qBCMonoRet = BigDecimal.ZERO; + + for (Combustivel c : Combustivel.values()) { + vProd = vProd.add(c.vProd()); + if (c.icmsAdRemRet != null) { + vIcmsMonoRet = vIcmsMonoRet.add(c.vIcmsMonoRet()); + qBCMonoRet = qBCMonoRet.add(c.qCom); + } + } + Total total = new Total(); ICMSTot icmstot = new ICMSTot(); - icmstot.setVBC("13.00"); - icmstot.setVICMS("0.91"); + icmstot.setVBC("0.00"); + icmstot.setVICMS("0.00"); icmstot.setVICMSDeson("0.00"); icmstot.setVFCP("0.00"); icmstot.setVFCPST("0.00"); icmstot.setVFCPSTRet("0.00"); icmstot.setVBCST("0.00"); icmstot.setVST("0.00"); - icmstot.setVProd("13.00"); + // No ICMSTot o qBCMonoRet e TDec_1302 (2 casas); no ICMS61 do item e TDec_1104v (4 casas) + icmstot.setQBCMonoRet(ObjetoUtil.getValor2Casas(qBCMonoRet)); + icmstot.setVICMSMonoRet(ObjetoUtil.getValor2Casas(vIcmsMonoRet)); + icmstot.setVProd(ObjetoUtil.getValor2Casas(vProd)); icmstot.setVFrete("0.00"); icmstot.setVSeg("0.00"); icmstot.setVDesc("0.00"); icmstot.setVII("0.00"); icmstot.setVIPI("0.00"); icmstot.setVIPIDevol("0.00"); - icmstot.setVPIS("0.21"); - icmstot.setVCOFINS("0.99"); + icmstot.setVPIS("0.00"); + icmstot.setVCOFINS("0.00"); icmstot.setVOutro("0.00"); - icmstot.setVNF("13.00"); + icmstot.setVNF(ObjetoUtil.getValor2Casas(vProd)); total.setICMSTot(icmstot); + // Totais IBS/CBS: de 2027 em diante o vNFTot soma o monofasico ao vNF + // (VB01-10 Excecao 1); em 2025 e 2026 fica igual ao vNF. IBSCBSTot traz o gMono + total.setVNFTot(ObjetoUtil.getValor2Casas(ibsCbsUtil.calculaVnfTot(icmstot.getVNF()))); + total.setIBSCBSTot(ibsCbsUtil.preencheTotaisIbsCsb()); + return total; } + /** Soma dos itens, usada no pagamento. */ + private static BigDecimal totalNota() { + BigDecimal vProd = BigDecimal.ZERO; + for (Combustivel c : Combustivel.values()) { + vProd = vProd.add(c.vProd()); + } + return vProd; + } + /** * Preenche Transporte * @@ -412,7 +594,7 @@ private static Pag preenchePag() { Pag pag = new Pag(); Pag.DetPag detPag = new Pag.DetPag(); detPag.setTPag("01"); - detPag.setVPag("13.00"); + detPag.setVPag(ObjetoUtil.getValor2Casas(totalNota())); pag.getDetPag().add(detPag); return pag; diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfeTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfeTeste.java index 994a006b..b76e3851 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfeTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfeTeste.java @@ -24,11 +24,17 @@ import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Total.ICMSTot; import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Transp; import br.com.swconsultoria.nfe.util.ChaveUtil; +import br.com.swconsultoria.nfe.util.IbsCbsUtil; +import br.com.swconsultoria.nfe.util.ObjetoUtil; import br.com.swconsultoria.nfe.util.ConstantesUtil; import br.com.swconsultoria.nfe.util.RetornoUtil; import br.com.swconsultoria.nfe.util.XmlNfeUtil; +import javax.xml.bind.JAXBElement; +import javax.xml.namespace.QName; +import java.math.BigDecimal; import java.time.LocalDateTime; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Random; @@ -43,6 +49,29 @@ public static void main(String[] args) { Envia(); } + /** + * cClassTrib do item. 000001 e tributacao integral; a tabela vem do + * ibscbs.json, o mesmo arquivo publicado pela SEFAZ. + */ + private static final String C_CLASS_TRIB = System.getProperty("cClassTrib", "000001"); + + /** Todo cClassTrib 620* e combustivel e exige o grupo comb. */ + private static boolean ehCombustivel() { + return C_CLASS_TRIB.startsWith("62"); + } + + /** + * So estes tres sao monofasia retida anteriormente. O 620001 e o 620002 sao + * monofasia padrao: pedem outro grupo de ICMS e nao levam valor retido, entao + * cair no mesmo ramo renderia documento contraditorio. + */ + private static boolean ehMonofasiaRetida() { + return Arrays.asList("620004", "620005", "620006").contains(C_CLASS_TRIB); + } + + /** Preenchido por preencheDet e consumido por preencheTotal. */ + private static IbsCbsUtil ibsCbsUtil; + private static void Envia() { try { @@ -50,7 +79,7 @@ private static void Envia() { ConfiguracoesNfe config = ConfiguracaoTeste.iniciaConfiguracoes(EstadosEnum.GO, AmbienteEnum.HOMOLOGACAO); //Informe o Numero da NFe - int numeroNfe = 92758; + int numeroNfe = Integer.parseInt(System.getProperty("numeroNfe", "92758")); //Informe o CNPJ do Emitente da NFe String cnpj = "10732644000128"; //Informe a data de Emissao da NFe @@ -84,7 +113,7 @@ private static void Envia() { infNFe.setEntrega(dadosEntrega(infNFe)); //Preenche os dados do Produto da Nfe e adiciona a Lista - infNFe.getDet().addAll(preencheDet()); + infNFe.getDet().addAll(preencheDet(infNFe)); @@ -277,7 +306,26 @@ private static InfNFe.Dest preencheDestinatario() { /** * Preenche Det Nfe */ - private static List preencheDet() { + /** + * O grupo IBSCBS passou a ser exigido na homologacao: sem ele a nota e + * rejeitada com 1115 (Grupo IBSCBS nao informado). O ano sai do dhEmi do + * proprio ide, para nao divergir do documento. + */ + private static List preencheDet(InfNFe infNFe) throws Exception { + + ibsCbsUtil = new IbsCbsUtil(XmlNfeUtil.leXml("src/test/resources/ibscbs.json"), + DocumentoEnum.NFE, infNFe); + + // Na monofasia retida anteriormente o valor e informado pelo emitente, mas + // o grupo gMonoRet carrega so o valor, sem base nem aliquota: a SEFAZ o + // confere pela tabela por produto, que ainda nao foi publicada. Hoje ela + // calcula zero e recusa qualquer outro valor com 1240, entao o padrao e + // zero. Quando a tabela sair, informe aqui o valor retido de fato. + if (ehMonofasiaRetida()) { + ibsCbsUtil.setVIBSMonoRet(new BigDecimal(System.getProperty("vIBSMonoRet", "0.00"))); + ibsCbsUtil.setVCBSMonoRet(new BigDecimal(System.getProperty("vCBSMonoRet", "0.00"))); + } + //O Preenchimento deve ser feito por produto, Então deve ocorrer uma LIsta InfNFe.Det det = new InfNFe.Det(); @@ -292,6 +340,11 @@ private static List preencheDet() { det.setInfAdProd("Informações Adicionais do Produto"); + //Preenche o grupo IBS/CBS da Reforma Tributaria + TTribNFe ibsCbs = ibsCbsUtil.montaImpostosDet(C_CLASS_TRIB, det); + det.getImposto().getContent() + .add(new JAXBElement<>(new QName("IBSCBS"), TTribNFe.class, ibsCbs)); + //Retorna a Lista de Det return Collections.singletonList(det); } @@ -319,6 +372,26 @@ private static Prod preencheProduto() { prod.setVUnTrib("13.0000"); prod.setIndTot("1"); + // cClassTrib de combustivel (620*) exige o grupo comb, senao a SEFAZ + // rejeita com 1106. Os codigos abaixo sao os do oleo diesel, coerentes + // com o NCM e o CEST que passam a valer neste caso. + if (ehCombustivel()) { + prod.setNCM("27101921"); + prod.setCEST("0600600"); + // ICMS61 em GO exige o codigo de beneficio fiscal (rejeicao 930) + prod.setCBenef("GO890004"); + // Combustivel e vendido em litro: unidade diferente e rejeitada com 854 + prod.setUCom("LT"); + prod.setUTrib("L"); + prod.setCFOP("5656"); + Prod.Comb comb = new Prod.Comb(); + comb.setCProdANP("820101012"); + comb.setDescANP("OLEO DIESEL B S500-COMUM"); + comb.setUFCons(TUf.GO); + comb.setPBio("27.0000"); + prod.setComb(comb); + } + return prod; } @@ -331,15 +404,26 @@ private static Imposto preencheImposto() { Imposto.ICMS icms = new Imposto.ICMS(); - Imposto.ICMS.ICMS60 icms60 = new Imposto.ICMS.ICMS60(); - icms60.setOrig("0"); - icms60.setCST("60"); - icms60.setVBCSTRet("0.00"); - icms60.setPST("0.00"); - icms60.setVICMSSTRet("0.00"); - icms60.setVICMSSubstituto("0.00"); - - icms.setICMS60(icms60); + if (ehMonofasiaRetida()) { + // Combustivel monofasico retido anteriormente: o ICMS tem de ser o 61, + // nao o 60, senao a SEFAZ rejeita com 858 (grupo de tributacao indevido). + Imposto.ICMS.ICMS61 icms61 = new Imposto.ICMS.ICMS61(); + icms61.setOrig("0"); + icms61.setCST("61"); + icms61.setQBCMonoRet("1.0000"); + icms61.setAdRemICMSRet("1.1700"); + icms61.setVICMSMonoRet("1.17"); + icms.setICMS61(icms61); + } else { + Imposto.ICMS.ICMS60 icms60 = new Imposto.ICMS.ICMS60(); + icms60.setOrig("0"); + icms60.setCST("60"); + icms60.setVBCSTRet("0.00"); + icms60.setPST("0.00"); + icms60.setVICMSSTRet("0.00"); + icms60.setVICMSSubstituto("0.00"); + icms.setICMS60(icms60); + } PIS pis = new PIS(); PISAliq pisAliq = new PISAliq(); @@ -391,9 +475,19 @@ private static Total preencheTotal() { icmstot.setVCOFINS("0.99"); icmstot.setVOutro("0.00"); icmstot.setVNF("13.00"); + if (ehMonofasiaRetida()) { + // O item declara o ICMS monofasico retido; o total precisa acompanhar + icmstot.setQBCMonoRet("1.00"); + icmstot.setVICMSMonoRet("1.17"); + } icmstot.setVTotTrib("5.00"); total.setICMSTot(icmstot); + //Totais do IBS/CBS e o total geral do documento (vNFTot) + total.setIBSCBSTot(ibsCbsUtil.preencheTotaisIbsCsb()); + BigDecimal vNfTot = ibsCbsUtil.calculaVnfTot(icmstot.getVNF()); + total.setVNFTot(ObjetoUtil.getValor2Casas(vNfTot)); + return total; } diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfeXmlTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfeXmlTeste.java index 014143b6..a6aa6c1f 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfeXmlTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNfeXmlTeste.java @@ -26,9 +26,9 @@ public static void main(String[] args) { try { // Inicia As Configurações - ConfiguracoesNfe config = ConfiguracaoTeste.iniciaConfiguracoes(EstadosEnum.MT, AmbienteEnum.HOMOLOGACAO); + ConfiguracoesNfe config = ConfiguracaoTeste.iniciaConfiguracoes(EstadosEnum.valueOf(System.getProperty("ufXml", "MT")), AmbienteEnum.HOMOLOGACAO); - String caminhoXML = "d:/teste/nfe.xml"; + String caminhoXML = System.getProperty("caminhoXML", "d:/teste/nfe.xml"); // Le Xml do Arquivo String xml = XmlNfeUtil.leXml(caminhoXML); @@ -38,7 +38,7 @@ public static void main(String[] args) { // enviNFe = Nfe.montaNfe(config, enviNFe, true); // Envia a Nfe para a Sefaz - TRetEnviNFe retorno = Nfe.enviarNfe(config, enviNFe, DocumentoEnum.NFE); + TRetEnviNFe retorno = Nfe.enviarNfe(config, enviNFe, DocumentoEnum.valueOf(System.getProperty("docXml", "NFE"))); //Valida se o Retorno é Assincrono if (RetornoUtil.isRetornoAssincrono(retorno)) { @@ -49,7 +49,7 @@ public static void main(String[] args) { //Define Numero de tentativas que irá tentar a Consulta while (tentativa < 15) { - retornoNfe = Nfe.consultaRecibo(config, recibo, DocumentoEnum.NFE); + retornoNfe = Nfe.consultaRecibo(config, recibo, DocumentoEnum.valueOf(System.getProperty("docXml", "NFE"))); if (retornoNfe.getCStat().equals(StatusEnum.LOTE_EM_PROCESSAMENTO.getCodigo())) { System.out.println("INFO: Lote Em Processamento, vai tentar novamente apos 1 Segundo."); Thread.sleep(1000); diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNotaDebitoCreditoTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNotaDebitoCreditoTeste.java new file mode 100644 index 00000000..e180e8e2 --- /dev/null +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/EnvioNotaDebitoCreditoTeste.java @@ -0,0 +1,500 @@ +package br.com.swconsultoria.nfe.exemplos; + +import br.com.swconsultoria.nfe.Nfe; +import br.com.swconsultoria.nfe.dom.ConfiguracoesNfe; +import br.com.swconsultoria.nfe.dom.enuns.AmbienteEnum; +import br.com.swconsultoria.nfe.dom.enuns.DocumentoEnum; +import br.com.swconsultoria.nfe.dom.enuns.EstadosEnum; +import br.com.swconsultoria.nfe.schemas.TEnderEmi; +import br.com.swconsultoria.nfe.schemas.TEndereco; +import br.com.swconsultoria.nfe.schemas.TEnviNFe; +import br.com.swconsultoria.nfe.schemas.TNFe; +import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe; +import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Det.Imposto; +import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Det.Prod; +import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Total; +import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Total.ICMSTot; +import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Transp; +import br.com.swconsultoria.nfe.schemas.TRetEnviNFe; +import br.com.swconsultoria.nfe.schemas.TTribNFe; +import br.com.swconsultoria.nfe.schemas.TUf; +import br.com.swconsultoria.nfe.schemas.TUfEmi; +import br.com.swconsultoria.nfe.util.ChaveUtil; +import br.com.swconsultoria.nfe.util.ConstantesUtil; +import br.com.swconsultoria.nfe.util.IbsCbsUtil; +import br.com.swconsultoria.nfe.util.ObjetoUtil; +import br.com.swconsultoria.nfe.util.RetornoUtil; +import br.com.swconsultoria.nfe.util.XmlNfeUtil; + +import javax.xml.bind.JAXBElement; +import javax.xml.namespace.QName; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.Random; + +/** + * Nota de Debito (finNFe=6) e Nota de Credito (finNFe=5) da NF-e modelo 55, + * criadas pela NT 2025.002-RTC. Emite as duas em homologacao em Goias. + * + *

O sentido das palavras segue sempre o ponto de vista do EMITENTE: a nota de + * debito registra um aumento no imposto devido pelo emitente; a nota de credito + * registra uma reducao. As finalidades que ja existiam, 2-Complementar e + * 3-Ajuste, sao casos particulares de nota de debito. + * + *

A particularidade que mais derruba nota: elas sao documentos de IBS/CBS + * e nada mais. Com finNFe 5 ou 6 e proibido informar ICMS, ISSQN, IPI, II, + * PIS, PISST, COFINS, COFINSST, ICMSUFDest e impostoDevol - rejeicao + * 1001 (NF-e com finalidade de debito ou credito somente para IBS/CBS). + * Por isso o grupo imposto destes exemplos carrega so o IBSCBS. O schema + * permite: a escolha ICMS/ISSQN e minOccurs=0 e o IBSCBS e irmao dela. + * + *

O caminho inverso tambem existe: para finNFe diferente de 5 e 6 o ICMS ou o + * ISSQN continuam obrigatorios (rejeicao 1002). E as regras que exigiam os + * grupos PIS (745) e COFINS (748) em toda NF-e 55 passaram a ter excecao para + * finNFe 5 e 6 - sem essa excecao a nota seria impossivel de montar. + * + *

Excecoes a 1001, previstas na propria NT, que NAO sao usadas aqui: + * tpNFCredito 03, 04 e 06 e tpNFDebito 07 aceitam os grupos antigos; + * tpNFDebito 06-Pagamento antecipado aceita PIS/COFINS em 2026 e aceita IPI. + * + *

Outras regras gerais que ganharam excecao para finNFe 5 e 6, e que explicam + * por que a nota passa mesmo parecendo incompleta para os olhos antigos: origem + * da mercadoria (966), CST de monofasia de combustivel (960) e a exigencia de + * ICMS ST por UF de destino. + * + *

Sobre o cClassTrib: a NT amarra cada tipo de nota a um codigo especifico + * (rejeicoes 1200, 1201 e 1202). 800002 para tpNFDebito=01, 811001 para 02, + * 811002 para 03, 800001 para 05 nos dois lados, 410030 para tpNFDebito=07, + * 811003 para 08 e 810001 para tpNFCredito=02. Os tipos escolhidos nestes dois + * exemplos - debito 04 e credito 01, Multa e juros - estao na coluna + * "Nao limitar" da tabela, entao aceitam o 000001 de tributacao integral e + * dispensam os grupos especiais gTransfCred e gEstornoCred. + * + *

As duas foram autorizadas em homologacao em Goias com este codigo, em + * 07/11/2026: a nota de debito com protocolo 152260027993410 e a nota de credito + * com protocolo 152260027993411, as duas com cStat 100. + * + *

Para rodar com outro emitente e outro certificado, sem editar o fonte: + * + *

+ * java -Dcertificado=caminho.pfx -DsenhaCertificado=senha \
+ *      -DcnpjEmit=... -DieEmit=... -DnomeEmit=... \
+ *      -DnumeroNfe=1 -DchaveRef=chave44digitos \
+ *      br.com.swconsultoria.nfe.exemplos.EnvioNotaDebitoCreditoTeste
+ * 
+ * + * @author Samuel Oliveira + */ +public class EnvioNotaDebitoCreditoTeste { + + /** Identidade do emitente. O certificado tem de ser desta empresa. */ + private static final String CNPJ_EMIT = System.getProperty("cnpjEmit", "10732644000128"); + private static final String IE_EMIT = System.getProperty("ieEmit", "104519304"); + private static final String NOME_EMIT = System.getProperty("nomeEmit", "POSTO PARK XIII LTDA"); + + /** + * Regime do emitente. A NT trata as notas de debito e credito como + * instrumento do regime regular; o tpNFDebito=08 existe justamente para + * documentar o desenquadramento do Simples. + */ + private static final String CRT_EMIT = System.getProperty("crtEmit", "3"); + + /** 000001 e tributacao integral; a tabela vem do mesmo ibscbs.json da SEFAZ. */ + private static final String C_CLASS_TRIB = System.getProperty("cClassTrib", "000001"); + + /** Numero da primeira nota; a segunda sai com numero+1. */ + private static final int NUMERO_NFE = Integer.parseInt(System.getProperty("numeroNfe", "92800")); + + /** Valor do item que esta sendo debitado ou creditado. */ + private static final String V_PROD = "100.00"; + + /** Preenchido por montaDet e consumido por preencheTotal. */ + private static IbsCbsUtil ibsCbsUtil; + + public static void main(String[] args) throws Exception { + + ConfiguracoesNfe config = ConfiguracaoTeste.iniciaConfiguracoes(EstadosEnum.GO, AmbienteEnum.HOMOLOGACAO); + + // So os 44 digitos: o refNFe e o chaveAcesso nao levam o prefixo "NFe" + // que o ChaveUtil devolve para o atributo Id do infNFe. + String chaveRef = System.getProperty("chaveRef", "").replaceFirst("^NFe", ""); + + // Os dois lados referenciam o documento original, mas a SEFAZ os cobra de + // forma diferente, e isso so aparece emitindo: + // + // - o DFeReferenciado da nota de debito NAO e conferido contra a base. + // Uma chave montada na hora, com digito verificador correto, autoriza; + // - o NFref da nota de credito E conferido. Chave que nao existe cai em + // rejeicao 267 (Chave de Acesso referenciada inexistente). + // + // Por isso, sem -DchaveRef, o debito usa uma chave sintetica e o credito + // usa a chave da nota de debito que acabou de ser autorizada - so para o + // exemplo rodar ponta a ponta. Na pratica o documento referenciado pela + // nota de credito e a nota original do fornecedor. + System.out.println("=========== NOTA DE DEBITO (finNFe=6) ==========="); + String chaveDebito = chaveRef.isEmpty() ? chaveSinteticaDeReferencia(config) : chaveRef; + System.out.println("### DFeReferenciado: " + chaveDebito); + String autorizadaDebito = envia(config, montaNotaDebito(config, NUMERO_NFE, chaveDebito)); + + String chaveCredito = chaveRef.isEmpty() ? autorizadaDebito : chaveRef; + System.out.println(); + System.out.println("=========== NOTA DE CREDITO (finNFe=5) =========="); + if (chaveCredito == null) { + System.out.println("# Pulada: sem chave autorizada para o NFref. Informe -DchaveRef."); + return; + } + System.out.println("### NFref: " + chaveCredito); + envia(config, montaNotaCredito(config, NUMERO_NFE + 1, chaveCredito)); + } + + /** + * NOTA DE DEBITO - finNFe=6, tpNFDebito=04-Multa e juros. + * + *

Cenario da NT: o fornecedor cobrou multa e juros do adquirente e emite a + * nota de debito para que o adquirente do regime regular possa se creditar do + * valor pago. Se o fornecedor nao emitir, o adquirente tem a alternativa de + * emitir uma nota de credito do tipo 01 - que e o segundo exemplo aqui. + * + *

Particularidades: + * + *

    + *
  • tpNF=1-Saida e obrigatorio. Nota de debito com tpNF=0 cai em + * rejeicao 1162 (Tipo de Operacao incompativel com NF-e de Debito). E o + * espelho da nota de credito, que exige tpNF=0.
  • + *
  • tpNFDebito e obrigatorio quando finNFe=6 (rejeicao 1009), e + * proibido quando finNFe e outra coisa (rejeicao 1139).
  • + *
  • O referenciamento e por ITEM, no grupo DFeReferenciado, nao no + * cabecalho. Os tipos 03-Debitos de notas fiscais nao processadas na + * apuracao, 04-Multa e juros e o credito 06-Retorno por recusa parcial + * exigem o DFeReferenciado (rejeicao 1038). Informar NFref no cabecalho + * junto com o DFeReferenciado no item derruba a nota com 1010 + * (referenciamento de documento a nivel de nota e a nivel de item).
  • + *
  • O nItem do DFeReferenciado aponta o item da nota original. Para + * tpNFDebito=03 ele e proibido (1039); para os outros tipos e exigido + * (1048), regra marcada como implementacao futura. Informar desde ja deixa a + * nota pronta para quando entrar.
  • + *
  • Todos os itens tem de apontar a MESMA chave de acesso (rejeicao 1130), + * com excecao de tpNFDebito 03 e 07.
  • + *
+ */ + private static TEnviNFe montaNotaDebito(ConfiguracoesNfe config, int numeroNfe, String chaveReferenciada) + throws Exception { + + InfNFe infNFe = esqueleto(config, numeroNfe, "NOTA DE DEBITO - MULTA E JUROS"); + + infNFe.getIde().setTpNF("1"); + infNFe.getIde().setFinNFe("6"); + infNFe.getIde().setTpNFDebito("04"); + + // 5949 - outra saida nao especificada. Coerente com tpNF=1-Saida. + InfNFe.Det det = montaDet(infNFe, "5949"); + + InfNFe.Det.DFeReferenciado referenciado = new InfNFe.Det.DFeReferenciado(); + referenciado.setChaveAcesso(chaveReferenciada); + referenciado.setNItem("1"); + det.setDFeReferenciado(referenciado); + + return fecha(infNFe, det); + } + + /** + * NOTA DE CREDITO - finNFe=5, tpNFCredito=01-Multa e juros. + * + *

Cenario da NT: o adquirente pagou multa e juros, o fornecedor nao emitiu + * a nota de debito, e o adquirente emite a nota de credito para lancar o + * valor na apuracao assistida. O fornecedor concorda - ou nao - pelo evento + * 211128 - Aceite de debito na apuracao por emissao de nota de credito, + * com a tag indAceitacao, tambem criado por esta NT. + * + *

Particularidades: + * + *

    + *
  • tpNF=0-Entrada e obrigatorio (rejeicao 1161). Quem emite a nota + * de credito esta reduzindo o proprio imposto, entao o documento entra no seu + * estabelecimento. Por isso o CFOP e de entrada.
  • + *
  • tpNFCredito e obrigatorio quando finNFe=5 (rejeicao 1164), e + * proibido nas outras finalidades (rejeicao 1163).
  • + *
  • O referenciamento e no CABECALHO, no NFref, exatamente o + * contrario da nota de debito deste arquivo. Os tipos 01-Multa e juros, + * 03-Retorno e 04-Reducao de valores exigem o NFref (rejeicao 254) e aceitam + * uma unica ocorrencia (rejeicao 255). Referenciamento por item e proibido em + * finNFe=5 (rejeicao 1042), com uma unica excecao: tpNFCredito=06-Retorno por + * recusa parcial, que exige o item.
  • + *
  • So NF-e modelo 55 pode ser referenciada (rejeicao 1003). A + * excecao e tpNFCredito=03-Retorno, que aceita tambem NFC-e modelo 65 - faz + * sentido: a recusa pode ser de uma venda a consumidor.
  • + *
  • Para os tipos 03 e 04 a NF-e referenciada tem de ser do mesmo CNPJ + * emitente (rejeicao 269) e da mesma UF (rejeicao 678). Para o tipo 01, usado + * aqui, nao ha essa amarra - e coerente, porque a nota original e do + * fornecedor, nao de quem emite o credito.
  • + *
  • tpNFCredito=02-Apropriacao de credito presumido de IBS na ZFM e o unico + * que PROIBE o NFref (rejeicao 1027) e que ainda nao pode ser usado: ano de + * emissao menor que 2029 cai em rejeicao 1145.
  • + *
  • A chave do NFref tem de existir de verdade, e isso nao esta na + * NT: chave sintetica, com digito verificador correto, foi recusada com + * 267 (Chave de Acesso referenciada inexistente) na homologacao de GO. + * O DFeReferenciado da nota de debito, no mesmo lote, passou com a mesma + * chave inexistente - a conferencia contra a base e so do NFref.
  • + *
+ */ + private static TEnviNFe montaNotaCredito(ConfiguracoesNfe config, int numeroNfe, String chaveReferenciada) + throws Exception { + + InfNFe infNFe = esqueleto(config, numeroNfe, "NOTA DE CREDITO - MULTA E JUROS"); + + infNFe.getIde().setTpNF("0"); + infNFe.getIde().setFinNFe("5"); + infNFe.getIde().setTpNFCredito("01"); + + InfNFe.Ide.NFref nFref = new InfNFe.Ide.NFref(); + nFref.setRefNFe(chaveReferenciada); + infNFe.getIde().getNFref().add(nFref); + + // 1949 - outra entrada nao especificada. Coerente com tpNF=0-Entrada e nao + // e CFOP de devolucao, que seria recusado com 328 neste tipo de nota. + return fecha(infNFe, montaDet(infNFe, "1949")); + } + + /** + * Cabecalho comum as duas notas. + * + *

indPres=0 (nao se aplica) e indFinal=0: nota de debito e de credito nao + * documentam venda, nao tem comprador presente nem consumidor final. Com + * indPres=0 tambem nao se informa indIntermed nem o grupo infIntermed. + */ + private static InfNFe esqueleto(ConfiguracoesNfe config, int numeroNfe, String natOp) { + + String cnf = String.format("%08d", new Random().nextInt(99999999)); + String modelo = DocumentoEnum.NFE.getModelo(); + int serie = 1; + String tipoEmissao = "1"; + LocalDateTime dataEmissao = LocalDateTime.now(); + + ChaveUtil chaveUtil = new ChaveUtil(config.getEstado(), CNPJ_EMIT, modelo, serie, numeroNfe, + tipoEmissao, cnf, dataEmissao); + + InfNFe infNFe = new InfNFe(); + infNFe.setId(chaveUtil.getChaveNF()); + infNFe.setVersao(ConstantesUtil.VERSAO.NFE); + + InfNFe.Ide ide = new InfNFe.Ide(); + ide.setCUF(config.getEstado().getCodigoUF()); + ide.setCNF(cnf); + ide.setNatOp(natOp); + ide.setMod(modelo); + ide.setSerie(String.valueOf(serie)); + ide.setNNF(String.valueOf(numeroNfe)); + ide.setDhEmi(XmlNfeUtil.dataNfe(dataEmissao, null)); + ide.setIdDest("1"); + ide.setCMunFG("5219753"); + ide.setTpImp("1"); + ide.setTpEmis(tipoEmissao); + ide.setCDV(chaveUtil.getDigitoVerificador()); + ide.setTpAmb(config.getAmbiente().getCodigo()); + ide.setIndFinal("0"); + ide.setIndPres("0"); + ide.setProcEmi("0"); + ide.setVerProc("NT2025.002-DEB-CRED"); + infNFe.setIde(ide); + + infNFe.setEmit(preencheEmitente(config)); + infNFe.setDest(preencheDestinatario()); + + return infNFe; + } + + /** Fecha a nota: item, totais, transporte, pagamento e o envelope do lote. */ + private static TEnviNFe fecha(InfNFe infNFe, InfNFe.Det det) { + + infNFe.getDet().add(det); + infNFe.setTotal(preencheTotal()); + infNFe.setTransp(preencheTransporte()); + infNFe.setPag(preenchePag()); + + TNFe nfe = new TNFe(); + nfe.setInfNFe(infNFe); + + TEnviNFe enviNFe = new TEnviNFe(); + enviNFe.setVersao(ConstantesUtil.VERSAO.NFE); + enviNFe.setIdLote("1"); + enviNFe.setIndSinc("1"); + enviNFe.getNFe().add(nfe); + + return enviNFe; + } + + /** + * Item da nota. O grupo imposto leva SO o IBSCBS: e esta a diferenca visivel + * entre uma nota de debito/credito e qualquer outra NF-e 55. + */ + private static InfNFe.Det montaDet(InfNFe infNFe, String cfop) throws Exception { + + ibsCbsUtil = new IbsCbsUtil(XmlNfeUtil.leXml("src/test/resources/ibscbs.json"), + DocumentoEnum.NFE, infNFe); + + InfNFe.Det det = new InfNFe.Det(); + det.setNItem("1"); + det.setProd(preencheProduto(cfop)); + + // Grupo imposto sem ICMS, sem PIS e sem COFINS - ver o javadoc da classe. + det.setImposto(new Imposto()); + + TTribNFe ibsCbs = ibsCbsUtil.montaImpostosDet(C_CLASS_TRIB, det); + det.getImposto().getContent() + .add(new JAXBElement<>(new QName("IBSCBS"), TTribNFe.class, ibsCbs)); + + return det; + } + + private static Prod preencheProduto(String cfop) { + Prod prod = new Prod(); + prod.setCProd("MULTAJUROS"); + prod.setCEAN("SEM GTIN"); + prod.setXProd("NOTA FISCAL EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL"); + prod.setNCM("84835090"); + prod.setCFOP(cfop); + prod.setUCom("UN"); + prod.setQCom("1.0000"); + prod.setVUnCom("100.0000"); + prod.setVProd(V_PROD); + prod.setCEANTrib("SEM GTIN"); + prod.setUTrib("UN"); + prod.setQTrib("1.0000"); + prod.setVUnTrib("100.0000"); + prod.setIndTot("1"); + return prod; + } + + /** + * Totais. O ICMSTot continua obrigatorio pelo schema, mas vai todo zerado: + * nao ha ICMS, PIS nem COFINS para somar. O que da conteudo a nota e o + * IBSCBSTot, e o vNFTot e o total do documento com os novos tributos. + */ + private static Total preencheTotal() { + Total total = new Total(); + + ICMSTot icmstot = new ICMSTot(); + icmstot.setVBC("0.00"); + icmstot.setVICMS("0.00"); + icmstot.setVICMSDeson("0.00"); + icmstot.setVFCP("0.00"); + icmstot.setVBCST("0.00"); + icmstot.setVST("0.00"); + icmstot.setVFCPST("0.00"); + icmstot.setVFCPSTRet("0.00"); + icmstot.setVProd(V_PROD); + icmstot.setVFrete("0.00"); + icmstot.setVSeg("0.00"); + icmstot.setVDesc("0.00"); + icmstot.setVII("0.00"); + icmstot.setVIPI("0.00"); + icmstot.setVIPIDevol("0.00"); + icmstot.setVPIS("0.00"); + icmstot.setVCOFINS("0.00"); + icmstot.setVOutro("0.00"); + icmstot.setVNF(V_PROD); + total.setICMSTot(icmstot); + + total.setIBSCBSTot(ibsCbsUtil.preencheTotaisIbsCsb()); + BigDecimal vNfTot = ibsCbsUtil.calculaVnfTot(icmstot.getVNF()); + total.setVNFTot(ObjetoUtil.getValor2Casas(vNfTot)); + + return total; + } + + private static InfNFe.Emit preencheEmitente(ConfiguracoesNfe config) { + InfNFe.Emit emit = new InfNFe.Emit(); + emit.setCNPJ(CNPJ_EMIT); + emit.setXNome(NOME_EMIT); + + TEnderEmi enderEmit = new TEnderEmi(); + enderEmit.setXLgr("AV SANTO ANTONIO"); + enderEmit.setNro("0"); + enderEmit.setXBairro("PQ STO ANTONIO"); + enderEmit.setCMun("5219753"); + enderEmit.setXMun("SANTO ANTONIO DO DESCOBERTO"); + enderEmit.setUF(TUfEmi.valueOf(config.getEstado().toString())); + enderEmit.setCEP("72900000"); + enderEmit.setCPais("1058"); + enderEmit.setXPais("Brasil"); + emit.setEnderEmit(enderEmit); + + emit.setIE(IE_EMIT); + emit.setCRT(CRT_EMIT); + + return emit; + } + + private static InfNFe.Dest preencheDestinatario() { + InfNFe.Dest dest = new InfNFe.Dest(); + dest.setCNPJ("47966252000133"); + dest.setXNome("NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL"); + + TEndereco enderDest = new TEndereco(); + enderDest.setXLgr("Rua: Teste"); + enderDest.setNro("0"); + enderDest.setXBairro("TESTE"); + enderDest.setCMun("5202809"); + enderDest.setXMun("AVELINOPOLIS"); + enderDest.setUF(TUf.GO); + enderDest.setCEP("74430130"); + enderDest.setCPais("1058"); + enderDest.setXPais("Brasil"); + dest.setEnderDest(enderDest); + dest.setIE("109684036"); + dest.setIndIEDest("1"); + return dest; + } + + private static Transp preencheTransporte() { + Transp transp = new Transp(); + // 9 - sem ocorrencia de transporte: nao ha mercadoria circulando. + transp.setModFrete("9"); + return transp; + } + + /** + * Pagamento. tPag=90-Sem pagamento com vPag zerado: a nota lanca imposto na + * apuracao, nao cobra nada. O grupo em si continua obrigatorio pelo schema. + */ + private static InfNFe.Pag preenchePag() { + InfNFe.Pag pag = new InfNFe.Pag(); + InfNFe.Pag.DetPag detPag = new InfNFe.Pag.DetPag(); + detPag.setTPag("90"); + detPag.setVPag("0.00"); + pag.getDetPag().add(detPag); + return pag; + } + + /** + * Monta uma chave de acesso valida do proprio emitente, so para o exemplo + * rodar sem depender de uma nota real. Em producao a chave referenciada e a + * de um documento autorizado. + */ + private static String chaveSinteticaDeReferencia(ConfiguracoesNfe config) { + LocalDateTime mesPassado = LocalDateTime.now().minusMonths(1); + return new ChaveUtil(config.getEstado(), CNPJ_EMIT, DocumentoEnum.NFE.getModelo(), 1, + NUMERO_NFE - 1, "1", "00000001", mesPassado) + .getChaveNF().replaceFirst("^NFe", ""); + } + + /** @return a chave autorizada, ou null se a SEFAZ nao autorizou. */ + private static String envia(ConfiguracoesNfe config, TEnviNFe enviNFe) { + try { + System.out.println(XmlNfeUtil.objectToXml(enviNFe)); + enviNFe = Nfe.montaNfe(config, enviNFe, true); + + TRetEnviNFe retorno = Nfe.enviarNfe(config, enviNFe, DocumentoEnum.NFE); + RetornoUtil.validaSincrono(retorno); + + System.out.println("# Status: " + retorno.getProtNFe().getInfProt().getCStat() + + " - " + retorno.getProtNFe().getInfProt().getXMotivo()); + System.out.println("# Protocolo: " + retorno.getProtNFe().getInfProt().getNProt()); + System.out.println("# Chave: " + retorno.getProtNFe().getInfProt().getChNFe()); + return retorno.getProtNFe().getInfProt().getChNFe(); + } catch (Exception e) { + System.err.println("# Erro: " + e.getMessage()); + return null; + } + } +} diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/EpecTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/EpecTeste.java index 41e78917..ee1f88a2 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/EpecTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/EpecTeste.java @@ -8,10 +8,12 @@ import br.com.swconsultoria.nfe.dom.enuns.EstadosEnum; import br.com.swconsultoria.nfe.schemas_eventos.TEnvEventoEpec; import br.com.swconsultoria.nfe.schemas_eventos.TRetEnvEventoEpec; +import br.com.swconsultoria.nfe.util.ChaveUtil; import br.com.swconsultoria.nfe.util.EpecUtil; import br.com.swconsultoria.nfe.util.RetornoUtil; import java.time.LocalDateTime; +import java.util.Random; /** * @author Samuel Oliveira @@ -29,20 +31,27 @@ public static void main(String[] args) { //Para isso Foi criado o Objeto Epec Evento epec = new Evento(); //Informe a chave da Epec - epec.setChave("52190310732644000128550010000125491000125491"); + // O EPEC so aceita chave com tpEmis=4 (rejeicao 484): ela e montada aqui, + // e nao fixada, para refletir a nota que sera emitida em contingencia. + String cnpjEmit = "10732644000128"; + int numeroNfe = Integer.parseInt(System.getProperty("numeroNfeEpec", "94000")); + String cnf = String.format("%08d", new Random().nextInt(99999999)); + ChaveUtil chaveUtil = new ChaveUtil(EstadosEnum.GO, cnpjEmit, "55", 1, + numeroNfe, "4", cnf, LocalDateTime.now()); + epec.setChave(chaveUtil.getChaveNF().replace("NFe", "")); //Informe o CNPJ do emitente epec.setCnpj("10732644000128"); //Informe a data do EPEC epec.setDataEvento(LocalDateTime.now()); //Preenche os Dados do Evento EPEC EventoEpec eventoEpec = new EventoEpec(); - eventoEpec.setCnpjDestinatario("X"); - eventoEpec.setvST("X"); - eventoEpec.setvNF("X"); - eventoEpec.setvICMS("X"); - eventoEpec.setTipoNF("X"); - eventoEpec.setIeEmitente("X"); - eventoEpec.setIeDestinatario("X"); + eventoEpec.setCnpjDestinatario("10732644000128"); + eventoEpec.setvST("0.00"); + eventoEpec.setvNF("13.00"); + eventoEpec.setvICMS("0.00"); + eventoEpec.setTipoNF("1"); + eventoEpec.setIeEmitente("104519304"); + eventoEpec.setIeDestinatario("104519304"); eventoEpec.setEstadoDestinatario(EstadosEnum.GO); epec.setEventoEpec(eventoEpec); diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/EventoGenericoTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/EventoGenericoTeste.java index 4b0d3b84..bc01e39c 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/EventoGenericoTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/EventoGenericoTeste.java @@ -9,7 +9,7 @@ import br.com.swconsultoria.nfe.dom.enuns.AmbienteEnum; import br.com.swconsultoria.nfe.dom.enuns.EstadosEnum; import br.com.swconsultoria.nfe.dom.enuns.EventosEnum; -import br.com.swconsultoria.nfe.schemas_eventos.DetEventoConciliacaoFinanceira; +import br.com.swconsultoria.nfe.schemas_eventos.DetEvento112110; import br.com.swconsultoria.nfe.schemas_eventos.TEnvEventoGenerico; import br.com.swconsultoria.nfe.schemas_eventos.TRetEnvEventoGenerico; import br.com.swconsultoria.nfe.util.ConstantesUtil; @@ -34,22 +34,27 @@ public static void main(String[] args) { Evento generico = new Evento(); generico.setChave("52250810732644000128550010000927491462345823"); generico.setCnpj("10732644000128"); - generico.setSequencia(2); + generico.setSequencia(Integer.parseInt(System.getProperty("seqEvento", "2"))); generico.setDataEvento(LocalDateTime.now()); //Monta Eventos da Receita, Aqui pode ser qualquer um. //Abaixo Exemplo do 112110 - DetEventoConciliacaoFinanceira detEvento = new DetEventoConciliacaoFinanceira(); + // O payload tem de ser o do proprio tpEvento: 112110 usa DetEvento112110. + // Usar o do EConf (110750) rendia rejeicao 493 (schema especifico). + DetEvento112110 detEvento = new DetEvento112110(); detEvento.setVersao(ConstantesUtil.VERSAO.EVENTO_GENERICO); detEvento.setDescEvento("Informação de efetivo pagamento integral para liberar crédito presumido do adquirente"); // TODO 112110: detEvento.setCOrgaoAutor(config.getEstado().getCodigoUF()); // TODO 112110: detEvento.setTpAutor("1"); - detEvento.setVerAplic("v4.1.1"); + detEvento.setCOrgaoAutor("52"); + detEvento.setTpAutor("1"); + detEvento.setVerAplic("4.3.0"); + detEvento.setIndQuitacao("1"); // TODO 112110: detEvento.setIndQuitacao("1"); generico.setDetEvento(detEvento); //Monta o Evento Generico - TEnvEventoGenerico enviEvento = EventoGenericoUtil.montaEvento(generico,DetEventoConciliacaoFinanceira.class, EventosEnum.PAGAMENTO_INTEGRAL_CREDITO_PRESUMIDO, config); + TEnvEventoGenerico enviEvento = EventoGenericoUtil.montaEvento(generico, DetEvento112110.class, EventosEnum.PAGAMENTO_INTEGRAL_CREDITO_PRESUMIDO, config); //Envia o Evento Generico TRetEnvEventoGenerico retorno = Nfe.eventoGenerico(config, enviEvento, true); diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/IbsCbsTest.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/IbsCbsTest.java index c72839f6..597fa3b8 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/IbsCbsTest.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/IbsCbsTest.java @@ -3,10 +3,12 @@ import br.com.swconsultoria.certificado.Certificado; import br.com.swconsultoria.certificado.CertificadoService; import br.com.swconsultoria.nfe.Nfe; +import br.com.swconsultoria.nfe.Validar; import br.com.swconsultoria.nfe.dom.ConfiguracoesNfe; import br.com.swconsultoria.nfe.dom.enuns.AmbienteEnum; import br.com.swconsultoria.nfe.dom.enuns.DocumentoEnum; import br.com.swconsultoria.nfe.dom.enuns.EstadosEnum; +import br.com.swconsultoria.nfe.dom.enuns.ServicosEnum; import br.com.swconsultoria.nfe.exception.NfeException; import br.com.swconsultoria.nfe.schemas.TEnviNFe; import br.com.swconsultoria.nfe.schemas.TIBSCBSMonoTot; @@ -26,6 +28,7 @@ import java.util.Objects; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * @author Samuel Oliveira @@ -40,7 +43,8 @@ void testeIbsCbs() throws Exception { String json = getIbsCbsJson(); String cclassTrib = "000001"; - IbsCbsUtil ibsCbsUtil = new IbsCbsUtil(json, DocumentoEnum.NFE); + // o ano sai do dhEmi da propria nota: nao fixa data nem quebra na virada + IbsCbsUtil ibsCbsUtil = new IbsCbsUtil(json, DocumentoEnum.NFE, infNFe(enviNFe)); for (TNFe.InfNFe.Det det : enviNFe.getNFe().get(0).getInfNFe().getDet()) { TTribNFe ibsCbs = ibsCbsUtil.montaImpostosDet(cclassTrib, det); @@ -63,7 +67,8 @@ void testeIbsCbsRegular() throws Exception { String cclassTrib = "550001"; String cclassTribRegular = "000001"; - IbsCbsUtil ibsCbsUtil = new IbsCbsUtil(json, DocumentoEnum.NFE); + // o ano sai do dhEmi da propria nota: nao fixa data nem quebra na virada + IbsCbsUtil ibsCbsUtil = new IbsCbsUtil(json, DocumentoEnum.NFE, infNFe(enviNFe)); for (TNFe.InfNFe.Det det : enviNFe.getNFe().get(0).getInfNFe().getDet()) { TTribNFe ibsCbs = ibsCbsUtil.montaImpostosDet(cclassTrib, det, cclassTribRegular); @@ -86,7 +91,8 @@ void testeIbsCbsMonofasico() throws Exception { String json = getIbsCbsJson(); String cclassTrib = "620006"; - IbsCbsUtil ibsCbsUtil = new IbsCbsUtil(json, DocumentoEnum.NFE); + // o ano sai do dhEmi da propria nota: nao fixa data nem quebra na virada + IbsCbsUtil ibsCbsUtil = new IbsCbsUtil(json, DocumentoEnum.NFE, infNFe(enviNFe)); for (TNFe.InfNFe.Det det : enviNFe.getNFe().get(0).getInfNFe().getDet()) { TTribNFe ibsCbs = ibsCbsUtil.montaImpostosDet(cclassTrib, det); @@ -109,7 +115,8 @@ void testeIbsCbsDiferimento() throws Exception { String json = getIbsCbsJson(); String cclassTrib = "515001"; - IbsCbsUtil ibsCbsUtil = new IbsCbsUtil(json, DocumentoEnum.NFE); + // o ano sai do dhEmi da propria nota: nao fixa data nem quebra na virada + IbsCbsUtil ibsCbsUtil = new IbsCbsUtil(json, DocumentoEnum.NFE, infNFe(enviNFe)); for (TNFe.InfNFe.Det det : enviNFe.getNFe().get(0).getInfNFe().getDet()) { ibsCbsUtil.setpAliqDiferimento(BigDecimal.valueOf(100)); @@ -124,6 +131,47 @@ void testeIbsCbsDiferimento() throws Exception { assertEquals(esperado, XmlNfeUtil.objectToXml(enviNFe)); } + /** + * Valida contra o XSD o XML gerado nas duas modalidades de monofasia, com aliquotas + * reais. Diferente dos demais testes desta classe, que comparam string com o golden + * file, este exercita o contrato de schema: pega erro de estrutura ou de campo + * obrigatorio que a comparacao textual nao enxerga. + */ + @Test + void deveGerarXmlMonofasicoValidoContraOSchemaNasDuasModalidades() throws Exception { + for (boolean adValorem : new boolean[]{false, true}) { + ConfiguracoesNfe config = getConfiguracoesNfe(); + TEnviNFe enviNFe = getEnviNFe(); + IbsCbsUtil util = new IbsCbsUtil(getIbsCbsJson(), DocumentoEnum.NFE); + + // aqui o ano divergir do dhEmi e intencional: o que se testa e a estrutura + // das duas modalidades contra o XSD, nao o valor emitido + util.setAnoEmissao(adValorem ? 2026 : 2029); + if (adValorem) { + util.setPAliqMonoUF(new BigDecimal("10")); + util.setPAliqMonoMun(new BigDecimal("2")); + util.setPAliqMonoCBS(new BigDecimal("8")); + } else { + // Gasolina: R$ 0,7925 por litro, repartido entre IBS e CBS + util.setAdRemIBS(new BigDecimal("0.5000")); + util.setAdRemCBS(new BigDecimal("0.2925")); + } + + for (TNFe.InfNFe.Det det : enviNFe.getNFe().get(0).getInfNFe().getDet()) { + TTribNFe ibsCbs = util.montaImpostosDet("620001", det); + det.getImposto().getContent() + .add(new JAXBElement<>(new QName("IBSCBS"), TTribNFe.class, ibsCbs)); + } + + enviNFe = addTotaisIbsCbs(util, enviNFe, config); + String xml = XmlNfeUtil.objectToXml(enviNFe); + + String xsd = Paths.get("schemas", ServicosEnum.ENVIO.getXsd()).toString(); + assertTrue(new Validar().isValidXml(xsd, xml), + "XML monofasico " + (adValorem ? "ad valorem" : "ad rem") + " deve validar contra o XSD"); + } + } + private static TEnviNFe addTotaisIbsCbs(IbsCbsUtil ibsCbsUtil, TEnviNFe enviNFe, ConfiguracoesNfe config) throws NfeException { BigDecimal vNfTot = ibsCbsUtil.calculaVnfTot(enviNFe.getNFe().get(0).getInfNFe().getTotal().getICMSTot().getVNF()); enviNFe.getNFe().get(0).getInfNFe().getTotal().setVNFTot(ObjetoUtil.getValor2Casas(vNfTot)); @@ -133,6 +181,21 @@ private static TEnviNFe addTotaisIbsCbs(IbsCbsUtil ibsCbsUtil, TEnviNFe enviNFe, return Nfe.montaNfe(config, enviNFe, false); } + /** + * Os goldens acima esperam vNFTot sem IBS/CBS, o que so vale ate 2026 (VB01-10 + * Excecao 1). Se o dhEmi do fixture mudar de ano, os quatro falham com diff de + * bytes; este falha antes, dizendo o motivo. + */ + @Test + void oFixtureDosGoldensDeveSerDeAnoSemTributoNoTotal() throws Exception { + assertEquals("2026", infNFe(getEnviNFe()).getIde().getDhEmi().substring(0, 4), + "os goldens assumem nota de 2026"); + } + + private static TNFe.InfNFe infNFe(TEnviNFe enviNFe) { + return enviNFe.getNFe().get(0).getInfNFe(); + } + private static String getIbsCbsJson() throws IOException { return XmlNfeUtil.leXml("src/test/resources/ibscbs.json"); } diff --git a/src/test/java/br/com/swconsultoria/nfe/exemplos/InutilizarTeste.java b/src/test/java/br/com/swconsultoria/nfe/exemplos/InutilizarTeste.java index ba30b403..e66f2c18 100644 --- a/src/test/java/br/com/swconsultoria/nfe/exemplos/InutilizarTeste.java +++ b/src/test/java/br/com/swconsultoria/nfe/exemplos/InutilizarTeste.java @@ -34,9 +34,9 @@ public static void main(String[] args) { //Informe a serie int serie = 1; //Informe a numeracao Inicial - int numeroInicial = 243; + int numeroInicial = Integer.parseInt(System.getProperty("inutNumeroInicial", "243")); //Informe a numeracao Final - int numeroFinal = 244; + int numeroFinal = Integer.parseInt(System.getProperty("inutNumeroFinal", "244")); //Informe a Justificativa da Inutilizacao String justificativa = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; //Informe a data do Cancelamento diff --git a/src/test/java/br/com/swconsultoria/nfe/impressao/TesteImpressaoDanfeV2.java b/src/test/java/br/com/swconsultoria/nfe/impressao/TesteImpressaoDanfeV2.java new file mode 100644 index 00000000..3cc47e61 --- /dev/null +++ b/src/test/java/br/com/swconsultoria/nfe/impressao/TesteImpressaoDanfeV2.java @@ -0,0 +1,39 @@ +package br.com.swconsultoria.nfe.impressao; + +import br.com.swconsultoria.nfe.impressao.v2.ImpressaoDanfeV2DTO; +import br.com.swconsultoria.nfe.impressao.v2.ImpressaoDanfeV2Util; +import br.com.swconsultoria.nfe.impressao.v2.OrientacaoDanfeEnum; +import br.com.swconsultoria.nfe.util.XmlNfeUtil; + +/** + * DANFE v2 (Thymeleaf, leiaute NT 2026.010 - IBS/CBS/IS). Só NF-e modelo 55; a v1 (Jasper) continua em {@link TesteImpressaoNFe}. + */ +public class TesteImpressaoDanfeV2 { + + public static void main(String[] args) { + try { + //Faça a leitura do Arquivo + String xml = XmlNfeUtil.leXml("d:/teste/nfe.xml"); + + //Aqui está pegando o Layout Padrão v2 (Thymeleaf - NT 2026.010) + ImpressaoDanfeV2DTO impressao = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml); + + //Customizações opcionais + //impressao.setLogoArquivo("d:/teste/logo.png"); //Logo próprio (ou setLogo(InputStream / byte[])) + //impressao.removerLogo(); //Imprime sem logo + //impressao.setOrientacao(OrientacaoDanfeEnum.PAISAGEM); //Padrão: AUTOMATICA (pelo tpImp do XML) + //impressao.setExibirCanhoto(false); + //impressao.setTemplate("d:/teste/meu-danfe.html"); //Template Thymeleaf próprio + //impressao.getParametros().put("chave", "valor"); //Disponível no template como ${parametros.chave} + + //Faz a impressão em pdf File + ImpressaoDanfeV2Util.impressaoPdfArquivo(impressao, "d:/teste/teste-nfe-v2.pdf"); + System.out.println("Impressão Pdf Arquivo OK"); + + //Ou: ImpressaoDanfeV2Util.impressaoPdfByte(impressao), impressaoHtml(impressao, destino), impressaoDireta(impressao) + } catch (Exception e) { + //Trate seus erros aqui + e.printStackTrace(); + } + } +} diff --git a/src/test/java/br/com/swconsultoria/nfe/impressao/TesteImpressaoDanfeV2QuebraPagina.java b/src/test/java/br/com/swconsultoria/nfe/impressao/TesteImpressaoDanfeV2QuebraPagina.java new file mode 100644 index 00000000..d1ce6340 --- /dev/null +++ b/src/test/java/br/com/swconsultoria/nfe/impressao/TesteImpressaoDanfeV2QuebraPagina.java @@ -0,0 +1,37 @@ +package br.com.swconsultoria.nfe.impressao; + +import br.com.swconsultoria.nfe.impressao.v2.ImpressaoDanfeV2DTO; +import br.com.swconsultoria.nfe.impressao.v2.ImpressaoDanfeV2Util; +import br.com.swconsultoria.nfe.impressao.v2.OrientacaoDanfeEnum; +import br.com.swconsultoria.nfe.util.XmlNfeUtil; + +/** + * Teste da quebra de página do DANFE v2 com uma NF-e de 50 itens. + * Conferir no PDF: o cabeçalho e o título da tabela de itens se repetem nas folhas seguintes, + * a numeração "FOLHA x/y" e se nenhuma linha de item ficou cortada entre duas folhas. + * Execute a partir da raiz do projeto. + */ +public class TesteImpressaoDanfeV2QuebraPagina { + + public static void main(String[] args) { + try { + //NF-e fictícia de homologação com 50 itens (gerada a partir do DanfeV2Rtc.xml) + String xml = XmlNfeUtil.leXml("src/test/resources/DanfeV2Rtc50Itens.xml"); + + //Retrato + ImpressaoDanfeV2DTO retrato = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml); + retrato.setOrientacao(OrientacaoDanfeEnum.RETRATO); + ImpressaoDanfeV2Util.impressaoPdfArquivo(retrato, "d:/teste/teste-nfe-v2-50-itens-retrato.pdf"); + System.out.println("Impressão Pdf Retrato OK"); + + //Paisagem + ImpressaoDanfeV2DTO paisagem = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml); + paisagem.setOrientacao(OrientacaoDanfeEnum.PAISAGEM); + ImpressaoDanfeV2Util.impressaoPdfArquivo(paisagem, "d:/teste/teste-nfe-v2-50-itens-paisagem.pdf"); + System.out.println("Impressão Pdf Paisagem OK"); + } catch (Exception e) { + //Trate seus erros aqui + e.printStackTrace(); + } + } +} diff --git a/src/test/java/br/com/swconsultoria/nfe/impressao/v2/ImpressaoDanfeV2UtilTest.java b/src/test/java/br/com/swconsultoria/nfe/impressao/v2/ImpressaoDanfeV2UtilTest.java new file mode 100644 index 00000000..6dc4f8c7 --- /dev/null +++ b/src/test/java/br/com/swconsultoria/nfe/impressao/v2/ImpressaoDanfeV2UtilTest.java @@ -0,0 +1,362 @@ +package br.com.swconsultoria.nfe.impressao.v2; + +import br.com.swconsultoria.nfe.exception.DanfeException; +import br.com.swconsultoria.nfe.util.XmlNfeUtil; +import com.openhtmltopdf.util.XRLog; +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.pdmodel.PDPage; +import org.apache.pdfbox.pdmodel.common.PDRectangle; +import org.apache.pdfbox.text.PDFTextStripperByArea; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import java.awt.geom.Rectangle2D; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Map; +import java.util.logging.Level; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.junit.jupiter.api.Assertions.*; + +/** + * DANFE v2 (Thymeleaf) com as NF-e fictícias de homologação de src/test/resources: + * DanfeV2Rtc.xml (2 itens, IBSCBS com e sem gRed, IS, duplicatas, transporte e QR Code), + * DanfeV2Rtc50Itens.xml (50 itens, para a quebra de página), DanfeV2Mono.xml (monofásico ad rem e ad valorem, + * transferência de crédito e ajuste de competência) e DanfeV2SemRtc.xml (NF-e sem RTC e sem protocolo). + */ +class ImpressaoDanfeV2UtilTest { + + private static String xml; + private static String xml50Itens; + private static String xmlMono; + private static String xmlSemRtc; + + @BeforeAll + static void leXmls() throws IOException { + // A biblioteca não mexe no log do openhtmltopdf; aqui só para não poluir a saída do build + for (String logger : XRLog.listRegisteredLoggers()) { + XRLog.setLevel(logger, Level.WARNING); + } + xml = XmlNfeUtil.leXml("src/test/resources/DanfeV2Rtc.xml"); + xml50Itens = XmlNfeUtil.leXml("src/test/resources/DanfeV2Rtc50Itens.xml"); + xmlMono = XmlNfeUtil.leXml("src/test/resources/DanfeV2Mono.xml"); + xmlSemRtc = XmlNfeUtil.leXml("src/test/resources/DanfeV2SemRtc.xml"); + } + + @Test + void gerarHtmlComDadosDaNota() { + String html = ImpressaoDanfeV2Util.gerarHtml(ImpressaoDanfeV2Util.impressaoPadraoNFe(xml)); + + assertTrue(html.contains("EMPRESA EXEMPLO LTDA")); + assertTrue(html.contains("000.000.123")); + assertTrue(html.contains("3526 1212 3456 7800 0195 5500 1000 0001 2310 0000 1234"), "chave em grupos de 4"); + assertTrue(html.contains("1.775,00"), "vNF"); + assertTrue(html.contains("TOTAL DO IBS / CBS / IS")); + assertEquals("1.656,00", valorDoCampo(html, "BASE DE CÁLCULO DO IBS / CBS"), "base de cálculo total do IBS/CBS"); + assertTrue(html.contains("IBS/CBS 000") && html.contains("IBS/CBS 200"), "CST do IBS/CBS de cada item"); + assertTrue(html.contains("SEM VALOR FISCAL"), "tpAmb=2 imprime a marca d'água"); + assertTrue(html.contains("data:image/png;base64,"), "logo, código de barras e QR Code em data URI"); + assertFalse(html.contains("null"), "nenhuma concatenação imprime o literal null"); + } + + @Test + void aliquotaEfetivaQuandoHaGRed() { + DanfeV2DTO danfe = LeitorDanfeV2.ler(new XmlDanfeV2(xml)); + + assertEquals(2, danfe.getItens().size()); + Map item1 = danfe.getItens().get(0); + Map item2 = danfe.getItens().get(1); + assertEquals("0.9000", item1.get("pCBS"), "sem gRed imprime a alíquota vigente"); + assertEquals("0.3600", item2.get("pCBS"), "com gRed imprime pAliqEfet (NT 2026.010 item 4.3)"); + assertEquals("0.0400", item2.get("pIBSUF")); + assertEquals("0.9000", item2.get("pCBSVigente")); + assertEquals("000", item1.get("cstIBSCBS")); + assertEquals("200", item2.get("cstIBSCBS")); + assertEquals("1.50", item1.get("vIBS"), "gIBSCBS/vIBS também fica disponível"); + assertNull(item1.get("qBCMono"), "item gIBSCBS não tem chaves do monofásico"); + } + + @Test + void itensMonofasicosTransferenciaEAjusteCoerentesComOTotal() throws IOException { + DanfeV2DTO danfe = LeitorDanfeV2.ler(new XmlDanfeV2(xmlMono)); + + assertEquals(4, danfe.getItens().size()); + Map adRem = danfe.getItens().get(0); + Map adValorem = danfe.getItens().get(1); + Map transferencia = danfe.getItens().get(2); + Map ajuste = danfe.getItens().get(3); + + // Ad rem (CST 620): base em quantidade, alíquota em R$/unidade, valor sem abertura UF/Município + assertEquals("620", adRem.get("cstIBSCBS")); + assertNull(adRem.get("vBCIBSCBS")); + assertEquals("1000.0000", adRem.get("qBCMono")); + assertEquals("0.0500", adRem.get("adRemIBS")); + assertEquals("0.2000", adRem.get("adRemCBS")); + assertEquals("50.00", adRem.get("vIBS")); + assertEquals("200.00", adRem.get("vCBS")); + assertNull(adRem.get("vIBSUF")); + assertNull(adRem.get("pIBSUF")); + assertEquals("10.00", adRem.get("vIBSMonoReten")); + assertEquals("30.00", adRem.get("vCBSMonoReten")); + assertEquals("60.00", adRem.get("vTotIBSMonoItem")); + + // Ad valorem: entra nas mesmas colunas do gIBSCBS (base em R$ e alíquota em %) + assertEquals("5000.00", adValorem.get("vBCIBSCBS")); + assertEquals("0.1000", adValorem.get("pIBSUF")); + assertEquals("5.00", adValorem.get("vIBSUF")); + assertEquals("0.0000", adValorem.get("pIBSMun")); + assertEquals("0.9000", adValorem.get("pCBS")); + assertEquals("45.00", adValorem.get("vCBS")); + assertEquals("1.00", adValorem.get("vIBSMonoRet")); + assertEquals("2.00", adValorem.get("vCBSMonoRet")); + assertNull(adValorem.get("adRemIBS")); + + // Transferência de crédito (CST 800) e ajuste de competência (CST 811): só valores + assertEquals("800", transferencia.get("cstIBSCBS")); + assertEquals("10.00", transferencia.get("vIBS")); + assertEquals("30.00", transferencia.get("vCBS")); + assertEquals("811", ajuste.get("cstIBSCBS")); + assertEquals("1.00", ajuste.get("vIBS")); + assertEquals("3.00", ajuste.get("vCBS")); + assertEquals("2026-11", ajuste.get("competApur")); + + // Totais: a nota só tem monofásico, então gMono é a soma dos itens e gIBS/gCBS vêm zerados + assertTrue(danfe.isExibirIbsCbsIs()); + assertTrue(danfe.isExibirLinhaIbsCbsMono()); + assertTrue(danfe.isExibirLinhaIbsCbsMonoRet()); + Map tot = danfe.getIbsCbsTot(); + assertEquals(new BigDecimal(adRem.get("vIBS")).add(new BigDecimal(adValorem.get("vIBS"))), new BigDecimal(tot.get("vIBSMono"))); + assertEquals(new BigDecimal(adRem.get("vCBS")).add(new BigDecimal(adValorem.get("vCBS"))), new BigDecimal(tot.get("vCBSMono"))); + assertEquals(new BigDecimal(adRem.get("vIBSMonoReten")), new BigDecimal(tot.get("vIBSMonoReten"))); + assertEquals(new BigDecimal(adValorem.get("vIBSMonoRet")), new BigDecimal(tot.get("vIBSMonoRet"))); + assertEquals(0, new BigDecimal(tot.get("vIBSUF")).signum(), "sem item gIBSCBS o IBS normal é zero"); + assertEquals(0, new BigDecimal(tot.get("vCBS")).signum()); + + ImpressaoDanfeV2DTO impressao = ImpressaoDanfeV2Util.impressaoPadraoNFe(xmlMono); + String html = ImpressaoDanfeV2Util.gerarHtml(impressao); + assertEquals("55,00", valorDoCampo(html, "VALOR DO IBS MONOFÁSICO")); + assertEquals("245,00", valorDoCampo(html, "VALOR DA CBS MONOFÁSICA")); + assertEquals("1,00", valorDoCampo(html, "VALOR DO IBS MONOFÁSICO RETIDO ANTERIORMENTE")); + assertEquals("2,00", valorDoCampo(html, "VALOR DA CBS MONOFÁSICA RETIDA ANTERIORMENTE")); + assertTrue(html.contains("IBS/CBS QTD1.000,00<"), "base em quantidade do ad rem"); + assertTrue(html.contains("0,0500") && html.contains("0,2000"), "alíquotas ad rem"); + assertTrue(html.contains("IBS/CBS 620") && html.contains("IBS/CBS 800") && html.contains("IBS/CBS 811")); + assertTrue(html.contains("Retenção monofásica IBS 10,00 CBS 30,00")); + assertTrue(html.contains("Retido anteriormente IBS 1,00 CBS 2,00")); + assertTrue(html.contains("Ajuste de competência 11/2026")); + assertFalse(html.contains("null")); + assertEquals(1, folhas(ImpressaoDanfeV2Util.impressaoPdfByte(impressao))); + } + + @Test + void notaSemGruposOpcionaisNaoImprimeQuadrosFacultativos() throws IOException { + DanfeV2DTO danfe = LeitorDanfeV2.ler(new XmlDanfeV2(xmlSemRtc)); + + assertFalse(danfe.isExibirIbsCbsIs()); + assertFalse(danfe.isExibirQrCode()); + assertFalse(danfe.isExibirFatura()); + assertTrue(danfe.isExibirTransporte(), "modFrete é obrigatório no XML: o quadro sai mesmo sem transportadora"); + assertFalse(danfe.isExibirIssqn()); + assertTrue(danfe.getProt().isEmpty()); + assertEquals("35261212345678000195550010000004561000004567", danfe.getChave(), "sem protNFe a chave vem do infNFe/@Id"); + assertEquals("102", danfe.getItens().get(0).get("CST"), "CSOSN no lugar do CST"); + assertNull(danfe.getItens().get(0).get("cstIBSCBS")); + + ImpressaoDanfeV2DTO impressao = ImpressaoDanfeV2Util.impressaoPadraoNFe(xmlSemRtc); + impressao.removerLogo(); + String html = ImpressaoDanfeV2Util.gerarHtml(impressao); + assertFalse(html.contains("TOTAL DO IBS / CBS / IS")); + assertFalse(html.contains("QR CODE")); + assertFalse(html.contains("FATURA / DUPLICATAS")); + assertEquals("9 - Sem Frete", valorDoCampo(html, "FRETE POR CONTA"), "o XML traz só o modFrete"); + assertFalse(html.contains("class=\"logo\""), "removerLogo: o template não gera o bloco do logo"); + assertFalse(html.contains("null"), "nenhuma concatenação imprime o literal null"); + assertTrue(html.contains("1 - SIMPLES NACIONAL")); + assertEquals(1, folhas(ImpressaoDanfeV2Util.impressaoPdfByte(impressao))); + } + + @Test + void modalidadeDoFreteSaiMesmoSemTransportadora() { + String soModFrete = xmlSemRtc.replace("9", "0"); + assertNotEquals(xmlSemRtc, soModFrete); + + String html = ImpressaoDanfeV2Util.gerarHtml(ImpressaoDanfeV2Util.impressaoPadraoNFe(soModFrete)); + + assertEquals("0 - Remetente", valorDoCampo(html, "FRETE POR CONTA")); + } + + @Test + void valorUnitarioImprimeTodasAsCasasDoXml() { + assertEquals("13,00", new FormatadorDanfeV2().valorUnitario("13.000000")); + assertEquals("5,899", new FormatadorDanfeV2().valorUnitario("5.8990")); + assertEquals("5,893217", new FormatadorDanfeV2().valorUnitario("5.893217")); + assertEquals("1.234,1234567891", new FormatadorDanfeV2().valorUnitario("1234.1234567891"), "o Schema aceita até 10 casas"); + assertEquals("", new FormatadorDanfeV2().valorUnitario(null)); + + String comSeisCasas = xmlSemRtc.replaceFirst("[^<]*", "5.893217"); + assertNotEquals(xmlSemRtc, comSeisCasas); + + String html = ImpressaoDanfeV2Util.gerarHtml(ImpressaoDanfeV2Util.impressaoPadraoNFe(comSeisCasas)); + + assertTrue(html.contains(">5,893217<"), "vUnCom no DANFE com as casas do XML, sem arredondar"); + assertFalse(html.contains("num-longo\""), "até 10 caracteres cabe na coluna em 7pt"); + + String comDezCasas = xmlSemRtc.replaceFirst("[^<]*", "1234.1234567891"); + String htmlLongo = ImpressaoDanfeV2Util.gerarHtml(ImpressaoDanfeV2Util.impressaoPadraoNFe(comDezCasas)); + + assertTrue(htmlLongo.contains("num-longo\">1.234,1234567891<"), "valor longo em fonte menor para não cortar o início"); + } + + @Test + void blocosFacultativos() { + DanfeV2DTO danfe = LeitorDanfeV2.ler(new XmlDanfeV2(xml)); + + assertTrue(danfe.isHomologacao()); + assertFalse(danfe.isPaisagem(), "tpImp=1"); + assertTrue(danfe.isExibirIbsCbsIs()); + assertTrue(danfe.isExibirQrCode()); + assertTrue(danfe.isExibirFatura()); + assertTrue(danfe.isExibirTransporte()); + assertFalse(danfe.isExibirLinhaFcp(), "vFCP/vFCPST vêm 0.00 em toda NF-e 4.00: a linha não sai"); + assertFalse(danfe.isExibirLinhaIcmsMono()); + assertFalse(danfe.isExibirLinhaIbsCbsMono()); + } + + @Test + void pdfRetratoEPaisagemEmUmaFolha() throws IOException { + ImpressaoDanfeV2DTO impressao = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml); + assertEquals(1, folhas(ImpressaoDanfeV2Util.impressaoPdfByte(impressao))); + + impressao.setOrientacao(OrientacaoDanfeEnum.PAISAGEM); + byte[] paisagem = ImpressaoDanfeV2Util.impressaoPdfByte(impressao); + assertEquals(1, folhas(paisagem)); + try (PDDocument documento = PDDocument.load(paisagem)) { + PDRectangle folha = documento.getPage(0).getMediaBox(); + assertTrue(folha.getWidth() > folha.getHeight(), "folha em paisagem"); + } + } + + @Test + void quebraDePaginaCom50Itens() throws IOException { + // O que importa é quebrar em várias folhas, repetir o cabeçalho e não cortar item; a contagem exata + // (hoje 3 em retrato e 4 em paisagem) muda a cada ajuste de CSS e não é o contrato + ImpressaoDanfeV2DTO retrato = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml50Itens); + retrato.setOrientacao(OrientacaoDanfeEnum.RETRATO); + byte[] pdfRetrato = ImpressaoDanfeV2Util.impressaoPdfByte(retrato); + assertTrue(folhas(pdfRetrato) >= 3, "retrato em várias folhas"); + assertTrue(textoDaUltimaFolha(pdfRetrato, 0f, 0.25f).contains("DANFE"), "cabeçalho repetido na última folha"); + assertTrue(textoDaUltimaFolha(pdfRetrato, 0f, 1f).contains("DISJUNTOR TERMOMAGNETICO"), "item 50 na última folha"); + + ImpressaoDanfeV2DTO paisagem = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml50Itens); + paisagem.setOrientacao(OrientacaoDanfeEnum.PAISAGEM); + byte[] pdfPaisagem = ImpressaoDanfeV2Util.impressaoPdfByte(paisagem); + assertTrue(folhas(pdfPaisagem) > folhas(pdfRetrato), "paisagem cabe menos itens por folha"); + assertTrue(textoDaUltimaFolha(pdfPaisagem, 0f, 0.25f).contains("DANFE")); + } + + @Test + void dadosAdicionaisNoRodapeDaUltimaFolha() throws IOException { + // 2 itens em retrato: o bloco sai do meio da folha e encosta no rodapé, como no DANFE Jasper + byte[] retrato = ImpressaoDanfeV2Util.impressaoPdfByte(ImpressaoDanfeV2Util.impressaoPadraoNFe(xml)); + assertEquals(1, folhas(retrato)); + assertTrue(textoDaUltimaFolha(retrato, 0.80f, 1f).contains("RESERVADO AO FISCO"), "bloco nos últimos 20% da folha"); + assertFalse(textoDaUltimaFolha(retrato, 0.25f, 0.75f).contains("RESERVADO AO FISCO"), "bloco fora do meio da folha"); + + // 50 itens em paisagem: várias folhas e o bloco no rodapé da última + ImpressaoDanfeV2DTO paisagem = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml50Itens); + paisagem.setOrientacao(OrientacaoDanfeEnum.PAISAGEM); + byte[] pdf50 = ImpressaoDanfeV2Util.impressaoPdfByte(paisagem); + assertTrue(folhas(pdf50) >= 3); + assertTrue(textoDaUltimaFolha(pdf50, 0.80f, 1f).contains("RESERVADO AO FISCO")); + + // Sem os marcadores (template próprio), o PDF continua saindo, com o bloco logo após os itens + String html = ImpressaoDanfeV2Util.gerarHtml(ImpressaoDanfeV2Util.impressaoPadraoNFe(xml)) + .replace("id=\"" + ImpressaoDanfeV2Util.ID_ESPACO_DADOS_ADICIONAIS + "\"", ""); + byte[] semMarcador = ImpressaoDanfeV2Util.htmlParaPdf(html); + assertEquals(1, folhas(semMarcador)); + assertTrue(textoDaUltimaFolha(semMarcador, 0.25f, 0.75f).contains("RESERVADO AO FISCO")); + } + + @Test + void xmlComBomEhAceito() { + assertDoesNotThrow(() -> ImpressaoDanfeV2Util.gerarHtml(ImpressaoDanfeV2Util.impressaoPadraoNFe("\uFEFF" + xml))); + } + + @Test + void errosViramDanfeException() { + assertThrows(DanfeException.class, () -> ImpressaoDanfeV2Util.gerarHtml(ImpressaoDanfeV2Util.impressaoPadraoNFe(null))); + assertThrows(DanfeException.class, () -> ImpressaoDanfeV2Util.gerarHtml(ImpressaoDanfeV2Util.impressaoPadraoNFe(""))); + + ImpressaoDanfeV2DTO impressao = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml); + impressao.setTemplate("d:/nao/existe/danfe.html"); + DanfeException erro = assertThrows(DanfeException.class, () -> ImpressaoDanfeV2Util.gerarHtml(impressao)); + assertTrue(erro.getMessage().startsWith("Erro ao processar o template")); + + // Caminho inválido (InvalidPathException no Windows, NoSuchFileException nos demais): sempre DanfeException + ImpressaoDanfeV2DTO valida = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml); + assertThrows(DanfeException.class, () -> ImpressaoDanfeV2Util.impressaoHtml(valida, "nao/existe/da|nfe\0.html")); + assertThrows(DanfeException.class, () -> ImpressaoDanfeV2Util.impressaoPdfArquivo(valida, "nao/existe/da|nfe\0.pdf")); + } + + @Test + void logo() { + ImpressaoDanfeV2DTO impressao = ImpressaoDanfeV2Util.impressaoPadraoNFe(xml); + assertNotNull(impressao.getLogo(), "logo padrão /img/nfe.png"); + + impressao.removerLogo(); + assertNull(impressao.getLogo()); + + impressao.setLogoArquivo("src/main/resources/img/nfe.png"); + assertNotNull(impressao.getLogo()); + + impressao.setLogoArquivo(null); + assertNull(impressao.getLogo()); + + assertThrows(DanfeException.class, () -> impressao.setLogoArquivo("d:/nao/existe/logo.png")); + } + + @Test + void formatador() { + FormatadorDanfeV2 fmt = new FormatadorDanfeV2(); + + assertEquals("1.234,50", fmt.valor("1234.5")); + assertEquals("1,01", fmt.valor("1.005"), "HALF_UP, não HALF_EVEN"); + assertEquals("18,00%", fmt.aliquota("18.00")); + assertEquals("12.345.678/0001-95", fmt.documento("12345678000195")); + assertEquals("000.000.123", fmt.numeroNota("123")); + assertEquals("001", fmt.serie("1")); + assertEquals("25/12/2026 10:30:00", fmt.dataHora("2026-12-25T10:30:00-03:00")); + assertEquals("000", fmt.cst("0", "00")); + assertEquals("", fmt.valor(null)); + assertEquals("0,0500", fmt.adRem("0.0500")); + assertEquals("11/2026", fmt.competencia("2026-11")); + assertEquals("", fmt.complementoIbsCbs(null)); + } + + /** Valor impresso logo abaixo do rótulo de um campo do fragmento "campo" (rótulo + valor), ou null se o rótulo não existe. */ + private static String valorDoCampo(String html, String rotulo) { + Matcher m = Pattern.compile(Pattern.quote(rotulo) + "\\s*

([^<]*)
").matcher(html); + return m.find() ? m.group(1) : null; + } + + private static int folhas(byte[] pdf) throws IOException { + try (PDDocument documento = PDDocument.load(pdf)) { + return documento.getNumberOfPages(); + } + } + + /** Texto da faixa horizontal da última folha entre as duas frações da altura (0 = topo, 1 = pé da folha). */ + private static String textoDaUltimaFolha(byte[] pdf, float de, float ate) throws IOException { + try (PDDocument documento = PDDocument.load(pdf)) { + PDPage ultima = documento.getPage(documento.getNumberOfPages() - 1); + PDRectangle folha = ultima.getMediaBox(); + PDFTextStripperByArea stripper = new PDFTextStripperByArea(); + stripper.addRegion("faixa", new Rectangle2D.Float(0, folha.getHeight() * de, + folha.getWidth(), folha.getHeight() * (ate - de))); + stripper.extractRegions(ultima); + return stripper.getTextForRegion("faixa"); + } + } +} diff --git a/src/test/java/br/com/swconsultoria/nfe/util/IbsCbsUtilTest.java b/src/test/java/br/com/swconsultoria/nfe/util/IbsCbsUtilTest.java index 05231e98..521f0b74 100644 --- a/src/test/java/br/com/swconsultoria/nfe/util/IbsCbsUtilTest.java +++ b/src/test/java/br/com/swconsultoria/nfe/util/IbsCbsUtilTest.java @@ -8,10 +8,9 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import java.io.IOException; import java.math.BigDecimal; -import java.util.ArrayList; import java.util.Collections; -import java.util.List; import static org.junit.jupiter.api.Assertions.*; @@ -289,15 +288,195 @@ void naoDeveQuebrarComCstDtoSemNovosIndicadores() throws NfeException { assertNull(resultado.getGCredPresIBSZFM()); } + // ------------------------------------------------------------------------- + // Base de calculo do IBS/CBS (gIBSCBS/vBC) + // ------------------------------------------------------------------------- + + /** + * Regressao: item com ICMS70 (reducao de BC + ST) tinha o vICMS ignorado por + * XmlImpostoUtil.getVICMS, inflando a base do IBS/CBS. + * Cenario real: NF-e 735190 / Puratos, item 1. + * 668.57 - 9.71 (PIS) - 44.71 (COFINS) - 80.23 (ICMS) = 533.92 + */ + @Test + void deveSubtrairVicmsDoGrupoIcms70NaBaseDeCalculo() throws NfeException { + TNFe.InfNFe.Det det = criarDetMinimo("668.57", "2.0000"); + adicionarIcms70(det, "80.23", null); + adicionarPisCofins(det, "9.71", "44.71"); + + TTribNFe resultado = calcular(det); + + assertEquals("533.92", resultado.getGIBSCBS().getVBC()); + assertEquals("0.53", resultado.getGIBSCBS().getGIBSUF().getVIBSUF()); + assertEquals("4.81", resultado.getGIBSCBS().getGCBS().getVCBS()); + } + + @Test + void deveSubtrairVfcpDoGrupoIcms70NaBaseDeCalculo() throws NfeException { + TNFe.InfNFe.Det det = criarDetMinimo("668.57", "2.0000"); + adicionarIcms70(det, "80.23", "10.00"); + adicionarPisCofins(det, "9.71", "44.71"); + + TTribNFe resultado = calcular(det); + + assertEquals("523.92", resultado.getGIBSCBS().getVBC()); + } + + @Test + void deveSubtrairVicmsDoGrupoIcmsPartNaBaseDeCalculo() throws NfeException { + TNFe.InfNFe.Det det = criarDetMinimo("100.00", "1.0000"); + TNFe.InfNFe.Det.Imposto.ICMS icms = new TNFe.InfNFe.Det.Imposto.ICMS(); + TNFe.InfNFe.Det.Imposto.ICMS.ICMSPart part = new TNFe.InfNFe.Det.Imposto.ICMS.ICMSPart(); + part.setVICMS("18.00"); + icms.setICMSPart(part); + det.getImposto().getContent().add(new ObjectFactory().createTNFeInfNFeDetImpostoICMS(icms)); + + TTribNFe resultado = calcular(det); + + assertEquals("82.00", resultado.getGIBSCBS().getVBC()); + } + + @Test + void deveSomarViiEVisNaBaseDeCalculo() throws NfeException { + TNFe.InfNFe.Det det = criarDetMinimo("100.00", "1.0000"); + ObjectFactory of = new ObjectFactory(); + + TNFe.InfNFe.Det.Imposto.II ii = new TNFe.InfNFe.Det.Imposto.II(); + ii.setVII("20.00"); + det.getImposto().getContent().add(of.createTNFeInfNFeDetImpostoII(ii)); + + TIS is = new TIS(); + is.setVIS("5.00"); + det.getImposto().getContent().add(of.createTNFeInfNFeDetImpostoIS(is)); + + TTribNFe resultado = calcular(det); + + assertEquals("125.00", resultado.getGIBSCBS().getVBC()); + } + + // ------------------------------------------------------------------------- + // Regressão issue #349: IbsCbsUtil herdava cClassTrib do item anterior + // quando o cClassTrib do item corrente era nulo/vazio/inexistente, pois + // filtraCClasstrib só atribuía os campos de instância dentro do + // ifPresent, sem limpá-los no caminho "não encontrado". A partir do 2º + // item, um cClassTrib inválido deixava de lançar exceção porque + // validaClassTrib valida o campo remanescente do item anterior, não o + // argumento recebido. + // ------------------------------------------------------------------------- + + @Test + void deveLancarExcecaoNoSegundoItemQuandoCClassTribForNuloAposItemValido() throws Exception { + IbsCbsUtil util = new IbsCbsUtil(carregarJsonIbsCbs(), DocumentoEnum.NFE); + util.setpAliqIbsUf(new BigDecimal("10")); + util.setpAliqIbsMun(BigDecimal.ZERO); + util.setpAliqCbs(new BigDecimal("9")); + + // Item 1 válido, processado com sucesso + util.montaImpostosDet("000001", criarDetMinimo("100.00", "1.0000")); + + // Item 2 com cClassTrib nulo deve lançar, mesmo com estado do item 1 na instância + NfeException excecao = assertThrows(NfeException.class, + () -> util.montaImpostosDet(null, criarDetMinimo("100.00", "1.0000"))); + assertEquals("CClassTrib inválido ou não encontrado: null", excecao.getMessage()); + } + + @Test + void deveLancarExcecaoNoSegundoItemQuandoCClassTribForVazioAposItemValido() throws Exception { + IbsCbsUtil util = new IbsCbsUtil(carregarJsonIbsCbs(), DocumentoEnum.NFE); + util.setpAliqIbsUf(new BigDecimal("10")); + util.setpAliqIbsMun(BigDecimal.ZERO); + util.setpAliqCbs(new BigDecimal("9")); + + util.montaImpostosDet("000001", criarDetMinimo("100.00", "1.0000")); + + NfeException excecao = assertThrows(NfeException.class, + () -> util.montaImpostosDet("", criarDetMinimo("100.00", "1.0000"))); + assertEquals("CClassTrib inválido ou não encontrado: ", excecao.getMessage()); + } + + @Test + void deveLancarExcecaoNoSegundoItemQuandoCClassTribForInexistenteAposItemValido() throws Exception { + IbsCbsUtil util = new IbsCbsUtil(carregarJsonIbsCbs(), DocumentoEnum.NFE); + util.setpAliqIbsUf(new BigDecimal("10")); + util.setpAliqIbsMun(BigDecimal.ZERO); + util.setpAliqCbs(new BigDecimal("9")); + + util.montaImpostosDet("000001", criarDetMinimo("100.00", "1.0000")); + + NfeException excecao = assertThrows(NfeException.class, + () -> util.montaImpostosDet("999999", criarDetMinimo("100.00", "1.0000"))); + assertEquals("CClassTrib inválido ou não encontrado: 999999", excecao.getMessage()); + } + + @Test + void deveLancarExcecaoParaCClassTribInvalidoIndependenteDaPosicaoDoItem() throws Exception { + String json = carregarJsonIbsCbs(); + + // Mesmo cClassTrib inválido como 1º item de uma instância nova + IbsCbsUtil utilPrimeiroItem = new IbsCbsUtil(json, DocumentoEnum.NFE); + utilPrimeiroItem.setpAliqIbsUf(new BigDecimal("10")); + utilPrimeiroItem.setpAliqCbs(new BigDecimal("9")); + NfeException excecaoNoPrimeiroItem = assertThrows(NfeException.class, + () -> utilPrimeiroItem.montaImpostosDet("999999", criarDetMinimo("100.00", "1.0000"))); + + // Mesmo cClassTrib inválido como 2º item, após um 1º item válido na mesma instância + IbsCbsUtil utilSegundoItem = new IbsCbsUtil(json, DocumentoEnum.NFE); + utilSegundoItem.setpAliqIbsUf(new BigDecimal("10")); + utilSegundoItem.setpAliqCbs(new BigDecimal("9")); + utilSegundoItem.montaImpostosDet("000001", criarDetMinimo("100.00", "1.0000")); + NfeException excecaoNoSegundoItem = assertThrows(NfeException.class, + () -> utilSegundoItem.montaImpostosDet("999999", criarDetMinimo("100.00", "1.0000"))); + + assertEquals(excecaoNoPrimeiroItem.getMessage(), excecaoNoSegundoItem.getMessage(), + "O mesmo cClassTrib inválido deve lançar a mesma exceção independente da posição do item"); + assertEquals("CClassTrib inválido ou não encontrado: 999999", excecaoNoSegundoItem.getMessage()); + } + + @Test + void deveManterCstEClassTribCorretosDeCadaItemEAcumularTotaisCorretamenteEmSequenciaValida() throws Exception { + IbsCbsUtil util = new IbsCbsUtil(carregarJsonIbsCbs(), DocumentoEnum.NFE); + util.setpAliqIbsUf(new BigDecimal("10")); + util.setpAliqIbsMun(BigDecimal.ZERO); + util.setpAliqCbs(new BigDecimal("9")); + + // Item 1: CST 000/cClassTrib 000001, sem redução de alíquota + TTribNFe resultadoItem1 = util.montaImpostosDet("000001", criarDetMinimo("100.00", "1.0000")); + assertEquals("000", resultadoItem1.getCST()); + assertEquals("000001", resultadoItem1.getCClassTrib()); + assertEquals("10.00", resultadoItem1.getGIBSCBS().getGIBSUF().getVIBSUF()); + assertEquals("9.00", resultadoItem1.getGIBSCBS().getGCBS().getVCBS()); + + // Item 2: CST 200/cClassTrib 200013, com redução de 100% da alíquota + TTribNFe resultadoItem2 = util.montaImpostosDet("200013", criarDetMinimo("100.00", "1.0000")); + assertEquals("200", resultadoItem2.getCST()); + assertEquals("200013", resultadoItem2.getCClassTrib()); + assertEquals("100.00", resultadoItem2.getGIBSCBS().getVBC()); + assertEquals("0.00", resultadoItem2.getGIBSCBS().getGIBSUF().getVIBSUF()); + assertEquals("0.00", resultadoItem2.getGIBSCBS().getGCBS().getVCBS()); + + // Totais acumulados corretamente via preencheTotaisIbsCsb() + TIBSCBSMonoTot totais = util.preencheTotaisIbsCsb(); + assertEquals("200.00", totais.getVBCIBSCBS()); + assertEquals("10.00", totais.getGIBS().getVIBS()); + assertEquals("9.00", totais.getGCBS().getVCBS()); + } + // ------------------------------------------------------------------------- // Helpers // ------------------------------------------------------------------------- + private String carregarJsonIbsCbs() throws IOException { + return XmlNfeUtil.leXml("src/test/resources/ibscbs.json"); + } + private TNFe.InfNFe.Det criarDetMinimo(String vProd, String qCom) { TNFe.InfNFe.Det det = new TNFe.InfNFe.Det(); TNFe.InfNFe.Det.Prod prod = new TNFe.InfNFe.Det.Prod(); prod.setVProd(vProd); prod.setQCom(qCom); + // qTrib e obrigatorio no XSD e e a base quantitativa da monofasia; aqui as duas + // unidades coincidem, que e o caso comum em combustivel (uCom = uTrib = litro) + prod.setQTrib(qCom); det.setProd(prod); det.setImposto(new TNFe.InfNFe.Det.Imposto()); return det; @@ -321,6 +500,800 @@ private CstDTO montarCst(String cst, boolean indIBSCBS, boolean indRedAliq, return dto; } + // ------------------------------------------------------------------------- + // Monofasia: estrutura das modalidades ad rem / ad valorem + // ------------------------------------------------------------------------- + + @Test + void deveMontarMonofasiaAdValoremEm2026ComGruposIbsECbsSeparados() throws NfeException { + // Em 2026 os dois eixos sao ad valorem (UB85a-10 e UB95a-10); informar ad rem + // e rejeitado com cStat 1219 (IBS) ou 1245 (CBS). O ano e fixado para o teste + // nao depender do relogio: a partir de 2027 a CBS passa a ad rem. + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaPadrao(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2026); + TMonofasia mono = util.montaImpostosDet(CC_TRIB, criarDetMinimo("100.00", "1.0000")) + .getGIBSCBSMono(); + + assertNotNull(mono.getGIBSMonoAdValorem(), "ad valorem e o padrao: gIBSMonoAdValorem deve ser emitido"); + assertNotNull(mono.getGCBSMonoAdValorem(), "IBS e CBS são eixos independentes: ambos emitidos"); + assertNull(mono.getGIBSMonoAdRem(), "as duas modalidades do mesmo eixo são exclusivas"); + assertNull(mono.getGCBSMonoAdRem(), "as duas modalidades do mesmo eixo são exclusivas"); + + assertNotNull(mono.getGIBSMonoAdValorem().getGMonoPadrao(), "MonofasiaPadrao=true deve emitir gMonoPadrao"); + assertNull(mono.getGIBSMonoAdValorem().getGMonoRet(), "RetidaAnt=false não deve emitir gMonoRet"); + assertNull(mono.getGIBSMonoAdValorem().getGMonoReten(), "SujeitaRetencao=false não deve emitir gMonoReten"); + } + + @Test + void deveUsarModalidadesDiferentesPorEixoEntre2027E2028() throws NfeException { + // NT 2025.002-RTC: em 2027 e 2028 o IBS ainda e ad valorem enquanto a CBS + // ja e ad rem. Informar errado gera cStat 1219/1220 (IBS) ou 1245/1246 (CBS). + for (int ano : new int[]{2027, 2028}) { + TMonofasia mono = calcularMonoNoAno(ano); + + assertNotNull(mono.getGIBSMonoAdValorem(), "em " + ano + " o IBS e ad valorem"); + assertNull(mono.getGIBSMonoAdRem(), "em " + ano + " o IBS nao pode ser ad rem"); + assertNotNull(mono.getGCBSMonoAdRem(), "em " + ano + " a CBS ja e ad rem"); + assertNull(mono.getGCBSMonoAdValorem(), "em " + ano + " a CBS nao pode ser ad valorem"); + } + } + + @Test + void deveSeguirATabelaDeTransicaoDaNtEmCadaAno() throws NfeException { + TMonofasia em2026 = calcularMonoNoAno(2026); + assertNotNull(em2026.getGIBSMonoAdValorem(), "2026: IBS ad valorem"); + assertNotNull(em2026.getGCBSMonoAdValorem(), "2026: CBS ad valorem"); + + TMonofasia em2029 = calcularMonoNoAno(2029); + assertNotNull(em2029.getGIBSMonoAdRem(), "2029: IBS ad rem"); + assertNotNull(em2029.getGCBSMonoAdRem(), "2029: CBS ad rem"); + } + + private TMonofasia calcularMonoNoAno(int ano) throws NfeException { + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaPadrao(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(ano); + return util.montaImpostosDet(CC_TRIB, criarDetMinimo("100.00", "1.0000")).getGIBSCBSMono(); + } + + @Test + void deveMontarMonofasiaAdRemEm2029() throws NfeException { + TMonofasia mono = calcularMono(false, true, false, false); + + assertNotNull(mono.getGIBSMonoAdRem(), "em 2029 o IBS e ad rem"); + assertNotNull(mono.getGCBSMonoAdRem(), "em 2029 a CBS e ad rem"); + assertNull(mono.getGIBSMonoAdValorem(), "ad valorem e ad rem não coexistem no mesmo eixo"); + assertNull(mono.getGCBSMonoAdValorem(), "ad valorem e ad rem não coexistem no mesmo eixo"); + } + + @Test + void naoDeveEmitirAliquotaMonofasicaDiferenteDeZeroEnquantoValorForZero() throws NfeException { + // Alíquota monofásica é própria por produto e não é a alíquota do regime regular + // configurada nos setters. Emitir alíquota real com valor zerado deixaria o grupo + // aritmeticamente incoerente, então ambos ficam zerados. O helper configura as três + // alíquotas regulares com valores não-zero justamente para que uma regressão que as + // vazasse para cá seja detectada. + TMonofasia adValorem = calcularMono(true, true, false, false); + TMonofasia.GIBSMonoAdValorem.GMonoPadrao ibs = adValorem.getGIBSMonoAdValorem().getGMonoPadrao(); + + assertEquals("0.0000", ibs.getPAliqMonoUF(), "pAliqMonoUF não deve receber a alíquota do regime regular"); + assertEquals("0.0000", ibs.getPAliqMonoMun(), "pAliqMonoMun não deve receber a alíquota do regime regular"); + assertCoerente(ibs.getPAliqMonoUF(), ibs.getVIBSMonoUF(), "pAliqMonoUF", "vIBSMonoUF"); + assertCoerente(ibs.getPAliqMonoMun(), ibs.getVIBSMonoMun(), "pAliqMonoMun", "vIBSMonoMun"); + + TMonofasia.GCBSMonoAdValorem.GMonoPadrao cbs = adValorem.getGCBSMonoAdValorem().getGMonoPadrao(); + assertEquals("0.0000", cbs.getPAliqMonoCBS(), "pAliqMonoCBS não deve receber a alíquota do regime regular"); + assertCoerente(cbs.getPAliqMonoCBS(), cbs.getVCBSMono(), "pAliqMonoCBS", "vCBSMono"); + + TMonofasia adRem = calcularMono(false, true, false, false); + TMonofasia.GIBSMonoAdRem.GMonoPadrao ibsAdRem = adRem.getGIBSMonoAdRem().getGMonoPadrao(); + assertCoerente(ibsAdRem.getAdRemIBS(), ibsAdRem.getVIBSMono(), "adRemIBS", "vIBSMono"); + + TMonofasia.GCBSMonoAdRem.GMonoPadrao cbsAdRem = adRem.getGCBSMonoAdRem().getGMonoPadrao(); + assertCoerente(cbsAdRem.getAdRemCBS(), cbsAdRem.getVCBSMono(), "adRemCBS", "vCBSMono"); + } + + /** Alíquota e valor precisam ser ambos zero ou ambos não-zero. */ + private void assertCoerente(String aliquota, String valor, String nomeAliquota, String nomeValor) { + boolean aliqZero = new BigDecimal(aliquota).signum() == 0; + boolean valorZero = new BigDecimal(valor).signum() == 0; + assertTrue(aliqZero == valorZero, String.format( + "%s=%s e %s=%s são incoerentes: devem ser ambos zero ou ambos não-zero", + nomeAliquota, aliquota, nomeValor, valor)); + } + + @Test + void deveEmitirApenasOsSubgruposCorrespondentesAsFlagsDoCClassTrib() throws NfeException { + TMonofasia soRetido = calcularMono(false, false, true, false); + assertNull(soRetido.getGIBSMonoAdRem().getGMonoPadrao(), "Padrao=false não emite gMonoPadrao"); + assertNotNull(soRetido.getGIBSMonoAdRem().getGMonoRet(), "RetidaAnt=true emite gMonoRet"); + assertNull(soRetido.getGIBSMonoAdRem().getGMonoReten(), "SujeitaRetencao=false não emite gMonoReten"); + + TMonofasia soReten = calcularMono(false, false, false, true); + assertNull(soReten.getGIBSMonoAdRem().getGMonoRet(), "RetidaAnt=false não emite gMonoRet"); + assertNotNull(soReten.getGIBSMonoAdRem().getGMonoReten(), "SujeitaRetencao=true emite gMonoReten"); + } + + @Test + void naoDeveEmitirGrupoMonofasicoVazioQuandoNenhumaFlagEstaAtiva() throws NfeException { + TMonofasia adRem = calcularMono(false, false, false, false); + assertNull(adRem.getGIBSMonoAdRem(), "sem flag de monofasia, não emitir wrapper vazio"); + assertNull(adRem.getGCBSMonoAdRem(), "sem flag de monofasia, não emitir wrapper vazio"); + + TMonofasia adValorem = calcularMono(true, false, false, false); + assertNull(adValorem.getGIBSMonoAdValorem(), "o guard também vale para o eixo ad valorem"); + assertNull(adValorem.getGCBSMonoAdValorem(), "o guard também vale para o eixo ad valorem"); + + // Com as 4 modalidades nulas sobram apenas os totais do item, que são obrigatórios + // no XSD (as duas sequences de modalidade são minOccurs="0"). + assertNotNull(adRem.getVTotIBSMonoItem(), "vTotIBSMonoItem é obrigatório e deve sobreviver"); + assertNotNull(adRem.getVTotCBSMonoItem(), "vTotCBSMonoItem é obrigatório e deve sobreviver"); + } + + @Test + void deveCalcularValorAdRemComAliquotaEspecificaDeCombustivel() throws NfeException { + // Gasolina: R$ 0,7925 por litro (tabela de aliquotas especificas). + // Repartido aqui como exemplo entre IBS e CBS; 1000 litros. + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaPadrao(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2029); // 2029: IBS e CBS ad rem + util.setAdRemIBS(new BigDecimal("0.5000")); + util.setAdRemCBS(new BigDecimal("0.2925")); + + TTribNFe tributo = util.montaImpostosDet(CC_TRIB, criarDetMinimo("5000.00", "1000.0000")); + TMonofasia mono = tributo.getGIBSCBSMono(); + + TMonofasia.GIBSMonoAdRem.GMonoPadrao ibs = mono.getGIBSMonoAdRem().getGMonoPadrao(); + assertEquals("1000.0000", ibs.getQBCMono()); + assertEquals("0.5000", ibs.getAdRemIBS()); + assertEquals("500.00", ibs.getVIBSMono(), "1000 x 0,5000"); + + TMonofasia.GCBSMonoAdRem.GMonoPadrao cbs = mono.getGCBSMonoAdRem().getGMonoPadrao(); + assertEquals("0.2925", cbs.getAdRemCBS()); + assertEquals("292.50", cbs.getVCBSMono(), "1000 x 0,2925"); + + assertEquals("500.00", mono.getVTotIBSMonoItem()); + assertEquals("292.50", mono.getVTotCBSMonoItem()); + } + + @Test + void deveCalcularValorAdValoremSobreABaseDoItem() throws NfeException { + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaPadrao(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2026); // 2026: IBS e CBS ad valorem + util.setPAliqMonoUF(new BigDecimal("10")); + util.setPAliqMonoMun(new BigDecimal("2")); + util.setPAliqMonoCBS(new BigDecimal("8")); + + TMonofasia mono = util.montaImpostosDet(CC_TRIB, criarDetMinimo("1000.00", "1.0000")) + .getGIBSCBSMono(); + + TMonofasia.GIBSMonoAdValorem.GMonoPadrao ibs = mono.getGIBSMonoAdValorem().getGMonoPadrao(); + assertEquals("1000.00", ibs.getVBCMono()); + assertEquals("100.00", ibs.getVIBSMonoUF(), "1000 x 10%"); + assertEquals("20.00", ibs.getVIBSMonoMun(), "1000 x 2%"); + assertEquals("120.00", ibs.getVIBSMono(), "soma UF + Mun"); + + TMonofasia.GCBSMonoAdValorem.GMonoPadrao cbs = mono.getGCBSMonoAdValorem().getGMonoPadrao(); + assertEquals("80.00", cbs.getVCBSMono(), "1000 x 8%"); + + assertEquals("120.00", mono.getVTotIBSMonoItem()); + assertEquals("80.00", mono.getVTotCBSMonoItem()); + } + + @Test + void deveCalcularRetencaoEUsarAliquotaDoPadraoQuandoNaoInformada() throws NfeException { + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaSujeitaRetencao(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2029); // 2029: IBS e CBS ad rem + util.setAdRemIBS(new BigDecimal("0.3515")); + util.setAdRemCBS(new BigDecimal("0.1000")); + + TMonofasia mono = util.montaImpostosDet(CC_TRIB, criarDetMinimo("500.00", "100.0000")) + .getGIBSCBSMono(); + + TMonofasia.GIBSMonoAdRem.GMonoReten reten = mono.getGIBSMonoAdRem().getGMonoReten(); + assertEquals("100.0000", reten.getQBCMonoReten(), "sem setQBCMonoReten, usa a quantidade do item"); + assertEquals("0.3515", reten.getAdRemIBSReten(), "sem aliquota propria de retencao, herda a do padrao"); + assertEquals("35.15", reten.getVIBSMonoReten(), "100 x 0,3515"); + } + + @Test + void deveUsarAliquotaEQuantidadeProprasDeRetencaoQuandoInformadas() throws NfeException { + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaSujeitaRetencao(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2029); // 2029: IBS e CBS ad rem + util.setAdRemIBS(new BigDecimal("0.3515")); + util.setAdRemIBSReten(new BigDecimal("0.2000")); + util.setQBCMonoReten(new BigDecimal("40")); + + TMonofasia.GIBSMonoAdRem.GMonoReten reten = util + .montaImpostosDet(CC_TRIB, criarDetMinimo("500.00", "100.0000")) + .getGIBSCBSMono().getGIBSMonoAdRem().getGMonoReten(); + + assertEquals("40.0000", reten.getQBCMonoReten()); + assertEquals("0.2000", reten.getAdRemIBSReten()); + assertEquals("8.00", reten.getVIBSMonoReten(), "40 x 0,2000"); + } + + @Test + void deveUsarValorInformadoNoRetidoAnteriormente() throws NfeException { + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaRetidaAnt(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2029); // 2029: IBS e CBS ad rem + util.setVIBSMonoRet(new BigDecimal("12.34")); + util.setVCBSMonoRet(new BigDecimal("56.78")); + + TMonofasia mono = util.montaImpostosDet(CC_TRIB, criarDetMinimo("500.00", "10.0000")) + .getGIBSCBSMono(); + + assertEquals("12.34", mono.getGIBSMonoAdRem().getGMonoRet().getVIBSMonoRet()); + assertEquals("56.78", mono.getGCBSMonoAdRem().getGMonoRet().getVCBSMonoRet()); + + // UB105a-10 e UB105b-10: vTot*MonoItem = padrao + retencao, sem o retido + // anteriormente. Como so o gMonoRet foi emitido, os totais do item ficam zero. + assertEquals("0.00", mono.getVTotIBSMonoItem(), "o retido anteriormente nao entra no total do item"); + assertEquals("0.00", mono.getVTotCBSMonoItem(), "o retido anteriormente nao entra no total do item"); + } + + @Test + void deveAcumularTotaisMonofasicosDaNotaEEmitirGMono() throws NfeException { + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaPadrao(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2029); // 2029: IBS e CBS ad rem + util.setAdRemIBS(new BigDecimal("0.5000")); + util.setAdRemCBS(new BigDecimal("0.2925")); + + // dois itens de 1000 litros cada + util.montaImpostosDet(CC_TRIB, criarDetMinimo("5000.00", "1000.0000")); + util.montaImpostosDet(CC_TRIB, criarDetMinimo("5000.00", "1000.0000")); + + TIBSCBSMonoTot totais = util.preencheTotaisIbsCsb(); + + assertNotNull(totais.getGMono(), "com valores monofasicos nao-zero, gMono deve ser emitido"); + assertEquals("1000.00", totais.getGMono().getVIBSMono(), "2 x 500,00"); + assertEquals("585.00", totais.getGMono().getVCBSMono(), "2 x 292,50"); + } + + @Test + void deveMontarGpBioDiferencaQuandoCClassTribIndicaDiferencaDeBiocombustivel() throws NfeException { + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setIndPercentualDiferencaBioCombustivel(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2029); // 2029: IBS e CBS ad rem + // adRemIBS e a aliquota do PRODUTO; o gpBioDiferenca usa a do BIOCOMBUSTIVEL, + // que e outra coluna da mesma tabela (UB89b-10). Informar so a do produto nao + // deve fazer a lib calcular o vIBSDiferenca. + util.setAdRemIBS(new BigDecimal("0.7925")); + util.setAdRemCBS(new BigDecimal("0.5000")); + util.setQBCBioComb(new BigDecimal("50")); + + TMonofasia mono = util.montaImpostosDet(CC_TRIB, criarDetMinimo("500.00", "1000.0000")) + .getGIBSCBSMono(); + + TMonofasia.GIBSMonoAdRem.GpBioDiferenca ibs = mono.getGIBSMonoAdRem().getGpBioDiferenca(); + assertNotNull(ibs, "IndPercentualDiferencaBioCombustivel=true deve emitir gpBioDiferenca"); + assertEquals("50.0000", ibs.getQBCBioComb()); + assertEquals("0.00", ibs.getVIBSDiferenca(), "sem a aliquota do biocombustivel nao se calcula"); + + TMonofasia.GCBSMonoAdRem.GpBioDiferenca cbs = mono.getGCBSMonoAdRem().getGpBioDiferenca(); + assertEquals("0.00", cbs.getVCBSDiferenca(), "sem a aliquota do biocombustivel nao se calcula"); + } + + @Test + void totalDoItemDeveSomarPadraoERetencaoMasNaoORetidoAnteriormente() throws NfeException { + // UB105a-10/UB105b-10: vTot*MonoItem = padrao + retencao. O retido + // anteriormente fica de fora porque o vTot*MonoItem e somado ao vItem + // (VB01-10); inclui-lo cobraria do cliente um imposto ja pago na etapa anterior. + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaPadrao(true); + ct.setMonofasiaSujeitaRetencao(true); + ct.setMonofasiaRetidaAnt(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2029); + util.setAdRemIBS(new BigDecimal("0.5000")); // padrao: 10 x 0,5000 = 5,00 + util.setAdRemIBSReten(new BigDecimal("0.2000")); // retencao: 10 x 0,2000 = 2,00 + util.setVIBSMonoRet(new BigDecimal("99.00")); // retido anteriormente + + TMonofasia mono = util.montaImpostosDet(CC_TRIB, criarDetMinimo("500.00", "10.0000")) + .getGIBSCBSMono(); + + assertEquals("5.00", mono.getGIBSMonoAdRem().getGMonoPadrao().getVIBSMono()); + assertEquals("2.00", mono.getGIBSMonoAdRem().getGMonoReten().getVIBSMonoReten()); + assertEquals("99.00", mono.getGIBSMonoAdRem().getGMonoRet().getVIBSMonoRet()); + assertEquals("7.00", mono.getVTotIBSMonoItem(), + "5,00 + 2,00; os 99,00 do retido anteriormente nao entram"); + } + + @Test + void totaisDaNotaDevemTrazerAsTresParcelasSeparadas() throws NfeException { + // W59-10, W59a-10 e W59c-10: no gMono cada parcela tem tag propria, somando o + // campo homonimo dos itens. Diferente do total do item, aqui o retido entra. + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaPadrao(true); + ct.setMonofasiaSujeitaRetencao(true); + ct.setMonofasiaRetidaAnt(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2029); + util.setAdRemIBS(new BigDecimal("0.5000")); + util.setAdRemIBSReten(new BigDecimal("0.2000")); + util.setVIBSMonoRet(new BigDecimal("99.00")); + + util.montaImpostosDet(CC_TRIB, criarDetMinimo("500.00", "10.0000")); + TIBSCBSMonoTot.GMono gMono = util.preencheTotaisIbsCsb().getGMono(); + + assertNotNull(gMono, "com valores monofasicos nao-zero o gMono deve ser emitido"); + assertEquals("5.00", gMono.getVIBSMono(), "parcela padrao"); + assertEquals("2.00", gMono.getVIBSMonoReten(), "parcela de retencao"); + assertEquals("99.00", gMono.getVIBSMonoRet(), "retido anteriormente tem tag propria"); + } + + @Test + void vnfTotNaoDeveSomarTributosEm2025E2026() throws NfeException { + // VB01-10 Excecao 1: em 2025 e 2026 o vItem nao soma vIBS, vCBS, vIS nem os + // totais monofasicos. Como o vNFTot e a soma dos vItem (W60-10), nesses anos + // ele coincide com o vNF. + for (int ano : new int[]{2025, 2026}) { + IbsCbsUtil util = utilComIbsCbs(ano); + util.montaImpostosDet(CC_TRIB, criarDetMinimo("1000.00", "1.0000")); + + assertEquals(0, new BigDecimal("1000.00").compareTo(util.calculaVnfTot("1000.00")), + "em " + ano + " o vNFTot e igual ao vNF"); + } + } + + @Test + void vnfTotDeveSomarTributosAPartirDe2027() throws NfeException { + IbsCbsUtil util = utilComIbsCbs(2027); + util.montaImpostosDet(CC_TRIB, criarDetMinimo("1000.00", "1.0000")); + + // base 1000,00: IBS UF 10% = 100,00; IBS Mun 2% = 20,00; CBS 8% = 80,00 + assertEquals(0, new BigDecimal("1200.00").compareTo(util.calculaVnfTot("1000.00")), + "a partir de 2027 o vNFTot soma IBS e CBS"); + } + + @Test + void vnfTotDeveSomarMonofasiaSemORetidoAnteriormente() throws NfeException { + // Da monofasia entram as parcelas que compoem o vTotIBSMonoItem (padrao e + // retencao). O retido anteriormente ja foi cobrado na etapa anterior. + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaPadrao(true); + ct.setMonofasiaRetidaAnt(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2029); + util.setAdRemIBS(new BigDecimal("0.5000")); // 10 x 0,5000 = 5,00 + util.setAdRemCBS(new BigDecimal("0.2000")); // 10 x 0,2000 = 2,00 + util.setVIBSMonoRet(new BigDecimal("99.00")); // retido: nao entra + util.setVCBSMonoRet(new BigDecimal("77.00")); // retido: nao entra + + util.montaImpostosDet(CC_TRIB, criarDetMinimo("500.00", "10.0000")); + + assertEquals(0, new BigDecimal("507.00").compareTo(util.calculaVnfTot("500.00")), + "500,00 + 5,00 + 2,00; os 176,00 retidos anteriormente ficam de fora"); + } + + @Test + void vnfTotNaoDeveSomarVisEm2026() throws NfeException { + // A Excecao 1 da VB01-10 cita o vIS junto com o vIBS e o vCBS + IbsCbsUtil util = utilComIbsCbs(2026); + TNFe.InfNFe.Det det = criarDetMinimo("1000.00", "1.0000"); + adicionarIs(det, "50.00"); + util.montaImpostosDet(CC_TRIB, det); + + assertEquals(0, new BigDecimal("1000.00").compareTo(util.calculaVnfTot("1000.00")), + "em 2026 nem o vIS entra no vNFTot"); + } + + @Test + void vnfTotDeveSomarVisAPartirDe2027() throws NfeException { + // O ICMSTot nao tem campo de Imposto Seletivo: o IS tem grupo de total proprio + // (ISTot, W33-10), logo o vNF recebido nao o inclui e o vNFTot precisa soma-lo + IbsCbsUtil util = utilComIbsCbs(2027); + TNFe.InfNFe.Det det = criarDetMinimo("1000.00", "1.0000"); + adicionarIs(det, "50.00"); + util.montaImpostosDet(CC_TRIB, det); + + // base 1050,00 (o vIS entra na BC do IBS/CBS): IBS UF 10% = 105,00; + // IBS Mun 2% = 21,00; CBS 8% = 84,00; mais o proprio vIS de 50,00 + assertEquals(0, new BigDecimal("1260.00").compareTo(util.calculaVnfTot("1000.00")), + "a partir de 2027 o vNFTot soma IBS, CBS e IS"); + } + + // ------------------------------------------------------------------------- + // Ano de emissao derivado do dhEmi + // ------------------------------------------------------------------------- + + @Test + void deveDerivarOAnoDoDhEmiParaDecidirOVnfTot() throws NfeException { + // o dhEmi e o campo pelo qual a SEFAZ valida: derivar dele impede que o ano + // do calculo divirja do que vai no XML + IbsCbsUtil de2026 = utilComIbsCbs("2026-12-30T23:59:59-03:00"); + de2026.montaImpostosDet(CC_TRIB, criarDetMinimo("1000.00", "1.0000")); + assertEquals(0, new BigDecimal("1000.00").compareTo(de2026.calculaVnfTot("1000.00")), + "nota de 2026 nao soma tributo no total, mesmo montada depois da virada"); + + IbsCbsUtil de2027 = utilComIbsCbs("2027-01-01T00:00:01-03:00"); + de2027.montaImpostosDet(CC_TRIB, criarDetMinimo("1000.00", "1.0000")); + assertEquals(0, new BigDecimal("1200.00").compareTo(de2027.calculaVnfTot("1000.00")), + "nota de 2027 soma IBS e CBS"); + } + + @Test + void deveDerivarOAnoDoDhEmiParaDecidirAModalidadeDaMonofasia() throws NfeException { + // UB85a/UB95a: em 2026 as duas modalidades sao ad valorem; de 2029 ad rem + assertNotNull(monofasiaComDhEmi("2026-06-15T10:00:00-03:00").getGIBSMonoAdValorem(), + "nota de 2026 sai ad valorem"); + assertNotNull(monofasiaComDhEmi("2029-06-15T10:00:00-03:00").getGIBSMonoAdRem(), + "nota de 2029 sai ad rem"); + } + + @Test + void deveAceitarODhEmiNoFormatoDoSchemaComQualquerFuso() throws NfeException { + // o TDateTimeUTC admite de 00:00 a 11:00 nos dois sinais, mais +12:00, e + // recusa -12:00. O ano e o do campo, + // nao o do instante convertido para o fuso local + IbsCbsUtil util = utilComIbsCbs("2027-01-01T00:00:00+12:00"); + util.montaImpostosDet(CC_TRIB, criarDetMinimo("1000.00", "1.0000")); + + assertEquals(0, new BigDecimal("1200.00").compareTo(util.calculaVnfTot("1000.00")), + "o ano vem do proprio dhEmi, sem reinterpretar o fuso"); + } + + @Test + void deveLerODhEmiDaPropriaInfNFe() throws NfeException { + CstDTO cst = montarCst("TST", true, false, false, false, false, false); + cst.setClassificacoesTributarias( + Collections.singletonList(montarClassTrib(CC_TRIB, false, false, false))); + + TNFe.InfNFe infNFe = new TNFe.InfNFe(); + TNFe.InfNFe.Ide ide = new TNFe.InfNFe.Ide(); + ide.setDhEmi("2027-03-10T08:30:00-03:00"); + infNFe.setIde(ide); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE, infNFe); + util.setpAliqIbsUf(new BigDecimal("10")); + util.setpAliqIbsMun(new BigDecimal("2")); + util.setpAliqCbs(new BigDecimal("8")); + util.montaImpostosDet(CC_TRIB, criarDetMinimo("1000.00", "1.0000")); + + assertEquals(0, new BigDecimal("1200.00").compareTo(util.calculaVnfTot("1000.00")), + "o ano tem de sair do dhEmi do ide da nota passada"); + } + + @Test + void deveDizerQualNivelFaltaQuandoNaoDaParaLerODhEmiDaInfNFe() { + CstDTO cst = montarCst("TST", true, false, false, false, false, false); + cst.setClassificacoesTributarias( + Collections.singletonList(montarClassTrib(CC_TRIB, false, false, false))); + java.util.List lista = Collections.singletonList(cst); + + NfeException semNota = assertThrows(NfeException.class, + () -> new IbsCbsUtil(lista, DocumentoEnum.NFE, (TNFe.InfNFe) null)); + assertTrue(semNota.getMessage().contains("infNFe"), semNota.getMessage()); + + NfeException semIde = assertThrows(NfeException.class, + () -> new IbsCbsUtil(lista, DocumentoEnum.NFE, new TNFe.InfNFe())); + assertTrue(semIde.getMessage().contains("ide"), semIde.getMessage()); + + TNFe.InfNFe semDhEmi = new TNFe.InfNFe(); + semDhEmi.setIde(new TNFe.InfNFe.Ide()); + NfeException faltaDhEmi = assertThrows(NfeException.class, + () -> new IbsCbsUtil(lista, DocumentoEnum.NFE, semDhEmi)); + assertTrue(faltaDhEmi.getMessage().contains("dhEmi"), faltaDhEmi.getMessage()); + } + + @Test + void deveAceitarTodosOsFusosQueOSchemaPermite() throws NfeException { + // apertar a validacao nao pode recusar valor que o Schema aceita: o pattern + // vai de 00:00 a 11:00 nos dois sinais, e +12:00 no positivo + for (String fuso : new String[]{"-00:00", "+00:00", "-03:00", "-11:00", + "+11:00", "+12:00"}) { + IbsCbsUtil util = utilComIbsCbs("2027-06-15T10:00:00" + fuso); + util.montaImpostosDet(CC_TRIB, criarDetMinimo("1000.00", "1.0000")); + + assertEquals(0, new BigDecimal("1200.00").compareTo(util.calculaVnfTot("1000.00")), + "fuso " + fuso + " e valido no Schema e tem de ser aceito"); + } + } + + @Test + void deveRecusarDhEmiAusenteOuForaDoFormatoDoSchema() { + for (String invalido : new String[]{null, "", " ", "2026-01-12", "12/01/2026", + "2026-01-12T11:27:13", "ontem", + // o Schema exige deslocamento explicito ±hh:00: nao aceita Z nem meia hora + "2026-01-12T11:27:13Z", "2026-01-12T11:27:13-03:30", + // fora da faixa de fuso do pattern (de -11:00 a +12:00) + "2026-01-12T11:27:13-12:00", "2026-01-12T11:27:13+13:00", + // segundos obrigatorios, fracao de segundo nao prevista, T maiusculo + "2026-01-12T11:27-03:00", "2026-01-12T11:27:13.500-03:00", + "2026-01-12t11:27:13-03:00", + // o pattern so admite ano 20XX: um ano de outro seculo nao pode virar + // anoEmissao e deixar o vNFTot sair sem tributo + "1999-01-12T11:27:13-03:00"}) { + NfeException e = assertThrows(NfeException.class, + () -> utilComIbsCbs(invalido), + "dhEmi '" + invalido + "' tem de ser recusado, nao cair no relogio da maquina"); + assertTrue(e.getMessage().contains("dhEmi"), + "a mensagem precisa dizer qual campo esta errado: " + e.getMessage()); + } + } + + /** gIBSCBSMono de um item monofasico com o dhEmi informado. */ + private TMonofasia monofasiaComDhEmi(String dhEmi) throws NfeException { + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaPadrao(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE, dhEmi); + util.setPAliqMonoUF(new BigDecimal("10")); + util.setPAliqMonoCBS(new BigDecimal("8")); + util.setAdRemIBS(new BigDecimal("0.5000")); + util.setAdRemCBS(new BigDecimal("0.2000")); + + return util.montaImpostosDet(CC_TRIB, criarDetMinimo("500.00", "10.0000")).getGIBSCBSMono(); + } + + /** Como {@link #utilComIbsCbs(int)}, mas com o ano vindo do dhEmi. */ + private IbsCbsUtil utilComIbsCbs(String dhEmi) throws NfeException { + CstDTO cst = montarCst("TST", true, false, false, false, false, false); + cst.setClassificacoesTributarias( + Collections.singletonList(montarClassTrib(CC_TRIB, false, false, false))); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE, dhEmi); + util.setpAliqIbsUf(new BigDecimal("10")); + util.setpAliqIbsMun(new BigDecimal("2")); + util.setpAliqCbs(new BigDecimal("8")); + return util; + } + + /** IbsCbsUtil com um cClassTrib de IBS/CBS regular e aliquotas conhecidas. */ + private IbsCbsUtil utilComIbsCbs(int ano) { + CstDTO cst = montarCst("TST", true, false, false, false, false, false); + cst.setClassificacoesTributarias( + Collections.singletonList(montarClassTrib(CC_TRIB, false, false, false))); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(ano); + util.setpAliqIbsUf(new BigDecimal("10")); + util.setpAliqIbsMun(new BigDecimal("2")); + util.setpAliqCbs(new BigDecimal("8")); + return util; + } + + @Test + void deveUsarQuantidadeTributavelComoBaseDaMonofasiaENaoAComercial() throws NfeException { + // UB86a: "a BC em quantidade conforme unidade de medida estabelecida na + // legislacao", que e a de uTrib. Quando uCom != uTrib (ex.: venda em caixa, + // tributacao por litro) usar qCom erraria o imposto pelo fator de conversao, + // e sem rejeicao, porque UB86c-10 so confere a consistencia interna do grupo. + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaPadrao(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2029); + util.setAdRemIBS(new BigDecimal("0.5000")); + + TNFe.InfNFe.Det det = criarDetMinimo("500.00", "2.0000"); // 2 caixas + det.getProd().setQTrib("24.0000"); // de 12 litros cada + + TMonofasia.GIBSMonoAdRem.GMonoPadrao padrao = util + .montaImpostosDet(CC_TRIB, det) + .getGIBSCBSMono().getGIBSMonoAdRem().getGMonoPadrao(); + + assertEquals("24.0000", padrao.getQBCMono(), "a base e a quantidade tributavel"); + assertEquals("12.00", padrao.getVIBSMono(), "24 litros x 0,5000, nao 2 caixas"); + } + + @Test + void deveCalcularDiferencaDeBioComAAliquotaDoBiocombustivel() throws NfeException { + // UB89b-10: vIBSDiferenca = qBCBioComb x adRemIBSBioComb + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setIndPercentualDiferencaBioCombustivel(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2029); + util.setAdRemIBS(new BigDecimal("0.7925")); // aliquota do produto: ignorada aqui + util.setAdRemIBSBioComb(new BigDecimal("0.1922")); // EAC: R$ 0,1922 por litro + util.setAdRemCBSBioComb(new BigDecimal("0.1000")); + util.setQBCBioComb(new BigDecimal("50")); + + TMonofasia mono = util.montaImpostosDet(CC_TRIB, criarDetMinimo("500.00", "1000.0000")) + .getGIBSCBSMono(); + + assertEquals("9.61", mono.getGIBSMonoAdRem().getGpBioDiferenca().getVIBSDiferenca(), + "50 x 0,1922, a aliquota do biocombustivel e nao a do produto"); + assertEquals("5.00", mono.getGCBSMonoAdRem().getGpBioDiferenca().getVCBSDiferenca(), + "50 x 0,1000"); + } + + @Test + void deveCalcularQBCBioCombPelaFormulaDaNtQuandoPBioObrigInformado() throws NfeException { + // NT 2025.002-RTC, UB94a-10 / 620004 (a recolher): + // qBCBioComb = qTrib x (pBio - pBioObrig) / (1 - pBioObrig) + // 100 x (0,30 - 0,27) / (1 - 0,27) = 100 x 0,03 / 0,73 = 4,1096 + TMonofasia.GIBSMonoAdValorem.GpBioDiferenca bio = + calcularBio("620004", "30.0000", new BigDecimal("27")); + + assertEquals("4.1096", bio.getQBCBioComb(), "gasolina com EAC acima do obrigatorio"); + } + + @Test + void deveInverterAFormulaDoBioNoCClassTrib620005() throws NfeException { + // 620005 (a ressarcir): qBCBioComb = qTrib x (pBioObrig - pBio) / (1 - pBioObrig) + // 100 x (0,27 - 0,20) / 0,73 = 9,5890 + TMonofasia.GIBSMonoAdValorem.GpBioDiferenca bio = + calcularBio("620005", "20.0000", new BigDecimal("27")); + + assertEquals("9.5890", bio.getQBCBioComb(), "mistura abaixo do obrigatorio: ressarcir"); + } + + @Test + void deveUsarQuantidadeInformadaNoBioQuandoPBioObrigDesconhecido() throws NfeException { + // Sem o pBioObrig (tabela Indice de Mistura, consultada pelo cProdANP) nao da + // para aplicar a formula, entao vale o valor informado pelo integrador. + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib("620004", false, false, false); + ct.setIndPercentualDiferencaBioCombustivel(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2026); + util.setQBCBioComb(new BigDecimal("7.5")); + + TMonofasia.GIBSMonoAdValorem.GpBioDiferenca bio = util + .montaImpostosDet("620004", criarDetComBio("100.0000", "30.0000")) + .getGIBSCBSMono().getGIBSMonoAdValorem().getGpBioDiferenca(); + + assertEquals("7.5000", bio.getQBCBioComb()); + } + + private TMonofasia.GIBSMonoAdValorem.GpBioDiferenca calcularBio( + String cClassTrib, String pBio, BigDecimal pBioObrig) throws NfeException { + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(cClassTrib, false, false, false); + ct.setIndPercentualDiferencaBioCombustivel(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2026); + util.setPBioObrig(pBioObrig); + + return util.montaImpostosDet(cClassTrib, criarDetComBio("100.0000", pBio)) + .getGIBSCBSMono().getGIBSMonoAdValorem().getGpBioDiferenca(); + } + + /** Item de combustivel com qTrib e pBio, que a formula do gpBioDiferenca consome. */ + private TNFe.InfNFe.Det criarDetComBio(String qTrib, String pBio) { + TNFe.InfNFe.Det det = criarDetMinimo("500.00", qTrib); + det.getProd().setQTrib(qTrib); + TNFe.InfNFe.Det.Prod.Comb comb = new TNFe.InfNFe.Det.Prod.Comb(); + comb.setCProdANP("320102001"); + comb.setDescANP("GASOLINA COMUM"); + comb.setPBio(pBio); + det.getProd().setComb(comb); + return det; + } + + @Test + void naoDeveMontarGpBioDiferencaQuandoIndicadorEstaDesligado() throws NfeException { + TMonofasia mono = calcularMono(false, true, false, false); + + assertNull(mono.getGIBSMonoAdRem().getGpBioDiferenca(), + "sem o indicador do cClassTrib, gpBioDiferenca nao deve sair"); + assertNull(mono.getGCBSMonoAdRem().getGpBioDiferenca(), + "sem o indicador do cClassTrib, gpBioDiferenca nao deve sair"); + } + + @Test + void devePermitirInformarValorDaDiferencaDeBioDiretamente() throws NfeException { + CstDTO cst = montarCst("620", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setIndPercentualDiferencaBioCombustivel(true); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setAnoEmissao(2029); // 2029: IBS e CBS ad rem + util.setQBCBioComb(new BigDecimal("50")); + util.setVIBSDiferenca(new BigDecimal("77.77")); + + TMonofasia.GIBSMonoAdRem.GpBioDiferenca bio = util + .montaImpostosDet(CC_TRIB, criarDetMinimo("500.00", "1000.0000")) + .getGIBSCBSMono().getGIBSMonoAdRem().getGpBioDiferenca(); + + assertEquals("77.77", bio.getVIBSDiferenca(), "valor informado prevalece sobre o calculado"); + } + + @Test + void deveEmitirOsTresSubgruposQuandoTodasAsFlagsEstaoAtivas() throws NfeException { + TMonofasia mono = calcularMono(false, true, true, true); + + TMonofasia.GIBSMonoAdRem ibs = mono.getGIBSMonoAdRem(); + assertNotNull(ibs.getGMonoPadrao(), "gMonoPadrao deve sair com Padrao=true"); + assertNotNull(ibs.getGMonoRet(), "gMonoRet deve sair com RetidaAnt=true"); + assertNotNull(ibs.getGMonoReten(), "gMonoReten deve sair com SujeitaRetencao=true"); + + TMonofasia.GCBSMonoAdRem cbs = mono.getGCBSMonoAdRem(); + assertNotNull(cbs.getGMonoPadrao(), "o eixo CBS acompanha as mesmas flags"); + assertNotNull(cbs.getGMonoRet(), "o eixo CBS acompanha as mesmas flags"); + assertNotNull(cbs.getGMonoReten(), "o eixo CBS acompanha as mesmas flags"); + } + + /** + * Monta o grupo de monofasia para as flags informadas. + * Parâmetros: adValorem, monofasiaPadrao, monofasiaRetidaAnt, monofasiaSujeitaRetencao. + */ + private TMonofasia calcularMono(boolean adValorem, boolean padrao, + boolean retidaAnt, boolean sujeitaRetencao) throws NfeException { + CstDTO cst = montarCst("TST", false, false, false, true, false, false); + ClassificacaoTributariaDTO ct = montarClassTrib(CC_TRIB, false, false, false); + ct.setMonofasiaPadrao(padrao); + ct.setMonofasiaRetidaAnt(retidaAnt); + ct.setMonofasiaSujeitaRetencao(sujeitaRetencao); + cst.setClassificacoesTributarias(Collections.singletonList(ct)); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + // As tres aliquotas regulares precisam ser nao-zero: e isso que permite detectar + // uma regressao que as vaze para os campos monofasicos. + util.setpAliqIbsUf(new BigDecimal("0.1")); + util.setpAliqIbsMun(new BigDecimal("0.05")); + util.setpAliqCbs(new BigDecimal("0.9")); + util.setAnoEmissao(adValorem ? 2026 : 2029); + + TMonofasia mono = util.montaImpostosDet(CC_TRIB, criarDetMinimo("100.00", "1.0000")).getGIBSCBSMono(); + assertNotNull(mono, "IndIBSCBSMono=true deve emitir gIBSCBSMono"); + return mono; + } + /** * Monta ClassificacaoTributariaDTO com os flags relevantes para os novos grupos. * Parâmetros: indCredPresOper, indEstornoCred, indCompraGov. @@ -335,4 +1308,50 @@ private ClassificacaoTributariaDTO montarClassTrib(String cClassTrib, boolean in dto.setIndCompraGov(indCompraGov); return dto; } + + /** Monta o IbsCbsUtil padrao (IBS UF 0,10% / CBS 0,90%) e calcula os impostos do item. */ + private TTribNFe calcular(TNFe.InfNFe.Det det) throws NfeException { + CstDTO cst = montarCst("TST", true, false, false, false, false, false); + cst.setClassificacoesTributarias( + Collections.singletonList(montarClassTrib(CC_TRIB, false, false, false))); + + IbsCbsUtil util = new IbsCbsUtil(Collections.singletonList(cst), DocumentoEnum.NFE); + util.setpAliqIbsUf(new BigDecimal("0.1")); + util.setpAliqIbsMun(BigDecimal.ZERO); + util.setpAliqCbs(new BigDecimal("0.9")); + return util.montaImpostosDet(CC_TRIB, det); + } + + private void adicionarIcms70(TNFe.InfNFe.Det det, String vIcms, String vFcp) { + TNFe.InfNFe.Det.Imposto.ICMS icms = new TNFe.InfNFe.Det.Imposto.ICMS(); + TNFe.InfNFe.Det.Imposto.ICMS.ICMS70 icms70 = new TNFe.InfNFe.Det.Imposto.ICMS.ICMS70(); + icms70.setVICMS(vIcms); + icms70.setVFCP(vFcp); + // ICMS-ST nao entra na base do IBS/CBS + icms70.setVICMSST("157.23"); + icms.setICMS70(icms70); + det.getImposto().getContent().add(new ObjectFactory().createTNFeInfNFeDetImpostoICMS(icms)); + } + + private void adicionarIs(TNFe.InfNFe.Det det, String vIs) { + br.com.swconsultoria.nfe.schemas.TIS is = new br.com.swconsultoria.nfe.schemas.TIS(); + is.setVIS(vIs); + det.getImposto().getContent().add(new ObjectFactory().createTNFeInfNFeDetImpostoIS(is)); + } + + private void adicionarPisCofins(TNFe.InfNFe.Det det, String vPis, String vCofins) { + ObjectFactory of = new ObjectFactory(); + + TNFe.InfNFe.Det.Imposto.PIS pis = new TNFe.InfNFe.Det.Imposto.PIS(); + TNFe.InfNFe.Det.Imposto.PIS.PISAliq pisAliq = new TNFe.InfNFe.Det.Imposto.PIS.PISAliq(); + pisAliq.setVPIS(vPis); + pis.setPISAliq(pisAliq); + det.getImposto().getContent().add(of.createTNFeInfNFeDetImpostoPIS(pis)); + + TNFe.InfNFe.Det.Imposto.COFINS cofins = new TNFe.InfNFe.Det.Imposto.COFINS(); + TNFe.InfNFe.Det.Imposto.COFINS.COFINSAliq cofAliq = new TNFe.InfNFe.Det.Imposto.COFINS.COFINSAliq(); + cofAliq.setVCOFINS(vCofins); + cofins.setCOFINSAliq(cofAliq); + det.getImposto().getContent().add(of.createTNFeInfNFeDetImpostoCOFINS(cofins)); + } } diff --git a/src/test/java/br/com/swconsultoria/nfe/util/SignatureNamespaceTest.java b/src/test/java/br/com/swconsultoria/nfe/util/SignatureNamespaceTest.java new file mode 100644 index 00000000..80e173c3 --- /dev/null +++ b/src/test/java/br/com/swconsultoria/nfe/util/SignatureNamespaceTest.java @@ -0,0 +1,85 @@ +package br.com.swconsultoria.nfe.util; + +import br.com.swconsultoria.nfe.exception.NfeException; +import br.com.swconsultoria.nfe.schemas_eventos.TEnvEventoCancelamento; +import org.junit.jupiter.api.Test; + +import javax.xml.bind.JAXBException; +import java.io.IOException; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Testes de regressão para a issue #352: os 8 tipos XMLDSig duplicados em + * {@code br.com.swconsultoria.nfe.schemas_eventos} perderam o atributo {@code namespace} do + * {@code @XmlType}, ao contrário dos mesmos tipos em {@code br.com.swconsultoria.nfe.schemas}. + * Sem esse namespace, o unmarshal descartava silenciosamente os filhos de {@code Signature} + * (SignedInfo, SignatureValue, KeyInfo) por esperá-los no namespace do portal fiscal em vez do + * namespace real do XMLDSig, resultando em um {@code } vazio gravado no procEventoNFe. + */ +class SignatureNamespaceTest { + + private static final String XMLDSIG_NS = "http://www.w3.org/2000/09/xmldsig#"; + + @Test + void deveMapearSignedInfoSignatureValueEKeyInfoAoDesserializarEventoAssinado() throws IOException { + // Given + String xml = XmlNfeUtil.leXml("src/test/resources/EventoCancelamentoAssinado.xml"); + + // When + TEnvEventoCancelamento envEvento = XmlNfeUtil.xmlToObject(xml, TEnvEventoCancelamento.class); + + // Then + assertEquals(1, envEvento.getEvento().size(), "Deve conter exatamente um evento"); + assertNotNull(envEvento.getEvento().get(0).getSignature(), "Signature não deve ser nulo"); + assertNotNull(envEvento.getEvento().get(0).getSignature().getSignedInfo(), + "SignedInfo deve ter sido mapeado a partir do namespace xmldsig#"); + assertNotNull(envEvento.getEvento().get(0).getSignature().getSignatureValue(), + "SignatureValue deve ter sido mapeado a partir do namespace xmldsig#"); + assertNotNull(envEvento.getEvento().get(0).getSignature().getKeyInfo(), + "KeyInfo deve ter sido mapeado a partir do namespace xmldsig#"); + + byte[] certificado = envEvento.getEvento().get(0).getSignature() + .getKeyInfo().getX509Data().getX509Certificate(); + assertNotNull(certificado, "X509Certificate deve sobreviver ao unmarshal dentro de KeyInfo/X509Data"); + assertTrue(certificado.length > 0, "X509Certificate não deve estar vazio"); + + byte[] signatureValue = envEvento.getEvento().get(0).getSignature().getSignatureValue().getValue(); + assertNotNull(signatureValue, "SignatureValue.value deve ter sido preenchido"); + assertTrue(signatureValue.length > 0, "SignatureValue.value não deve estar vazio"); + + assertNotNull(envEvento.getEvento().get(0).getSignature().getSignedInfo().getReference(), + "Reference dentro de SignedInfo deve ter sido mapeado"); + assertNotNull(envEvento.getEvento().get(0).getSignature().getSignedInfo().getReference().getDigestValue(), + "DigestValue dentro de Reference deve ter sido mapeado"); + } + + @Test + void deveSerializarSignatureNoNamespaceXmldsigSemXmlnsDuplicado() throws IOException, JAXBException, NfeException { + // Given + String xmlOriginal = XmlNfeUtil.leXml("src/test/resources/EventoCancelamentoAssinado.xml"); + TEnvEventoCancelamento envEvento = XmlNfeUtil.xmlToObject(xmlOriginal, TEnvEventoCancelamento.class); + + // When + String xmlGerado = XmlNfeUtil.objectToXml(envEvento); + + // Then + assertTrue(xmlGerado.contains(""), + "Signature deve ser emitido explicitamente no namespace do XMLDSig"); + assertFalse(xmlGerado.contains("ns2:"), "Não deve sobrar prefixo ns2: após o marshal"); + + String tagSignatureAbertura = xmlGerado.substring( + xmlGerado.indexOf("', xmlGerado.indexOf(" não pode ter xmlns duplicado: " + tagSignatureAbertura); + + assertTrue(xmlGerado.contains(""), "SignedInfo deve estar presente no XML gerado"); + assertTrue(xmlGerado.contains(""), "SignatureValue deve estar presente no XML gerado"); + assertTrue(xmlGerado.contains(""), "KeyInfo deve estar presente no XML gerado"); + assertTrue(xmlGerado.contains(""), "X509Certificate deve estar presente no XML gerado"); + } +} diff --git a/src/test/java/br/com/swconsultoria/nfe/util/XmlImpostoUtilTest.java b/src/test/java/br/com/swconsultoria/nfe/util/XmlImpostoUtilTest.java index d7b2d0b4..23b9ba85 100644 --- a/src/test/java/br/com/swconsultoria/nfe/util/XmlImpostoUtilTest.java +++ b/src/test/java/br/com/swconsultoria/nfe/util/XmlImpostoUtilTest.java @@ -1,6 +1,7 @@ package br.com.swconsultoria.nfe.util; import br.com.swconsultoria.nfe.schemas.ObjectFactory; +import br.com.swconsultoria.nfe.schemas.TIS; import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Det.Imposto.*; import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Det.Imposto.COFINS.COFINSAliq; import br.com.swconsultoria.nfe.schemas.TNFe.InfNFe.Det.Imposto.COFINS.COFINSQtde; @@ -244,4 +245,90 @@ void getVISSQN_comValor_retornaValor() { assertEquals(new BigDecimal("99.99"), XmlImpostoUtil.getVISSQN(impostos)); } + + // ------------------------------------------------------------------------- + // getVICMS / getVFCP - grupos que estavam faltando (ICMS70, ICMSPart) + // ------------------------------------------------------------------------- + + @Test + void getVICMS_icms70_retornaValor() { + ICMS icms = new ICMS(); + ICMS.ICMS70 icms70 = new ICMS.ICMS70(); + icms70.setVICMS("80.23"); + icms70.setVICMSST("157.23"); + icms.setICMS70(icms70); + + List> impostos = new ArrayList<>(); + impostos.add(FACTORY.createTNFeInfNFeDetImpostoICMS(icms)); + + assertEquals(new BigDecimal("80.23"), XmlImpostoUtil.getVICMS(impostos)); + } + + @Test + void getVICMS_icmsPart_retornaValor() { + ICMS icms = new ICMS(); + ICMS.ICMSPart part = new ICMS.ICMSPart(); + part.setVICMS("18.00"); + icms.setICMSPart(part); + + List> impostos = new ArrayList<>(); + impostos.add(FACTORY.createTNFeInfNFeDetImpostoICMS(icms)); + + assertEquals(new BigDecimal("18.00"), XmlImpostoUtil.getVICMS(impostos)); + } + + @Test + void getVFCP_icms70ComFCP_retornaValor() { + ICMS icms = new ICMS(); + ICMS.ICMS70 icms70 = new ICMS.ICMS70(); + icms70.setVICMS("80.23"); + icms70.setVFCP("10.00"); + icms.setICMS70(icms70); + + List> impostos = new ArrayList<>(); + impostos.add(FACTORY.createTNFeInfNFeDetImpostoICMS(icms)); + + assertEquals(new BigDecimal("10.00"), XmlImpostoUtil.getVFCP(impostos)); + } + + // ------------------------------------------------------------------------- + // getVII + // ------------------------------------------------------------------------- + + @Test + void getVII_listaVazia_retornaZero() { + assertEquals(BigDecimal.ZERO, XmlImpostoUtil.getVII(Collections.emptyList())); + } + + @Test + void getVII_comValor_retornaValor() { + II ii = new II(); + ii.setVII("20.00"); + + List> impostos = new ArrayList<>(); + impostos.add(FACTORY.createTNFeInfNFeDetImpostoII(ii)); + + assertEquals(new BigDecimal("20.00"), XmlImpostoUtil.getVII(impostos)); + } + + // ------------------------------------------------------------------------- + // getVIS + // ------------------------------------------------------------------------- + + @Test + void getVIS_listaVazia_retornaZero() { + assertEquals(BigDecimal.ZERO, XmlImpostoUtil.getVIS(Collections.emptyList())); + } + + @Test + void getVIS_comValor_retornaValor() { + TIS is = new TIS(); + is.setVIS("5.00"); + + List> impostos = new ArrayList<>(); + impostos.add(FACTORY.createTNFeInfNFeDetImpostoIS(is)); + + assertEquals(new BigDecimal("5.00"), XmlImpostoUtil.getVIS(impostos)); + } + } diff --git a/src/test/resources/DanfeV2Mono.xml b/src/test/resources/DanfeV2Mono.xml new file mode 100644 index 00000000..cc324093 --- /dev/null +++ b/src/test/resources/DanfeV2Mono.xml @@ -0,0 +1,342 @@ + + + + + + + 35 + 00000789 + VENDA DE COMBUSTIVEL + 55 + 1 + 789 + 2026-12-02T08:30:00-03:00 + 1 + 1 + 3550308 + 1 + 1 + 0 + 2 + 1 + 0 + 1 + 0 + JavaDanfe 2.0 + + + 12345678000195 + DISTRIBUIDORA EXEMPLO DE COMBUSTIVEIS LTDA + + Avenida Industrial + 1000 + Distrito Industrial + 3550308 + São Paulo + SP + 04001000 + 1058 + BRASIL + 1133334444 + + 111222333444 + 3 + + + 98765432000110 + POSTO EXEMPLO LTDA + + Rodovia Exemplo + km 25 + Zona Rural + 3509502 + Campinas + SP + 13010000 + 1058 + BRASIL + + 1 + 555666777888 + + + + GAS01 + SEM GTIN + GASOLINA C COMUM + 27101259 + 5656 + L + 1000.0000 + 6.1900000000 + 6190.00 + SEM GTIN + L + 1000.0000 + 6.1900000000 + 1 + + + + + 0 + 61 + 1000.0000 + 1.3700 + 1370.00 + + + + 620 + 620006 + + + + 1000.0000 + 0.0500 + 50.00 + + + 1000.0000 + 0.0100 + 10.00 + + + + + 1000.0000 + 0.2000 + 200.00 + + + 1000.0000 + 0.0300 + 30.00 + + + 60.00 + 230.00 + + + + + + + DIE01 + SEM GTIN + OLEO DIESEL B S10 + 27101921 + 5656 + L + 1000.0000 + 5.0000000000 + 5000.00 + SEM GTIN + L + 1000.0000 + 5.0000000000 + 1 + + + + + 0 + 61 + 1000.0000 + 1.0600 + 1060.00 + + + + 620 + 620006 + + + + 5000.00 + 0.1000 + 5.00 + 0.0000 + 0.00 + 5.00 + + + 1.00 + + + + + 5000.00 + 0.9000 + 45.00 + + + 2.00 + + + 5.00 + 45.00 + + + + + + + TRC01 + SEM GTIN + TRANSFERENCIA DE CREDITO DE IBS E CBS + 00000000 + 5949 + UN + 1.0000 + 0.0000000000 + 0.00 + SEM GTIN + UN + 1.0000 + 0.0000000000 + 0 + + + + + 0 + 90 + + + + 800 + 800001 + + 10.00 + 30.00 + + + + + + + AJC01 + SEM GTIN + AJUSTE DE COMPETENCIA DE IBS E CBS + 00000000 + 5949 + UN + 1.0000 + 0.0000000000 + 0.00 + SEM GTIN + UN + 1.0000 + 0.0000000000 + 0 + + + + + 0 + 90 + + + + 811 + 811001 + + 2026-11 + 1.00 + 3.00 + + + + + + + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 2000.0000 + 2430.00 + 11190.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 11190.00 + + + 0.00 + + + 0.00 + 0.00 + 0.00 + + + 0.00 + 0.00 + 0.00 + + 0.00 + 0.00 + 0.00 + + + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + + + 55.00 + 245.00 + 10.00 + 30.00 + 1.00 + 2.00 + + + + + 0 + + + + 15 + 11190.00 + + + + Documento emitido em ambiente de homologação. + Exemplo de NF-e de combustíveis com IBS/CBS monofásico (ad rem e ad valorem), transferência de crédito e ajuste de competência. + + + + + + 2 + SP_NFE_PL_010 + 35261212345678000195550010000007891000007890 + 2026-12-02T08:30:15-03:00 + 135260000078901 + AAAAAAAAAAAAAAAAAAAAAAAAAAA= + 100 + Autorizado o uso da NF-e + + + diff --git a/src/test/resources/DanfeV2Rtc.xml b/src/test/resources/DanfeV2Rtc.xml new file mode 100644 index 00000000..8599305d --- /dev/null +++ b/src/test/resources/DanfeV2Rtc.xml @@ -0,0 +1,304 @@ + + + + + + + 35 + 00000123 + VENDA DE MERCADORIA ADQUIRIDA DE TERCEIROS + 55 + 1 + 123 + 2026-12-01T10:15:30-03:00 + 2026-12-01T14:00:00-03:00 + 1 + 1 + 3550308 + 1 + 1 + 4 + 2 + 1 + 0 + 1 + 0 + JavaDanfe 2.0 + + + 12345678000195 + EMPRESA EXEMPLO LTDA + EXEMPLO + + Rua Exemplo + 100 + Sala 2 + Centro + 3550308 + São Paulo + SP + 01001000 + 1058 + BRASIL + 1133334444 + + 111222333444 + 12345 + 4711302 + 3 + + + 98765432000110 + CLIENTE EXEMPLO S/A + + Avenida Cliente + 200 + Jardim Industrial + 3509502 + Campinas + SP + 13010000 + 1058 + BRASIL + 19988887777 + + 1 + 555666777888 + + + + 1001 + SEM GTIN + PARAFUSO SEXTAVADO ACO INOX M8 X 40MM + 73181500 + 5102 + CX + 10.0000 + 150.0000000000 + 1500.00 + SEM GTIN + CX + 10.0000 + 150.0000000000 + 1 + + + + + 0 + 00 + 3 + 1500.00 + 18.00 + 270.00 + + + + 999 + + 50 + 1500.00 + 5.00 + 75.00 + + + + 000 + 000001 + + 1500.00 + + 0.1000 + 1.50 + + + 0.0000 + 0.00 + + 1.50 + + 0.9000 + 13.50 + + + + + Lote 2026-11 / validade indeterminada + + + + 2002 + SEM GTIN + REFRIGERANTE COLA LATA 350ML + 22021000 + 5405 + UN + 48.0000 + 3.2500000000 + 156.00 + SEM GTIN + UN + 48.0000 + 3.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 156.00 + 2.0000 + 3.12 + + + 200 + 200032 + + 156.00 + + 0.1000 + + 60.0000 + 0.0400 + + 0.06 + + + 0.0000 + 0.00 + + 0.06 + + 0.9000 + + 60.0000 + 0.3600 + + 0.56 + + + + + + + + 1500.00 + 270.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 1656.00 + 50.00 + 0.00 + 6.00 + 0.00 + 75.00 + 0.00 + 0.00 + 0.00 + 0.00 + 1775.00 + + + 3.12 + + + 1656.00 + + + 0.00 + 0.00 + 1.56 + + + 0.00 + 0.00 + 0.00 + + 1.56 + 0.00 + 0.00 + + + 0.00 + 0.00 + 14.06 + 0.00 + 0.00 + + + + + 0 + + 22222222000122 + TRANSPORTADORA EXEMPLO LTDA + 333333333333 + Rodovia Exemplo, km 10 + Jundiaí + SP + + + ABC1D23 + SP + 12345678 + + + 11 + VOLUME + EXEMPLO + 001 + 45.500 + 48.250 + + + + + 123 + 1775.00 + 0.00 + 1775.00 + + 0012026-12-31443.75 + 0022027-01-30443.75 + 0032027-03-01443.75 + 0042027-03-31443.75 + + + + 15 + 1775.00 + + + + Documento emitido em ambiente de homologação. + Documento emitido a título de exemplo de leiaute (Reforma Tributária - IBS/CBS/IS). Pedido de compra 4500012345. + + + + https://www.homologacao.nfe.fazenda.gov.br/consulta?p=35261212345678000195550010000001231000001234|2|2|1|ABCDEF0123456789 + www.nfe.fazenda.gov.br/consulta + + + + + 2 + SP_NFE_PL_010 + 35261212345678000195550010000001231000001234 + 2026-12-01T10:15:45-03:00 + 135260000012345 + AAAAAAAAAAAAAAAAAAAAAAAAAAA= + 100 + Autorizado o uso da NF-e + + + diff --git a/src/test/resources/DanfeV2Rtc50Itens.xml b/src/test/resources/DanfeV2Rtc50Itens.xml new file mode 100644 index 00000000..571d99c0 --- /dev/null +++ b/src/test/resources/DanfeV2Rtc50Itens.xml @@ -0,0 +1,3033 @@ + + + + + + + 35 + 00000124 + VENDA DE MERCADORIA ADQUIRIDA DE TERCEIROS + 55 + 1 + 124 + 2026-12-01T10:15:30-03:00 + 2026-12-01T14:00:00-03:00 + 1 + 1 + 3550308 + 1 + 1 + 4 + 2 + 1 + 0 + 1 + 0 + JavaDanfe 2.0 + + + 12345678000195 + EMPRESA EXEMPLO LTDA + EXEMPLO + + Rua Exemplo + 100 + Sala 2 + Centro + 3550308 + São Paulo + SP + 01001000 + 1058 + BRASIL + 1133334444 + + 111222333444 + 12345 + 4711302 + 3 + + + 98765432000110 + CLIENTE EXEMPLO S/A + + Avenida Cliente + 200 + Jardim Industrial + 3509502 + Campinas + SP + 13010000 + 1058 + BRASIL + 19988887777 + + 1 + 555666777888 + + + + 1001 + SEM GTIN + PARAFUSO SEXTAVADO ACO INOX M8 X 40MM + 73181500 + 5102 + CX + 8.0000 + 16.2500000000 + 130.00 + SEM GTIN + CX + 8.0000 + 16.2500000000 + 1 + + + + + 0 + 00 + 3 + 130.00 + 18.00 + 23.40 + + + + 999 + + 50 + 130.00 + 5.00 + 6.50 + + + + 000 + 000001 + + 130.00 + + 0.1000 + 0.13 + + + 0.0000 + 0.00 + + 0.13 + + 0.9000 + 1.17 + + + + + + + + 1002 + SEM GTIN + REFRIGERANTE COLA LATA 350ML + 22021000 + 5405 + UN + 15.0000 + 29.2500000000 + 438.75 + SEM GTIN + UN + 15.0000 + 29.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 438.75 + 2.0000 + 8.78 + + + 200 + 200032 + + 438.75 + + 0.1000 + + 60.0000 + 0.0400 + + 0.18 + + + 0.0000 + 0.00 + + 0.18 + + 0.9000 + + 60.0000 + 0.3600 + + 1.58 + + + + + + + + 1003 + SEM GTIN + ARRUELA LISA ZINCADA 8MM + 73182200 + 5102 + PC + 22.0000 + 42.2500000000 + 929.50 + SEM GTIN + PC + 22.0000 + 42.2500000000 + 1 + + + + + 0 + 00 + 3 + 929.50 + 18.00 + 167.31 + + + + 000 + 000001 + + 929.50 + + 0.1000 + 0.93 + + + 0.0000 + 0.00 + + 0.93 + + 0.9000 + 8.37 + + + + + + + + 1004 + SEM GTIN + PORCA SEXTAVADA ACO CARBONO M10 CLASSE 8 COM TRATAMENTO SUPERFICIAL ZINCADO BRANCO - EMBALAGEM INDUSTRIAL + 73181600 + 5102 + CX + 29.0000 + 55.2500000000 + 1602.25 + SEM GTIN + CX + 29.0000 + 55.2500000000 + 1 + + + + + 0 + 00 + 3 + 1602.25 + 18.00 + 288.41 + + + + 999 + + 50 + 1602.25 + 5.00 + 80.11 + + + + 000 + 000001 + + 1602.25 + + 0.1000 + 1.60 + + + 0.0000 + 0.00 + + 1.60 + + 0.9000 + 14.42 + + + + + + + + 1005 + SEM GTIN + AGUA MINERAL SEM GAS GARRAFA 500ML + 22011000 + 5405 + UN + 36.0000 + 68.2500000000 + 2457.00 + SEM GTIN + UN + 36.0000 + 68.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 2457.00 + 2.0000 + 49.14 + + + 200 + 200032 + + 2457.00 + + 0.1000 + + 60.0000 + 0.0400 + + 0.98 + + + 0.0000 + 0.00 + + 0.98 + + 0.9000 + + 60.0000 + 0.3600 + + 8.85 + + + + + Lote 2026-5 / item com informação adicional para variar a altura da linha + + + + 1006 + SEM GTIN + CHAVE COMBINADA 13MM CROMO VANADIO + 82041100 + 5102 + UN + 3.0000 + 81.2500000000 + 243.75 + SEM GTIN + UN + 3.0000 + 81.2500000000 + 1 + + + + + 0 + 00 + 3 + 243.75 + 18.00 + 43.88 + + + + 000 + 000001 + + 243.75 + + 0.1000 + 0.24 + + + 0.0000 + 0.00 + + 0.24 + + 0.9000 + 2.19 + + + + + + + + 1007 + SEM GTIN + CABO FLEXIVEL 2,5MM2 750V AZUL ROLO 100M + 85444900 + 5102 + RL + 10.0000 + 94.2500000000 + 942.50 + SEM GTIN + RL + 10.0000 + 94.2500000000 + 1 + + + + + 0 + 00 + 3 + 942.50 + 18.00 + 169.65 + + + + 999 + + 50 + 942.50 + 5.00 + 47.13 + + + + 000 + 000001 + + 942.50 + + 0.1000 + 0.94 + + + 0.0000 + 0.00 + + 0.94 + + 0.9000 + 8.48 + + + + + + + + 1008 + SEM GTIN + SUCO DE UVA INTEGRAL 1L + 20096100 + 5405 + UN + 17.0000 + 10.2500000000 + 174.25 + SEM GTIN + UN + 17.0000 + 10.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 174.25 + 2.0000 + 3.49 + + + 200 + 200032 + + 174.25 + + 0.1000 + + 60.0000 + 0.0400 + + 0.07 + + + 0.0000 + 0.00 + + 0.07 + + 0.9000 + + 60.0000 + 0.3600 + + 0.63 + + + + + + + + 1009 + SEM GTIN + FITA ISOLANTE ANTICHAMA 19MM X 20M + 39191010 + 5102 + UN + 24.0000 + 23.2500000000 + 558.00 + SEM GTIN + UN + 24.0000 + 23.2500000000 + 1 + + + + + 0 + 00 + 3 + 558.00 + 18.00 + 100.44 + + + + 000 + 000001 + + 558.00 + + 0.1000 + 0.56 + + + 0.0000 + 0.00 + + 0.56 + + 0.9000 + 5.02 + + + + + + + + 1010 + SEM GTIN + DISJUNTOR TERMOMAGNETICO BIPOLAR 32A CURVA C + 85362000 + 5102 + UN + 31.0000 + 36.2500000000 + 1123.75 + SEM GTIN + UN + 31.0000 + 36.2500000000 + 1 + + + + + 0 + 00 + 3 + 1123.75 + 18.00 + 202.28 + + + + 999 + + 50 + 1123.75 + 5.00 + 56.19 + + + + 000 + 000001 + + 1123.75 + + 0.1000 + 1.12 + + + 0.0000 + 0.00 + + 1.12 + + 0.9000 + 10.11 + + + + + Lote 2026-10 / item com informação adicional para variar a altura da linha + + + + 1011 + SEM GTIN + PARAFUSO SEXTAVADO ACO INOX M8 X 40MM + 73181500 + 5405 + CX + 38.0000 + 49.2500000000 + 1871.50 + SEM GTIN + CX + 38.0000 + 49.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 1871.50 + 2.0000 + 37.43 + + + 200 + 200032 + + 1871.50 + + 0.1000 + + 60.0000 + 0.0400 + + 0.75 + + + 0.0000 + 0.00 + + 0.75 + + 0.9000 + + 60.0000 + 0.3600 + + 6.74 + + + + + + + + 1012 + SEM GTIN + REFRIGERANTE COLA LATA 350ML + 22021000 + 5102 + UN + 5.0000 + 62.2500000000 + 311.25 + SEM GTIN + UN + 5.0000 + 62.2500000000 + 1 + + + + + 0 + 00 + 3 + 311.25 + 18.00 + 56.03 + + + + 000 + 000001 + + 311.25 + + 0.1000 + 0.31 + + + 0.0000 + 0.00 + + 0.31 + + 0.9000 + 2.80 + + + + + + + + 1013 + SEM GTIN + ARRUELA LISA ZINCADA 8MM + 73182200 + 5102 + PC + 12.0000 + 75.2500000000 + 903.00 + SEM GTIN + PC + 12.0000 + 75.2500000000 + 1 + + + + + 0 + 00 + 3 + 903.00 + 18.00 + 162.54 + + + + 999 + + 50 + 903.00 + 5.00 + 45.15 + + + + 000 + 000001 + + 903.00 + + 0.1000 + 0.90 + + + 0.0000 + 0.00 + + 0.90 + + 0.9000 + 8.13 + + + + + + + + 1014 + SEM GTIN + PORCA SEXTAVADA ACO CARBONO M10 CLASSE 8 COM TRATAMENTO SUPERFICIAL ZINCADO BRANCO - EMBALAGEM INDUSTRIAL + 73181600 + 5405 + CX + 19.0000 + 88.2500000000 + 1676.75 + SEM GTIN + CX + 19.0000 + 88.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 1676.75 + 2.0000 + 33.54 + + + 200 + 200032 + + 1676.75 + + 0.1000 + + 60.0000 + 0.0400 + + 0.67 + + + 0.0000 + 0.00 + + 0.67 + + 0.9000 + + 60.0000 + 0.3600 + + 6.04 + + + + + + + + 1015 + SEM GTIN + AGUA MINERAL SEM GAS GARRAFA 500ML + 22011000 + 5102 + UN + 26.0000 + 4.2500000000 + 110.50 + SEM GTIN + UN + 26.0000 + 4.2500000000 + 1 + + + + + 0 + 00 + 3 + 110.50 + 18.00 + 19.89 + + + + 000 + 000001 + + 110.50 + + 0.1000 + 0.11 + + + 0.0000 + 0.00 + + 0.11 + + 0.9000 + 0.99 + + + + + Lote 2026-15 / item com informação adicional para variar a altura da linha + + + + 1016 + SEM GTIN + CHAVE COMBINADA 13MM CROMO VANADIO + 82041100 + 5102 + UN + 33.0000 + 17.2500000000 + 569.25 + SEM GTIN + UN + 33.0000 + 17.2500000000 + 1 + + + + + 0 + 00 + 3 + 569.25 + 18.00 + 102.47 + + + + 999 + + 50 + 569.25 + 5.00 + 28.46 + + + + 000 + 000001 + + 569.25 + + 0.1000 + 0.57 + + + 0.0000 + 0.00 + + 0.57 + + 0.9000 + 5.12 + + + + + + + + 1017 + SEM GTIN + CABO FLEXIVEL 2,5MM2 750V AZUL ROLO 100M + 85444900 + 5405 + RL + 40.0000 + 30.2500000000 + 1210.00 + SEM GTIN + RL + 40.0000 + 30.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 1210.00 + 2.0000 + 24.20 + + + 200 + 200032 + + 1210.00 + + 0.1000 + + 60.0000 + 0.0400 + + 0.48 + + + 0.0000 + 0.00 + + 0.48 + + 0.9000 + + 60.0000 + 0.3600 + + 4.36 + + + + + + + + 1018 + SEM GTIN + SUCO DE UVA INTEGRAL 1L + 20096100 + 5102 + UN + 7.0000 + 43.2500000000 + 302.75 + SEM GTIN + UN + 7.0000 + 43.2500000000 + 1 + + + + + 0 + 00 + 3 + 302.75 + 18.00 + 54.50 + + + + 000 + 000001 + + 302.75 + + 0.1000 + 0.30 + + + 0.0000 + 0.00 + + 0.30 + + 0.9000 + 2.72 + + + + + + + + 1019 + SEM GTIN + FITA ISOLANTE ANTICHAMA 19MM X 20M + 39191010 + 5102 + UN + 14.0000 + 56.2500000000 + 787.50 + SEM GTIN + UN + 14.0000 + 56.2500000000 + 1 + + + + + 0 + 00 + 3 + 787.50 + 18.00 + 141.75 + + + + 999 + + 50 + 787.50 + 5.00 + 39.38 + + + + 000 + 000001 + + 787.50 + + 0.1000 + 0.79 + + + 0.0000 + 0.00 + + 0.79 + + 0.9000 + 7.09 + + + + + + + + 1020 + SEM GTIN + DISJUNTOR TERMOMAGNETICO BIPOLAR 32A CURVA C + 85362000 + 5405 + UN + 21.0000 + 69.2500000000 + 1454.25 + SEM GTIN + UN + 21.0000 + 69.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 1454.25 + 2.0000 + 29.09 + + + 200 + 200032 + + 1454.25 + + 0.1000 + + 60.0000 + 0.0400 + + 0.58 + + + 0.0000 + 0.00 + + 0.58 + + 0.9000 + + 60.0000 + 0.3600 + + 5.24 + + + + + Lote 2026-20 / item com informação adicional para variar a altura da linha + + + + 1021 + SEM GTIN + PARAFUSO SEXTAVADO ACO INOX M8 X 40MM + 73181500 + 5102 + CX + 28.0000 + 82.2500000000 + 2303.00 + SEM GTIN + CX + 28.0000 + 82.2500000000 + 1 + + + + + 0 + 00 + 3 + 2303.00 + 18.00 + 414.54 + + + + 000 + 000001 + + 2303.00 + + 0.1000 + 2.30 + + + 0.0000 + 0.00 + + 2.30 + + 0.9000 + 20.73 + + + + + + + + 1022 + SEM GTIN + REFRIGERANTE COLA LATA 350ML + 22021000 + 5102 + UN + 35.0000 + 95.2500000000 + 3333.75 + SEM GTIN + UN + 35.0000 + 95.2500000000 + 1 + + + + + 0 + 00 + 3 + 3333.75 + 18.00 + 600.08 + + + + 999 + + 50 + 3333.75 + 5.00 + 166.69 + + + + 000 + 000001 + + 3333.75 + + 0.1000 + 3.33 + + + 0.0000 + 0.00 + + 3.33 + + 0.9000 + 30.00 + + + + + + + + 1023 + SEM GTIN + ARRUELA LISA ZINCADA 8MM + 73182200 + 5405 + PC + 2.0000 + 11.2500000000 + 22.50 + SEM GTIN + PC + 2.0000 + 11.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 22.50 + 2.0000 + 0.45 + + + 200 + 200032 + + 22.50 + + 0.1000 + + 60.0000 + 0.0400 + + 0.01 + + + 0.0000 + 0.00 + + 0.01 + + 0.9000 + + 60.0000 + 0.3600 + + 0.08 + + + + + + + + 1024 + SEM GTIN + PORCA SEXTAVADA ACO CARBONO M10 CLASSE 8 COM TRATAMENTO SUPERFICIAL ZINCADO BRANCO - EMBALAGEM INDUSTRIAL + 73181600 + 5102 + CX + 9.0000 + 24.2500000000 + 218.25 + SEM GTIN + CX + 9.0000 + 24.2500000000 + 1 + + + + + 0 + 00 + 3 + 218.25 + 18.00 + 39.29 + + + + 000 + 000001 + + 218.25 + + 0.1000 + 0.22 + + + 0.0000 + 0.00 + + 0.22 + + 0.9000 + 1.96 + + + + + + + + 1025 + SEM GTIN + AGUA MINERAL SEM GAS GARRAFA 500ML + 22011000 + 5102 + UN + 16.0000 + 37.2500000000 + 596.00 + SEM GTIN + UN + 16.0000 + 37.2500000000 + 1 + + + + + 0 + 00 + 3 + 596.00 + 18.00 + 107.28 + + + + 999 + + 50 + 596.00 + 5.00 + 29.80 + + + + 000 + 000001 + + 596.00 + + 0.1000 + 0.60 + + + 0.0000 + 0.00 + + 0.60 + + 0.9000 + 5.36 + + + + + Lote 2026-25 / item com informação adicional para variar a altura da linha + + + + 1026 + SEM GTIN + CHAVE COMBINADA 13MM CROMO VANADIO + 82041100 + 5405 + UN + 23.0000 + 50.2500000000 + 1155.75 + SEM GTIN + UN + 23.0000 + 50.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 1155.75 + 2.0000 + 23.12 + + + 200 + 200032 + + 1155.75 + + 0.1000 + + 60.0000 + 0.0400 + + 0.46 + + + 0.0000 + 0.00 + + 0.46 + + 0.9000 + + 60.0000 + 0.3600 + + 4.16 + + + + + + + + 1027 + SEM GTIN + CABO FLEXIVEL 2,5MM2 750V AZUL ROLO 100M + 85444900 + 5102 + RL + 30.0000 + 63.2500000000 + 1897.50 + SEM GTIN + RL + 30.0000 + 63.2500000000 + 1 + + + + + 0 + 00 + 3 + 1897.50 + 18.00 + 341.55 + + + + 000 + 000001 + + 1897.50 + + 0.1000 + 1.90 + + + 0.0000 + 0.00 + + 1.90 + + 0.9000 + 17.08 + + + + + + + + 1028 + SEM GTIN + SUCO DE UVA INTEGRAL 1L + 20096100 + 5102 + UN + 37.0000 + 76.2500000000 + 2821.25 + SEM GTIN + UN + 37.0000 + 76.2500000000 + 1 + + + + + 0 + 00 + 3 + 2821.25 + 18.00 + 507.83 + + + + 999 + + 50 + 2821.25 + 5.00 + 141.06 + + + + 000 + 000001 + + 2821.25 + + 0.1000 + 2.82 + + + 0.0000 + 0.00 + + 2.82 + + 0.9000 + 25.39 + + + + + + + + 1029 + SEM GTIN + FITA ISOLANTE ANTICHAMA 19MM X 20M + 39191010 + 5405 + UN + 4.0000 + 89.2500000000 + 357.00 + SEM GTIN + UN + 4.0000 + 89.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 357.00 + 2.0000 + 7.14 + + + 200 + 200032 + + 357.00 + + 0.1000 + + 60.0000 + 0.0400 + + 0.14 + + + 0.0000 + 0.00 + + 0.14 + + 0.9000 + + 60.0000 + 0.3600 + + 1.29 + + + + + + + + 1030 + SEM GTIN + DISJUNTOR TERMOMAGNETICO BIPOLAR 32A CURVA C + 85362000 + 5102 + UN + 11.0000 + 5.2500000000 + 57.75 + SEM GTIN + UN + 11.0000 + 5.2500000000 + 1 + + + + + 0 + 00 + 3 + 57.75 + 18.00 + 10.40 + + + + 000 + 000001 + + 57.75 + + 0.1000 + 0.06 + + + 0.0000 + 0.00 + + 0.06 + + 0.9000 + 0.52 + + + + + Lote 2026-30 / item com informação adicional para variar a altura da linha + + + + 1031 + SEM GTIN + PARAFUSO SEXTAVADO ACO INOX M8 X 40MM + 73181500 + 5102 + CX + 18.0000 + 18.2500000000 + 328.50 + SEM GTIN + CX + 18.0000 + 18.2500000000 + 1 + + + + + 0 + 00 + 3 + 328.50 + 18.00 + 59.13 + + + + 999 + + 50 + 328.50 + 5.00 + 16.43 + + + + 000 + 000001 + + 328.50 + + 0.1000 + 0.33 + + + 0.0000 + 0.00 + + 0.33 + + 0.9000 + 2.96 + + + + + + + + 1032 + SEM GTIN + REFRIGERANTE COLA LATA 350ML + 22021000 + 5405 + UN + 25.0000 + 31.2500000000 + 781.25 + SEM GTIN + UN + 25.0000 + 31.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 781.25 + 2.0000 + 15.63 + + + 200 + 200032 + + 781.25 + + 0.1000 + + 60.0000 + 0.0400 + + 0.31 + + + 0.0000 + 0.00 + + 0.31 + + 0.9000 + + 60.0000 + 0.3600 + + 2.81 + + + + + + + + 1033 + SEM GTIN + ARRUELA LISA ZINCADA 8MM + 73182200 + 5102 + PC + 32.0000 + 44.2500000000 + 1416.00 + SEM GTIN + PC + 32.0000 + 44.2500000000 + 1 + + + + + 0 + 00 + 3 + 1416.00 + 18.00 + 254.88 + + + + 000 + 000001 + + 1416.00 + + 0.1000 + 1.42 + + + 0.0000 + 0.00 + + 1.42 + + 0.9000 + 12.74 + + + + + + + + 1034 + SEM GTIN + PORCA SEXTAVADA ACO CARBONO M10 CLASSE 8 COM TRATAMENTO SUPERFICIAL ZINCADO BRANCO - EMBALAGEM INDUSTRIAL + 73181600 + 5102 + CX + 39.0000 + 57.2500000000 + 2232.75 + SEM GTIN + CX + 39.0000 + 57.2500000000 + 1 + + + + + 0 + 00 + 3 + 2232.75 + 18.00 + 401.90 + + + + 999 + + 50 + 2232.75 + 5.00 + 111.64 + + + + 000 + 000001 + + 2232.75 + + 0.1000 + 2.23 + + + 0.0000 + 0.00 + + 2.23 + + 0.9000 + 20.09 + + + + + + + + 1035 + SEM GTIN + AGUA MINERAL SEM GAS GARRAFA 500ML + 22011000 + 5405 + UN + 6.0000 + 70.2500000000 + 421.50 + SEM GTIN + UN + 6.0000 + 70.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 421.50 + 2.0000 + 8.43 + + + 200 + 200032 + + 421.50 + + 0.1000 + + 60.0000 + 0.0400 + + 0.17 + + + 0.0000 + 0.00 + + 0.17 + + 0.9000 + + 60.0000 + 0.3600 + + 1.52 + + + + + Lote 2026-35 / item com informação adicional para variar a altura da linha + + + + 1036 + SEM GTIN + CHAVE COMBINADA 13MM CROMO VANADIO + 82041100 + 5102 + UN + 13.0000 + 83.2500000000 + 1082.25 + SEM GTIN + UN + 13.0000 + 83.2500000000 + 1 + + + + + 0 + 00 + 3 + 1082.25 + 18.00 + 194.81 + + + + 000 + 000001 + + 1082.25 + + 0.1000 + 1.08 + + + 0.0000 + 0.00 + + 1.08 + + 0.9000 + 9.74 + + + + + + + + 1037 + SEM GTIN + CABO FLEXIVEL 2,5MM2 750V AZUL ROLO 100M + 85444900 + 5102 + RL + 20.0000 + 96.2500000000 + 1925.00 + SEM GTIN + RL + 20.0000 + 96.2500000000 + 1 + + + + + 0 + 00 + 3 + 1925.00 + 18.00 + 346.50 + + + + 999 + + 50 + 1925.00 + 5.00 + 96.25 + + + + 000 + 000001 + + 1925.00 + + 0.1000 + 1.93 + + + 0.0000 + 0.00 + + 1.93 + + 0.9000 + 17.33 + + + + + + + + 1038 + SEM GTIN + SUCO DE UVA INTEGRAL 1L + 20096100 + 5405 + UN + 27.0000 + 12.2500000000 + 330.75 + SEM GTIN + UN + 27.0000 + 12.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 330.75 + 2.0000 + 6.62 + + + 200 + 200032 + + 330.75 + + 0.1000 + + 60.0000 + 0.0400 + + 0.13 + + + 0.0000 + 0.00 + + 0.13 + + 0.9000 + + 60.0000 + 0.3600 + + 1.19 + + + + + + + + 1039 + SEM GTIN + FITA ISOLANTE ANTICHAMA 19MM X 20M + 39191010 + 5102 + UN + 34.0000 + 25.2500000000 + 858.50 + SEM GTIN + UN + 34.0000 + 25.2500000000 + 1 + + + + + 0 + 00 + 3 + 858.50 + 18.00 + 154.53 + + + + 000 + 000001 + + 858.50 + + 0.1000 + 0.86 + + + 0.0000 + 0.00 + + 0.86 + + 0.9000 + 7.73 + + + + + + + + 1040 + SEM GTIN + DISJUNTOR TERMOMAGNETICO BIPOLAR 32A CURVA C + 85362000 + 5102 + UN + 1.0000 + 38.2500000000 + 38.25 + SEM GTIN + UN + 1.0000 + 38.2500000000 + 1 + + + + + 0 + 00 + 3 + 38.25 + 18.00 + 6.89 + + + + 999 + + 50 + 38.25 + 5.00 + 1.91 + + + + 000 + 000001 + + 38.25 + + 0.1000 + 0.04 + + + 0.0000 + 0.00 + + 0.04 + + 0.9000 + 0.34 + + + + + Lote 2026-40 / item com informação adicional para variar a altura da linha + + + + 1041 + SEM GTIN + PARAFUSO SEXTAVADO ACO INOX M8 X 40MM + 73181500 + 5405 + CX + 8.0000 + 51.2500000000 + 410.00 + SEM GTIN + CX + 8.0000 + 51.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 410.00 + 2.0000 + 8.20 + + + 200 + 200032 + + 410.00 + + 0.1000 + + 60.0000 + 0.0400 + + 0.16 + + + 0.0000 + 0.00 + + 0.16 + + 0.9000 + + 60.0000 + 0.3600 + + 1.48 + + + + + + + + 1042 + SEM GTIN + REFRIGERANTE COLA LATA 350ML + 22021000 + 5102 + UN + 15.0000 + 64.2500000000 + 963.75 + SEM GTIN + UN + 15.0000 + 64.2500000000 + 1 + + + + + 0 + 00 + 3 + 963.75 + 18.00 + 173.48 + + + + 000 + 000001 + + 963.75 + + 0.1000 + 0.96 + + + 0.0000 + 0.00 + + 0.96 + + 0.9000 + 8.67 + + + + + + + + 1043 + SEM GTIN + ARRUELA LISA ZINCADA 8MM + 73182200 + 5102 + PC + 22.0000 + 77.2500000000 + 1699.50 + SEM GTIN + PC + 22.0000 + 77.2500000000 + 1 + + + + + 0 + 00 + 3 + 1699.50 + 18.00 + 305.91 + + + + 999 + + 50 + 1699.50 + 5.00 + 84.98 + + + + 000 + 000001 + + 1699.50 + + 0.1000 + 1.70 + + + 0.0000 + 0.00 + + 1.70 + + 0.9000 + 15.30 + + + + + + + + 1044 + SEM GTIN + PORCA SEXTAVADA ACO CARBONO M10 CLASSE 8 COM TRATAMENTO SUPERFICIAL ZINCADO BRANCO - EMBALAGEM INDUSTRIAL + 73181600 + 5405 + CX + 29.0000 + 90.2500000000 + 2617.25 + SEM GTIN + CX + 29.0000 + 90.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 2617.25 + 2.0000 + 52.35 + + + 200 + 200032 + + 2617.25 + + 0.1000 + + 60.0000 + 0.0400 + + 1.05 + + + 0.0000 + 0.00 + + 1.05 + + 0.9000 + + 60.0000 + 0.3600 + + 9.42 + + + + + + + + 1045 + SEM GTIN + AGUA MINERAL SEM GAS GARRAFA 500ML + 22011000 + 5102 + UN + 36.0000 + 6.2500000000 + 225.00 + SEM GTIN + UN + 36.0000 + 6.2500000000 + 1 + + + + + 0 + 00 + 3 + 225.00 + 18.00 + 40.50 + + + + 000 + 000001 + + 225.00 + + 0.1000 + 0.23 + + + 0.0000 + 0.00 + + 0.23 + + 0.9000 + 2.03 + + + + + Lote 2026-45 / item com informação adicional para variar a altura da linha + + + + 1046 + SEM GTIN + CHAVE COMBINADA 13MM CROMO VANADIO + 82041100 + 5102 + UN + 3.0000 + 19.2500000000 + 57.75 + SEM GTIN + UN + 3.0000 + 19.2500000000 + 1 + + + + + 0 + 00 + 3 + 57.75 + 18.00 + 10.40 + + + + 999 + + 50 + 57.75 + 5.00 + 2.89 + + + + 000 + 000001 + + 57.75 + + 0.1000 + 0.06 + + + 0.0000 + 0.00 + + 0.06 + + 0.9000 + 0.52 + + + + + + + + 1047 + SEM GTIN + CABO FLEXIVEL 2,5MM2 750V AZUL ROLO 100M + 85444900 + 5405 + RL + 10.0000 + 32.2500000000 + 322.50 + SEM GTIN + RL + 10.0000 + 32.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 322.50 + 2.0000 + 6.45 + + + 200 + 200032 + + 322.50 + + 0.1000 + + 60.0000 + 0.0400 + + 0.13 + + + 0.0000 + 0.00 + + 0.13 + + 0.9000 + + 60.0000 + 0.3600 + + 1.16 + + + + + + + + 1048 + SEM GTIN + SUCO DE UVA INTEGRAL 1L + 20096100 + 5102 + UN + 17.0000 + 45.2500000000 + 769.25 + SEM GTIN + UN + 17.0000 + 45.2500000000 + 1 + + + + + 0 + 00 + 3 + 769.25 + 18.00 + 138.47 + + + + 000 + 000001 + + 769.25 + + 0.1000 + 0.77 + + + 0.0000 + 0.00 + + 0.77 + + 0.9000 + 6.92 + + + + + + + + 1049 + SEM GTIN + FITA ISOLANTE ANTICHAMA 19MM X 20M + 39191010 + 5102 + UN + 24.0000 + 58.2500000000 + 1398.00 + SEM GTIN + UN + 24.0000 + 58.2500000000 + 1 + + + + + 0 + 00 + 3 + 1398.00 + 18.00 + 251.64 + + + + 999 + + 50 + 1398.00 + 5.00 + 69.90 + + + + 000 + 000001 + + 1398.00 + + 0.1000 + 1.40 + + + 0.0000 + 0.00 + + 1.40 + + 0.9000 + 12.58 + + + + + + + + 1050 + SEM GTIN + DISJUNTOR TERMOMAGNETICO BIPOLAR 32A CURVA C + 85362000 + 5405 + UN + 31.0000 + 71.2500000000 + 2208.75 + SEM GTIN + UN + 31.0000 + 71.2500000000 + 1 + + + + + 0 + 60 + + + + 000 + 000001 + 2208.75 + 2.0000 + 44.18 + + + 200 + 200032 + + 2208.75 + + 0.1000 + + 60.0000 + 0.0400 + + 0.88 + + + 0.0000 + 0.00 + + 0.88 + + 0.9000 + + 60.0000 + 0.3600 + + 7.95 + + + + + Lote 2026-50 / item com informação adicional para variar a altura da linha + + + + 32736.00 + 5892.56 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 50645.75 + 120.00 + 0.00 + 35.00 + 0.00 + 1024.47 + 0.00 + 0.00 + 0.00 + 0.00 + 51755.22 + + + 358.24 + + + 50645.75 + + + 0.00 + 0.00 + 39.89 + + + 0.00 + 0.00 + 0.00 + + 39.89 + 0.00 + 0.00 + + + 0.00 + 0.00 + 359.10 + 0.00 + 0.00 + + + + + 0 + + 22222222000122 + TRANSPORTADORA EXEMPLO LTDA + 333333333333 + Rodovia Exemplo, km 10 + Jundiaí + SP + + + ABC1D23 + SP + 12345678 + + + 50 + VOLUME + EXEMPLO + 001 + 412.300 + 438.900 + + + + + 124 + 51755.22 + 0.00 + 51755.22 + + 0012026-12-3112938.80 + 0022027-01-3012938.80 + 0032027-03-0112938.80 + 0042027-03-3112938.82 + + + + 15 + 51755.22 + + + + Documento emitido em ambiente de homologação. + Documento emitido a título de exemplo de leiaute (Reforma Tributária - IBS/CBS/IS). Pedido de compra 4500012346. Nota com 50 itens para teste da quebra de página. + + + + https://www.homologacao.nfe.fazenda.gov.br/consulta?p=35261212345678000195550010000001241000001244|2|2|1|ABCDEF0123456789 + www.nfe.fazenda.gov.br/consulta + + + + + 2 + SP_NFE_PL_010 + 35261212345678000195550010000001241000001244 + 2026-12-01T10:15:45-03:00 + 135260000012346 + AAAAAAAAAAAAAAAAAAAAAAAAAAA= + 100 + Autorizado o uso da NF-e + + + diff --git a/src/test/resources/DanfeV2SemRtc.xml b/src/test/resources/DanfeV2SemRtc.xml new file mode 100644 index 00000000..003570d0 --- /dev/null +++ b/src/test/resources/DanfeV2SemRtc.xml @@ -0,0 +1,129 @@ + + + + + + 35 + 00000456 + VENDA DE MERCADORIA + 55 + 1 + 456 + 2026-06-10T09:00:00-03:00 + 1 + 1 + 3550308 + 1 + 1 + 7 + 2 + 1 + 1 + 1 + 0 + JavaDanfe 2.0 + + + 12345678000195 + EMPRESA EXEMPLO LTDA + + Rua Exemplo + 100 + Centro + 3550308 + São Paulo + SP + 01001000 + 1058 + BRASIL + + 111222333444 + 1 + + + 12345678909 + CONSUMIDOR EXEMPLO + + Rua do Cliente + 50 + Vila Nova + 3550308 + São Paulo + SP + 04001000 + 1058 + BRASIL + + 9 + + + + 3003 + SEM GTIN + CANETA ESFEROGRAFICA AZUL + 96081000 + 5102 + UN + 10.0000 + 2.5000000000 + 25.00 + SEM GTIN + UN + 10.0000 + 2.5000000000 + 1 + + + + + 0 + 102 + + + + + 07 + + + + + 07 + + + + + + + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 25.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 0.00 + 25.00 + + + + 9 + + + + 01 + 25.00 + + + + diff --git a/src/test/resources/EventoCancelamentoAssinado.xml b/src/test/resources/EventoCancelamentoAssinado.xml new file mode 100644 index 00000000..0ed3b63e --- /dev/null +++ b/src/test/resources/EventoCancelamentoAssinado.xml @@ -0,0 +1,22 @@ + + + 1 + + + 91 + 2 + 09158456000159 + 52230309158456000159550010000731791567812345 + 2024-01-15T10:00:00-03:00 + 110111 + 1 + 1.00 + + Cancelamento + 352230000123456 + Cancelamento por erro na emissao do documento fiscal em teste de round trip JAXB dsig + + + ZmFrZURpZ2VzdFZhbHVlRHVtbXk=ZmFrZVNpZ25hdHVyZVZhbHVlRHVtbXlEYXRhRm9yVGVzdGVSb3VuZFRyaXA=ZmFrZUNlcnRpZmljYXRlRGF0YUR1bW15Rm9yVGVzdGVSb3VuZFRyaXBKQVhC + + diff --git a/src/test/resources/IbsCbs.xml b/src/test/resources/IbsCbs.xml index f66e3927..cc2cfa99 100644 --- a/src/test/resources/IbsCbs.xml +++ b/src/test/resources/IbsCbs.xml @@ -1 +1 @@ -113544039674VENDA DE PRODUÇÃO55112452026-01-12T11:27:13-03:0011353780011311100Bridi.4.0.3499999999999999ALUMINIO SUL DESC RESID IND EIRELIRODOVIA JOSE DE CARVALHOS/NFUNIL3537800PIEDADESP181700001058Brasil1532996276526082602118356558703000275BENTOMAR INDUSTRIA E COMERCIO DE MINERIOS LTDARUA 4331FERRAZ3543907RIO CLAROSP135080001058Brasil193539127315871243791161SEM GTINPO COM ALUMINIO INDUSTRIAL NAO LAMELAR760310005101KG1.000100.00100.00SEM GTINKG1.000100.001020333.3367.0018.0012.0099950100.002.603.000188.000.650.570188.003.002.6400000000184.790.10000.080.00000.000.080.90000.7667.0012.000.000.000.000.000.000.000.000.000.000.000.00100.000.000.000.000.003.000.000.572.640.00103.0084.790.000.000.080.000.000.000.080.000.000.000.000.760.000.00103.8490011.03Base de Cálculo do ICMS Reduzida conforme Art.15 do Anexo II do RICMSiwYcsB6cCjrHE2rATM0IwbAlKqo=WJT6fM00eVd9rmODkQYCK2SHHxo/p9Gu4/RybayzdspGITsH/OyYb47LJIdUTEHHeYJKkH3KR0aPCnRdV59rIwISLs0UgMzUyAafDg6Rr5tswi8+cnYU1/NjMUFhSLgJYxFc6PIdy7Nhxni21lOU/VCKtrSBn8TQ3iMVFAfTnRBjVqJXovIj9iQO8g/zrGiAQZHjLPaq8HRFO+fZI6intbNi1QKVkJvGan2c3BJ6peikaCbjDW4xUTK00O+hhlZW0Y/KnSunERVKOOixhnLKgXHmt7OS69ZExVpBEtp6TEnUhpDGepQfup9lkbyN+DPOXqm83yVWMLkVHeyx0frO9g==MIIFRTCCAy2gAwIBAgIFMzMzMzMwDQYJKoZIhvcNAQELBQAwLjELMAkGA1UEBhMCQlIxDTALBgNVBAoMBFRSVDIxEDAOBgNVBAMMB0FDIFRlc3QwHhcNMTkwNTE5MDMzNjAxWhcNMjkwNTE2MDMzNjAxWjCBjDELMAkGA1UEBhMCQlIxEzARBgNVBAoMCklDUC1CcmFzaWwxETAPBgNVBAsMCEFSIFRlc3RlMRUwEwYDVQQLDAxSRkIgZS1DUEYgQTMxDjAMBgNVBAsMBVRFU1RFMS4wLAYDVQQDDCVDRVJUSUZJQ0FETyBDTlBKIFRFU1RFOjk5OTk5OTk5OTk5OTk5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsvU5zUaIR8aMbgxYMPplTdDTN3a7SsSbWw3vhzFaKoi4DtQ7BgnLiRTpi55Ju6gVGAGoO/AbDgvB3RN3QZmShDCziAm+6/yfjXfKCgZxLFbU06BFvZgH74fGaBxw0XTgB+0b4ybvEcesowwJ5TabNbF/wfdzws9FiIMgLbTKDrGRxmNWJRTsHcxrM7S/jdC+0P1wLNU/yHJFdYtc2+uaQeWot4sqEs5xjT5zF04awiPmJzM7rJ/LPdNyWvPpSxxpp+fwh5DcSnNfVdi1MDA+ZfxZJiewJ6oHD8xsGOb+UFZ6ILZlhBC48fQ4ZP23BFznogKchCeDbTnSbC3pUkb4fwIDAQABo4IBCTCCAQUwCwYDVR0PBAQDAgXgMBMGA1UdJQQMMAoGCCsGAQUFBwMCMB0GA1UdDgQWBBS3jHyL1soINz1THzzRVxW2DOlgMzAfBgNVHSMEGDAWgBSRscTYqHEjUnYfoO/WhedPFogFvTCBoAYDVR0RBIGYMIGVoD0GBWBMAQMEoDQTMjEwMTAxOTcwOTk5OTk5OTk5OTkwMDAwMDAwMDAwMDAwMDAwMDIyNjE0ODQ1MlNTUFNQoCAGBWBMAQMCoBcTFUNFUlRJRklDQURPIENQRiBURVNURaAZBgVgTAEDA6AQEw45OTk5OTk5OTk5OTk5OaAXBgVgTAEDB6AOEwwwMDAwMDAwMDAwMDAwDQYJKoZIhvcNAQELBQADggIBAHvd1BPw8F57FfOlf8bTgGAAE7RowwkWp/16qWMp+n4E8mI7EXvEjMRQDyebzp+aWyyjoqnft9k2h2nyidSuy7wt5zGGwyKUdIPCRPerbu9+ylZenznXDNCxtPI3cWIuwiE7d9p4ih9/8beAZ6WryYxUC1G3B/MaKVGCFR9KJrKQw8QbHl5Vaovjse7hrWjYRdgLifzQYK8ExGtqraIFLqIa020UUE1xLVPDyOrMAh22B+EzjcfkmEeSK6o3UrvKRDsUivE2+RxWu1FHwVHoEcF209M5RDtyRsNHR8iLWW+e/dzEtTGClPSwLm3OFu0/PbvFhFbA3IpyWoDLuSonluOVBtlAeJEf1eUQSGQoYBt33d3FyVqunYhEFu4vBE1tu8tJdbi2WqbePOajlMqKwmPgjyGUBfRWKloCkiw2yM/sbWDeErz7isaOYhyty/Y84DYIJV/uhHYWqL/qanid6yI54ZpjhYsb7GemjYRwdLd3kUq81/R5nKAlgjnTzOYWKTiLCuSo5svSWht5ENiAr2zUq08txX5wQ8FHMkw87EjkrNpxR2bIGbY+j34YD5l+m83yC/kPoZKn+AE4CKCRexlNYwXymHsBcG5UzrSYxvXeJWc006HxLJEobaeGkamG5HlNh7DaG/u7k7xOmLQUy7B804sneE23GRJ2AbulJk7e \ No newline at end of file +113544039674VENDA DE PRODUÇÃO55112452026-01-12T11:27:13-03:0011353780011311100Bridi.4.0.3499999999999999ALUMINIO SUL DESC RESID IND EIRELIRODOVIA JOSE DE CARVALHOS/NFUNIL3537800PIEDADESP181700001058Brasil1532996276526082602118356558703000275BENTOMAR INDUSTRIA E COMERCIO DE MINERIOS LTDARUA 4331FERRAZ3543907RIO CLAROSP135080001058Brasil193539127315871243791161SEM GTINPO COM ALUMINIO INDUSTRIAL NAO LAMELAR760310005101KG1.000100.00100.00SEM GTINKG1.000100.001020333.3367.0018.0012.0099950100.002.603.000188.000.650.570188.003.002.6400000000184.790.10000.080.00000.000.080.90000.7667.0012.000.000.000.000.000.000.000.000.000.000.000.00100.000.000.000.000.003.000.000.572.640.00103.0084.790.000.000.080.000.000.000.080.000.000.000.000.760.000.00103.0090011.03Base de Cálculo do ICMS Reduzida conforme Art.15 do Anexo II do RICMSOnB1V6ibQhRCm5x3k3/+0951vDY=AaifGM5qXAypKHpiut+j0z0OuiL6QGfOV85dhwt6Jjq5R+hSE9y6TqHEQkwfI8zY174ZuWxGulI7Bxbk+rElZUQi+jGm6BYglef+LFuiOj6Fk7f+dkfcDC//YW/7SPBi+5zFUBH7JASn6aUhEm1G+VIj6hjc2/c3uHKQVYxUI2Ssoyhz/gQ1FMndSJYF0kqmAcgTM6P0/GFTpUoeX2rWoq/Mnq+H/plZZWnRUZagmO9HnJ9gIh96VA8EczUTThvq+UoeME9RjkAgFYTTX45gHpkcBrPbCodnQxBb5suZA5NNDl8xJnt7CTAyG8WiDkVpAHSE/Qurx6TLeLOi1NvUJw==MIIFRTCCAy2gAwIBAgIFMzMzMzMwDQYJKoZIhvcNAQELBQAwLjELMAkGA1UEBhMCQlIxDTALBgNVBAoMBFRSVDIxEDAOBgNVBAMMB0FDIFRlc3QwHhcNMTkwNTE5MDMzNjAxWhcNMjkwNTE2MDMzNjAxWjCBjDELMAkGA1UEBhMCQlIxEzARBgNVBAoMCklDUC1CcmFzaWwxETAPBgNVBAsMCEFSIFRlc3RlMRUwEwYDVQQLDAxSRkIgZS1DUEYgQTMxDjAMBgNVBAsMBVRFU1RFMS4wLAYDVQQDDCVDRVJUSUZJQ0FETyBDTlBKIFRFU1RFOjk5OTk5OTk5OTk5OTk5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsvU5zUaIR8aMbgxYMPplTdDTN3a7SsSbWw3vhzFaKoi4DtQ7BgnLiRTpi55Ju6gVGAGoO/AbDgvB3RN3QZmShDCziAm+6/yfjXfKCgZxLFbU06BFvZgH74fGaBxw0XTgB+0b4ybvEcesowwJ5TabNbF/wfdzws9FiIMgLbTKDrGRxmNWJRTsHcxrM7S/jdC+0P1wLNU/yHJFdYtc2+uaQeWot4sqEs5xjT5zF04awiPmJzM7rJ/LPdNyWvPpSxxpp+fwh5DcSnNfVdi1MDA+ZfxZJiewJ6oHD8xsGOb+UFZ6ILZlhBC48fQ4ZP23BFznogKchCeDbTnSbC3pUkb4fwIDAQABo4IBCTCCAQUwCwYDVR0PBAQDAgXgMBMGA1UdJQQMMAoGCCsGAQUFBwMCMB0GA1UdDgQWBBS3jHyL1soINz1THzzRVxW2DOlgMzAfBgNVHSMEGDAWgBSRscTYqHEjUnYfoO/WhedPFogFvTCBoAYDVR0RBIGYMIGVoD0GBWBMAQMEoDQTMjEwMTAxOTcwOTk5OTk5OTk5OTkwMDAwMDAwMDAwMDAwMDAwMDIyNjE0ODQ1MlNTUFNQoCAGBWBMAQMCoBcTFUNFUlRJRklDQURPIENQRiBURVNURaAZBgVgTAEDA6AQEw45OTk5OTk5OTk5OTk5OaAXBgVgTAEDB6AOEwwwMDAwMDAwMDAwMDAwDQYJKoZIhvcNAQELBQADggIBAHvd1BPw8F57FfOlf8bTgGAAE7RowwkWp/16qWMp+n4E8mI7EXvEjMRQDyebzp+aWyyjoqnft9k2h2nyidSuy7wt5zGGwyKUdIPCRPerbu9+ylZenznXDNCxtPI3cWIuwiE7d9p4ih9/8beAZ6WryYxUC1G3B/MaKVGCFR9KJrKQw8QbHl5Vaovjse7hrWjYRdgLifzQYK8ExGtqraIFLqIa020UUE1xLVPDyOrMAh22B+EzjcfkmEeSK6o3UrvKRDsUivE2+RxWu1FHwVHoEcF209M5RDtyRsNHR8iLWW+e/dzEtTGClPSwLm3OFu0/PbvFhFbA3IpyWoDLuSonluOVBtlAeJEf1eUQSGQoYBt33d3FyVqunYhEFu4vBE1tu8tJdbi2WqbePOajlMqKwmPgjyGUBfRWKloCkiw2yM/sbWDeErz7isaOYhyty/Y84DYIJV/uhHYWqL/qanid6yI54ZpjhYsb7GemjYRwdLd3kUq81/R5nKAlgjnTzOYWKTiLCuSo5svSWht5ENiAr2zUq08txX5wQ8FHMkw87EjkrNpxR2bIGbY+j34YD5l+m83yC/kPoZKn+AE4CKCRexlNYwXymHsBcG5UzrSYxvXeJWc006HxLJEobaeGkamG5HlNh7DaG/u7k7xOmLQUy7B804sneE23GRJ2AbulJk7e \ No newline at end of file diff --git a/src/test/resources/IbsCbsMonofasico.xml b/src/test/resources/IbsCbsMonofasico.xml index 177ef1a5..e78d7ed0 100644 --- a/src/test/resources/IbsCbsMonofasico.xml +++ b/src/test/resources/IbsCbsMonofasico.xml @@ -1 +1 @@ -113544039674VENDA DE PRODUÇÃO55112452026-01-12T11:27:13-03:0011353780011311100Bridi.4.0.3499999999999999ALUMINIO SUL DESC RESID IND EIRELIRODOVIA JOSE DE CARVALHOS/NFUNIL3537800PIEDADESP181700001058Brasil1532996276526082602118356558703000275BENTOMAR INDUSTRIA E COMERCIO DE MINERIOS LTDARUA 4331FERRAZ3543907RIO CLAROSP135080001058Brasil193539127315871243791161SEM GTINPO COM ALUMINIO INDUSTRIAL NAO LAMELAR760310005101KG1.000100.00100.00SEM GTINKG1.000100.001020333.3367.0018.0012.0099950100.002.603.000188.000.650.570188.003.002.646206200061.00000.000.000.000.000.000.0067.0012.000.000.000.000.000.000.000.000.000.000.000.00100.000.000.000.000.003.000.000.572.640.00103.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.00103.0090011.03Base de Cálculo do ICMS Reduzida conforme Art.15 do Anexo II do RICMS5a+GoQw7bId3FOqKlwtxxA5a2F4=QpsHL9SbRvZgODskHCthr5Tm1dW9wGhrfFOBLyEZklu80tb28R5P3gcsJ3Btyhkx9E9tvs1VfilNxqgwvU501I0YRBgNPMJQ1kaXurwjLu1/Pz8vQzg1QxSi0I+Fnw9TzB0KYa1aaIRoEq3bIDd/LA8YDlTJXf1QecCPhOhzDLqTY53S+m7SVgBonvcVCm16lDGdyKmViKoPHL9uR4ZetYKW8c1MZBrcoc6BM4QEdEnwQJLoRfZK/wYbzjUbvPoU8s8uUo6w6kgAT6Eku6HRc8OKVkTHps+aJWXK600Lyf29Xd5qOKX8CbAGA4C4Zl5tiWj7fd47Nio3AexhAYmuvA==MIIFRTCCAy2gAwIBAgIFMzMzMzMwDQYJKoZIhvcNAQELBQAwLjELMAkGA1UEBhMCQlIxDTALBgNVBAoMBFRSVDIxEDAOBgNVBAMMB0FDIFRlc3QwHhcNMTkwNTE5MDMzNjAxWhcNMjkwNTE2MDMzNjAxWjCBjDELMAkGA1UEBhMCQlIxEzARBgNVBAoMCklDUC1CcmFzaWwxETAPBgNVBAsMCEFSIFRlc3RlMRUwEwYDVQQLDAxSRkIgZS1DUEYgQTMxDjAMBgNVBAsMBVRFU1RFMS4wLAYDVQQDDCVDRVJUSUZJQ0FETyBDTlBKIFRFU1RFOjk5OTk5OTk5OTk5OTk5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsvU5zUaIR8aMbgxYMPplTdDTN3a7SsSbWw3vhzFaKoi4DtQ7BgnLiRTpi55Ju6gVGAGoO/AbDgvB3RN3QZmShDCziAm+6/yfjXfKCgZxLFbU06BFvZgH74fGaBxw0XTgB+0b4ybvEcesowwJ5TabNbF/wfdzws9FiIMgLbTKDrGRxmNWJRTsHcxrM7S/jdC+0P1wLNU/yHJFdYtc2+uaQeWot4sqEs5xjT5zF04awiPmJzM7rJ/LPdNyWvPpSxxpp+fwh5DcSnNfVdi1MDA+ZfxZJiewJ6oHD8xsGOb+UFZ6ILZlhBC48fQ4ZP23BFznogKchCeDbTnSbC3pUkb4fwIDAQABo4IBCTCCAQUwCwYDVR0PBAQDAgXgMBMGA1UdJQQMMAoGCCsGAQUFBwMCMB0GA1UdDgQWBBS3jHyL1soINz1THzzRVxW2DOlgMzAfBgNVHSMEGDAWgBSRscTYqHEjUnYfoO/WhedPFogFvTCBoAYDVR0RBIGYMIGVoD0GBWBMAQMEoDQTMjEwMTAxOTcwOTk5OTk5OTk5OTkwMDAwMDAwMDAwMDAwMDAwMDIyNjE0ODQ1MlNTUFNQoCAGBWBMAQMCoBcTFUNFUlRJRklDQURPIENQRiBURVNURaAZBgVgTAEDA6AQEw45OTk5OTk5OTk5OTk5OaAXBgVgTAEDB6AOEwwwMDAwMDAwMDAwMDAwDQYJKoZIhvcNAQELBQADggIBAHvd1BPw8F57FfOlf8bTgGAAE7RowwkWp/16qWMp+n4E8mI7EXvEjMRQDyebzp+aWyyjoqnft9k2h2nyidSuy7wt5zGGwyKUdIPCRPerbu9+ylZenznXDNCxtPI3cWIuwiE7d9p4ih9/8beAZ6WryYxUC1G3B/MaKVGCFR9KJrKQw8QbHl5Vaovjse7hrWjYRdgLifzQYK8ExGtqraIFLqIa020UUE1xLVPDyOrMAh22B+EzjcfkmEeSK6o3UrvKRDsUivE2+RxWu1FHwVHoEcF209M5RDtyRsNHR8iLWW+e/dzEtTGClPSwLm3OFu0/PbvFhFbA3IpyWoDLuSonluOVBtlAeJEf1eUQSGQoYBt33d3FyVqunYhEFu4vBE1tu8tJdbi2WqbePOajlMqKwmPgjyGUBfRWKloCkiw2yM/sbWDeErz7isaOYhyty/Y84DYIJV/uhHYWqL/qanid6yI54ZpjhYsb7GemjYRwdLd3kUq81/R5nKAlgjnTzOYWKTiLCuSo5svSWht5ENiAr2zUq08txX5wQ8FHMkw87EjkrNpxR2bIGbY+j34YD5l+m83yC/kPoZKn+AE4CKCRexlNYwXymHsBcG5UzrSYxvXeJWc006HxLJEobaeGkamG5HlNh7DaG/u7k7xOmLQUy7B804sneE23GRJ2AbulJk7e \ No newline at end of file +113544039674VENDA DE PRODUÇÃO55112452026-01-12T11:27:13-03:0011353780011311100Bridi.4.0.3499999999999999ALUMINIO SUL DESC RESID IND EIRELIRODOVIA JOSE DE CARVALHOS/NFUNIL3537800PIEDADESP181700001058Brasil1532996276526082602118356558703000275BENTOMAR INDUSTRIA E COMERCIO DE MINERIOS LTDARUA 4331FERRAZ3543907RIO CLAROSP135080001058Brasil193539127315871243791161SEM GTINPO COM ALUMINIO INDUSTRIAL NAO LAMELAR760310005101KG1.000100.00100.00SEM GTINKG1.000100.001020333.3367.0018.0012.0099950100.002.603.000188.000.650.570188.003.002.646206200060.000.000.000.0067.0012.000.000.000.000.000.000.000.000.000.000.000.00100.000.000.000.000.003.000.000.572.640.00103.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.00103.0090011.03Base de Cálculo do ICMS Reduzida conforme Art.15 do Anexo II do RICMS/zPj9bs5tlTwqd+q9NCNUoOL9v4=kqceHDXsvry/aIMwIAHCvsWYOaWUYt6KMWp2B55lcGhiFF8kBaiUo9L85HBpII8mlZT2rAvpM3KaG4VrpW2VmYms+xrUJYrbhObrYVEk93OZJtOVEStWnVKKjiNOc7LWbPVwbeiFw/s1J6zhlGwS4ahaz0oBuEQ4oblIPecl3rSKAa1bP4D1USZbOCWLQsq+dvBeHTayiedsoCmPxR4yz5oaXzkKqCKqoxnjmYfe5WNpMqsuj4vqP5TfmPT7TZL2mdLnNXk8uG1VCc6JV319+zklmaxvzlM3L2lu8rNkk43dreGU1ko6aB4pFGNKIuNoipGEd8YBqcmZWgEI9DzFxw==MIIFRTCCAy2gAwIBAgIFMzMzMzMwDQYJKoZIhvcNAQELBQAwLjELMAkGA1UEBhMCQlIxDTALBgNVBAoMBFRSVDIxEDAOBgNVBAMMB0FDIFRlc3QwHhcNMTkwNTE5MDMzNjAxWhcNMjkwNTE2MDMzNjAxWjCBjDELMAkGA1UEBhMCQlIxEzARBgNVBAoMCklDUC1CcmFzaWwxETAPBgNVBAsMCEFSIFRlc3RlMRUwEwYDVQQLDAxSRkIgZS1DUEYgQTMxDjAMBgNVBAsMBVRFU1RFMS4wLAYDVQQDDCVDRVJUSUZJQ0FETyBDTlBKIFRFU1RFOjk5OTk5OTk5OTk5OTk5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsvU5zUaIR8aMbgxYMPplTdDTN3a7SsSbWw3vhzFaKoi4DtQ7BgnLiRTpi55Ju6gVGAGoO/AbDgvB3RN3QZmShDCziAm+6/yfjXfKCgZxLFbU06BFvZgH74fGaBxw0XTgB+0b4ybvEcesowwJ5TabNbF/wfdzws9FiIMgLbTKDrGRxmNWJRTsHcxrM7S/jdC+0P1wLNU/yHJFdYtc2+uaQeWot4sqEs5xjT5zF04awiPmJzM7rJ/LPdNyWvPpSxxpp+fwh5DcSnNfVdi1MDA+ZfxZJiewJ6oHD8xsGOb+UFZ6ILZlhBC48fQ4ZP23BFznogKchCeDbTnSbC3pUkb4fwIDAQABo4IBCTCCAQUwCwYDVR0PBAQDAgXgMBMGA1UdJQQMMAoGCCsGAQUFBwMCMB0GA1UdDgQWBBS3jHyL1soINz1THzzRVxW2DOlgMzAfBgNVHSMEGDAWgBSRscTYqHEjUnYfoO/WhedPFogFvTCBoAYDVR0RBIGYMIGVoD0GBWBMAQMEoDQTMjEwMTAxOTcwOTk5OTk5OTk5OTkwMDAwMDAwMDAwMDAwMDAwMDIyNjE0ODQ1MlNTUFNQoCAGBWBMAQMCoBcTFUNFUlRJRklDQURPIENQRiBURVNURaAZBgVgTAEDA6AQEw45OTk5OTk5OTk5OTk5OaAXBgVgTAEDB6AOEwwwMDAwMDAwMDAwMDAwDQYJKoZIhvcNAQELBQADggIBAHvd1BPw8F57FfOlf8bTgGAAE7RowwkWp/16qWMp+n4E8mI7EXvEjMRQDyebzp+aWyyjoqnft9k2h2nyidSuy7wt5zGGwyKUdIPCRPerbu9+ylZenznXDNCxtPI3cWIuwiE7d9p4ih9/8beAZ6WryYxUC1G3B/MaKVGCFR9KJrKQw8QbHl5Vaovjse7hrWjYRdgLifzQYK8ExGtqraIFLqIa020UUE1xLVPDyOrMAh22B+EzjcfkmEeSK6o3UrvKRDsUivE2+RxWu1FHwVHoEcF209M5RDtyRsNHR8iLWW+e/dzEtTGClPSwLm3OFu0/PbvFhFbA3IpyWoDLuSonluOVBtlAeJEf1eUQSGQoYBt33d3FyVqunYhEFu4vBE1tu8tJdbi2WqbePOajlMqKwmPgjyGUBfRWKloCkiw2yM/sbWDeErz7isaOYhyty/Y84DYIJV/uhHYWqL/qanid6yI54ZpjhYsb7GemjYRwdLd3kUq81/R5nKAlgjnTzOYWKTiLCuSo5svSWht5ENiAr2zUq08txX5wQ8FHMkw87EjkrNpxR2bIGbY+j34YD5l+m83yC/kPoZKn+AE4CKCRexlNYwXymHsBcG5UzrSYxvXeJWc006HxLJEobaeGkamG5HlNh7DaG/u7k7xOmLQUy7B804sneE23GRJ2AbulJk7e \ No newline at end of file diff --git a/src/test/resources/ibscbs.json b/src/test/resources/ibscbs.json index 02579daa..2e29b2ec 100644 --- a/src/test/resources/ibscbs.json +++ b/src/test/resources/ibscbs.json @@ -26,10 +26,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": true, @@ -38,7 +38,7 @@ "IndNF3e": true, "IndNFCom": true, "IndNFSE": true, - "IndBPeTM": true, + "IndBPeTM": false, "IndBPeTA": true, "IndNFAg": true, "IndNFSVIA": false, @@ -46,7 +46,12 @@ "IndNFGas": true, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art4" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art4", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": true, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "000002", @@ -60,10 +65,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -79,8 +84,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art11" + "Anexo": 90111, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art11", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "000003", @@ -94,10 +104,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -114,7 +124,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art311" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art311", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "000004", @@ -128,10 +143,49 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", + "IndNFe": true, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art312", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "000005", + "DescricaoClassTrib": "Operação com EAC destinado à mistura com gasolina A, mas com saída do biocombustível com destinação diversa, observado o art. 179 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -148,7 +202,51 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art312" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art179\r\n", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" + }, + { + "cClassTrib": "000006", + "DescricaoClassTrib": "Situações tributadas integralmente pelo IBS e CBS realizadas por autônomo", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "2 - Padrão", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": true, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art4", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" } ] }, @@ -179,10 +277,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Uniforme Setorial", + "TipoAliquota": "5 - Uniforme Setorial", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -199,7 +297,12 @@ "IndNFGas": false, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art212" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art212", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "010002", @@ -213,10 +316,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-09-30T00:00:00", "FimVigencia": null, - "TipoAliquota": "Uniforme Setorial", + "TipoAliquota": "5 - Uniforme Setorial", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -233,7 +336,12 @@ "IndNFGas": false, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art233\r\n" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art233\r\n", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" } ] }, @@ -264,10 +372,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Uniforme Nacional", + "TipoAliquota": "4 - Uniforme Nacional", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -284,7 +392,12 @@ "IndNFGas": false, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art236" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art236", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "011002", @@ -298,10 +411,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Uniforme Nacional", + "TipoAliquota": "4 - Uniforme Nacional", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -318,7 +431,12 @@ "IndNFGas": false, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art237" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art237", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "011003", @@ -332,10 +450,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Uniforme Nacional", + "TipoAliquota": "4 - Uniforme Nacional", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -351,8 +469,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art240" + "Anexo": 92401, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art240", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "011004", @@ -366,10 +489,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Uniforme Nacional", + "TipoAliquota": "4 - Uniforme Nacional", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -386,7 +509,12 @@ "IndNFGas": false, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art246" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art246", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "011005", @@ -400,10 +528,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Uniforme Nacional", + "TipoAliquota": "4 - Uniforme Nacional", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -420,7 +548,12 @@ "IndNFGas": false, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art243" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art243", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" } ] }, @@ -441,7 +574,7 @@ "classificacoesTributarias": [ { "cClassTrib": "200001", - "DescricaoClassTrib": "Aquisições de máquinas, de aparelhos, de instrumentos, de equipamentos, de matérias-primas, de produtos intermediários e de materiais de embalagem realizadas entre empresas autorizadas a operar em zonas de processamento de exportação, observado o art. 103 da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Serviços de transporte de bens até as zonas de processamento de exportação e bens exportados a partir das zonas de processamento de exportação, observado o art. 103 da Lei Complementar n 214, de 2025.", "pRedIBS": 100.00000, "pRedCBS": 100.00000, "IndTribRegular": false, @@ -451,11 +584,11 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", - "IndNFe": true, + "TipoAliquota": "2 - Padrão", + "IndNFe": false, "IndNFCe": false, "IndCTe": true, "IndCTeOS": false, @@ -471,7 +604,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art103" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art103", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "3 - Receita Bruta Exportação Direta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200002", @@ -485,10 +623,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -504,8 +642,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art110" + "Anexo": 81971, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art110", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200003", @@ -519,10 +662,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -539,11 +682,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 1, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art125" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art125", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200004", - "DescricaoClassTrib": "Venda de dispositivos médicos com a especificação das respectivas classificações da NCM/SH previstas no Anexo XII da Lei Complementar nº 214, de 2025, observado o art. 144 da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Fornecimento de dispositivos médicos com a especificação das respectivas classificações da NCM/SH previstas no Anexo XII da Lei Complementar nº 214, de 2025, observado o art. 144 da Lei Complementar nº 214, de 2025.", "pRedIBS": 100.00000, "pRedCBS": 100.00000, "IndTribRegular": false, @@ -553,10 +701,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -573,11 +721,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 12, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art144" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art144", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200005", - "DescricaoClassTrib": "Venda de dispositivos médicos com a especificação das respectivas classificações da NCM/SH previstas no Anexo IV da Lei Complementar nº 214, de 2025, quando adquiridos por órgãos da administração pública direta, autarquias e fundações públicas, observado o art. 144 da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Fornecimento de dispositivos médicos com a especificação das respectivas classificações da NCM/SH previstas no Anexo IV da Lei Complementar nº 214, de 2025, quando adquiridos por órgãos da administração pública direta, autarquias, fundações públicas e entidades de saúde imunes, observado o art. 144 da Lei Complementar nº 214, de 2025.", "pRedIBS": 100.00000, "pRedCBS": 100.00000, "IndTribRegular": false, @@ -587,10 +740,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -607,7 +760,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 4, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art144" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art144", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200006", @@ -621,10 +779,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -641,7 +799,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art144" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art144", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200007", @@ -655,10 +818,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -675,7 +838,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 13, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art145" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art145", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200008", @@ -689,10 +857,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -709,11 +877,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 5, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art145" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art145", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200009", - "DescricaoClassTrib": "Fornecimento dos medicamentos relacionados no Anexo XIV da Lei Complementar nº 214, de 2025, com a especificação das respectivas classificações da NCM/SH, observado o art. 146 da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Fornecimento dos medicamentos registrados na Anvisa, observado o art. 146 da Lei Complementar nº 214, de 2025.", "pRedIBS": 100.00000, "pRedCBS": 100.00000, "IndTribRegular": false, @@ -723,10 +896,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -742,8 +915,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": 14, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art146" + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art146", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": true, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200010", @@ -757,10 +935,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -777,7 +955,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art146" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art146", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200011", @@ -791,10 +974,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -811,11 +994,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 6, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art146" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art146", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200012", - "DescricaoClassTrib": "Situação de emergência de saúde pública reconhecida pelo Poder Legislativo federal, estadual, distrital ou municipal competente, ato conjunto do Ministro da Fazenda e do Comitê Gestor do IBS poderá ser editado, a qualquer momento, para incluir dispositivos não listados no Anexo XIV da Lei Complementar nº 214, de 2025, limitada a vigência do benefício ao período e à localidade da emergência de saúde pública, observado o art. 146 da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Situação de emergência de saúde pública reconhecida pelo Poder Legislativo federal, estadual, distrital ou municipal competente, ato conjunto do Ministro da Fazenda e do Comitê Gestor do IBS poderá ser editado, a qualquer momento, limitada a vigência do benefício ao período e à localidade da emergência de saúde pública, observado o art. 146 da Lei Complementar nº 214, de 2025.", "pRedIBS": 100.00000, "pRedCBS": 100.00000, "IndTribRegular": false, @@ -825,10 +1013,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -845,7 +1033,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art146" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art146", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200013", @@ -859,10 +1052,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -878,8 +1071,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art147" + "Anexo": 91471, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art147", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200014", @@ -893,10 +1091,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -913,7 +1111,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 15, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art148" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art148", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200015", @@ -927,10 +1130,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -947,7 +1150,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art149" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art149", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200016", @@ -961,10 +1169,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -980,8 +1188,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art156" + "Anexo": 91561, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art156", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200017", @@ -995,10 +1208,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1015,7 +1228,12 @@ "IndNFGas": false, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art212" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art212", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200018", @@ -1029,10 +1247,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1049,11 +1267,16 @@ "IndNFGas": false, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art223" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art223", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200019", - "DescricaoClassTrib": "Importador dos serviços financeiros seja contribuinte que realize as operações de que tratam os incisos I a V do caput do art. 182, será aplicada alíquota zero na importação, sem prejuízo da manutenção do direito de dedução dessas despesas da base de cálculo do IBS e da CBS, segundo, observado o art. 231 da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Importador dos serviços financeiros que seja contribuinte e tenha direito de apropriação de créditos na aquisição do mesmo serviço financeiro no País, observado o art. 231 da Lei Complementar nº 214, de 2025.", "pRedIBS": 100.00000, "pRedCBS": 100.00000, "IndTribRegular": false, @@ -1063,10 +1286,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1074,7 +1297,7 @@ "IndBPe": false, "IndNF3e": false, "IndNFCom": false, - "IndNFSE": false, + "IndNFSE": true, "IndBPeTM": false, "IndBPeTA": false, "IndNFAg": false, @@ -1083,7 +1306,12 @@ "IndNFGas": false, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art231" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art231", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200020", @@ -1097,16 +1325,16 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, - "IndCTe": false, + "IndCTe": true, "IndCTeOS": false, "IndBPe": false, - "IndNF3e": false, + "IndNF3e": true, "IndNFCom": false, "IndNFSE": true, "IndBPeTM": false, @@ -1117,7 +1345,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art271" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art271", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200021", @@ -1131,10 +1364,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1151,7 +1384,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art285" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art285", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200022", @@ -1165,10 +1403,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -1185,7 +1423,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art445" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art445", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200023", @@ -1199,10 +1442,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -1219,7 +1462,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art448" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art448", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200024", @@ -1233,10 +1481,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -1253,7 +1501,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art463" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art463", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "200025", @@ -1267,10 +1520,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1286,8 +1539,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art308" + "Anexo": 93081, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art308", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200026", @@ -1301,10 +1559,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1320,8 +1578,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art158" + "Anexo": 91581, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art158", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200027", @@ -1335,10 +1598,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1351,11 +1614,16 @@ "IndBPeTA": false, "IndNFAg": false, "IndNFSVIA": false, - "IndNFABI": true, + "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art261" + "Anexo": 92611, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art261", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200028", @@ -1369,10 +1637,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1389,7 +1657,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 2, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art129" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art129", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200029", @@ -1403,10 +1676,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1423,7 +1696,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 3, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art130" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art130", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200030", @@ -1437,10 +1715,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -1457,7 +1735,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 4, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art131" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art131", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200031", @@ -1471,10 +1754,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -1491,11 +1774,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 5, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art132" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art132", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200032", - "DescricaoClassTrib": "Fornecimento dos medicamentos registrados na Anvisa ou produzidos por farmácias de manipulação, ressalvados os medicamentos sujeitos à alíquota zero de que trata o art. 141 da Lei Complementar nº 214, de 2025, observado o art. 133 da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Fornecimento dos medicamentos registrados na Anvisa ou produzidos por farmácias de manipulação, ressalvados os medicamentos sujeitos à alíquota zero de que trata o art. 146 da Lei Complementar nº 214, de 2025, observado o art. 133 da Lei Complementar nº 214, de 2025.", "pRedIBS": 60.00000, "pRedCBS": 60.00000, "IndTribRegular": false, @@ -1505,10 +1793,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -1525,7 +1813,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art133" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art133", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": true, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200033", @@ -1539,10 +1832,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -1559,7 +1852,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 6, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art133" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art133", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200034", @@ -1573,10 +1871,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -1593,7 +1891,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 7, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art135" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art135", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200035", @@ -1607,10 +1910,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -1627,7 +1930,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 8, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art136" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art136", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200036", @@ -1641,10 +1949,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -1661,7 +1969,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art137" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art137", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200037", @@ -1675,10 +1988,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1695,7 +2008,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art137" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art137", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200038", @@ -1709,10 +2027,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -1729,11 +2047,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 9, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art138" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art138", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200039", - "DescricaoClassTrib": "Fornecimento dos serviços e o licenciamento ou cessão dos direitos relacionados no Anexo X da Lei Complementar nº 214, de 2025, com a especificação das respectivas classificações da NBS, quando destinados às seguintes produções nacionais artísticas, culturais, de eventos, jornalísticas e audiovisuais: espetáculos teatrais, circenses e de dança, shows musicais, desfiles carnavalescos ou folclóricos, eventos acadêmicos e científicos, como congressos, conferências e simpósios, feiras de negócios, exposições, feiras e mostras culturais, artísticas e literárias, programas de auditório ou jornalísticos, filmes, documentários, séries, novelas, entrevistas e clipes musicais, observado o art. 139 da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Fornecimento dos bens e serviços listados no Anexo X da Lei Complementar nº 214, de 2025, com a especificação das respectivas classificações da NCM/SH e NBS, nos casos relacionados com produções nacionais artísticas, culturais, de eventos, jornalísticas e audiovisuais, observado o art. 139 da Lei Complementar nº 214, de 2025.", "pRedIBS": 60.00000, "pRedCBS": 60.00000, "IndTribRegular": false, @@ -1743,10 +2066,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -1763,7 +2086,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 10, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art139" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art139", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200040", @@ -1777,10 +2105,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1797,7 +2125,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art140" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art140", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200041", @@ -1811,10 +2144,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1830,12 +2163,17 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art141" + "Anexo": 91411, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art141", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200042", - "DescricaoClassTrib": "Operações relacionadas ao fornecimento de serviço de educação desportiva, classificado no código 1.2205.12.00 da NBS, observado o art. 141 da Lei Complementar nº 214, de 2025. Operações relacionadas às seguintes atividades desportivas: operações e prestações de serviços de segurança da informação e segurança cibernética, observado o art. 141 da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Operações relacionadas às seguintes atividades desportivas: gestão e exploração do desporto por associações e clubes esportivos filiados ao órgão estadual ou federal responsável pela coordenação dos desportos, observado o art. 141 da Lei Complementar nº 214, de 2025.", "pRedIBS": 60.00000, "pRedCBS": 60.00000, "IndTribRegular": false, @@ -1845,10 +2183,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1865,7 +2203,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art141" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art141", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200043", @@ -1879,17 +2222,17 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, "IndBPe": false, "IndNF3e": false, - "IndNFCom": false, + "IndNFCom": true, "IndNFSE": true, "IndBPeTM": false, "IndBPeTA": false, @@ -1899,7 +2242,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 11, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art142" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art142", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200044", @@ -1913,17 +2261,17 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", - "IndNFe": true, - "IndNFCe": true, + "TipoAliquota": "2 - Padrão", + "IndNFe": false, + "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, "IndBPe": false, "IndNF3e": false, - "IndNFCom": false, + "IndNFCom": true, "IndNFSE": true, "IndBPeTM": false, "IndBPeTA": false, @@ -1933,7 +2281,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": 11, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art142" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art142", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200045", @@ -1947,10 +2300,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -1967,7 +2320,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art158" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art158", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200046", @@ -1981,10 +2339,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -2001,7 +2359,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art261" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art261", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200047", @@ -2015,10 +2378,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -2035,7 +2398,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art275" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art275", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200048", @@ -2049,10 +2417,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -2068,8 +2436,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art281" + "Anexo": 92811, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art281", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200049", @@ -2083,10 +2456,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -2103,7 +2476,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art286" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art286", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200050", @@ -2117,10 +2495,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": true, @@ -2137,7 +2515,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art287" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art287", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200051", @@ -2151,10 +2534,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -2171,7 +2554,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art289" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art289", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" }, { "cClassTrib": "200052", @@ -2185,10 +2573,127 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": true, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": 91271, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art127", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" + }, + { + "cClassTrib": "200053", + "DescricaoClassTrib": "Fornecimento de medicamentos registrados na Anvisa, quando classificados como soros ou vacinas, observado o art. 146 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 100.00000, + "pRedCBS": 100.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "2 - Padrão", + "IndNFe": true, + "IndNFCe": true, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art146", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": true, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "200054", + "DescricaoClassTrib": "Fornecimento de bem material pela cooperativa de produção agropecuária a associado não sujeito ao regime regular do IBS e da CBS com anulação de créditos referentes ao bem fornecido, observado o art. 271 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 100.00000, + "pRedCBS": 100.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": true, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "2 - Padrão", + "IndNFe": true, + "IndNFCe": true, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": true, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art271\r\n", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "200055", + "DescricaoClassTrib": "Fornecimento dos serviços com redução de alíquota de 60% realizado por autônomo, observado o art. 128 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 60.00000, + "pRedCBS": 60.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "2 - Padrão", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -2205,7 +2710,51 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art127" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art128", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" + }, + { + "cClassTrib": "200056", + "DescricaoClassTrib": "Fornecimento dos serviços com redução de alíquota de 30% realizado por autônomo, observado o art. 127 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 30.00000, + "pRedCBS": 30.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "2 - Padrão", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": true, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": 91271, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art127", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" } ] }, @@ -2236,10 +2785,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", - "FimVigencia": null, - "TipoAliquota": "Fixa", + "FimVigencia": "2026-01-01T00:00:00", + "TipoAliquota": "1 - Fixa", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -2256,7 +2805,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art485" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art485", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "220002", @@ -2270,10 +2824,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", - "FimVigencia": null, - "TipoAliquota": "Fixa", + "FimVigencia": "2026-01-01T00:00:00", + "TipoAliquota": "1 - Fixa", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -2290,7 +2844,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art485" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art485", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "220003", @@ -2304,10 +2863,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", - "FimVigencia": null, - "TipoAliquota": "Fixa", + "FimVigencia": "2026-01-01T00:00:00", + "TipoAliquota": "1 - Fixa", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -2324,7 +2883,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art486" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art486", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" } ] }, @@ -2355,10 +2919,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Fixa", + "TipoAliquota": "1 - Fixa", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -2374,29 +2938,17 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art484\r\n" - } - ] - }, - { - "CST": "222", - "DescricaoCST": "Redução de Base de Cálculo", - "IndIBSCBS": true, - "IndRedBC": true, - "IndRedAliq": false, - "IndTransfCred": false, - "IndDif": false, - "IndAjusteCompet": false, - "IndIBSCBSMono": false, - "IndCredPresIBSZFM": false, - "Publicacao": "2025-05-05T00:00:00", - "InicioVigencia": "2025-05-05T00:00:00", - "FimVigencia": null, - "classificacoesTributarias": [ + "Anexo": 94871, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art484\r\n", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" + }, { - "cClassTrib": "222001", - "DescricaoClassTrib": "Transporte internacional de passageiros, caso os trechos de ida e volta sejam vendidos em conjunto, a base de cálculo será a metade do valor cobrado, observado o Art. 12 § 8º da Lei Complementar nº 214, de 2025.", + "cClassTrib": "221002", + "DescricaoClassTrib": "Incorporação imobiliária submetida ao regime especial de tributação, observado o art. 485 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": false, @@ -2406,48 +2958,36 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", - "InicioVigencia": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "1 - Fixa", "IndNFe": false, "IndNFCe": false, "IndCTe": false, - "IndCTeOS": true, - "IndBPe": true, + "IndCTeOS": false, + "IndBPe": false, "IndNF3e": false, "IndNFCom": false, "IndNFSE": false, "IndBPeTM": false, - "IndBPeTA": true, + "IndBPeTA": false, "IndNFAg": false, "IndNFSVIA": false, - "IndNFABI": false, + "IndNFABI": true, "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art12" - } - ] - }, - { - "CST": "400", - "DescricaoCST": "Isenção", - "IndIBSCBS": false, - "IndRedBC": false, - "IndRedAliq": false, - "IndTransfCred": false, - "IndDif": false, - "IndAjusteCompet": false, - "IndIBSCBSMono": false, - "IndCredPresIBSZFM": false, - "Publicacao": "2025-05-12T00:00:00", - "InicioVigencia": "2025-05-01T00:00:00", - "FimVigencia": null, - "classificacoesTributarias": [ + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art485", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" + }, { - "cClassTrib": "400001", - "DescricaoClassTrib": "Fornecimento de serviços de transporte público coletivo de passageiros rodoviário e metroviário de caráter urbano, semiurbano e metropolitano, sob regime de autorização, permissão ou concessão pública, observado o art. 157 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "221003", + "DescricaoClassTrib": "Incorporação imobiliária submetida ao regime especial de tributação, observado o art. 485 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": false, @@ -2457,15 +2997,166 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", - "InicioVigencia": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "1 - Fixa", "IndNFe": false, "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, - "IndBPe": true, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": true, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art485", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "221004", + "DescricaoClassTrib": "Alienação de imóvel decorrente de parcelamento do solo, observado o art. 486 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "1 - Fixa", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": true, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art486", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" + } + ] + }, + { + "CST": "222", + "DescricaoCST": "Redução de Base de Cálculo", + "IndIBSCBS": true, + "IndRedBC": true, + "IndRedAliq": false, + "IndTransfCred": false, + "IndDif": false, + "IndAjusteCompet": false, + "IndIBSCBSMono": false, + "IndCredPresIBSZFM": false, + "Publicacao": "2025-05-05T00:00:00", + "InicioVigencia": "2025-05-05T00:00:00", + "FimVigencia": null, + "classificacoesTributarias": [ + { + "cClassTrib": "222001", + "DescricaoClassTrib": "Transporte internacional de passageiros, caso os trechos de ida e volta sejam vendidos em conjunto, a base de cálculo será a metade do valor cobrado, observado o Art. 12 § 8º da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2025-05-05T00:00:00", + "FimVigencia": null, + "TipoAliquota": "2 - Padrão", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": true, + "IndBPe": true, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": true, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art12", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "5 - Receita Bruta Mercado Interno/Exportação", + "TipoDoacao": "2 - Exige Indicador de Doação, quando tributado" + } + ] + }, + { + "CST": "400", + "DescricaoCST": "Isenção", + "IndIBSCBS": false, + "IndRedBC": false, + "IndRedAliq": false, + "IndTransfCred": false, + "IndDif": false, + "IndAjusteCompet": false, + "IndIBSCBSMono": false, + "IndCredPresIBSZFM": false, + "Publicacao": "2025-05-12T00:00:00", + "InicioVigencia": "2025-05-01T00:00:00", + "FimVigencia": null, + "classificacoesTributarias": [ + { + "cClassTrib": "400001", + "DescricaoClassTrib": "Fornecimento de serviços de transporte público coletivo de passageiros rodoviário e metroviário de caráter urbano, semiurbano e metropolitano, sob regime de autorização, permissão ou concessão pública, observado o art. 157 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2025-05-05T00:00:00", + "FimVigencia": null, + "TipoAliquota": "2 - Padrão", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": true, "IndNF3e": false, "IndNFCom": false, "IndNFSE": true, @@ -2477,7 +3168,129 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art157" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art157", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "400002", + "DescricaoClassTrib": "Fornecimento de serviços de transporte público coletivo de passageiros rodoviário e metroviário de caráter urbano, semiurbano e metropolitano, sob regime de autorização, permissão ou concessão pública, com medição por quilômetro rodado, observado o art. 157 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": true, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art157", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "400003", + "DescricaoClassTrib": "Bagagens de viajantes e de tripulantes, acompanhadas ou desacompanhadas, observado o art. 94 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art94", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": true, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "400004", + "DescricaoClassTrib": "Remessas internacionais, observado o art. 94 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art94", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": true, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" } ] }, @@ -2508,10 +3321,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": true, @@ -2520,7 +3333,7 @@ "IndNF3e": true, "IndNFCom": true, "IndNFSE": true, - "IndBPeTM": true, + "IndBPeTM": false, "IndBPeTA": true, "IndNFAg": true, "IndNFSVIA": false, @@ -2528,7 +3341,12 @@ "IndNFGas": true, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art5" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art5", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410002", @@ -2542,10 +3360,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -2562,7 +3380,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art6" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art6", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410003", @@ -2576,10 +3399,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": true, @@ -2588,15 +3411,20 @@ "IndNF3e": true, "IndNFCom": true, "IndNFSE": true, - "IndBPeTM": true, + "IndBPeTM": false, "IndBPeTA": true, "IndNFAg": true, - "IndNFSVIA": true, + "IndNFSVIA": false, "IndNFABI": true, "IndNFGas": true, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art6" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art6", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "1 - Exige Indicador de Doação" }, { "cClassTrib": "410004", @@ -2610,10 +3438,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": true, @@ -2630,7 +3458,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art8" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art8", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "3 - Receita Bruta Exportação Direta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410005", @@ -2644,10 +3477,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -2664,7 +3497,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410006", @@ -2678,10 +3516,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -2698,7 +3536,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410007", @@ -2712,10 +3555,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -2732,7 +3575,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410008", @@ -2746,10 +3594,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -2766,7 +3614,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": true, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "2 - Receita Bruta Interna sem Cálculo IBS/CBS", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410009", @@ -2780,10 +3633,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -2800,7 +3653,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": true, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "2 - Receita Bruta Interna sem Cálculo IBS/CBS", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410010", @@ -2814,10 +3672,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -2834,7 +3692,12 @@ "IndNFGas": false, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "2 - Receita Bruta Interna sem Cálculo IBS/CBS", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410011", @@ -2848,10 +3711,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -2868,7 +3731,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art9", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "2 - Receita Bruta Interna sem Cálculo IBS/CBS", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410012", @@ -2882,10 +3750,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -2902,7 +3770,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art26" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art26", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410013", @@ -2916,10 +3789,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -2936,7 +3809,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art98" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art98", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "3 - Receita Bruta Exportação Direta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410014", @@ -2944,16 +3822,16 @@ "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": false, - "IndCredPresOper": true, + "IndCredPresOper": false, "IndEstornoCred": false, "MonofasiaSujeitaRetencao": false, "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -2970,7 +3848,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art164" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art164", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410015", @@ -2984,10 +3867,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": true, @@ -3004,7 +3887,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art169" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art169", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410016", @@ -3018,10 +3906,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3038,7 +3926,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art170" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art170", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410017", @@ -3052,10 +3945,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3072,7 +3965,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art171" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art171", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410018", @@ -3086,10 +3984,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -3106,7 +4004,12 @@ "IndNFGas": false, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art213" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art213", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410019", @@ -3120,10 +4023,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -3140,7 +4043,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art274" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art274", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410020", @@ -3154,10 +4062,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -3174,7 +4082,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art274" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art274", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410021", @@ -3188,10 +4101,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -3208,7 +4121,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art12" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art12", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410022", @@ -3222,11 +4140,11 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-09-30T15:52:36.277", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-09-30T15:52:36.277", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", - "IndNFe": false, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, @@ -3242,7 +4160,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": null + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art200", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410023", @@ -3256,11 +4179,11 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-09-30T15:52:36.277", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-09-30T15:52:36.277", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", - "IndNFe": false, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, @@ -3276,7 +4199,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": null + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art200", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410024", @@ -3290,11 +4218,11 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-09-30T15:52:36.277", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-09-30T15:52:36.277", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", - "IndNFe": false, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, @@ -3310,7 +4238,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": null + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art204", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410025", @@ -3324,11 +4257,11 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-09-30T15:52:36.277", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-09-30T15:52:36.277", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", - "IndNFe": false, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, @@ -3344,7 +4277,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": null + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art204", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410026", @@ -3358,10 +4296,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-09-30T15:52:36.277", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": true, @@ -3370,19 +4308,24 @@ "IndNF3e": true, "IndNFCom": true, "IndNFSE": true, - "IndBPeTM": true, + "IndBPeTM": false, "IndBPeTA": true, "IndNFAg": true, - "IndNFSVIA": true, + "IndNFSVIA": false, "IndNFABI": true, "IndNFGas": true, "IndDERE": true, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art6\r\n" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art6\r\n", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "1 - Exige Indicador de Doação" }, { "cClassTrib": "410027", - "DescricaoClassTrib": "Serviços vinculados direta e exclusivamente à exportação de bens materiais ou associados à entrega no exterior de bens materiais, considerados exportação de serviços ou de bem imaterial, observado o art. 6º da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Fornecimento de bens e serviços, desde que vinculados direta e exclusivamente à exportação de bens materiais ou associados à entrega no exterior de bens materiais, observado o art. 6º da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": false, @@ -3392,11 +4335,11 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-11-19T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", - "IndNFe": false, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, "IndNFCe": false, "IndCTe": true, "IndCTeOS": true, @@ -3412,7 +4355,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art80" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art80", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "3 - Receita Bruta Exportação Direta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410028", @@ -3426,10 +4374,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-11-19T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -3437,16 +4385,21 @@ "IndBPe": false, "IndNF3e": false, "IndNFCom": false, - "IndNFSE": true, + "IndNFSE": false, "IndBPeTM": false, "IndBPeTA": false, "IndNFAg": false, "IndNFSVIA": false, - "IndNFABI": true, + "IndNFABI": false, "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art251" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art251", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410029", @@ -3460,10 +4413,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-11-19T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -3480,7 +4433,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art4" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art4", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410030", @@ -3494,10 +4452,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-11-19T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3514,7 +4472,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art47" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art47", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "410031", @@ -3528,10 +4491,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-11-19T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3548,11 +4511,16 @@ "IndNFGas": true, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art544" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art544", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "410999", - "DescricaoClassTrib": "Operações não onerosas sem previsão de tributação, não especificadas anteriormente, observado o art. 4º da Lei Complementar nº 214, de 2025.", + "cClassTrib": "410032", + "DescricaoClassTrib": "Tributos incidentes na operação que não integram a base de cálculo do IBS e da CBS, observado o art. 12 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": false, @@ -3562,67 +4530,652 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", - "InicioVigencia": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", - "IndNFe": true, - "IndNFCe": true, - "IndCTe": true, - "IndCTeOS": true, - "IndBPe": true, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, "IndNF3e": true, "IndNFCom": true, - "IndNFSE": true, - "IndBPeTM": true, - "IndBPeTA": true, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, "IndNFAg": true, "IndNFSVIA": false, - "IndNFABI": true, - "IndNFGas": true, + "IndNFABI": false, + "IndNFGas": true, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art12", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "410033", + "DescricaoClassTrib": "Operações com bens imóveis, inclusive operações com direitos reais sobre bens imóveis, realizadas por Fundos de Investimento Imobiliário (FII) e Fundos de Investimento nas Cadeias Produtivas do Agronegócio (Fiagro), observado o art. 26 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": true, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": true, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art26", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "410034", + "DescricaoClassTrib": "Fundos de investimento cujo patrimônio seja constituído exclusivamente por aplicações em participações societárias, certificados, direitos, títulos, valores mobiliários e demais ativos financeiros permitidos pela Comissão de Valores Mobiliários, observado o art. 26 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art26", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "410035", + "DescricaoClassTrib": "Fornecimento realizado por nanoempreendedor, observado o art. 26 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, + "IndNFCe": true, + "IndCTe": true, + "IndCTeOS": true, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": true, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art26", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "410036", + "DescricaoClassTrib": "Descontos financeiros em nota fatura, observado o art. 12 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": true, + "IndNFCom": true, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": true, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": true, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art12", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "410037", + "DescricaoClassTrib": "Importação de bens materiais sem incidência de IBS e CBS, observado o art. 66 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art66", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": true, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "410999", + "DescricaoClassTrib": "Operações não onerosas sem previsão de tributação, não especificadas anteriormente, observado o art. 4º da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2025-05-05T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, + "IndNFCe": true, + "IndCTe": true, + "IndCTeOS": true, + "IndBPe": true, + "IndNF3e": true, + "IndNFCom": true, + "IndNFSE": true, + "IndBPeTM": true, + "IndBPeTA": true, + "IndNFAg": true, + "IndNFSVIA": false, + "IndNFABI": true, + "IndNFGas": true, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art4", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" + } + ] + }, + { + "CST": "510", + "DescricaoCST": "Diferimento", + "IndIBSCBS": true, + "IndRedBC": false, + "IndRedAliq": false, + "IndTransfCred": false, + "IndDif": true, + "IndAjusteCompet": false, + "IndIBSCBSMono": false, + "IndCredPresIBSZFM": false, + "Publicacao": "2025-05-12T00:00:00", + "InicioVigencia": "2025-05-01T00:00:00", + "FimVigencia": null, + "classificacoesTributarias": [ + { + "cClassTrib": "510001", + "DescricaoClassTrib": "Operações, sujeitas a diferimento, com energia elétrica ou com direitos a ela relacionados, relativas à importação, geração, comercialização, distribuição e transmissão, observado o art. 28 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2025-05-05T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": true, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": 90281, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art28", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "2 - Receita Bruta Interna sem Cálculo IBS/CBS", + "TipoDoacao": "0 - Não permite indicador de doação" + } + ] + }, + { + "CST": "515", + "DescricaoCST": "Diferimento com redução de alíquota", + "IndIBSCBS": true, + "IndRedBC": false, + "IndRedAliq": true, + "IndTransfCred": false, + "IndDif": true, + "IndAjusteCompet": false, + "IndIBSCBSMono": false, + "IndCredPresIBSZFM": false, + "Publicacao": "2025-09-30T00:00:00", + "InicioVigencia": "2025-09-30T00:00:00", + "FimVigencia": null, + "classificacoesTributarias": [ + { + "cClassTrib": "515001", + "DescricaoClassTrib": "Operações, sujeitas a diferimento, com insumos agropecuários e aquícolas, observado o art. 138 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 60.00000, + "pRedCBS": 60.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2025-09-30T15:52:36.277", + "FimVigencia": null, + "TipoAliquota": "2 - Padrão", + "IndNFe": true, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": true, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": 9, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art138\r\n", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" + } + ] + }, + { + "CST": "550", + "DescricaoCST": "Suspensão", + "IndIBSCBS": true, + "IndRedBC": false, + "IndRedAliq": false, + "IndTransfCred": false, + "IndDif": false, + "IndAjusteCompet": false, + "IndIBSCBSMono": false, + "IndCredPresIBSZFM": false, + "Publicacao": "2025-05-12T00:00:00", + "InicioVigencia": "2025-05-01T00:00:00", + "FimVigencia": null, + "classificacoesTributarias": [ + { + "cClassTrib": "550001", + "DescricaoClassTrib": "Exportações de bens materiais, observado o art. 82 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": true, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2025-05-05T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art82", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "4 - Receita Bruta Exportação Indireta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "550002", + "DescricaoClassTrib": "Regime de Trânsito, observado o art. 84 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": true, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2025-05-05T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art84", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "550003", + "DescricaoClassTrib": "Regimes de Depósito, observado o art. 85 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": true, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2025-05-05T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art85", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "550004", + "DescricaoClassTrib": "Regimes de Depósito, observado o art. 87 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": true, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2025-05-05T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art87", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "4 - Receita Bruta Exportação Indireta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "550005", + "DescricaoClassTrib": "Regimes de Depósito, observado o art. 87 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": true, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2025-05-05T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art87", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "4 - Receita Bruta Exportação Indireta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "550006", + "DescricaoClassTrib": "Regimes de Permanência Temporária com suspensão total, observado o art. 88 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": true, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2025-05-05T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art4" - } - ] - }, - { - "CST": "510", - "DescricaoCST": "Diferimento", - "IndIBSCBS": true, - "IndRedBC": false, - "IndRedAliq": false, - "IndTransfCred": false, - "IndDif": true, - "IndAjusteCompet": false, - "IndIBSCBSMono": false, - "IndCredPresIBSZFM": false, - "Publicacao": "2025-05-12T00:00:00", - "InicioVigencia": "2025-05-01T00:00:00", - "FimVigencia": null, - "classificacoesTributarias": [ + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art88", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, { - "cClassTrib": "510001", - "DescricaoClassTrib": "Operações, sujeitas a diferimento, com energia elétrica ou com direitos a ela relacionados, relativas à geração, comercialização, distribuição e transmissão, observado o art. 28 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550007", + "DescricaoClassTrib": "Regimes de Aperfeiçoamento (Recof), observado o art. 90 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, - "IndTribRegular": false, + "IndTribRegular": true, "IndCredPresOper": false, "IndEstornoCred": false, "MonofasiaSujeitaRetencao": false, "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, "IndBPe": false, - "IndNF3e": true, + "IndNF3e": false, "IndNFCom": false, "IndNFSE": false, "IndBPeTM": false, @@ -3633,41 +5186,29 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art28" - } - ] - }, - { - "CST": "515", - "DescricaoCST": "Diferimento com redução de alíquota", - "IndIBSCBS": true, - "IndRedBC": false, - "IndRedAliq": true, - "IndTransfCred": false, - "IndDif": true, - "IndAjusteCompet": false, - "IndIBSCBSMono": false, - "IndCredPresIBSZFM": false, - "Publicacao": "2025-09-30T00:00:00", - "InicioVigencia": "2025-09-30T00:00:00", - "FimVigencia": null, - "classificacoesTributarias": [ + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art90", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, { - "cClassTrib": "515001", - "DescricaoClassTrib": "Operações, sujeitas a diferimento, com insumos agropecuários e aquícolas, observado o art. 138 da Lei Complementar nº 214, de 2025.", - "pRedIBS": 60.00000, - "pRedCBS": 60.00000, - "IndTribRegular": false, + "cClassTrib": "550008", + "DescricaoClassTrib": "Importação de bens para o Regime de Repetro-Temporário, de que tratam o inciso I do art. 93 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": true, "IndCredPresOper": false, "IndEstornoCred": false, "MonofasiaSujeitaRetencao": false, "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", - "InicioVigencia": "2025-09-30T15:52:36.277", + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3675,7 +5216,7 @@ "IndBPe": false, "IndNF3e": false, "IndNFCom": false, - "IndNFSE": true, + "IndNFSE": false, "IndBPeTM": false, "IndBPeTA": false, "IndNFAg": false, @@ -3683,29 +5224,17 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art138\r\n" - } - ] - }, - { - "CST": "550", - "DescricaoCST": "Suspensão", - "IndIBSCBS": true, - "IndRedBC": false, - "IndRedAliq": false, - "IndTransfCred": false, - "IndDif": false, - "IndAjusteCompet": false, - "IndIBSCBSMono": false, - "IndCredPresIBSZFM": false, - "Publicacao": "2025-05-12T00:00:00", - "InicioVigencia": "2025-05-01T00:00:00", - "FimVigencia": null, - "classificacoesTributarias": [ + "Anexo": 81641, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art93", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, { - "cClassTrib": "550001", - "DescricaoClassTrib": "Exportações de bens materiais, observado o art. 82 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550009", + "DescricaoClassTrib": "GNL-Temporário, de que trata o inciso II do art. 93 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -3715,10 +5244,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3734,12 +5263,17 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art82" + "Anexo": 81642, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art93", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550002", - "DescricaoClassTrib": "Regime de Trânsito, observado o art. 84 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550010", + "DescricaoClassTrib": "Repetro-Permanente, de que trata o inciso III do art. 93 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -3749,10 +5283,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3768,12 +5302,17 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art84" + "Anexo": 81643, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art93", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550003", - "DescricaoClassTrib": "Regimes de Depósito, observado o art. 85 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550011", + "DescricaoClassTrib": "Repetro-Industrialização, de que trata o inciso IV do art. 93 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -3783,10 +5322,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3802,12 +5341,17 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art85" + "Anexo": 81643, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art93", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550004", - "DescricaoClassTrib": "Regimes de Depósito, observado o art. 87 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550012", + "DescricaoClassTrib": "Repetro-Nacional, de que trata o inciso V do art. 93 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -3817,10 +5361,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3836,12 +5380,17 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art87" + "Anexo": 81643, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art93", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550005", - "DescricaoClassTrib": "Regimes de Depósito, observado o art. 87 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550013", + "DescricaoClassTrib": "Repetro-Entreposto, de que trata o inciso VI do art. 93 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -3851,10 +5400,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3870,12 +5419,17 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art87" + "Anexo": 81644, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art93", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550006", - "DescricaoClassTrib": "Regimes de Permanência Temporária, observado o art. 88 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550014", + "DescricaoClassTrib": "Zona de Processamento de Exportação, observado os arts. 99 e 100 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -3885,10 +5439,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3905,11 +5459,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art88" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art99", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "4 - Receita Bruta Exportação Indireta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550007", - "DescricaoClassTrib": "Regimes de Aperfeiçoamento, observado o art. 90 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550015", + "DescricaoClassTrib": "Regime Tributário para Incentivo à Modernização e à Ampliação da Estrutura Portuária - Reporto, observado o art. 105 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -3919,10 +5478,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3938,12 +5497,17 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art90" + "Anexo": 81861, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art105", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550008", - "DescricaoClassTrib": "Importação de bens para o Regime de Repetro-Temporário, de que tratam o inciso I do art. 93 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550016", + "DescricaoClassTrib": "Regime Especial de Incentivos para o Desenvolvimento da Infraestrutura - Reidi, observado o art. 106 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -3953,10 +5517,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -3964,7 +5528,7 @@ "IndBPe": false, "IndNF3e": false, "IndNFCom": false, - "IndNFSE": false, + "IndNFSE": true, "IndBPeTM": false, "IndBPeTA": false, "IndNFAg": false, @@ -3973,11 +5537,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art93" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art106", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550009", - "DescricaoClassTrib": "GNL-Temporário, de que trata o inciso II do art. 93 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550017", + "DescricaoClassTrib": "Regime Tributário para Incentivo à Atividade Econômica Naval – Renaval, observado o art. 107 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -3987,10 +5556,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4007,11 +5576,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art93" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art107", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550010", - "DescricaoClassTrib": "Repetro-Permanente, de que trata o inciso III do art. 93 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550018", + "DescricaoClassTrib": "Desoneração da aquisição de bens de capital, observado o art. 109 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -4021,10 +5595,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4040,12 +5614,17 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art93" + "Anexo": 81961, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art109", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550011", - "DescricaoClassTrib": "Repetro-Industrialização, de que trata o inciso IV do art. 93 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550019", + "DescricaoClassTrib": "Importação de bem material por indústria incentivada para utilização na Zona Franca de Manaus, observado o art. 443 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -4055,10 +5634,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4075,11 +5654,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art93" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art443", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550012", - "DescricaoClassTrib": "Repetro-Nacional, de que trata o inciso V do art. 93 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550020", + "DescricaoClassTrib": "Áreas de livre comércio, observado o art. 461 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -4089,10 +5673,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4109,11 +5693,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art93" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art461", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550013", - "DescricaoClassTrib": "Repetro-Entreposto, de que trata o inciso VI do art. 93 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550021", + "DescricaoClassTrib": "Fornecimento de produtos agropecuários in natura para contribuinte do regime regular que promova industrialização destinada a exportação, observado o art. 82 da Lei Complementar nº 214, de 2025.\r\n", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -4123,10 +5712,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", - "InicioVigencia": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2025-09-30T15:52:36.277", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4143,11 +5732,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art93" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art82\r\n", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "4 - Receita Bruta Exportação Indireta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550014", - "DescricaoClassTrib": "Zona de Processamento de Exportação, observado os arts. 99, 100 e 102 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550022", + "DescricaoClassTrib": "Regime Especial de Incentivos para a Produção de Hidrogênio de Baixa Emissão de Carbono (Rehidro), observado o art. 106 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -4157,10 +5751,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", - "InicioVigencia": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4168,7 +5762,7 @@ "IndBPe": false, "IndNF3e": false, "IndNFCom": false, - "IndNFSE": false, + "IndNFSE": true, "IndBPeTM": false, "IndBPeTA": false, "IndNFAg": false, @@ -4177,11 +5771,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art99" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art106", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550015", - "DescricaoClassTrib": "Regime Tributário para Incentivo à Modernização e à Ampliação da Estrutura Portuária - Reporto, observado o art. 105 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550023", + "DescricaoClassTrib": "Operações com hidrocarbonetos líquidos derivados de petróleo não combustíveis ou de gás natural, inclusive nafta, observado o art. 172 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -4191,10 +5790,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", - "InicioVigencia": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4211,11 +5810,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art105" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art172", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550016", - "DescricaoClassTrib": "Regime Especial de Incentivos para o Desenvolvimento da Infraestrutura - Reidi, observado o art. 106 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550024", + "DescricaoClassTrib": "Importações e nas aquisições no mercado interno de máquinas, equipamentos e veículos destinados a utilização nas atividades de que trata o inciso IIIdo art. 107 efetuadas para incorporação a seu ativo imobilizado, observado o art. 107 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -4225,18 +5829,18 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", - "InicioVigencia": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", - "IndNFe": true, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": false, "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, "IndBPe": false, "IndNF3e": false, "IndNFCom": false, - "IndNFSE": true, + "IndNFSE": false, "IndBPeTM": false, "IndBPeTA": false, "IndNFAg": false, @@ -4245,11 +5849,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art106" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art107", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550017", - "DescricaoClassTrib": "Regime Tributário para Incentivo à Atividade Econômica Naval – Renaval, observado o art. 107 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550025", + "DescricaoClassTrib": "Importações e nas aquisições no mercado interno de matérias-primas, produtos intermediários, partes, peças e componentes para utilização na construção, conservação, modernização e reparo de embarcações pré-registradas ou registradas no REB, observado o art. 107 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -4259,11 +5868,11 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", - "InicioVigencia": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", - "IndNFe": true, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": false, "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, @@ -4279,11 +5888,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art107" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art107", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "1 - Receita Bruta Interna", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550018", - "DescricaoClassTrib": "Desoneração da aquisição de bens de capital, observado o art. 109 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550026", + "DescricaoClassTrib": "Regimes de admissão temporária com suspensão total do pagamento dos tributos durante o período de sua permanência na Zona Franca de Manaus, observado o art. 89 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -4293,10 +5907,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", - "InicioVigencia": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4313,11 +5927,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art109" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art89", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550019", - "DescricaoClassTrib": "Importação de bem material por indústria incentivada para utilização na Zona Franca de Manaus, observado o art. 443 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550027", + "DescricaoClassTrib": "Regimes de Aperfeiçoamento (Drawback), observado o art. 90 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -4327,10 +5946,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", - "InicioVigencia": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4347,11 +5966,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art443" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art90", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550020", - "DescricaoClassTrib": "Áreas de livre comércio, observado o art. 461 da Lei Complementar nº 214, de 2025.", + "cClassTrib": "550028", + "DescricaoClassTrib": "Regimes de Aperfeiçoamento (Admissão temporária), observado o art. 90 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -4361,10 +5985,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", - "InicioVigencia": "2025-05-05T00:00:00", + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4381,11 +6005,16 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art461" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art90", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { - "cClassTrib": "550021", - "DescricaoClassTrib": "Fornecimento de produtos agropecuários in natura para contribuinte do regime regular que promova industrialização destinada a exportação, observado o art. 82 da Lei Complementar nº 214, de 2025.\r\n", + "cClassTrib": "550029", + "DescricaoClassTrib": "Zona de Processamento de Exportação, observado os art. 102 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": true, @@ -4395,10 +6024,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-09-30T15:52:36.277", - "InicioVigencia": "2025-09-30T15:52:36.277", + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4415,7 +6044,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art82\r\n" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art99", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "4 - Receita Bruta Exportação Indireta", + "TipoDoacao": "0 - Não permite indicador de doação" } ] }, @@ -4436,7 +6070,7 @@ "classificacoesTributarias": [ { "cClassTrib": "620001", - "DescricaoClassTrib": "Tributação monofásica sobre combustíveis, observados os art. 172 e art. 179 I da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Tributação monofásica sobre combustíveis, observados os art. 172 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": false, @@ -4446,12 +6080,12 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": true, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, - "IndNFCe": true, + "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, "IndBPe": false, @@ -4465,8 +6099,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art172" + "Anexo": 91721, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art172", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "620002", @@ -4480,12 +6119,12 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": true, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, - "IndNFCe": true, + "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, "IndBPe": false, @@ -4499,12 +6138,17 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art178" + "Anexo": 91722, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art178", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "620003", - "DescricaoClassTrib": "Tributação monofásica com tributos retidos por responsabilidade sobre combustíveis, observado o art. 178 da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Tributação monofásica com responsabilidade de retenção de tributos por terceiros, observado o art. 178 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": false, @@ -4513,13 +6157,13 @@ "MonofasiaSujeitaRetencao": false, "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": true, - "MonofasiaPadrao": true, - "Publicacao": "2025-05-05T00:00:00", + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, - "IndNFCe": true, + "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, "IndBPe": false, @@ -4533,8 +6177,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art178" + "Anexo": 91723, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art178", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": true, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "620004", @@ -4547,13 +6196,13 @@ "MonofasiaSujeitaRetencao": false, "MonofasiaRetidaAnt": true, "MonofasiaDiferimento": false, - "MonofasiaPadrao": true, - "Publicacao": "2025-05-05T00:00:00", + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, - "IndNFCe": true, + "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, "IndBPe": false, @@ -4567,8 +6216,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art179" + "Anexo": 91724, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art179", + "IndPercentualDiferencaBioCombustivel": true, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "620005", @@ -4582,12 +6236,12 @@ "MonofasiaRetidaAnt": true, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, - "IndNFCe": true, + "IndNFCe": false, "IndCTe": false, "IndCTeOS": false, "IndBPe": false, @@ -4601,8 +6255,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art179" + "Anexo": 91725, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art179", + "IndPercentualDiferencaBioCombustivel": true, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "620006", @@ -4616,10 +6275,10 @@ "MonofasiaRetidaAnt": true, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": true, "IndCTe": false, @@ -4635,8 +6294,52 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, + "Anexo": 91726, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art180", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "2 - Receita Bruta Interna sem Cálculo IBS/CBS", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "620007", + "DescricaoClassTrib": "Perecimento, deteriorização, roubo, furto ou extravio no regime monofásico sem estorno de crédito, observado o art. 47 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-06-22T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": true, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": false, + "IndBPe": false, + "IndNF3e": false, + "IndNFCom": false, + "IndNFSE": false, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": false, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": false, + "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art180" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art47", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" } ] }, @@ -4667,10 +6370,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4687,7 +6390,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art55" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art55", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "800002", @@ -4701,10 +6409,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4721,7 +6429,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art272" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art272", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" } ] }, @@ -4752,10 +6465,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4772,7 +6485,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art450" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art450", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" } ] }, @@ -4803,10 +6521,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-09-30T15:52:36.277", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-09-30T15:52:36.277", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4823,7 +6541,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art51\r\n" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art51\r\n", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "811002", @@ -4837,10 +6560,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-09-30T15:52:36.277", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-09-30T15:52:36.277", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4857,7 +6580,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art45\r\n" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art45\r\n", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "811003", @@ -4871,10 +6599,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-09-30T15:52:36.277", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-09-30T15:52:36.277", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -4891,13 +6619,18 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art41\r\n" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art41\r\n", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" } ] }, { "CST": "820", - "DescricaoCST": "Tributação em declaração de regime específico", + "DescricaoCST": "Tributação em documento específico", "IndIBSCBS": false, "IndRedBC": false, "IndRedAliq": false, @@ -4912,7 +6645,7 @@ "classificacoesTributarias": [ { "cClassTrib": "820001", - "DescricaoClassTrib": "Documento com informações de fornecimento de serviços de planos de assinstência à saúde, mas com tributação realizada por outro meio, observado o art. 235 da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Documento com informações de fornecimento de serviços de planos de assistência à saúde elencados no art. 234 da Lei Complementar nº 214, de 2025, mas com tributação realizada por outro meio", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": false, @@ -4922,10 +6655,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -4941,8 +6674,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art235" + "Anexo": 92341, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art234", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "820002", @@ -4956,10 +6694,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -4975,8 +6713,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art236" + "Anexo": 92361, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art236", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "820003", @@ -4990,10 +6733,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -5009,8 +6752,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art243" + "Anexo": 92431, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art243", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "820004", @@ -5024,10 +6772,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -5044,7 +6792,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art248" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art248", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "820005", @@ -5058,10 +6811,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -5076,9 +6829,14 @@ "IndNFSVIA": false, "IndNFABI": true, "IndNFGas": false, - "IndDERE": true, + "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art254" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art254", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "820006", @@ -5092,10 +6850,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-09-30T15:52:36.277", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-09-30T15:52:36.277", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -5111,8 +6869,13 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art11\r\n" + "Anexo": 90111, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art11\r\n", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "820007", @@ -5126,10 +6889,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-11-19T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -5145,12 +6908,17 @@ "IndNFABI": false, "IndNFGas": false, "IndDERE": false, - "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art181" + "Anexo": 91811, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art181", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "9 - Fornecimento Incompatível com SN", + "TipoDoacao": "0 - Não permite indicador de doação" }, { "cClassTrib": "820008", - "DescricaoClassTrib": "Documento com informações de fornecimento, mas com tributação realizada em fatura anterior, observado o art. 10 da Lei Complementar nº 214, de 2025.", + "DescricaoClassTrib": "Documento com informações de fornecimento de serviço continuado, mas com tributação realizada em fatura anterior, observado o art. 10 da Lei Complementar nº 214, de 2025.", "pRedIBS": 0.00000, "pRedCBS": 0.00000, "IndTribRegular": false, @@ -5160,10 +6928,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-11-19T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-11-19T00:00:00", "FimVigencia": null, - "TipoAliquota": "Sem Alíquota", + "TipoAliquota": "3 - Sem Alíquota", "IndNFe": false, "IndNFCe": false, "IndCTe": false, @@ -5180,7 +6948,51 @@ "IndNFGas": true, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art10" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art10", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" + }, + { + "cClassTrib": "820009", + "DescricaoClassTrib": "Fornecimentos declarados e tributados em outro documento, observado o art. 60 da Lei Complementar nº 214, de 2025.", + "pRedIBS": 0.00000, + "pRedCBS": 0.00000, + "IndTribRegular": false, + "IndCredPresOper": false, + "IndEstornoCred": false, + "MonofasiaSujeitaRetencao": false, + "MonofasiaRetidaAnt": false, + "MonofasiaDiferimento": false, + "MonofasiaPadrao": false, + "Publicacao": "2026-10-01T00:00:00", + "InicioVigencia": "2026-01-01T00:00:00", + "FimVigencia": null, + "TipoAliquota": "3 - Sem Alíquota", + "IndNFe": false, + "IndNFCe": false, + "IndCTe": false, + "IndCTeOS": true, + "IndBPe": false, + "IndNF3e": true, + "IndNFCom": true, + "IndNFSE": true, + "IndBPeTM": false, + "IndBPeTA": false, + "IndNFAg": true, + "IndNFSVIA": false, + "IndNFABI": false, + "IndNFGas": true, + "IndDERE": false, + "Anexo": null, + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art60", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" } ] }, @@ -5211,10 +7023,10 @@ "MonofasiaRetidaAnt": false, "MonofasiaDiferimento": false, "MonofasiaPadrao": false, - "Publicacao": "2025-05-05T00:00:00", + "Publicacao": "2026-06-22T00:00:00", "InicioVigencia": "2025-05-05T00:00:00", "FimVigencia": null, - "TipoAliquota": "Padrão", + "TipoAliquota": "2 - Padrão", "IndNFe": true, "IndNFCe": false, "IndCTe": false, @@ -5231,7 +7043,12 @@ "IndNFGas": false, "IndDERE": false, "Anexo": null, - "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art28" + "Link": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm#art28", + "IndPercentualDiferencaBioCombustivel": false, + "IndDIR": false, + "IndDUIMP": false, + "TipoReceitaBrutaSN": "0 - Não Receita Bruta", + "TipoDoacao": "0 - Não permite indicador de doação" } ] }