Rev 710 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 710 | Rev 727 | ||
|---|---|---|---|
| Line 61... | Line 61... | ||
| 61 | // TODO: 10% capas e pelĂculas e 5% no geral (sem descontos ou cupons)
|
61 | // TODO: 10% capas e pelĂculas e 5% no geral (sem descontos ou cupons)
|
| 62 | Double valorCashback = 0.0; |
62 | Double valorCashback = 0.0; |
| 63 | if (VerificadorUtil.naoEstaNulo(parametrosVendaDTO.getCliente())) { |
63 | if (VerificadorUtil.naoEstaNulo(parametrosVendaDTO.getCliente())) { |
| 64 | if (VerificadorUtil.naoEstaNuloOuVazio(parametrosVendaDTO.getLancamentos())) { |
64 | if (VerificadorUtil.naoEstaNuloOuVazio(parametrosVendaDTO.getLancamentos())) { |
| 65 | for (Lancamento lancamento : parametrosVendaDTO.getLancamentos()) { |
65 | for (Lancamento lancamento : parametrosVendaDTO.getLancamentos()) { |
| 66 | if (VerificadorUtil.naoEstaNulo(lancamento.getValorVenda()) && VerificadorUtil.naoEstaNulo(lancamento.getValorVarejo())) { |
- | |
| 67 | if (VerificadorUtil.estaNulo(lancamento.getCupom()) && lancamento.getValorVenda() >= lancamento.getValorVarejo()) { |
- | |
| 68 | valorCashback = valorCashback + lancamento.getValorVenda()/100 * TipoProduto.parse(lancamento.getProduto().getTipo()).getPercentualCashback(); |
- | |
| 69 | }
|
- | |
| 70 | }
|
- | |
| - | 66 | valorCashback += lancamento.valorCashbackGerado(); |
|
| 71 | }
|
67 | }
|
| 72 | }
|
68 | }
|
| 73 | if (valorCashback > 0.0) { |
69 | if (valorCashback > 0.0) { |
| 74 | Cashback cashback = new Cashback(); |
70 | Cashback cashback = new Cashback(); |
| 75 | cashback.setCliente(parametrosVendaDTO.getCliente()); |
71 | cashback.setCliente(parametrosVendaDTO.getCliente()); |