Subversion Repositories Integrator Subversion

Rev

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

Rev 106 Rev 126
Line 463... Line 463...
463
       
463
       
464
        public void uploadArquivoXml(final FileUploadEvent e) {
464
        public void uploadArquivoXml(final FileUploadEvent e) {
465
        new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
465
        new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
466
                        public void execute() {
466
                        public void execute() {
467
                                NotaFiscal notaFiscal = notaFiscalService.importarXml(e.getFile());
467
                                NotaFiscal notaFiscal = notaFiscalService.importarXml(e.getFile());
-
 
468
                                preencherNotaFiscalImportada(notaFiscal);
-
 
469
                        }
-
 
470
                });
-
 
471
    }
-
 
472
       
-
 
473
        public void importarArquivoXmlImportado() {
-
 
474
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
-
 
475
                        public void execute() {
-
 
476
                                NotaFiscal notaFiscal = notaFiscalService.importarXml(getEntidade().getNotaFiscal().getTextoXml());
-
 
477
                                preencherNotaFiscalImportada(notaFiscal);
-
 
478
                        }
-
 
479
                });
-
 
480
        }
-
 
481
       
-
 
482
        private void preencherNotaFiscalImportada(final NotaFiscal notaFiscal) {
-
 
483
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
-
 
484
                        public void execute() {
468
                                setNotaFiscalImportada(notaFiscal);
485
                                setNotaFiscalImportada(notaFiscal);
469
                                if (VerificadorUtil.estaNulo(getEntidade().getConta())) {
486
                                if (VerificadorUtil.estaNulo(getEntidade().getConta())) {
470
                                        setCadastrarParcelasImportadas(true);
487
                                        setCadastrarParcelasImportadas(true);
471
                                } else {
488
                                } else {
472
                                        setCadastrarParcelasImportadas(false);
489
                                        setCadastrarParcelasImportadas(false);
473
                                }
490
                                }
474
                                adicionandoParametroArgsConfirmandoAcao(true);
491
                                adicionandoParametroArgsConfirmandoAcao(true);
475
                        }
492
                        }
476
                });
493
                });
477
    }
-
 
-
 
494
        }
478
       
495
       
479
        public void confirmarImportacaoXml() {
496
        public void confirmarImportacaoXml() {
480
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
497
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
481
                        public void execute() {
498
                        public void execute() {
482
                                NotaFiscal notaFiscalImportado = notaFiscalService.consultarPelaChaveEeTipo(getNotaFiscalImportada().getChave(), TipoNotaFiscal.NFE_RECEBIDA.getValor());
499
                                NotaFiscal notaFiscalImportado = notaFiscalService.consultarPelaChaveEeTipo(getNotaFiscalImportada().getChave(), TipoNotaFiscal.NFE_RECEBIDA.getValor());