Rev 690 | Rev 704 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 690 | Rev 702 | ||
|---|---|---|---|
| Line 783... | Line 783... | ||
| 783 | }
|
783 | }
|
| 784 | if (VerificadorUtil.estaNulo(parametrosVenda.getLoja())) { |
784 | if (VerificadorUtil.estaNulo(parametrosVenda.getLoja())) { |
| 785 | throw new NegocioException("Informe a loja"); |
785 | throw new NegocioException("Informe a loja"); |
| 786 | }
|
786 | }
|
| 787 | for (VendaFormaPagamento vendaFormaPagamento : parametrosVenda.getLancamentosPagamentos()) { |
787 | for (VendaFormaPagamento vendaFormaPagamento : parametrosVenda.getLancamentosPagamentos()) { |
| 788 | if (vendaFormaPagamento.getFormaPagamento().formaPagamentoEhCartao()) { |
- | |
| - | 788 | if (vendaFormaPagamento.getFormaPagamento().formaPagamentoEhCartao() || |
|
| - | 789 | vendaFormaPagamento.getFormaPagamento().formaPagamentoEhPix()) { |
|
| 789 | if (VerificadorUtil.estaNulo(parametrosVenda.getMaquineta())) { |
790 | if (VerificadorUtil.estaNulo(parametrosVenda.getMaquineta())) { |
| 790 | throw new NegocioException("Informe a maquineta"); |
791 | throw new NegocioException("Informe a maquineta"); |
| 791 | }
|
792 | }
|
| 792 | }
|
793 | }
|
| 793 | }
|
794 | }
|
| Line 884... | Line 885... | ||
| 884 | utilizarCupom(vendaFormaPagamento.getCupom()); |
885 | utilizarCupom(vendaFormaPagamento.getCupom()); |
| 885 | }
|
886 | }
|
| 886 | }
|
887 | }
|
| 887 | 888 | ||
| 888 | private void adicionarMaquineta(VendaFormaPagamento vendaFormaPagamento, ParametrosVendaDTO parametrosVenda, Venda venda) { |
889 | private void adicionarMaquineta(VendaFormaPagamento vendaFormaPagamento, ParametrosVendaDTO parametrosVenda, Venda venda) { |
| 889 | if (vendaFormaPagamento.getFormaPagamento().formaPagamentoEhCartao()) { |
- | |
| - | 890 | if (vendaFormaPagamento.getFormaPagamento().formaPagamentoEhCartao() || |
|
| - | 891 | vendaFormaPagamento.getFormaPagamento().formaPagamentoEhPix()) { |
|
| 890 | if (VerificadorUtil.estaNulo(parametrosVenda.getMaquineta())) { |
892 | if (VerificadorUtil.estaNulo(parametrosVenda.getMaquineta())) { |
| 891 | parametrosVenda.setMaquineta(parametrosVenda.getLoja().getMaquineta()); |
893 | parametrosVenda.setMaquineta(parametrosVenda.getLoja().getMaquineta()); |
| 892 | }
|
894 | }
|
| 893 | venda.setMaquineta(parametrosVenda.getMaquineta()); |
895 | venda.setMaquineta(parametrosVenda.getMaquineta()); |
| 894 | }
|
896 | }
|