Skip to content

Conversation

@GlauberF
Copy link

@GlauberF GlauberF commented Aug 8, 2025

Descrição

Atualiza a biblioteca Java NF-e com a comunidade, trazendo as seguintes alterações.

O que entra nessa atualização:

  1. Alterado URLs Consulta Cadastro AM
  2. Alterado URLs QRCode GO
  3. Alterado URLs ConsultaNFCe RN
  4. Atualizado Layout RT com Nota Técnica 2025.002.v.1.20
  5. Adicionado Impressao de NFe, NFCe e CCe : 14 : Impressao

PR Relacionadas

Link da tarefa no JIRA

https://asaasdev.atlassian.net/browse/SKYW-496

Serviços afetados

Prints do desenvolvimento

@GlauberF GlauberF marked this pull request as draft August 8, 2025 19:31
@GlauberF GlauberF self-assigned this Aug 8, 2025
@GlauberF GlauberF marked this pull request as ready for review August 8, 2025 20:47
@danielrbrdan danielrbrdan requested a review from Copilot August 11, 2025 11:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the Java NF-e library to version 4.00.41 with several community-driven enhancements. The update includes URL changes for various state tax systems, layout updates following Technical Note 2025.002.v.1.20, and the addition of new NFe, NFCe, and CCe printing capabilities.

Key changes include:

  • Updated URLs for AM cadastral consultation, GO QRCode, and RN NFCe consultation
  • Added comprehensive printing functionality for NFe, NFCe, and CCe documents
  • Updated RT layout according to latest technical specifications

Reviewed Changes

Copilot reviewed 30 out of 37 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
TesteImpressaoPdfByte.java Test class for PDF byte array generation
TesteImpressaoPdfArquivo.java Test class for PDF file generation
TesteImpressaoNFe.java Test class for NFe printing
TesteImpressaoNFCe.java Test class for NFCe printing
TesteImpressaoJasperPreview.java Test class for Jasper report preview
TesteImpressaoHtml.java Test class for HTML generation
TesteImpressaoCCe.java Test class for CCe printing
danfe_fatura.jrxml JasperReports template for invoice data
danfe.jrxml Main DANFE template with extensive layout and fields
danfce.jrxml DANFCE template for consumer electronic invoices

ImpressaoDTO impressao = ImpressaoNfeUtil.impressaoPadraoNFe(xml);

//Faz a impressão em pdf File passando o caminho do Arquivo
ImpressaoNfeUtil.impressaoPdfArquivo(impressao, "/d/teste/teste-nfe.pdf");
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

The file path uses an absolute path with Unix-style path separator. This creates platform dependency issues. Consider using relative paths or Path.of() for better cross-platform compatibility.

Suggested change
ImpressaoNfeUtil.impressaoPdfArquivo(impressao, "/d/teste/teste-nfe.pdf");
ImpressaoNfeUtil.impressaoPdfArquivo(impressao, Path.of("d:", "teste", "teste-nfe.pdf").toString());

Copilot uses AI. Check for mistakes.
//Faz a impressão e retorna um Jasper Preview
JasperViewer jasperViewer = ImpressaoNfeUtil.impressaoPreview(impressao);

//PAra mostrar o Preview
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

There is a typo in the comment. 'PAra' should be 'Para'.

Suggested change
//PAra mostrar o Preview
//Para mostrar o Preview

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +11

public class TesteImpressaoJasperPreview {

public static void main(String[] args) {
try {
//Faça a leitura do Arquivo
String xml = XmlNfeUtil.leXml("D:\\teste\\nfe.xml");
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

The file path uses Windows-style absolute path with escaped backslashes. This creates platform dependency and maintainability issues. Consider using relative paths or standardized path separators for better portability.

Suggested change
public class TesteImpressaoJasperPreview {
public static void main(String[] args) {
try {
//Faça a leitura do Arquivo
String xml = XmlNfeUtil.leXml("D:\\teste\\nfe.xml");
import java.nio.file.Paths;
public class TesteImpressaoJasperPreview {
public static void main(String[] args) {
try {
//Faça a leitura do Arquivo
String xml = XmlNfeUtil.leXml(Paths.get("teste", "nfe.xml").toString());

Copilot uses AI. Check for mistakes.
@GlauberF GlauberF changed the title Skyw 496 atualizar biblioteca java n fe v4.00.41 31 07 2025 schemas pl.009p1 e pl.010b SKYW-496 - Atualizar biblioteca java nfe v4.00.41 Aug 11, 2025
@GlauberF GlauberF merged commit 25e8985 into release Aug 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants