• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wmixvideo / nfe / #7148

04 Dec 2025 02:00PM UTC coverage: 52.281% (+25.3%) from 26.996%
#7148

push

web-flow
Ajuste conforme CTe_Nota_Tecnica_2025_001_RTC_v1.10 (#1126)

* Merge from master

* Revert "Merge from master"

This reverts commit e2ed141c3.

* Revert "Revert "Merge from master""

This reverts commit 05781623b.

* Adição do campo indDoacao e grupo de informações de estorno de crédito. Exclusão do grupo de informações do crédito presumido por não se aplicar aos cClassTrib associados ao CTe. Conforme CTe_Nota_Tecnica_2025_001_RTC_v1.10.

103 of 276 new or added lines in 17 files covered. (37.32%)

2968 existing lines in 404 files now uncovered.

14761 of 28234 relevant lines covered (52.28%)

0.52 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.49
/src/main/java/com/fincatto/documentofiscal/nfe400/classes/nota/NFNotaInfo.java
1
package com.fincatto.documentofiscal.nfe400.classes.nota;
2

3
import com.fincatto.documentofiscal.DFBase;
4
import com.fincatto.documentofiscal.nfe400.classes.NFTipo;
5
import com.fincatto.documentofiscal.validadores.DFBigDecimalValidador;
6
import com.fincatto.documentofiscal.validadores.DFListValidador;
7
import com.fincatto.documentofiscal.validadores.DFStringValidador;
8
import org.simpleframework.xml.*;
9

10
import java.math.BigDecimal;
11
import java.util.List;
12

13
@Root(name = "infNFe")
14
@Namespace(reference = "http://www.portalfiscal.inf.br/nfe")
15
public class NFNotaInfo extends DFBase {
1✔
16
    private static final long serialVersionUID = 4569152242139670228L;
17

18
    public static final String IDENT = "NFe";
19
    
20
    @Attribute(name = "Id")
21
    private String identificador;
22
    
23
    @Attribute(name = "versao")
24
    private String versao;
25
    
26
    @Element(name = "ide")
27
    private NFNotaInfoIdentificacao identificacao;
28
    
29
    @Element(name = "emit")
30
    private NFNotaInfoEmitente emitente;
31

32
    @Element(name = "avulsa", required = false)
33
    private NFNotaInfoAvulsa avulsa;
34

35
    @Element(name = "dest", required = false)
36
    private NFNotaInfoDestinatario destinatario;
37

38
    @Element(name = "retirada", required = false)
39
    private NFNotaInfoLocal retirada;
40

41
    @Element(name = "entrega", required = false)
42
    private NFNotaInfoLocal entrega;
43

44
    @ElementList(entry = "autXML", inline = true, required = false)
45
    private List<NFPessoaAutorizadaDownloadNFe> pessoasAutorizadasDownloadNFe;
46
    
47
    @ElementList(entry = "det", inline = true)
48
    private List<NFNotaInfoItem> itens;
49
    
50
    @Element(name = "total")
51
    private NFNotaInfoTotal total;
52
    
53
    @Element(name = "transp")
54
    private NFNotaInfoTransporte transporte;
55

56
    @Element(name = "cobr", required = false)
57
    private NFNotaInfoCobranca cobranca;
58

59
    @Element(name = "pag")
60
    private NFNotaInfoPagamento pagamento;
61
    
62
    @Element(name="infIntermed", required = false)
63
    private NFInformacaoIntermediador infIntermed;
64

65
    @Element(name = "infAdic", required = false)
66
    private NFNotaInfoInformacoesAdicionais informacoesAdicionais;
67

68
    @Element(name = "exporta", required = false)
69
    private NFNotaInfoExportacao exportacao;
70

71
    @Element(name = "compra", required = false)
72
    private NFNotaInfoCompra compra;
73

74
    @Element(name = "cana", required = false)
75
    private NFNotaInfoCana cana;
76

77
    @Element(name="infRespTec", required = false)
78
    private NFNotaInfoResponsavelTecnico informacaoResposavelTecnico;
79

80
    @Element(name="infSolicNFF", required = false)
81
    private NFInfoSolicitacaoNFF informacaoSolicitacaoNFF;
82

83
    @Element(name="agropecuario", required = false)
84
    private NFNotaInfoAgropecuario agropecuario;
85

86
    /**
87
     * Pega a chave de acesso a partir do identificador.
88
     * @return Chave de acesso.
89
     */
90
    public String getChaveAcesso() {
91
        return this.identificador.replace(NFNotaInfo.IDENT, "");
1✔
92
    }
93

94
    public void setIdentificador(final String identificador) {
95
        DFStringValidador.exatamente44N(identificador, "Identificador");
1✔
96
        this.identificador = NFNotaInfo.IDENT + identificador;
1✔
97
    }
1✔
98

99
    public String getIdentificador() {
100
        return this.identificador;
1✔
101
    }
102

103
    public void setVersao(final BigDecimal versao) {
104
        this.versao = DFBigDecimalValidador.tamanho4Com2CasasDecimais(versao, "Versao");
1✔
105
    }
1✔
106

107
    public NFNotaInfoIdentificacao getIdentificacao() {
108
        return this.identificacao;
1✔
109
    }
110

111
    public void setIdentificacao(final NFNotaInfoIdentificacao identificacao) {
112
        this.identificacao = identificacao;
1✔
113
    }
1✔
114

115
    public void setEmitente(final NFNotaInfoEmitente emitente) {
116
        this.emitente = emitente;
1✔
117
    }
1✔
118

119
    public void setAvulsa(final NFNotaInfoAvulsa avulsa) {
120
        this.avulsa = avulsa;
1✔
121
    }
1✔
122

123
    public NFNotaInfoDestinatario getDestinatario() {
124
        return this.destinatario;
1✔
125
    }
126

127
    public void setDestinatario(final NFNotaInfoDestinatario destinatario) {
128
        this.destinatario = destinatario;
1✔
129
    }
1✔
130

131
    public void setItens(final List<NFNotaInfoItem> itens) {
132
        DFListValidador.tamanho990(itens, "Itens da Nota");
1✔
133
        this.itens = itens;
1✔
134
    }
1✔
135

136
    public void setRetirada(final NFNotaInfoLocal retirada) {
137
        this.retirada = retirada;
1✔
138
    }
1✔
139

140
    public void setEntrega(final NFNotaInfoLocal entrega) {
141
        this.entrega = entrega;
1✔
142
    }
1✔
143

144
    public void setCobranca(final NFNotaInfoCobranca cobranca) {
145
        this.cobranca = cobranca;
1✔
146
    }
1✔
147

148
    public void setTotal(final NFNotaInfoTotal total) {
149
        this.total = total;
1✔
150
    }
1✔
151

152
    public void setTransporte(final NFNotaInfoTransporte transporte) {
153
        this.transporte = transporte;
1✔
154
    }
1✔
155

156
    public void setInformacoesAdicionais(final NFNotaInfoInformacoesAdicionais informacoesAdicionais) {
157
        this.informacoesAdicionais = informacoesAdicionais;
1✔
158
    }
1✔
159

160
    public void setExportacao(final NFNotaInfoExportacao exportacao) {
161
        this.exportacao = exportacao;
1✔
162
    }
1✔
163

164
    public void setCompra(final NFNotaInfoCompra compra) {
165
        this.compra = compra;
1✔
166
    }
1✔
167

168
    public void setCana(final NFNotaInfoCana cana) {
169
        this.cana = cana;
1✔
170
    }
1✔
171

172
    public void setPessoasAutorizadasDownloadNFe(final List<NFPessoaAutorizadaDownloadNFe> pessoasAutorizadasDownloadNFe) {
173
        DFListValidador.tamanho10(pessoasAutorizadasDownloadNFe, "Pessoas Autorizadas Download NFe");
1✔
174
        this.pessoasAutorizadasDownloadNFe = pessoasAutorizadasDownloadNFe;
1✔
175
    }
1✔
176

177
    public void setPagamento(final NFNotaInfoPagamento pagamento) {
178
        this.pagamento = pagamento;
1✔
179
    }
1✔
180
    
181
    public void setInfIntermed(final NFInformacaoIntermediador infIntermed) {
182
                this.infIntermed = infIntermed;
1✔
183
        }
1✔
184

185
    public NFNotaInfo setInformacaoResposavelTecnico(NFNotaInfoResponsavelTecnico informacaoResposavelTecnico) {
UNCOV
186
        this.informacaoResposavelTecnico = informacaoResposavelTecnico;
×
UNCOV
187
        return this;
×
188
    }
189

190
    public void setInformacaoSolicitacaoNFF(NFInfoSolicitacaoNFF informacaoSolicitacaoNFF) {
UNCOV
191
        this.informacaoSolicitacaoNFF = informacaoSolicitacaoNFF;
×
UNCOV
192
    }
×
193

194
    public String getVersao() {
195
        return this.versao;
1✔
196
    }
197

198
    public NFNotaInfoEmitente getEmitente() {
199
        return this.emitente;
1✔
200
    }
201

202
    public NFNotaInfoAvulsa getAvulsa() {
203
        return this.avulsa;
1✔
204
    }
205

206
    public NFNotaInfoLocal getRetirada() {
207
        return this.retirada;
1✔
208
    }
209

210
    public NFNotaInfoLocal getEntrega() {
211
        return this.entrega;
1✔
212
    }
213

214
    public List<NFPessoaAutorizadaDownloadNFe> getPessoasAutorizadasDownloadNFe() {
215
        return this.pessoasAutorizadasDownloadNFe;
1✔
216
    }
217

218
    public List<NFNotaInfoItem> getItens() {
219
        return this.itens;
1✔
220
    }
221

222
    public NFNotaInfoTotal getTotal() {
223
        return this.total;
1✔
224
    }
225

226
    public NFNotaInfoTransporte getTransporte() {
227
        return this.transporte;
1✔
228
    }
229

230
    public NFNotaInfoCobranca getCobranca() {
231
        return this.cobranca;
1✔
232
    }
233

234
    public NFNotaInfoPagamento getPagamento() {
235
        return this.pagamento;
1✔
236
    }
237
    
238
    public NFInformacaoIntermediador getInfIntermed() {
UNCOV
239
                return infIntermed;
×
240
        }
241

242
    public NFNotaInfoInformacoesAdicionais getInformacoesAdicionais() {
243
        return this.informacoesAdicionais;
1✔
244
    }
245

246
    public NFNotaInfoExportacao getExportacao() {
247
        return this.exportacao;
1✔
248
    }
249

250
    public NFNotaInfoCompra getCompra() {
251
        return this.compra;
1✔
252
    }
253

254
    public NFNotaInfoCana getCana() {
255
        return this.cana;
1✔
256
    }
257

258
    public NFNotaInfoResponsavelTecnico getInformacaoResposavelTecnico() {
UNCOV
259
        return this.informacaoResposavelTecnico;
×
260
    }
261

262
    public NFInfoSolicitacaoNFF getInformacaoSolicitacaoNFF() {
UNCOV
263
        return informacaoSolicitacaoNFF;
×
264
    }
265

266
    public NFNotaInfoAgropecuario getAgropecuario() {
UNCOV
267
        return agropecuario;
×
268
    }
269

270
    public void setAgropecuario(NFNotaInfoAgropecuario agropecuario) {
UNCOV
271
        this.agropecuario = agropecuario;
×
UNCOV
272
    }
×
273

274
    @Override
275
    public String toString() {
276
        if (this.getDestinatario() != null && this.getIdentificacao() != null && this.getDestinatario().getIndicadorIEDestinatario().equals(NFIndicadorIEDestinatario.NAO_CONTRIBUINTE) && this.getIdentificacao().getOperacaoConsumidorFinal().equals(NFOperacaoConsumidorFinal.NAO) && this.getIdentificacao().getTipo().equals(NFTipo.SAIDA) && !this.getIdentificacao().getIdentificadorLocalDestinoOperacao().equals(NFIdentificadorLocalDestinoOperacao.OPERACAO_COM_EXTERIOR)) {
1✔
277
            throw new IllegalStateException("Opera\u00E7\u00E3o com n\u00E3o contribuinte deve indicar opera\u00E7\u00E3o com consumidor final");
1✔
278
        }
279
        return super.toString();
1✔
280
    }
281
        
282
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc