Skip to content

Commit 4480d85

Browse files
- Adicionado Monofasico aos calculos IBSCBS
- Corrigido busca de IBSCBS para multi-thread
1 parent 18f3379 commit 4480d85

File tree

7 files changed

+66
-11
lines changed

7 files changed

+66
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Notas de versão
2-
- Correcoes Calculos IBSCBS
2+
- Adicionado Monofasico aos calculos IBSCBS
3+
- Corrigido busca de IBSCBS para multi-thread

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 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.00.47/jar)
1+
# 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.00.48/jar)
22
Biblioteca Java para consumo do WebService de NFe/NFCe
33

44
### Powered by
@@ -22,7 +22,7 @@ Para Iniciar :
2222
<dependency>
2323
<groupId>br.com.swconsultoria</groupId>
2424
<artifactId>java-nfe</artifactId>
25-
<version>4.00.47</version>
25+
<version>4.00.48</version>
2626
</dependency>
2727
```
2828

@@ -34,7 +34,7 @@ repositories {
3434
}
3535
}
3636
dependencies {
37-
implementation "br.com.swconsultoria:java-nfe:4.00.47"
37+
implementation "br.com.swconsultoria:java-nfe:4.00.48"
3838
}
3939
```
4040

@@ -44,6 +44,10 @@ ________________________________________________________________________________
4444

4545
# Historico de Versões
4646

47+
## v4.00.48 - 20/12/2025 - Schemas PL.010b (v1.30)
48+
- Adicionado Monofasico aos calculos IBSCBS
49+
- Corrigido busca de IBSCBS para multi-thread
50+
4751
## v4.00.47 - 10/12/2025 - Schemas PL.010b (v1.30)
4852
- Correcoes calculos IBSCBS
4953

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>br.com.swconsultoria</groupId>
55
<artifactId>java-nfe</artifactId>
6-
<version>4.00.47</version>
6+
<version>4.00.48</version>
77
<name>Java_NFe</name>
88
<description>Api java para consumo do webService de nota fiscal eletronica</description>
99
<url>https://github.com/Samuel-Oliveira/Java_NFe</url>

src/main/java/br/com/swconsultoria/nfe/dom/ConfiguracoesNfe.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ public static ConfiguracoesNfe criarConfiguracoes(EstadosEnum estado, AmbienteEn
109109

110110
log.info(String.format("JAVA-NFE | Samuel Oliveira | [email protected] " +
111111
"| VERSAO=%s | DATA_VERSAO=%s | PASTA_SCHEMAS=%s | AMBIENTE=%s | ESTADO=%s",
112-
"4.00.47",
113-
"10/12/2025",
112+
"4.00.48",
113+
"20/12/2025",
114114
pastaSchemas,
115115
ambiente,
116116
estado.getNome().toUpperCase()));

src/main/java/br/com/swconsultoria/nfe/util/IbsCbsUtil.java

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,62 @@ public TTribNFe montaImpostosDet(String cclassTrib, TNFe.InfNFe.Det det, String
8585
ibsCbs.setGIBSCBS(montarGrupoIBSCBS());
8686
}
8787

88+
if (Boolean.TRUE.equals(cstIbsCbs.getIndIBSCBSMono())) {
89+
ibsCbs.setGIBSCBSMono(montaGrupoMono(det));
90+
}
91+
8892
return ibsCbs;
8993
}
9094

95+
private TMonofasia montaGrupoMono(TNFe.InfNFe.Det det) {
96+
TMonofasia gMono = new TMonofasia();
97+
if(Boolean.TRUE.equals(classTribIbsCbs.getMonofasiaPadrao())) {
98+
TMonofasia.GMonoPadrao monoPadrao = new TMonofasia.GMonoPadrao();
99+
monoPadrao.setQBCMono(ObjetoUtil.getValor4Casas(new BigDecimal(det.getProd().getQCom())));
100+
monoPadrao.setAdRemIBS("0.00");
101+
monoPadrao.setAdRemCBS("0.00");
102+
monoPadrao.setVIBSMono("0.00");
103+
monoPadrao.setVCBSMono("0.00");
104+
gMono.setGMonoPadrao(monoPadrao);
105+
}
106+
107+
if(Boolean.TRUE.equals(classTribIbsCbs.getMonofasiaRetidaAnt())) {
108+
TMonofasia.GMonoReten monoReten = new TMonofasia.GMonoReten();
109+
monoReten.setQBCMonoReten(ObjetoUtil.getValor4Casas(new BigDecimal(det.getProd().getQCom())));
110+
monoReten.setAdRemCBSReten("0.00");
111+
monoReten.setAdRemIBSReten("0.00");
112+
monoReten.setVCBSMonoReten("0.00");
113+
monoReten.setVIBSMonoReten("0.00");
114+
gMono.setGMonoReten(monoReten);
115+
}
116+
117+
if(Boolean.TRUE.equals(classTribIbsCbs.getMonofasiaSujeitaRetencao())) {
118+
TMonofasia.GMonoRet monoRet = new TMonofasia.GMonoRet();
119+
monoRet.setQBCMonoRet(ObjetoUtil.getValor4Casas(new BigDecimal(det.getProd().getQCom())));
120+
monoRet.setAdRemCBSRet("0.00");
121+
monoRet.setAdRemIBSRet("0.00");
122+
monoRet.setVCBSMonoRet("0.00");
123+
monoRet.setVIBSMonoRet("0.00");
124+
gMono.setGMonoRet(monoRet);
125+
}
126+
127+
if(Boolean.TRUE.equals(classTribIbsCbs.getMonofasiaDiferimento())) {
128+
TMonofasia.GMonoDif gMonoDif = new TMonofasia.GMonoDif();
129+
gMonoDif.setPDifCBS("0.00");
130+
gMonoDif.setPDifIBS("0.00");
131+
gMonoDif.setVCBSMonoDif("0.00");
132+
gMonoDif.setVIBSMonoDif("0.00");
133+
gMono.setGMonoDif(gMonoDif);
134+
135+
}
136+
gMono.setVTotCBSMonoItem("0.00");
137+
gMono.setVTotIBSMonoItem("0.00");
138+
139+
return gMono;
140+
}
141+
91142
private boolean deveMontarGrupoIBSCBS() {
92143
return Boolean.TRUE.equals(cstIbsCbs.getIndIBSCBS())
93-
|| Boolean.TRUE.equals(cstIbsCbs.getIndIBSCBSMono())
94144
|| Boolean.TRUE.equals(cstIbsCbs.getIndRedAliq())
95145
|| Boolean.TRUE.equals(cstIbsCbs.getIndDif())
96146
|| Boolean.TRUE.equals(cstIbsCbs.getIndTransfCred());
@@ -236,7 +286,7 @@ private <T> T criarGrupoImposto(
236286
BigDecimal percentRed = ObjetoUtil.getOrZero(percentualReducao);
237287
BigDecimal aliqEfet = aliq;
238288

239-
if (Boolean.TRUE.equals(cstIbsCbs.getIndRedAliq()) && percentRed.compareTo(BigDecimal.ZERO) > 0) {
289+
if (Boolean.TRUE.equals(cstIbsCbs.getIndRedAliq())) {
240290
TRed gRed = criarRedutor(percentRed, aliq);
241291
redSetter.set(grupo, gRed);
242292
aliqEfet = new BigDecimal(gRed.getPAliqEfet());

src/test/java/br/com/swconsultoria/nfe/exemplos/ConfiguracaoTeste.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static ConfiguracoesNfe iniciaConfiguracoes(EstadosEnum estado, AmbienteE
2929

3030
Certificado certificado = CertificadoService.certificadoPfx("d:/teste/certificado.pfx", "123456");
3131

32-
return ConfiguracoesNfe.criarConfiguracoes(estado, ambiente, certificado, "d:/teste/nfe/schemas");
32+
return ConfiguracoesNfe.criarConfiguracoes(estado, ambiente, certificado, "./schemas");
3333
}
3434

3535
}

src/test/java/br/com/swconsultoria/nfe/exemplos/EventoGenericoTeste.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static void main(String[] args) {
4444
detEvento.setDescEvento("Informação de efetivo pagamento integral para liberar crédito presumido do adquirente");
4545
detEvento.setCOrgaoAutor(config.getEstado().getCodigoUF());
4646
detEvento.setTpAutor("1");
47-
detEvento.setVerAplic("v4.00.47");
47+
detEvento.setVerAplic("v4.00.48");
4848
detEvento.setIndQuitacao("1");
4949
generico.setDetEvento(detEvento);
5050

0 commit comments

Comments
 (0)