diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoAntigo.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoAntigo.java index 86db92f45..74922b1c3 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoAntigo.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoAntigo.java @@ -176,7 +176,7 @@ public class RelatorioAgenciaFechamentoAntigo extends Relatorio { StringBuilder sql = new StringBuilder(); sql.append(" SELECT "); - sql.append(" pv.NUMPUNTOVENTA AS codigo, "); + sql.append(" pv.PUNTOVENTA_ID AS codigo, "); sql.append(" pv.nombpuntoventa AS descricao, "); sql.append(" "); sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID IS NULL and (c.INDREMOTOINVERSO is null or c.INDREMOTOINVERSO =0) THEN c.caja_id ELSE NULL END),0) AS qtdevendido, "); @@ -214,8 +214,8 @@ public class RelatorioAgenciaFechamentoAntigo extends Relatorio { sql.append(" AND c.TIPOVENTA_ID <> 6 "); sql.append(" AND c.INDREIMPRESION = 0 "); sql.append(" AND m.empresa_id = :empresaId "); - sql.append(" GROUP BY pv.NUMPUNTOVENTA , pv.nombpuntoventa "); - sql.append(" ORDER BY pv.NUMPUNTOVENTA , pv.nombpuntoventa "); + sql.append(" GROUP BY pv.PUNTOVENTA_ID , pv.nombpuntoventa "); + sql.append(" ORDER BY pv.PUNTOVENTA_ID , pv.nombpuntoventa "); return sql.toString(); diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoResumoDiario.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoResumoDiario.java new file mode 100644 index 000000000..f6c4a7c06 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoResumoDiario.java @@ -0,0 +1,272 @@ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.math.BigDecimal; +import java.sql.Connection; +import java.sql.ResultSet; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +import org.apache.commons.lang.math.NumberUtils; + +import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioAgenciaFechamentoAntigoBean; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioAgenciaFechamentoBean; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +public class RelatorioAgenciaFechamentoResumoDiario extends Relatorio { + + private List lsDadosRelatorio; + + public RelatorioAgenciaFechamentoResumoDiario(Map parametros, Connection conexao) throws Exception { + super(parametros, conexao); + + this.setCustomDataSource(new DataSource(this) { + @Override + public void initDados() throws Exception { + + Connection conexao = this.relatorio.getConexao(); + + Map parametros = this.relatorio.getParametros(); + + String fecInicio = parametros.get("fecInicio").toString() + " 00:00:00"; + String fecFinal = parametros.get("fecFinal").toString() + " 23:59:59"; + String empresa = parametros.get("empresa") != null ? parametros.get("empresa").toString() : ""; + String empresaNome = parametros.get("empresaNome") != null ? parametros.get("empresaNome").toString() : ""; + String puntoVenta = parametros.get("NUMPUNTOVENTA") != null ? parametros.get("NUMPUNTOVENTA").toString() : null; + + lsDadosRelatorio = new ArrayList(); + + String sql = carregarDadosTotaisdeVenda(puntoVenta); + + System.out.println(sql); + + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql); + ResultSet rset1 = null; + ResultSet rset2 = null; + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss"); + + stmt.setTimestamp("de", new java.sql.Timestamp(sdf.parse(fecInicio).getTime())); + stmt.setTimestamp("ate", new java.sql.Timestamp(sdf.parse(fecFinal).getTime())); + + if (empresa != null && !empresa.equals("")) { + stmt.setInt("empresaId", Integer.parseInt(empresa)); + } + + rset1= stmt.executeQuery(); + + while (rset1.next()) { + + RelatorioAgenciaFechamentoAntigoBean agenciaFechamento = new RelatorioAgenciaFechamentoAntigoBean(); + BigDecimal total = BigDecimal.ZERO; + BigDecimal vendido = BigDecimal.ZERO; + + String puntoVentaId = rset1.getString("codigo"); + + Integer qtdevendido = rset1.getInt("qtdevendido"); + Integer qtdedigitado = rset1.getInt("qtdedigitado"); + Integer qtdeAnulado = rset1.getInt("qtdeAnulado"); + Integer qtdeDevolvido = rset1.getInt("qtdeDevolvido"); + Integer qtdeTotal = null; + + vendido = rset1.getBigDecimal("vendido"); + BigDecimal digitado = rset1.getBigDecimal("digitado"); + BigDecimal anulado = rset1.getBigDecimal("anulado"); + BigDecimal devolvido = rset1.getBigDecimal("devolvido"); + + agenciaFechamento.setEmpresa(empresaNome); + + agenciaFechamento.setCodigo(rset1.getString("codigo")); + agenciaFechamento.setDescricao(rset1.getString("descricao")); + + agenciaFechamento.setQtdeVendido(qtdevendido != null ? qtdevendido : NumberUtils.INTEGER_ZERO); + agenciaFechamento.setQtdeDigitado(qtdedigitado != null ? qtdedigitado : NumberUtils.INTEGER_ZERO); + agenciaFechamento.setQtdeAnulado(qtdeAnulado != null ? qtdeAnulado : NumberUtils.INTEGER_ZERO); + agenciaFechamento.setQtdeDevolvido(qtdeDevolvido != null ? qtdeDevolvido : NumberUtils.INTEGER_ZERO); + + qtdeTotal = ((qtdevendido != null ? qtdevendido : NumberUtils.INTEGER_ZERO) + (qtdedigitado != null ? qtdedigitado : NumberUtils.INTEGER_ZERO)) + - ((qtdeAnulado != null ? qtdeAnulado : NumberUtils.INTEGER_ZERO) + (qtdeDevolvido != null ? qtdeDevolvido : NumberUtils.INTEGER_ZERO)); + + if (qtdeTotal < 0) { + qtdeTotal = NumberUtils.INTEGER_ZERO; + } + + agenciaFechamento.setQtdeTotal(qtdeTotal); + + agenciaFechamento.setDigitado(digitado != null ? digitado : BigDecimal.ZERO); + agenciaFechamento.setAnulado(anulado != null ? anulado : BigDecimal.ZERO); + agenciaFechamento.setDevolvido(devolvido != null ? devolvido : BigDecimal.ZERO); + + total = total.add(vendido != null ? vendido : BigDecimal.ZERO); + total = total.add(digitado != null ? digitado : BigDecimal.ZERO); + total = total.subtract(anulado != null ? anulado : BigDecimal.ZERO); + total = total.subtract(devolvido != null ? devolvido : BigDecimal.ZERO); + + stmt = new NamedParameterStatement(conexao, carregarDadosReceitaDespesa(puntoVentaId)); + + System.out.println(carregarDadosReceitaDespesa(puntoVentaId)); + + stmt.setTimestamp("de", new java.sql.Timestamp(sdf.parse(fecInicio).getTime())); + stmt.setTimestamp("ate", new java.sql.Timestamp(sdf.parse(fecFinal).getTime())); + + if (empresa != null && !empresa.equals("")) { + stmt.setInt("empresaId", Integer.parseInt(empresa)); + } + + if (puntoVentaId != null ) { + stmt.setString("puntoVentaId", puntoVentaId); + } + + rset2 = stmt.executeQuery(); + + if (rset2.next()) { + + Integer qtdedespesa = rset2.getInt("qtdedespesa"); + BigDecimal receita = rset2.getBigDecimal("receita"); + BigDecimal despesa = rset2.getBigDecimal("despesa"); + + agenciaFechamento.setQtdeDespesa(qtdedespesa != null ? qtdedespesa : NumberUtils.INTEGER_ZERO); + agenciaFechamento.setReceita(receita != null ? receita : BigDecimal.ZERO); + agenciaFechamento.setDespesa(despesa != null ? despesa : BigDecimal.ZERO); + + total = total.add(receita != null ? receita : BigDecimal.ZERO); + total = total.subtract(despesa != null ? despesa : BigDecimal.ZERO); + + agenciaFechamento.setVendido(vendido != null ? vendido : BigDecimal.ZERO); + agenciaFechamento.setTotal(total); + + } else { + agenciaFechamento.setQtdeDespesa(NumberUtils.INTEGER_ZERO); + agenciaFechamento.setReceita(BigDecimal.ZERO); + agenciaFechamento.setDespesa(BigDecimal.ZERO); + agenciaFechamento.setVendido(vendido != null ? vendido : BigDecimal.ZERO); + agenciaFechamento.setTotal(total); + } + + lsDadosRelatorio.add(agenciaFechamento); + //Estava dando um erro de "máximo de cursores abertos excedido" + //Colocado isso o erro parou de ocorrer + rset2.getStatement().close(); + rset2.close(); + } + + if (lsDadosRelatorio.size() > 0) { + + setLsDadosRelatorio(lsDadosRelatorio); + } + + } + }); + } + + public void setLsDadosRelatorio(List lsDadosRelatorio) { + this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio)); + this.lsDadosRelatorio = lsDadosRelatorio; + } + + @Override + protected void processaParametros() throws Exception { + } + + private String carregarDadosTotaisdeVenda(String puntoVenta) { + + StringBuilder sql = new StringBuilder(); + sql.append(" SELECT "); + sql.append(" pv.NUMPUNTOVENTA AS codigo, "); + sql.append(" pv.nombpuntoventa AS descricao, "); + sql.append(" "); + sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID IS NULL and (c.INDREMOTOINVERSO is null or c.INDREMOTOINVERSO =0) THEN c.caja_id ELSE NULL END),0) AS qtdevendido, "); + sql.append(" "); + sql.append(" COALESCE(COUNT(CASE WHEN c.INDREMOTOINVERSO = 1 THEN 1 ELSE NULL END),0) AS qtdedigitado, "); + sql.append(" "); + sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID = 31 THEN 1 ELSE NULL END),0) AS qtdeAnulado, "); + sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID is not null and c.MOTIVOCANCELACION_ID <> 31 THEN 1 ELSE NULL END),0) AS qtdeDevolvido, "); + sql.append(" "); + sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID IS NULL and (c.INDREMOTOINVERSO is null or c.INDREMOTOINVERSO =0) 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 vendido, "); + sql.append(" "); + sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID IS NULL and c.INDREMOTOINVERSO = 1 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 digitado, "); + sql.append(" "); + sql.append(" COALESCE(SUM(CASE WHEN 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 anulado, "); + 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(" "); + sql.append(" FROM CAJA c "); + sql.append(" INNER JOIN PUNTO_VENTA pv ON c.PUNTOVENTA_ID = pv.PUNTOVENTA_ID "); + sql.append(" inner join marca m on m.marca_id = c.marca_id "); + sql.append(" WHERE c.TURNO_ID IS NOT NULL "); + sql.append(" AND c.FECCORTE BETWEEN :de AND :ate "); + if (puntoVenta != null && !puntoVenta.equals("-1")) { + sql.append(" AND c.PUNTOVENTA_ID in (" + puntoVenta + ") "); + } + sql.append(" AND c.TIPOVENTA_ID <> 6 "); + sql.append(" AND c.INDREIMPRESION = 0 "); + sql.append(" AND m.empresa_id = :empresaId "); + sql.append(" GROUP BY pv.NUMPUNTOVENTA , pv.nombpuntoventa "); + sql.append(" ORDER BY pv.NUMPUNTOVENTA , pv.nombpuntoventa "); + + return sql.toString(); + + } + + private String carregaAgenciasComVenda() { + + StringBuilder sql = new StringBuilder(); + sql.append(" SELECT DISTINCT cc.PUNTOVENTA_ID "); + sql.append(" FROM CONTA_CORRENTE_PTOVTA cc "); + sql.append(" WHERE cc.FECHOROPERACION BETWEEN :de AND :ate "); + sql.append(" and cc.EMPRESA_ID = :empresaId "); + + return sql.toString(); + + } + + private String carregarDadosReceitaDespesa(String puntoVenta) { + + StringBuilder sql = new StringBuilder(); + sql.append(" SELECT "); + sql.append(" COALESCE(COUNT(CASE WHEN cdp.IMPORTE < 0 THEN 1 ELSE NULL END),0) as qtdedespesa, "); + sql.append(" COALESCE(SUM(CASE WHEN cdp.IMPORTE > 0 THEN cdp.IMPORTE ELSE NULL END),0) AS receita, "); + sql.append(" COALESCE(ABS(SUM(CASE WHEN cdp.IMPORTE < 0 THEN cdp.IMPORTE ELSE NULL END)),0) AS despesa "); + sql.append(" FROM CAJA_DIVERSOS cd, "); + sql.append(" CAJA_DIVERSOS_PAGO cdp, "); + sql.append(" EVENTO_EXTRA ee "); + sql.append(" WHERE cd.MOTIVOCANCELACION_ID IS NULL "); + sql.append(" AND ee.EVENTOEXTRA_ID = cd.EVENTOEXTRA_ID "); + sql.append(" AND cdp.CAJADIVERSOS_ID = cd.CAJADIVERSOS_ID "); + sql.append(" AND ee.activo = 1 "); + sql.append(" AND cd.TURNO_ID IS NOT NULL "); + sql.append(" AND cd.FECCORTE BETWEEN :de AND :ate "); + if (puntoVenta != null && !puntoVenta.equals("-1")) { + sql.append(" AND cd.PUNTOVENTA_ID = :puntoVentaId "); + } + sql.append(" AND ee.EMPRESA_ID=:empresaId "); + + return sql.toString(); + + } + + private String carregarNomeEmpresa() { + + StringBuilder sql = new StringBuilder(); + sql.append(" SELECT "); + sql.append(" NOMBEMPRESA "); + sql.append(" FROM EMPRESA "); + sql.append(" WHERE EMPRESA_ID=:empresaId "); + + return sql.toString(); + + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamentoResumoDiario_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamentoResumoDiario_es.properties new file mode 100644 index 000000000..d57b22ac6 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamentoResumoDiario_es.properties @@ -0,0 +1,23 @@ +#geral +msg.noData=No se pudo obtener datos con los parámetros reportados. +msg.a=a + +#Labels header +header.data=Data : +header.empresa=Empresa : +header.codigo=Código +header.descricao=Descrição +header.vendido=Vendido +header.digitado=Digitado +header.anulado=Anulados +header.devolvido=Devolvidos +header.receita=Receita +header.despesa=Despesa +header.total=Total + +detail.agencia=AGÊNCIA +detail.quantidade=QUANTIDADE +detail.valor=VALOR +detail.totalGeral=TOTAL GERAL + +linhas=Linhas \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamentoResumoDiario_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamentoResumoDiario_pt_BR.properties new file mode 100644 index 000000000..3aa97e55b --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamentoResumoDiario_pt_BR.properties @@ -0,0 +1,23 @@ +#geral +msg.noData=No se pudo obtener datos con los parámetros reportados. +msg.a=a + +#Labels header +header.data=Data : +header.empresa=Empresa : +header.codigo=Código +header.descricao=Descrição +header.vendido=Vendido +header.digitado=Digitado +header.anulado=Anulados +header.devolvido=Devolvidos +header.receita=Receita +header.despesa=Despesa +header.total=Total + +detail.agencia=AGÊNCIA +detail.quantidade=QUANTIDADE +detail.valor=VALOR +detail.totalGeral=TOTAL GERAL + +linhas=Linhas \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoAntigo.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoAntigo.jasper index 7db4b896c..9334d9a35 100644 Binary files a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoAntigo.jasper and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoAntigo.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoAntigo.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoAntigo.jrxml index fc1044747..ec964c188 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoAntigo.jrxml +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoAntigo.jrxml @@ -1,12 +1,8 @@ - - - - - - + + @@ -76,80 +72,76 @@ - + - - + - + - - + - - + - - + - + - + - + - + - + - + - + - + @@ -160,220 +152,220 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -384,49 +376,49 @@ - + - + - + - + - + - + - + @@ -434,52 +426,52 @@ - + - + - + - + - + - + - + - + @@ -490,8 +482,7 @@ - - + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoResumoDiario.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoResumoDiario.jasper new file mode 100644 index 000000000..7db4b896c Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoResumoDiario.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoResumoDiario.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoResumoDiario.jrxml new file mode 100644 index 000000000..fc1044747 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamentoResumoDiario.jrxml @@ -0,0 +1,499 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioAgenciaFechamentoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioAgenciaFechamentoController.java index 826e16ebc..7cd1a821e 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioAgenciaFechamentoController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioAgenciaFechamentoController.java @@ -26,6 +26,7 @@ import com.rjconsultores.ventaboletos.entidad.Empresa; import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioAgenciaFechamento; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioAgenciaFechamentoAntigo; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioAgenciaFechamentoResumoDiario; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; @@ -61,6 +62,7 @@ public class RelatorioAgenciaFechamentoController extends MyGenericForwardCompos private Radio radLayoutNovo; private Radio radLayoutAntigo; + private Radio radLayoutResumoDiario; private List lsEmpresas; @@ -99,17 +101,17 @@ public class RelatorioAgenciaFechamentoController extends MyGenericForwardCompos } Relatorio relatorio; Map args = new HashMap(); - if (radLayoutNovo.isChecked()) { - booleanLayout = true; - } - if(booleanLayout) { + if (radLayoutNovo.isChecked()) { relatorio = new RelatorioAgenciaFechamento(parametros, dataSourceRead.getConnection()); args.put("relatorio", relatorio); - }else { + }else if (radLayoutAntigo.isChecked()){ relatorio = new RelatorioAgenciaFechamentoAntigo(parametros, dataSourceRead.getConnection()); args.put("relatorio", relatorio); + } else { + relatorio = new RelatorioAgenciaFechamentoResumoDiario(parametros, dataSourceRead.getConnection()); + args.put("relatorio", relatorio); } openWindow("/component/reportView.zul", @@ -205,5 +207,11 @@ public class RelatorioAgenciaFechamentoController extends MyGenericForwardCompos this.radLayoutAntigo = radLayoutAntigo; } - + public Radio getRadLayoutResumoDiario() { + return radLayoutResumoDiario; + } + + public void setRadLayoutResumoDiario(Radio radLayoutResumoDiario) { + this.radLayoutResumoDiario = radLayoutResumoDiario; + } } diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index ff5757e06..0bc62d86f 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -696,6 +696,7 @@ relatorioVendasBilheteiroController.lbBilheteiro.value = Agente de Pasajes relatorioVendasBilheteiroController.lbLayout.value = Layout relatorioVendasBilheteiroController.lbLayoutNovo.value = Novo relatorioVendasBilheteiroController.lbLayoutAntigo.value = Antigo +relatorioVendasBilheteiroController.lbLayoutResumoDiario.value = Resumo Diário #Relatório de Vendas por bilheteiro Sintético relatorioVendasBilheteiroSinteticoController.window.title = Reporte de ventas por agentes sintético diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index 4c314a611..23dd48cc6 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -736,6 +736,7 @@ relatorioVendasBilheteiroController.lbBilheteiro.value = Bilheteiro relatorioVendasBilheteiroController.lbLayout.value = Layout relatorioVendasBilheteiroController.lbLayoutNovo.value = Novo relatorioVendasBilheteiroController.lbLayoutAntigo.value = Antigo +relatorioVendasBilheteiroController.lbLayoutResumoDiario.value = Resumo Diário #Relatório de Vendas por bilheteiro Sintético relatorioVendasBilheteiroSinteticoController.window.title = Relatório de Vendas por Bilheteiro Sintético diff --git a/web/gui/relatorios/filtroRelatorioAgenciaFechamento.zul b/web/gui/relatorios/filtroRelatorioAgenciaFechamento.zul index 2b919414f..775124ecb 100644 --- a/web/gui/relatorios/filtroRelatorioAgenciaFechamento.zul +++ b/web/gui/relatorios/filtroRelatorioAgenciaFechamento.zul @@ -7,7 +7,7 @@ @@ -82,6 +82,7 @@ +