Repository navigation
NT 2026.004 v1.01 e NT 2026.005 v1.00 - Campos do Simples Nacional para IBS/CBS e vTPrestLiq no CT-e - #223
Merged
marcosgerene merged 1 commit intoDec 1, 2026
Conversation
…ra IBS/CBS e vTPrestLiq no CT-e Implementação no CT-e e no CT-e OS dos campos novos das NTs 2026.004 v1.01 e 2026.005 v1.00, espelhando o que a NF-e já tem (Hercules-NET#212): - emit / emitOs: tpRegimeIBSCBS (0-1, após CRT; só serializa quando informado) - vPrest / vPrestOs: vTPrestLiq (0-1, entre vTPrest e vRec; só serializa quando informado) - IBSCBS: gTribSN > gIBSSN > pIBSSN/vIBSSN e gTribSN > gCBSSN > pCBSSN/vCBSSN (0-1, após gIBSCBS) - Schemas do CT-e atualizados com o pacote PL_CTe_400_NT2026.005 RTC SN_1.00 (cumulativo com a NT 2026.004 RTC 1.01): cteTiposBasico, DFeTiposBasicos, tiposGeralCTe e os novos evTributacaoSN, evCancTributacaoSN e evApropriaCredPres - Testes de serialização (ordem, omissão, round-trip) e validação do grupo IBSCBS contra o TTribCTe do schema novo em DFe.Testes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Obrigado pela contribuição! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementa no CT-e (modelo 57) e no CT-e OS (modelo 67) os campos novos das notas técnicas:
vPrest/vTPrestLiq(Valor Total da Prestação Líquido do Serviço)emit/tpRegimeIBSCBSe o grupoIBSCBS/gTribSNO desenho segue o que a NF-e da própria biblioteca já tem desde o #212 (
gTribSN,gIBSSN,gCBSSNeemit.tpRegimeIBSCBS).O que muda
emit(CT-e) eemitOs(CT-e OS)tpRegimeIBSCBS(int?)CRTvPrest(CT-e) evPrestOs(CT-e OS)vTPrestLiq(decimal?, 2 casas)vTPrestevRecIBSCBS(compartilhada CT-e e CT-e OS)gTribSN(novo)gIBSCBSgTribSN(novo)gIBSSN(pIBSSN4 casas,vIBSSN2 casas) egCBSSN(pCBSSN,vCBSSN)Ordem, cardinalidade e tipos conferidos contra o
cteTiposBasico_v4.00.xsde oDFeTiposBasicos_v1.00.xsddo pacote oficial
PL_CTe_400_NT2026.005 RTC SN_1.00(cumulativo: já contém a NT 2026.004 RTC 1.01).Os campos são todos opcionais: quem não preenche gera exatamente o mesmo XML de antes.
Schemas em
CTe.AppTeste/schemasatualizados com o pacote oficial (sem edição de conteúdo):cteTiposBasico_v4.00.xsd,DFeTiposBasicos_v1.00.xsd,tiposGeralCTe_v4.00.xsde os novosevTributacaoSN_v1.00.xsd,evCancTributacaoSN_v1.00.xsdeevApropriaCredPres_v4.00.xsd(incluídos noCTe.AppTeste.csprojcomCopyToOutputDirectory). OcteTiposBasico_v4.00.xsddo portal vem com quebra delinha só CR; foi convertido para a quebra padrão do repositório para o diff ficar legível (conteúdo igual).
Fora deste PR
CTe.Classes/Simplificadonão modelamemitnemtotal, entãotpRegimeIBSCBS,vTPrestLiqeIBSCBSTot/gTribSNdo modelo simplificado não foram incluídos.gMultaJuros,gICMSPrevistoPagtoAntecip,ISUFEmit) e os eventosnovos (só os XSD foram atualizados).
Como foi testado
DFe.Testes/ConhecimentoTransporte/CTeRtcSimplesNacionalTestes.cs(o projeto passou areferenciar
CTe.Classes):IBSCBS(gIBSCBSantes degTribSN), deemit/emitOs(tpRegimeIBSCBSdepois de
CRT) e devPrest/vPrestOs(vTPrestLiqentrevTPrestevRec);gTribSN;IBSCBS(com e semgIBSCBS, sógCBSSN) contra o tipoTTribCTedo schema novo, eum caso negativo (alíquota fora do tamanho) para garantir que a validação de fato roda.
dotnet test DFe.Testes/DFe.Testes.csproj: 273 aprovados, 0 falhas.