Subversion Repositories Integrator Subversion

Rev

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

Rev 480 Rev 485
Line 51... Line 51...
51
        private Long sequencialVendaParaVinculo;
51
        private Long sequencialVendaParaVinculo;
52
        private StreamedContent danfeNfePreVisualizacao;
52
        private StreamedContent danfeNfePreVisualizacao;
53
        private StreamedContent danfeNfe;
53
        private StreamedContent danfeNfe;
54
       
54
       
55
        private String codigoProdutoParaVinculoNotaFiscal = "";
55
        private String codigoProdutoParaVinculoNotaFiscal = "";
56
        private Integer quantidadeProdutoParaVinculoNotaFiscal = 0;
-
 
57
        private ProdutoDTO produtoDTOParaVinculoNotaFiscal;
56
        private ProdutoDTO produtoDTOParaVinculoNotaFiscal;
58
        private CompraProdutoDTO compraProdutoDTOParaVinculoNotaFiscal;
57
        private CompraProdutoDTO compraProdutoDTOParaVinculoNotaFiscal;
59
        private List<CompraProdutoDTO> listaCompraProdutoDTOParaVinculoNotaFiscal;
58
        private List<CompraProdutoDTO> listaCompraProdutoDTOParaVinculoNotaFiscal;
60
       
59
       
61
        private String chaveNotaFiscalParaReferenciaNotaFiscal = "";
60
        private String chaveNotaFiscalParaReferenciaNotaFiscal = "";
Line 176... Line 175...
176
        public String getCodigoProdutoParaVinculoNotaFiscal() {
175
        public String getCodigoProdutoParaVinculoNotaFiscal() {
177
                return codigoProdutoParaVinculoNotaFiscal;
176
                return codigoProdutoParaVinculoNotaFiscal;
178
        }
177
        }
179
        public void setCodigoProdutoParaVinculoNotaFiscal(String codigoProdutoParaVinculoNotaFiscal) {
178
        public void setCodigoProdutoParaVinculoNotaFiscal(String codigoProdutoParaVinculoNotaFiscal) {
180
                this.codigoProdutoParaVinculoNotaFiscal = codigoProdutoParaVinculoNotaFiscal;
179
                this.codigoProdutoParaVinculoNotaFiscal = codigoProdutoParaVinculoNotaFiscal;
181
        }
-
 
182
       
-
 
183
        public Integer getQuantidadeProdutoParaVinculoNotaFiscal() {
-
 
184
                return quantidadeProdutoParaVinculoNotaFiscal;
-
 
185
        }
-
 
186
        public void setQuantidadeProdutoParaVinculoNotaFiscal(Integer quantidadeProdutoParaVinculoNotaFiscal) {
-
 
187
                this.quantidadeProdutoParaVinculoNotaFiscal = quantidadeProdutoParaVinculoNotaFiscal;
-
 
188
        }
180
        }
189
       
181
       
190
        public ProdutoDTO getProdutoDTOParaVinculoNotaFiscal() {
182
        public ProdutoDTO getProdutoDTOParaVinculoNotaFiscal() {
191
                return produtoDTOParaVinculoNotaFiscal;
183
                return produtoDTOParaVinculoNotaFiscal;
192
        }
184
        }
Line 351... Line 343...
351
        public void consultarProdutosVinculados() {
343
        public void consultarProdutosVinculados() {
352
                getEntidade().setListaProdutosVinculadosDTO(notaFiscalService.consultarProdutosVinculados(getEntidade().getSequencial()));
344
                getEntidade().setListaProdutosVinculadosDTO(notaFiscalService.consultarProdutosVinculados(getEntidade().getSequencial()));
353
        }
345
        }
354
       
346
       
355
        public void selecionarCompraProdutoParaVinculoNotaFiscal(CompraProdutoDTO compraProdutoDTO) {
347
        public void selecionarCompraProdutoParaVinculoNotaFiscal(CompraProdutoDTO compraProdutoDTO) {
-
 
348
                compraProdutoDTO.setValorProdutoParaVinculoNotaFiscal(compraProdutoDTO.getValorCompra());
356
                setCompraProdutoDTOParaVinculoNotaFiscal(compraProdutoDTO);
349
                setCompraProdutoDTOParaVinculoNotaFiscal(compraProdutoDTO);
357
        }
350
        }
358
       
351
       
359
        public void excluirVinculoNotaFiscalProduto(NotaFiscalProdutoDTO notaFiscalProdutoDTO) {
352
        public void excluirVinculoNotaFiscalProduto(NotaFiscalProdutoDTO notaFiscalProdutoDTO) {
360
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
353
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
Line 374... Line 367...
374
        public void vinculoProdutoNaNotaFiscal() {
367
        public void vinculoProdutoNaNotaFiscal() {
375
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
368
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
376
                        public void execute() {
369
                        public void execute() {
377
                                notaFiscalProdutoService.vinculoProdutoNaNotaFiscal(getEntidade().getSequencial(),
370
                                notaFiscalProdutoService.vinculoProdutoNaNotaFiscal(getEntidade().getSequencial(),
378
                                                getProdutoDTOParaVinculoNotaFiscal().getSequencial(),
371
                                                getProdutoDTOParaVinculoNotaFiscal().getSequencial(),
379
                                                getCompraProdutoDTOParaVinculoNotaFiscal().getSequencial(),
-
 
380
                                                getQuantidadeProdutoParaVinculoNotaFiscal());
-
 
-
 
372
                                                getCompraProdutoDTOParaVinculoNotaFiscal());
381
                                setCodigoProdutoParaVinculoNotaFiscal("");
373
                                setCodigoProdutoParaVinculoNotaFiscal("");
382
                                setProdutoDTOParaVinculoNotaFiscal(null);
374
                                setProdutoDTOParaVinculoNotaFiscal(null);
383
                                setCompraProdutoDTOParaVinculoNotaFiscal(null);
375
                                setCompraProdutoDTOParaVinculoNotaFiscal(null);
384
                                setQuantidadeProdutoParaVinculoNotaFiscal(0);
-
 
385
                                consultarProdutosVinculados();
376
                                consultarProdutosVinculados();
386
                                LancadorMensagem.lancarSucesso("PRODUTO VINCULADO COM SUCESSO");
377
                                LancadorMensagem.lancarSucesso("PRODUTO VINCULADO COM SUCESSO");
387
                        }
378
                        }
388
                });
379
                });
389
        }
380
        }