Subversion Repositories Integrator Subversion

Rev

Rev 470 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 470 Rev 545
Line 544... Line 544...
544
       
544
       
545
        public void gerarNotaFiscalRemessa(final Transferencia transferencia) {
545
        public void gerarNotaFiscalRemessa(final Transferencia transferencia) {
546
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
546
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
547
                        public void execute() {
547
                        public void execute() {
548
                                if (sePermitidoEnvio(transferencia)) {
548
                                if (sePermitidoEnvio(transferencia)) {
549
                                        String numeroNota = "" + notaFiscalService.consultarProximoNumeroNotaFiscal(TipoNotaFiscal.NFE_REMESSA.getValor(), transferencia.getLojaSaida().getPessoaJuridica());
-
 
-
 
549
                                        String numeroNota = "" + notaFiscalService.consultarProximoNumeroNotaFiscal(TipoNotaFiscal.NFE_REMESSA_SAIDA.getValor(), transferencia.getLojaSaida().getPessoaJuridica());
550
                                        NotaFiscal notaFiscal = new NotaFiscal();
550
                                        NotaFiscal notaFiscal = new NotaFiscal();
551
                                        notaFiscal.setNumeroNotaFiscal(new Long(numeroNota));
551
                                        notaFiscal.setNumeroNotaFiscal(new Long(numeroNota));
552
                                        notaFiscal.setTipoModeloNotaFiscal(TipoModeloNotaFiscal.MODELO_NFE_55.getValor());
552
                                        notaFiscal.setTipoModeloNotaFiscal(TipoModeloNotaFiscal.MODELO_NFE_55.getValor());
553
                                        notaFiscal.setTipoNotaFiscal(TipoNotaFiscal.NFE_REMESSA.getValor());
-
 
554
                                        notaFiscal.setSerie(TipoNotaFiscal.NFE_REMESSA.getSerie());
-
 
-
 
553
                                        notaFiscal.setTipoNotaFiscal(TipoNotaFiscal.NFE_REMESSA_SAIDA.getValor());
-
 
554
                                        notaFiscal.setSerie(TipoNotaFiscal.NFE_REMESSA_SAIDA.getSerie());
555
                                        notaFiscal.setDataHoraEmissao(DataUtils.getDataAtual());
555
                                        notaFiscal.setDataHoraEmissao(DataUtils.getDataAtual());
556
                                        notaFiscal.setPessoaEmitente(transferencia.getLojaSaida().getPessoaJuridica());
556
                                        notaFiscal.setPessoaEmitente(transferencia.getLojaSaida().getPessoaJuridica());
557
                                        notaFiscal.setPessoaDestinatario(transferencia.getLojaEntrada().getPessoaJuridica());
557
                                        notaFiscal.setPessoaDestinatario(transferencia.getLojaEntrada().getPessoaJuridica());
558
                                        notaFiscalService.cadastrar(notaFiscal);
558
                                        notaFiscalService.cadastrar(notaFiscal);
559
                                       
559