diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoResumoDiario.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoResumoDiario.java index 580ebbfa8..b4f3b937e 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoResumoDiario.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoResumoDiario.java @@ -61,7 +61,7 @@ public class RelatorioAgenciaFechamentoResumoDiario extends Relatorio { BigDecimal total = BigDecimal.ZERO; BigDecimal vendido = BigDecimal.ZERO; - String puntoVentaId = rset1.getString("codigo"); + String puntoVentaId = rset1.getString("puntoventaId"); Integer qtdevendido = rset1.getInt("qtdevendido"); Integer qtdedigitado = rset1.getInt("qtdedigitado"); @@ -187,8 +187,8 @@ public class RelatorioAgenciaFechamentoResumoDiario extends Relatorio { sql.append(" "); sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID is not null and c.MOTIVOCANCELACION_ID <> 31 THEN ( "); sql.append(" coalesce(c.IMPORTEOUTROS,0) + coalesce(c.IMPORTEPEDAGIO,0) + coalesce(c.IMPORTESEGURO,0) "); - sql.append(" +coalesce(IMPORTETAXAEMBARQUE ,0)+coalesce(c.preciopagado,0)) ELSE NULL END),0) AS devolvido "); - sql.append(" "); + sql.append(" +coalesce(IMPORTETAXAEMBARQUE ,0)+coalesce(c.preciopagado,0)) ELSE NULL END),0) AS devolvido, "); + sql.append(" pv.PUNTOVENTA_ID AS puntoventaId "); sql.append(" "); sql.append(" FROM CAJA c "); sql.append(" INNER JOIN PUNTO_VENTA pv ON c.PUNTOVENTA_ID = pv.PUNTOVENTA_ID "); @@ -203,7 +203,7 @@ public class RelatorioAgenciaFechamentoResumoDiario extends Relatorio { if (empresa != null && !empresa.equals("") && !empresa.equals("-1")) { sql.append(" AND m.empresa_id = "+empresa+" "); } - sql.append(" GROUP BY pv.NUMPUNTOVENTA , pv.nombpuntoventa "); + sql.append(" GROUP BY pv.NUMPUNTOVENTA , pv.nombpuntoventa, pv.puntoventa_id "); sql.append(" ORDER BY pv.NUMPUNTOVENTA , pv.nombpuntoventa "); return sql.toString();