Rev 252 | Rev 305 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 252 | Rev 277 | ||
|---|---|---|---|
| Line 689... | Line 689... | ||
| 689 | if (VerificadorUtil.isListaNulaOuVazia(parametrosVenda.getLancamentosPagamentos()) && VerificadorUtil.estaNuloOuVazio(parametrosVenda.getObservacao())) { |
689 | if (VerificadorUtil.isListaNulaOuVazia(parametrosVenda.getLancamentosPagamentos()) && VerificadorUtil.estaNuloOuVazio(parametrosVenda.getObservacao())) { |
| 690 | throw new NegocioException("Obrigatório informar as observações em vendas sem pagamentos"); |
690 | throw new NegocioException("Obrigatório informar as observações em vendas sem pagamentos"); |
| 691 | }
|
691 | }
|
| 692 | if (VerificadorUtil.estaNulo(parametrosVenda.getLoja())) { |
692 | if (VerificadorUtil.estaNulo(parametrosVenda.getLoja())) { |
| 693 | throw new NegocioException("Informe a loja"); |
693 | throw new NegocioException("Informe a loja"); |
| - | 694 | }
|
|
| - | 695 | for (VendaFormaPagamento vendaFormaPagamento : parametrosVenda.getLancamentosPagamentos()) { |
|
| - | 696 | if (vendaFormaPagamento.getFormaPagamento().formaPagamentoEhCartao()) { |
|
| - | 697 | if (VerificadorUtil.estaNulo(parametrosVenda.getMaquineta())) { |
|
| - | 698 | throw new NegocioException("Informe a maquineta"); |
|
| - | 699 | }
|
|
| - | 700 | }
|
|
| 694 | }
|
701 | }
|
| 695 | }
|
702 | }
|
| 696 | 703 | ||
| 697 | private void lancarExcecaoSeValoresNaoSaoIguais(ParametrosVendaDTO parametrosVenda) { |
704 | private void lancarExcecaoSeValoresNaoSaoIguais(ParametrosVendaDTO parametrosVenda) { |
| 698 | final double TOLERANCE = 0.01; |
705 | final double TOLERANCE = 0.01; |