Rev 330 | Rev 596 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 330 | Rev 463 | ||
|---|---|---|---|
| Line 295... | Line 295... | ||
| 295 | }
|
295 | }
|
| 296 | }
|
296 | }
|
| 297 | }
|
297 | }
|
| 298 | if (adicionar) { |
298 | if (adicionar) { |
| 299 | CartaoDTO cartao = new CartaoDTO(); |
299 | CartaoDTO cartao = new CartaoDTO(); |
| 300 | cartao.setBandeira(StringUtil.setarUpperCaseComTrim(dadosSeparados[8])); |
- | |
| - | 300 | cartao.setBandeira(StringUtil.setarUpperCaseComTrim(dadosSeparados[9])); |
|
| 301 | FormaPagamento formaPagamento = null; |
301 | FormaPagamento formaPagamento = null; |
| 302 | String bandeira = StringUtil.setarUpperCaseComTrim(dadosSeparados[5]); |
302 | String bandeira = StringUtil.setarUpperCaseComTrim(dadosSeparados[5]); |
| 303 | String tipoCartao = null; |
303 | String tipoCartao = null; |
| 304 | if (bandeira.equals("DÉBITO") || bandeira.equals("DéBITO")) { |
304 | if (bandeira.equals("DÉBITO") || bandeira.equals("DéBITO")) { |
| 305 | tipoCartao = TipoCartao.DEBITO.getValor(); |
305 | tipoCartao = TipoCartao.DEBITO.getValor(); |
| Line 307... | Line 307... | ||
| 307 | if (cartao.getBandeira().equals("MASTERCARD")) { |
307 | if (cartao.getBandeira().equals("MASTERCARD")) { |
| 308 | cartao.setBandeira("MAESTRO"); |
308 | cartao.setBandeira("MAESTRO"); |
| 309 | }
|
309 | }
|
| 310 | } else { |
310 | } else { |
| 311 | tipoCartao = TipoCartao.CREDITO.getValor(); |
311 | tipoCartao = TipoCartao.CREDITO.getValor(); |
| 312 | String parcelas = dadosSeparados[7]; |
- | |
| - | 312 | String parcelas = dadosSeparados[8]; |
|
| 313 | formaPagamento = new FormaPagamento(FormaPagamento.recuperarCodigoDaFormaDePagamento(parcelas)); |
313 | formaPagamento = new FormaPagamento(FormaPagamento.recuperarCodigoDaFormaDePagamento(parcelas)); |
| 314 | }
|
314 | }
|
| 315 | cartao.setBrutoImportado(new Double(dadosSeparados[3].replace(".", "").replace(",", "."))); |
315 | cartao.setBrutoImportado(new Double(dadosSeparados[3].replace(".", "").replace(",", "."))); |
| 316 | preencherDadosArquivo(dataLinha, cartao, formaPagamento, tipoCartao); |
316 | preencherDadosArquivo(dataLinha, cartao, formaPagamento, tipoCartao); |
| 317 | }
|
317 | }
|