From 1e28090648f2b533f122dcd626258653518ce97a Mon Sep 17 00:00:00 2001 From: "igor.rodrigo" Date: Thu, 3 Sep 2015 20:50:34 +0000 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20da=20query=20do=20relat?= =?UTF-8?q?=C3=B3rio=20mantis=206555?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@47552 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../impl/RelatorioCancelamentoVendaCartao.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCancelamentoVendaCartao.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCancelamentoVendaCartao.java index f19af83c9..f94c8fb06 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCancelamentoVendaCartao.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCancelamentoVendaCartao.java @@ -23,7 +23,6 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio { public void initDados() throws Exception { Connection conexao = this.relatorio.getConexao(); Map parametros = this.relatorio.getParametros(); - String usuario = (String) parametros.get("USUARIO"); final Integer CARTAO_CREDITO = 2; final Integer CARTAO_DEBITO = 3; String sql = getSql(); @@ -33,9 +32,7 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio { stmt.setTimestamp("data_inicial", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime())); stmt.setTimestamp("data_final", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime())); stmt.setInt("formaPago1", CARTAO_CREDITO); - stmt.setInt("formaPago2", CARTAO_DEBITO); - //FIXME: Retirar valor fixo - stmt.setString("usuario", usuario); + stmt.setInt("formaPago2", CARTAO_DEBITO); ; ResultSet rset = stmt.executeQuery(); @@ -65,15 +62,13 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio { StringBuilder sql = new StringBuilder(); sql.append(" select distinct c.caja_id, p.nombpuntoventa, f.descpago, c.fechorventa, ptovta.numsitef,"); sql.append(" (coalesce(c.preciopagado,0) + coalesce(c.importeoutros,0)+ coalesce(c.importepedagio,0)+ coalesce(c.importeseguro,0) + coalesce(c.importetaxaembarque,0)) as valor_venda,"); - sql.append(" cf.importe as valor_cancelar, u.nombusuario, m.descmotivo, ctj.numautorizacion numautorizacion "); + sql.append(" cf.importe as valor_cancelar, m.descmotivo, ctj.numautorizacion numautorizacion "); sql.append(" from caja c inner join punto_venta p on c.puntoventa_id = p.puntoventa_id "); sql.append(" inner join caja_formapago cf on c.caja_id = cf.caja_id "); sql.append(" inner join forma_pago f on cf.formapago_id = f.formapago_id "); - sql.append(" inner join usuario u on c.usuario_id = u.usuario_id"); sql.append(" inner join ptovta_empresa ptovta on c.puntoventa_id = ptovta.puntoventa_id"); sql.append(" inner join motivo_cancelacion m "); sql.append(" on c.motivocancelacion_id = m.motivocancelacion_id "); - sql.append(" and u.usuario_id = :usuario "); if(parametros.get("EMPRESA_ID") != null){ sql.append(" inner join empresa e on p.empresa_id = e.empresa_id and p.empresa_id = " + parametros.get("EMPRESA_ID") ); }