Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ target/
.idea/
*.iml
/target/
/.github/*.md
show,
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.00.49/jar)
# 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.51/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
Expand All @@ -22,7 +22,7 @@ Para Iniciar :
<dependency>
<groupId>br.com.swconsultoria</groupId>
<artifactId>java-nfe</artifactId>
<version>4.00.49</version>
<version>4.00.51</version>
</dependency>
```

Expand All @@ -34,7 +34,7 @@ repositories {
}
}
dependencies {
implementation "br.com.swconsultoria:java-nfe:4.00.49"
implementation "br.com.swconsultoria:java-nfe:4.00.51"
}
```

Expand All @@ -44,6 +44,13 @@ ________________________________________________________________________________

# Historico de Versões

## v4.00.51 - 19/03/2026 - Schemas PL.010b (v1.30)
- Adicionado Teste Unitarios
- Atualizado Cacert

## v4.00.50 - 16/02/2026 - Schemas PL.010b (v1.30)
- Ajustes Impressao Danfe

## v4.00.49 - 18/01/2026 - Schemas PL.010b (v1.30)
- Corrigido monofasia retida Anteriormente.
- Adicionado calculos IBSCBS para Diferimento
Expand Down
4 changes: 2 additions & 2 deletions pom-base.xml
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium Sensitive Data Finding

PII

More Details
Attribute Value
Data Classifier PII/Name
Data Classifier ID BUILTIN-125

Sampled Examples

Key Value
developer.name Sa***l *****s

Rule ID: BUILTIN-125


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>br.com.swconsultoria</groupId>
<artifactId>java-nfe</artifactId>
<version>4.00.49-${versao}-SNAPSHOT</version>
<version>4.00.51-${versao}-SNAPSHOT</version>
<name>Java_NFe</name>
<description>Api java para consumo do webService de nota fiscal eletronica</description>
<url>https://github.com/Samuel-Oliveira/Java_NFe</url>
Expand Down Expand Up @@ -31,7 +31,7 @@
<java.version>1.8</java.version>

<!-- Versions -->
<java-certificado.version>3.13</java-certificado.version>
<java-certificado.version>3.14</java-certificado.version>
<httpcore.version>4.4.6</httpcore.version>
<jaxb-impl.version>2.3.1</jaxb-impl.version>
<jaxb-xjc.version>2.3.1</jaxb-xjc.version>
Expand Down
13 changes: 11 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>br.com.swconsultoria</groupId>
<artifactId>java-nfe</artifactId>
<version>4.00.49</version>
<version>4.00.51</version>
<name>Java_NFe</name>
<description>Api java para consumo do webService de nota fiscal eletronica</description>
<url>https://github.com/Samuel-Oliveira/Java_NFe</url>
Expand Down Expand Up @@ -31,7 +31,7 @@
<java.version>1.8</java.version>

<!-- Versions -->
<java-certificado.version>3.13</java-certificado.version>
<java-certificado.version>3.14</java-certificado.version>
<httpcore.version>4.4.6</httpcore.version>
<jaxb-impl.version>2.3.1</jaxb-impl.version>
<jaxb-xjc.version>2.3.1</jaxb-xjc.version>
Expand Down Expand Up @@ -279,6 +279,15 @@
<autoPublish>true</autoPublish>
</configuration>
</plugin>
<!-- Cobertura de testes -->
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version>
<configuration>
<repoToken>paGe4qkZvPNJtvxqY8NaJN5ImZO56RqB6</repoToken>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Security Vulnerability: Hardcoded repository token is exposed in the pom.xml file. This token grants access to Coveralls and should never be committed to version control. Anyone with access to this repository can now use this token to push unauthorized code coverage reports or access Coveralls data.

Suggested change
<repoToken>paGe4qkZvPNJtvxqY8NaJN5ImZO56RqB6</repoToken>
<repoToken>${env.COVERALLS_REPO_TOKEN}</repoToken>

</configuration>
</plugin>
</plugins>
</build>
</project>
114 changes: 102 additions & 12 deletions schemas/leiauteNFe_v4.00.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
<!-- PL_009m_NT2019_001_v155 - Inclusão de campos para Crédito Presumido e Redução da base de cálculo -->
<!-- PL_009m_NT2023_004_v101 - Informações de Pagamentos e Outros -->
<!-- PL_009p_NT2024_003_v103 - Produtos agropecuários -->
<xs:schema xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.portalfiscal.inf.br/nfe"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:schema xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:editix="http://www.portalfiscal.inf.br/nfe" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema_v1.01.xsd"/>
<xs:include schemaLocation="tiposBasico_v4.00.xsd"/>
<xs:include schemaLocation="DFeTiposBasicos_v1.00.xsd"/>
Expand Down Expand Up @@ -211,7 +209,13 @@ Campo preenchido somente quando “indPres = 5 (Operação presencial, fora do e
</xs:element>
<xs:element name="tpNFDebito" type="TTpNFDebito" minOccurs="0">
<xs:annotation>
<xs:documentation>Tipo de Nota de Débito</xs:documentation>
<xs:documentation>Tipo de Nota de Débito:
01=Transferência de créditos para Cooperativas;
02=Anulação de Crédito por Saídas Imunes/Isentas;
03=Débitos de notas fiscais não processadas na apuração;
04=Multa e juros;
05=Transferência de crédito de sucessão.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="tpNFCredito" type="TTpNFCredito" minOccurs="0">
Expand Down Expand Up @@ -503,7 +507,7 @@ Preencher com &quot;2B&quot;, quando se tratar de Cupom Fiscal emitido por máqu
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="refNFe" type="TChNFe" minOccurs="1" maxOccurs="99">
<xs:element name="refNFe" type="TChNFe" maxOccurs="99">
<xs:annotation>
<xs:documentation>Chave de acesso da NF-e de antecipação de pagamento</xs:documentation>
</xs:annotation>
Expand Down Expand Up @@ -2557,13 +2561,15 @@ ambiente.</xs:documentation>
</xs:element>
<xs:element name="motDesICMS">
<xs:annotation>
<xs:documentation>Motivo da desoneração do ICMS:3-Uso na agropecuária;9-Outros;12-Fomento agropecuário</xs:documentation>
<xs:documentation>Motivo da desoneração do ICMS:3-Uso na agropecuária;9-Outros; 10=Deficiente Condutor (Convênio ICMS 38/12); 11=Deficiente Não Condutor (Convênio ICMS 38/12); 12-Fomento agropecuário</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:whiteSpace value="preserve"/>
<xs:enumeration value="3"/>
<xs:enumeration value="9"/>
<xs:enumeration value="10"/>
<xs:enumeration value="11"/>
<xs:enumeration value="12"/>
</xs:restriction>
</xs:simpleType>
Expand Down Expand Up @@ -3397,11 +3403,39 @@ Informar o motivo da desoneração:
<xs:documentation>Percentual de redução da BC</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="cBenefRBC" minOccurs="0">
<xs:annotation>
<xs:documentation>Código de Benefício Fiscal na UF aplicado ao item quando houver RBC.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:whiteSpace value="preserve"/>
<xs:pattern value="[!-ÿ]{8}|[!-ÿ]{10}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="pICMS" type="TDec_0302a04">
<xs:annotation>
<xs:documentation>Alíquota do ICMS</xs:documentation>
</xs:annotation>
</xs:element>
<xs:sequence minOccurs="0">
<xs:element name="vICMSOp" type="TDec_1302">
<xs:annotation>
<xs:documentation>Valor do ICMS da Operação</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="pDif" type="TDec_0302a04Max100">
<xs:annotation>
<xs:documentation>Percentual do diferemento</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="vICMSDif" type="TDec_1302">
<xs:annotation>
<xs:documentation>Valor do ICMS da diferido</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:element name="vICMS" type="TDec_1302">
<xs:annotation>
<xs:documentation>Valor do ICMS</xs:documentation>
Expand All @@ -3424,6 +3458,23 @@ Informar o motivo da desoneração:
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:sequence minOccurs="0">
<xs:element name="pFCPDif" type="TDec_0302a04Opc">
<xs:annotation>
<xs:documentation>Percentual do diferimento do ICMS relativo ao Fundo de Combate à Pobreza (FCP).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="vFCPDif" type="TDec_1302">
<xs:annotation>
<xs:documentation>Valor do ICMS relativo ao Fundo de Combate à Pobreza (FCP) diferido.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="vFCPEfet" type="TDec_1302" minOccurs="0">
<xs:annotation>
<xs:documentation>Valor efetivo do ICMS relativo ao Fundo de Combate à Pobreza (FCP).</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:sequence>
<xs:sequence minOccurs="0">
<xs:element name="modBCST">
Expand Down Expand Up @@ -3571,12 +3622,14 @@ Operação interestadual para consumidor final com partilha do ICMS devido na o
<xs:annotation>
<xs:documentation>Tributação pelo ICMS
10 - Tributada e com cobrança do ICMS por substituição tributária;
20 – Redução de base de cálculo
90 – Outros.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:whiteSpace value="preserve"/>
<xs:enumeration value="10"/>
<xs:enumeration value="20"/>
<xs:enumeration value="90"/>
</xs:restriction>
</xs:simpleType>
Expand Down Expand Up @@ -3695,6 +3748,43 @@ Operação interestadual para consumidor final com partilha do ICMS devido na o
<xs:documentation>Sigla da UF para qual é devido o ICMS ST da operação.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:sequence minOccurs="0">
<xs:annotation>
<xs:documentation>Grupo desoneração</xs:documentation>
</xs:annotation>
<xs:element name="vICMSDeson" type="TDec_1302">
<xs:annotation>
<xs:documentation>Valor do ICMS de desoneração</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="motDesICMS">
<xs:annotation>
<xs:documentation>Motivo da desoneração do ICMS:9-Outros;10=Deficiente Condutor (Convênio ICMS 38/12) 11=Deficiente Não Condutor (Convênio ICMS 38/12)</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:whiteSpace value="preserve"/>
<xs:enumeration value="9"/>
<xs:enumeration value="10"/>
<xs:enumeration value="11"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="indDeduzDeson" minOccurs="0">
<xs:annotation>
<xs:documentation>Indica se o valor do ICMS desonerado (vICMSDeson) deduz do valor do item (vProd):
0=Valor do ICMS desonerado (vICMSDeson) não deduz do valor do item (vProd) / total da NF-e;
1=Valor do ICMS desonerado (vICMSDeson) deduz do valor do item (vProd) / total da NF-e.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:whiteSpace value="preserve"/>
<xs:enumeration value="0"/>
<xs:enumeration value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:element>
Expand Down Expand Up @@ -6520,16 +6610,16 @@ tipo de ato concessório:
<xs:whiteSpace value="preserve"/>
<xs:minLength value="60"/>
<xs:maxLength value="1000"/>
<!--QRCODE V1-->
<xs:pattern value="((HTTPS?|https?)://.*\?chNFe=[0-9]{44}&amp;nVersao=100&amp;tpAmb=[1-2](&amp;cDest=([A-Za-z0-9.:+-/)(]{0}|[A-Za-z0-9.:+-/)(]{5,20})?)?&amp;dhEmi=[A-Fa-f0-9]{50}&amp;vNF=(0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,12}(\.[0-9]{2})?)&amp;vICMS=(0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,12}(\.[0-9]{2})?)&amp;digVal=[A-Fa-f0-9]{56}&amp;cIdToken=[0-9]{6}&amp;cHashQRCode=[A-Fa-f0-9]{40})"/>
<!--QRCODE V2 ONLINE-->
<xs:pattern value="((HTTPS?|https?)://.*\?p=([0-9]{34}(1|3|4)[0-9]{9})\|[2]\|[1-2]\|(0|[1-9]{1}([0-9]{1,5})?)\|[A-Fa-f0-9]{40})"/>
<!--QRCODE V2 OFFLINE-->
<xs:pattern value="((HTTPS?|https?)://.*\?p=([0-9]{34}9[0-9]{9})\|[2]\|[1-2]\|([0]{1}[1-9]{1}|[1-2]{1}[0-9]{1}|[3]{1}[0-1]{1})\|(0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,12}(\.[0-9]{2})?)\|[A-Fa-f0-9]{56}\|(0|[1-9]{1}([0-9]{1,5})?)\|[A-Fa-f0-9]{40})"/>
<!--QRCODE V3 ONLINE-->
<xs:pattern value="((HTTPS?|https?)://.*\?p=([0-9]{34}(1|3|4)[0-9]{9})\|[3]\|[1-2])"/>
<!--QRCODE V3 OFFLINE-->
<xs:pattern value="((HTTPS?|https?)://.*\?p=([0-9]{34}(9)[0-9]{9})\|[3]\|[1-2]\|([0]{1}[1-9]{1}|[1-2]{1}[0-9]{1}|[3]{1}[0-1]{1})\|(0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,12}(\.[0-9]{2})?)\|((1|2|3)?)\|(([0-9]{3,14})?)\|([a-zA-Z0-9+/]+[=]{0,2}))"/>
<!--QRCODE V1-->
<!--QRCODE V2 ONLINE-->
<!--QRCODE V2 OFFLINE-->
<!--QRCODE V3 ONLINE-->
<!--QRCODE V3 OFFLINE-->
</xs:restriction>
</xs:simpleType>
</xs:element>
Expand Down Expand Up @@ -7578,4 +7668,4 @@ alterado para tamanho variavel 1-4. (NT2011/004)</xs:documentation>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:schema>
</xs:schema>
22 changes: 10 additions & 12 deletions schemas/nfe_v4.00.xsd
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2008 (http://www.altova.com) by sas-softwares@procergs.rs.gov.br (PROCERGS) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.portalfiscal.inf.br/nfe"
targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:include schemaLocation="leiauteNFe_v4.00.xsd"/>
<xs:element name="NFe" type="TNFe">
<xs:annotation>
<xs:documentation>Nota Fiscal Eletrônica</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2008 (http://www.altova.com) by sas-softwares@procergs.rs.gov.br (PROCERGS) -->
<xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.portalfiscal.inf.br/nfe" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="leiauteNFe_v4.00.xsd"/>
<xs:element name="NFe" type="TNFe">
<xs:annotation>
<xs:documentation>Nota Fiscal Eletrônica</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>
Loading
Loading