Rev 489 | Rev 534 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 489 | Rev 492 | ||
|---|---|---|---|
| Line 44... | Line 44... | ||
| 44 | import br.com.ec.core.util.StringUtil; |
44 | import br.com.ec.core.util.StringUtil; |
| 45 | import br.com.ec.core.util.VerificadorUtil; |
45 | import br.com.ec.core.util.VerificadorUtil; |
| 46 | import br.com.ec.domain.dto.NotaFiscalProdutoDTO; |
46 | import br.com.ec.domain.dto.NotaFiscalProdutoDTO; |
| 47 | import br.com.ec.domain.model.nfe.TipoModeloNotaFiscal; |
47 | import br.com.ec.domain.model.nfe.TipoModeloNotaFiscal; |
| 48 | import br.com.ec.domain.model.nfe.TipoNotaFiscal; |
48 | import br.com.ec.domain.model.nfe.TipoNotaFiscal; |
| - | 49 | import br.com.ec.domain.model.nfe.TipoNotaFiscalConsumidorFinal; |
|
| 49 | import br.com.ec.domain.model.nfe.TipoNotaFiscalDestino; |
50 | import br.com.ec.domain.model.nfe.TipoNotaFiscalDestino; |
| - | 51 | import br.com.ec.domain.model.nfe.TipoNotaFiscalFinalidadeOperacao; |
|
| 50 | import br.com.ec.domain.model.nfe.TipoNotaFiscalIntermediario; |
52 | import br.com.ec.domain.model.nfe.TipoNotaFiscalIntermediario; |
| 51 | import br.com.ec.domain.model.nfe.TipoNotaFiscalNaturezaOperacao; |
53 | import br.com.ec.domain.model.nfe.TipoNotaFiscalNaturezaOperacao; |
| 52 | import br.com.ec.domain.model.nfe.TipoNotaFiscalPresencaComprador; |
54 | import br.com.ec.domain.model.nfe.TipoNotaFiscalPresencaComprador; |
| 53 | import br.com.ec.domain.model.nfe.TipoNotaFiscalStatusRetorno; |
55 | import br.com.ec.domain.model.nfe.TipoNotaFiscalStatusRetorno; |
| - | 56 | import br.com.ec.domain.shared.ConstantesSEC; |
|
| 54 | import br.com.ec.relatorio.util.RelatorioUtils; |
57 | import br.com.ec.relatorio.util.RelatorioUtils; |
| 55 | import br.com.ec.web.util.DataUtil; |
58 | import br.com.ec.web.util.DataUtil; |
| 56 | import nfce.java.TNfeProc; |
- | |
| - | 59 | import nfce.TNfeProc; |
|
| - | 60 | import nfe.util.ConstantesUtil; |
|
| 57 | 61 | ||
| 58 | @Entity |
62 | @Entity |
| 59 | @Table(name="sec_nota_fiscal", schema="sc_sec") |
63 | @Table(name="sec_nota_fiscal", schema="sc_sec") |
| 60 | public class NotaFiscal implements Serializable, Identidade { |
64 | public class NotaFiscal implements Serializable, Identidade { |
| 61 | 65 | ||
| 62 | private static final long serialVersionUID = 1L; |
66 | private static final long serialVersionUID = 1L; |
| 63 | 67 | ||
| 64 | private Long sequencial; |
68 | private Long sequencial; |
| - | 69 | private String codigoNotaFiscal; |
|
| 65 | private String tipoModeloNotaFiscal; |
70 | private String tipoModeloNotaFiscal; |
| 66 | private String serie; |
71 | private String serie; |
| 67 | private Long numeroNotaFiscal; |
72 | private Long numeroNotaFiscal; |
| 68 | private Date dataHoraEmissao; |
73 | private Date dataHoraEmissao; |
| 69 | 74 | ||
| 70 | private String chave; |
75 | private String chave; |
| 71 | 76 | ||
| 72 | private String tipoNotaFiscalNaturezaOperacao; // NOVO |
- | |
| 73 | private String tipoNotaFiscalPresencaComprador; //NOVO |
- | |
| 74 | private String tipoNotaFiscalIntermediario; //NOVO |
- | |
| 75 | private String tipoNotaFiscalDestino; //NOVO |
- | |
| 76 | private Boolean indicadorOperacaoConsumidorFinal; |
- | |
| - | 77 | private String tipoNotaFiscalConsumidorFinal; |
|
| - | 78 | private String tipoNotaFiscalNaturezaOperacao; |
|
| - | 79 | private String tipoNotaFiscalPresencaComprador; |
|
| - | 80 | private String tipoNotaFiscalIntermediario; |
|
| - | 81 | private String tipoNotaFiscalDestino; |
|
| - | 82 | private String tipoNotaFiscalFinalidade; |
|
| 77 | 83 | ||
| 78 | private Venda venda; |
84 | private Venda venda; |
| 79 | private Pessoa pessoaEmitente; |
85 | private Pessoa pessoaEmitente; |
| 80 | private Pessoa pessoaDestinatario; |
86 | private Pessoa pessoaDestinatario; |
| 81 | private String observacaoVenda; |
87 | private String observacaoVenda; |
| Line 90... | Line 96... | ||
| 90 | 96 | ||
| 91 | private String statusRetorno; |
97 | private String statusRetorno; |
| 92 | private String motivoRetorno; |
98 | private String motivoRetorno; |
| 93 | private Date dataHoraEvento; |
99 | private Date dataHoraEvento; |
| 94 | private String textoXmlEvento; |
100 | private String textoXmlEvento; |
| - | 101 | ||
| - | 102 | private String statusRetornoUltimo; |
|
| - | 103 | private String motivoRetornoUltimo; |
|
| - | 104 | private Date dataHoraEventoUltimo; |
|
| - | 105 | private String textoXmlEventoUltimo; |
|
| 95 | 106 | ||
| 96 | private Double valorFrete; |
107 | private Double valorFrete; |
| 97 | private Double valorSeguro; |
108 | private Double valorSeguro; |
| 98 | private Double valorDesconto; |
109 | private Double valorDesconto; |
| 99 | private Double outrasDespesas; |
110 | private Double outrasDespesas; |
| Line 108... | Line 119... | ||
| 108 | private List<VendaFormaPagamento> listaFormaPagamento; |
119 | private List<VendaFormaPagamento> listaFormaPagamento; |
| 109 | 120 | ||
| 110 | private List<NotaFiscalProdutoDTO> listaProdutosVinculadosDTO; |
121 | private List<NotaFiscalProdutoDTO> listaProdutosVinculadosDTO; |
| 111 | 122 | ||
| 112 | private Boolean notaFiscalPendente; |
123 | private Boolean notaFiscalPendente; |
| - | 124 | private String versaoEmissor; |
|
| - | 125 | private String tipoImpressao; |
|
| 113 | 126 | ||
| 114 | public NotaFiscal() {} |
127 | public NotaFiscal() {} |
| 115 | 128 | ||
| 116 | public NotaFiscal(Long sequencial) { |
129 | public NotaFiscal(Long sequencial) { |
| 117 | this.sequencial = sequencial; |
130 | this.sequencial = sequencial; |
| Line 134... | Line 147... | ||
| 134 | public Long getSequencial() { |
147 | public Long getSequencial() { |
| 135 | return sequencial; |
148 | return sequencial; |
| 136 | }
|
149 | }
|
| 137 | public void setSequencial(Long sequencial) { |
150 | public void setSequencial(Long sequencial) { |
| 138 | this.sequencial = sequencial; |
151 | this.sequencial = sequencial; |
| - | 152 | }
|
|
| - | 153 | ||
| - | 154 | @Column(name="cod_notafiscal") |
|
| - | 155 | public String getCodigoNotaFiscal() { |
|
| - | 156 | return codigoNotaFiscal; |
|
| - | 157 | }
|
|
| - | 158 | public void setCodigoNotaFiscal(String codigoNotaFiscal) { |
|
| - | 159 | this.codigoNotaFiscal = codigoNotaFiscal; |
|
| 139 | }
|
160 | }
|
| 140 | 161 | ||
| 141 | @Column(name="dsc_serie") |
162 | @Column(name="dsc_serie") |
| 142 | public String getSerie() { |
163 | public String getSerie() { |
| 143 | return serie; |
164 | return serie; |
| Line 160... | Line 181... | ||
| 160 | }
|
181 | }
|
| 161 | public void setChave(String chave) { |
182 | public void setChave(String chave) { |
| 162 | this.chave = chave; |
183 | this.chave = chave; |
| 163 | }
|
184 | }
|
| 164 | 185 | ||
| 165 | //TODO: ACRESCENTAR NO BANCO DE DADOS (TIPOS)
|
- | |
| - | 186 | @Column(name="tip_consumidorfinal") |
|
| - | 187 | public String getTipoNotaFiscalConsumidorFinal() { |
|
| - | 188 | return tipoNotaFiscalConsumidorFinal; |
|
| - | 189 | }
|
|
| - | 190 | public void setTipoNotaFiscalConsumidorFinal(String tipoNotaFiscalConsumidorFinal) { |
|
| - | 191 | this.tipoNotaFiscalConsumidorFinal = tipoNotaFiscalConsumidorFinal; |
|
| - | 192 | }
|
|
| 166 | @Transient |
193 | @Transient |
| - | 194 | public String descricaoTipoNotaFiscalConsumidorFinal() { |
|
| - | 195 | return VerificadorUtil.naoEstaNuloOuVazio(getTipoNotaFiscalConsumidorFinal())? TipoNotaFiscalConsumidorFinal.parse(getTipoNotaFiscalConsumidorFinal()).getDescricao() : null; |
|
| - | 196 | }
|
|
| - | 197 | ||
| - | 198 | @Column(name="tip_naturezaoperacao") |
|
| 167 | public String getTipoNotaFiscalNaturezaOperacao() { |
199 | public String getTipoNotaFiscalNaturezaOperacao() { |
| 168 | return tipoNotaFiscalNaturezaOperacao; |
200 | return tipoNotaFiscalNaturezaOperacao; |
| 169 | }
|
201 | }
|
| 170 | public void setTipoNotaFiscalNaturezaOperacao(String tipoNotaFiscalNaturezaOperacao) { |
202 | public void setTipoNotaFiscalNaturezaOperacao(String tipoNotaFiscalNaturezaOperacao) { |
| 171 | this.tipoNotaFiscalNaturezaOperacao = tipoNotaFiscalNaturezaOperacao; |
203 | this.tipoNotaFiscalNaturezaOperacao = tipoNotaFiscalNaturezaOperacao; |
| Line 173... | Line 205... | ||
| 173 | @Transient |
205 | @Transient |
| 174 | public String descricaoTipoNotaFiscalNaturezaOperacao() { |
206 | public String descricaoTipoNotaFiscalNaturezaOperacao() { |
| 175 | return VerificadorUtil.naoEstaNuloOuVazio(getTipoNotaFiscalNaturezaOperacao())? TipoNotaFiscalNaturezaOperacao.parse(getTipoNotaFiscalNaturezaOperacao()).getDescricao() : null; |
207 | return VerificadorUtil.naoEstaNuloOuVazio(getTipoNotaFiscalNaturezaOperacao())? TipoNotaFiscalNaturezaOperacao.parse(getTipoNotaFiscalNaturezaOperacao()).getDescricao() : null; |
| 176 | }
|
208 | }
|
| 177 | 209 | ||
| 178 | @Transient |
- | |
| - | 210 | @Column(name="tip_presencacomprador") |
|
| 179 | public String getTipoNotaFiscalPresencaComprador() { |
211 | public String getTipoNotaFiscalPresencaComprador() { |
| 180 | return tipoNotaFiscalPresencaComprador; |
212 | return tipoNotaFiscalPresencaComprador; |
| 181 | }
|
213 | }
|
| 182 | public void setTipoNotaFiscalPresencaComprador(String tipoNotaFiscalPresencaComprador) { |
214 | public void setTipoNotaFiscalPresencaComprador(String tipoNotaFiscalPresencaComprador) { |
| 183 | this.tipoNotaFiscalPresencaComprador = tipoNotaFiscalPresencaComprador; |
215 | this.tipoNotaFiscalPresencaComprador = tipoNotaFiscalPresencaComprador; |
| Line 185... | Line 217... | ||
| 185 | @Transient |
217 | @Transient |
| 186 | public String descricaoTipoNotaFiscalPresencaComprador() { |
218 | public String descricaoTipoNotaFiscalPresencaComprador() { |
| 187 | return VerificadorUtil.naoEstaNuloOuVazio(getTipoNotaFiscalPresencaComprador())? TipoNotaFiscalPresencaComprador.parse(getTipoNotaFiscalPresencaComprador()).getDescricao() : null; |
219 | return VerificadorUtil.naoEstaNuloOuVazio(getTipoNotaFiscalPresencaComprador())? TipoNotaFiscalPresencaComprador.parse(getTipoNotaFiscalPresencaComprador()).getDescricao() : null; |
| 188 | }
|
220 | }
|
| 189 | 221 | ||
| - | 222 | @Column(name="tip_intermediario") |
|
| 190 | public String getTipoNotaFiscalIntermediario() { |
223 | public String getTipoNotaFiscalIntermediario() { |
| 191 | return tipoNotaFiscalIntermediario; |
224 | return tipoNotaFiscalIntermediario; |
| 192 | }
|
225 | }
|
| 193 | public void setTipoNotaFiscalIntermediario(String tipoNotaFiscalIntermediario) { |
226 | public void setTipoNotaFiscalIntermediario(String tipoNotaFiscalIntermediario) { |
| 194 | this.tipoNotaFiscalIntermediario = tipoNotaFiscalIntermediario; |
227 | this.tipoNotaFiscalIntermediario = tipoNotaFiscalIntermediario; |
| Line 196... | Line 229... | ||
| 196 | @Transient |
229 | @Transient |
| 197 | public String descricaoTipoNotaFiscalIntermediario() { |
230 | public String descricaoTipoNotaFiscalIntermediario() { |
| 198 | return VerificadorUtil.naoEstaNuloOuVazio(getTipoNotaFiscalIntermediario())? TipoNotaFiscalIntermediario.parse(getTipoNotaFiscalIntermediario()).getDescricao() : null; |
231 | return VerificadorUtil.naoEstaNuloOuVazio(getTipoNotaFiscalIntermediario())? TipoNotaFiscalIntermediario.parse(getTipoNotaFiscalIntermediario()).getDescricao() : null; |
| 199 | }
|
232 | }
|
| 200 | 233 | ||
| - | 234 | @Column(name="tip_destino") |
|
| 201 | public String getTipoNotaFiscalDestino() { |
235 | public String getTipoNotaFiscalDestino() { |
| 202 | return tipoNotaFiscalDestino; |
236 | return tipoNotaFiscalDestino; |
| 203 | }
|
237 | }
|
| 204 | public void setTipoNotaFiscalDestino(String tipoNotaFiscalDestino) { |
238 | public void setTipoNotaFiscalDestino(String tipoNotaFiscalDestino) { |
| 205 | this.tipoNotaFiscalDestino = tipoNotaFiscalDestino; |
239 | this.tipoNotaFiscalDestino = tipoNotaFiscalDestino; |
| 206 | }
|
240 | }
|
| 207 | @Transient |
241 | @Transient |
| 208 | public String descricaoTipoNotaFiscalDestino() { |
242 | public String descricaoTipoNotaFiscalDestino() { |
| 209 | return VerificadorUtil.naoEstaNuloOuVazio(getTipoNotaFiscalDestino())? TipoNotaFiscalDestino.parse(getTipoNotaFiscalDestino()).getDescricao() : null; |
243 | return VerificadorUtil.naoEstaNuloOuVazio(getTipoNotaFiscalDestino())? TipoNotaFiscalDestino.parse(getTipoNotaFiscalDestino()).getDescricao() : null; |
| - | 244 | }
|
|
| - | 245 | ||
| - | 246 | @Column(name="tip_finalidade") |
|
| - | 247 | public String getTipoNotaFiscalFinalidade() { |
|
| - | 248 | return tipoNotaFiscalFinalidade; |
|
| - | 249 | }
|
|
| - | 250 | public void setTipoNotaFiscalFinalidade(String tipoNotaFiscalFinalidade) { |
|
| - | 251 | this.tipoNotaFiscalFinalidade = tipoNotaFiscalFinalidade; |
|
| - | 252 | }
|
|
| - | 253 | @Transient |
|
| - | 254 | public String descricaoTipoNotaFiscalFinalidade() { |
|
| - | 255 | return VerificadorUtil.naoEstaNuloOuVazio(getTipoNotaFiscalFinalidade())? TipoNotaFiscalFinalidadeOperacao.parse(getTipoNotaFiscalFinalidade()).getDescricao() : null; |
|
| 210 | }
|
256 | }
|
| 211 | 257 | ||
| 212 | @ManyToOne |
258 | @ManyToOne |
| 213 | @ForeignKey(name = "fk_notafiscal_venda") |
259 | @ForeignKey(name = "fk_notafiscal_venda") |
| 214 | @JoinColumn(name="seq_venda", referencedColumnName="seq_venda", insertable=true, updatable=false) |
260 | @JoinColumn(name="seq_venda", referencedColumnName="seq_venda", insertable=true, updatable=false) |
| Line 243... | Line 289... | ||
| 243 | @Size(max = 100, message = "Limite de caracteres ultrapassado: Observação da Venda") |
289 | @Size(max = 100, message = "Limite de caracteres ultrapassado: Observação da Venda") |
| 244 | public String getObservacaoVenda() { |
290 | public String getObservacaoVenda() { |
| 245 | return observacaoVenda; |
291 | return observacaoVenda; |
| 246 | }
|
292 | }
|
| 247 | public void setObservacaoVenda(String observacaoVenda) { |
293 | public void setObservacaoVenda(String observacaoVenda) { |
| 248 | this.observacaoVenda = observacaoVenda; |
- | |
| - | 294 | this.observacaoVenda = StringUtil.setarUpperCaseComTrim(observacaoVenda); |
|
| 249 | }
|
295 | }
|
| 250 | 296 | ||
| 251 | @Column(name="dsc_complementares") |
297 | @Column(name="dsc_complementares") |
| 252 | @Size(max = 1500, message = "Limite de caracteres ultrapassado: Descrição Complementares") |
298 | @Size(max = 1500, message = "Limite de caracteres ultrapassado: Descrição Complementares") |
| 253 | public String getDescricaoComplementares() { |
299 | public String getDescricaoComplementares() { |
| Line 352... | Line 398... | ||
| 352 | public String getTextoXmlEvento() { |
398 | public String getTextoXmlEvento() { |
| 353 | return textoXmlEvento; |
399 | return textoXmlEvento; |
| 354 | }
|
400 | }
|
| 355 | public void setTextoXmlEvento(String textoXmlEvento) { |
401 | public void setTextoXmlEvento(String textoXmlEvento) { |
| 356 | this.textoXmlEvento = textoXmlEvento; |
402 | this.textoXmlEvento = textoXmlEvento; |
| - | 403 | }
|
|
| - | 404 | ||
| - | 405 | @Column(name="dsc_status_retorno_ultimo") |
|
| - | 406 | @Size(max = 100, message = "Limite de caracteres ultrapassado: Status do Retorno (Último)") |
|
| - | 407 | public String getStatusRetornoUltimo() { |
|
| - | 408 | return statusRetornoUltimo; |
|
| - | 409 | }
|
|
| - | 410 | public void setStatusRetornoUltimo(String statusRetornoUltimo) { |
|
| - | 411 | this.statusRetornoUltimo = statusRetornoUltimo; |
|
| - | 412 | }
|
|
| - | 413 | ||
| - | 414 | @Transient |
|
| - | 415 | public String resultadoStatusRetornoUltimo() { |
|
| - | 416 | TipoNotaFiscalStatusRetorno tipoStatus = TipoNotaFiscalStatusRetorno.parse(new Long(getStatusRetornoUltimo())); |
|
| - | 417 | return VerificadorUtil.naoEstaNulo(tipoStatus)? tipoStatus.getDescricao() : getStatusRetornoUltimo(); |
|
| - | 418 | }
|
|
| - | 419 | ||
| - | 420 | @Column(name="dsc_motivo_retorno_ultimo") |
|
| - | 421 | @Size(max = 100, message = "Limite de caracteres ultrapassado: Motivo do Retorno (Último)") |
|
| - | 422 | public String getMotivoRetornoUltimo() { |
|
| - | 423 | return motivoRetornoUltimo; |
|
| - | 424 | }
|
|
| - | 425 | public void setMotivoRetornoUltimo(String motivoRetornoUltimo) { |
|
| - | 426 | this.motivoRetornoUltimo = motivoRetornoUltimo; |
|
| - | 427 | }
|
|
| - | 428 | ||
| - | 429 | @Column(name="dth_evento_ultimo") |
|
| - | 430 | public Date getDataHoraEventoUltimo() { |
|
| - | 431 | return dataHoraEventoUltimo; |
|
| - | 432 | }
|
|
| - | 433 | public void setDataHoraEventoUltimo(Date dataHoraEventoUltimo) { |
|
| - | 434 | this.dataHoraEventoUltimo = dataHoraEventoUltimo; |
|
| - | 435 | }
|
|
| - | 436 | ||
| - | 437 | @Column(name="txt_xml_evento_ultimo") |
|
| - | 438 | public String getTextoXmlEventoUltimo() { |
|
| - | 439 | return textoXmlEventoUltimo; |
|
| - | 440 | }
|
|
| - | 441 | public void setTextoXmlEventoUltimo(String textoXmlEventoUltimo) { |
|
| - | 442 | this.textoXmlEventoUltimo = textoXmlEventoUltimo; |
|
| 357 | }
|
443 | }
|
| 358 | 444 | ||
| 359 | @Column(name="val_frete") |
445 | @Column(name="val_frete") |
| 360 | public Double getValorFrete() { |
446 | public Double getValorFrete() { |
| 361 | return valorFrete; |
447 | return valorFrete; |
| Line 474... | Line 560... | ||
| 474 | public Boolean getNotaFiscalPendente() { |
560 | public Boolean getNotaFiscalPendente() { |
| 475 | return notaFiscalPendente; |
561 | return notaFiscalPendente; |
| 476 | }
|
562 | }
|
| 477 | public void setNotaFiscalPendente(Boolean notaFiscalPendente) { |
563 | public void setNotaFiscalPendente(Boolean notaFiscalPendente) { |
| 478 | this.notaFiscalPendente = notaFiscalPendente; |
564 | this.notaFiscalPendente = notaFiscalPendente; |
| - | 565 | }
|
|
| - | 566 | ||
| - | 567 | @Transient |
|
| - | 568 | public String getVersaoEmissor() { |
|
| - | 569 | return versaoEmissor; |
|
| - | 570 | }
|
|
| - | 571 | public void setVersaoEmissor(String versaoEmissor) { |
|
| - | 572 | this.versaoEmissor = versaoEmissor; |
|
| - | 573 | }
|
|
| - | 574 | ||
| - | 575 | @Transient |
|
| - | 576 | public String getTipoImpressao() { |
|
| - | 577 | return tipoImpressao; |
|
| - | 578 | }
|
|
| - | 579 | public void setTipoImpressao(String tipoImpressao) { |
|
| - | 580 | this.tipoImpressao = tipoImpressao; |
|
| 479 | }
|
581 | }
|
| 480 | 582 | ||
| 481 | @Override |
583 | @Override |
| 482 | public int hashCode() { |
584 | public int hashCode() { |
| 483 | final int prime = 31; |
585 | final int prime = 31; |
| Line 549... | Line 651... | ||
| 549 | }
|
651 | }
|
| 550 | 652 | ||
| 551 | 653 | ||
| 552 | @Transient |
654 | @Transient |
| 553 | public Boolean ehNotaFiscalDeRemessa() { |
655 | public Boolean ehNotaFiscalDeRemessa() { |
| 554 | return VerificadorUtil.naoEstaNulo(getTipoNotaFiscal()) ? getTipoNotaFiscal().equals(TipoNotaFiscal.NFE_REMESSA.getValor()) : false; |
- | |
| - | 656 | return VerificadorUtil.naoEstaNulo(getTipoNotaFiscal()) ? getTipoNotaFiscal().equals(TipoNotaFiscal.NFE_REMESSA_SAIDA.getValor()) : false; |
|
| 555 | }
|
657 | }
|
| 556 | 658 | ||
| 557 | @Transient |
659 | @Transient |
| 558 | public byte[] criarArquivoXml() { |
660 | public byte[] criarArquivoXml() { |
| 559 | ByteArrayInputStream in = null; |
661 | ByteArrayInputStream in = null; |
| Line 705... | Line 807... | ||
| 705 | } catch (JAXBException e) { |
807 | } catch (JAXBException e) { |
| 706 | e.printStackTrace(); |
808 | e.printStackTrace(); |
| 707 | }
|
809 | }
|
| 708 | return null; |
810 | return null; |
| 709 | }
|
811 | }
|
| - | 812 | ||
| - | 813 | @Transient |
|
| - | 814 | public void prepararNotaFiscalConsumidorVenda() { |
|
| - | 815 | this.tipoNotaFiscal = TipoNotaFiscal.NFCE_SAIDA.getValor(); |
|
| - | 816 | this.tipoNotaFiscalNaturezaOperacao = TipoNotaFiscalNaturezaOperacao.VENDA_NFCE_1.getValor(); |
|
| - | 817 | this.tipoModeloNotaFiscal = TipoModeloNotaFiscal.MODELO_NFCE_65.getValor(); |
|
| - | 818 | this.serie = TipoNotaFiscal.NFCE_SAIDA.getSerie(); |
|
| - | 819 | this.tipoNotaFiscalDestino = TipoNotaFiscalDestino.DESTINO_DENTRO_DO_ESTADO_1.getValor(); |
|
| - | 820 | this.versaoEmissor = ConstantesUtil.VERSAO.NFE; |
|
| - | 821 | this.tipoImpressao = ConstantesSEC.NotaFiscal.TipoImpressao.IMPRESSAO_DANFE_NFCE_4; |
|
| - | 822 | this.tipoNotaFiscalConsumidorFinal = TipoNotaFiscalConsumidorFinal.CONSUMIDOR_FINAL_1.getValor(); |
|
| - | 823 | this.tipoNotaFiscalPresencaComprador = TipoNotaFiscalPresencaComprador.OPERACAO_PRESENCIAL_1.getValor(); |
|
| - | 824 | this.tipoNotaFiscalIntermediario = TipoNotaFiscalIntermediario.OPERACAO_SEM_INTERMEDIADOR_0.getValor(); |
|
| - | 825 | this.tipoNotaFiscalFinalidade = TipoNotaFiscalFinalidadeOperacao.NORMAL_1.getValor(); |
|
| - | 826 | //tpNF 0 - Entrada e 1 - Saída
|
|
| - | 827 | }
|
|
| - | 828 | ||
| - | 829 | @Transient |
|
| - | 830 | public void prepararNotaFiscalEletronicaVenda() { |
|
| - | 831 | this.tipoNotaFiscal = TipoNotaFiscal.NFE_SAIDA.getValor(); |
|
| - | 832 | this.tipoNotaFiscalNaturezaOperacao = TipoNotaFiscalNaturezaOperacao.VENDA_NFE_2.getValor(); |
|
| - | 833 | this.tipoModeloNotaFiscal = TipoModeloNotaFiscal.MODELO_NFE_55.getValor(); |
|
| - | 834 | this.serie = TipoNotaFiscal.NFE_SAIDA.getSerie(); |
|
| - | 835 | this.versaoEmissor = ConstantesUtil.VERSAO.NFE; |
|
| - | 836 | this.tipoImpressao = ConstantesSEC.NotaFiscal.TipoImpressao.IMPRESSAO_DANFE_RETRATO_1; |
|
| - | 837 | this.tipoNotaFiscalFinalidade = TipoNotaFiscalFinalidadeOperacao.NORMAL_1.getValor(); |
|
| - | 838 | }
|
|
| - | 839 | ||
| - | 840 | @Transient |
|
| - | 841 | public void prepararNotaFiscalEletronicaRemessa() { |
|
| - | 842 | this.tipoNotaFiscal = TipoNotaFiscal.NFE_REMESSA_SAIDA.getValor(); |
|
| - | 843 | this.tipoNotaFiscalNaturezaOperacao = TipoNotaFiscalNaturezaOperacao.REMESSA_4.getValor(); |
|
| - | 844 | this.tipoModeloNotaFiscal = TipoModeloNotaFiscal.MODELO_NFE_55.getValor(); |
|
| - | 845 | this.serie = TipoNotaFiscal.NFE_REMESSA_SAIDA.getSerie(); |
|
| - | 846 | this.versaoEmissor = ConstantesUtil.VERSAO.NFE; |
|
| - | 847 | this.tipoImpressao = ConstantesSEC.NotaFiscal.TipoImpressao.IMPRESSAO_DANFE_RETRATO_1; |
|
| - | 848 | this.tipoNotaFiscalIntermediario = TipoNotaFiscalIntermediario.OPERACAO_SEM_INTERMEDIADOR_0.getValor(); |
|
| - | 849 | this.tipoNotaFiscalFinalidade = TipoNotaFiscalFinalidadeOperacao.NORMAL_1.getValor(); |
|
| - | 850 | }
|
|
| 710 | 851 | ||
| 711 | }
|
852 | }
|