diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCancelamentoAutomaticoECF.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCancelamentoAutomaticoECF.java new file mode 100644 index 000000000..0b77706c9 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCancelamentoAutomaticoECF.java @@ -0,0 +1,152 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +/** + * @author Bruno Neves + * + */ +public class RelatorioCancelamentoAutomaticoECF extends Relatorio { + + + public RelatorioCancelamentoAutomaticoECF(Map parametros, Connection conexao) throws Exception { + super(parametros, conexao); + + this.setCustomDataSource(new ArrayDataSource(this) { + @Override + public void initDados() throws Exception { + + Connection conexao = this.relatorio.getConexao(); + Map parametros = this.relatorio.getParametros(); + + StringBuilder sql = new StringBuilder(); + + sql.append(" SELECT c.CORRIDA_ID AS Servico , "); + sql.append(" c.RUTA_ID AS Linhas, "); + sql.append(" c.PUNTOVENTA_ID AS agencia , "); + sql.append(" pOrigem.DESCPARADA AS origem, "); + sql.append(" pDestino.DESCPARADA AS destino, "); + sql.append(" c.NUMASIENTO AS poltronas, "); + sql.append(" c.NUMFOLIOSISTEMA AS passagem, "); + sql.append(" cs.DESCCLASE AS classe, "); + sql.append(" c.USUARIO_ID AS bilheteiro, "); + sql.append(" c.FECHORVENTA AS dataVenda, "); + sql.append(" c.PRECIOPAGADO AS tarifa, "); + sql.append(" c.IMPORTETAXAEMBARQUE AS taxa, "); + sql.append(" c.IMPORTEPEDAGIO AS pedagio, "); + sql.append(" c.IMPORTESEGURO AS seguro, "); + sql.append(" c.FECHORVIAJE AS dataEmbarque, "); + sql.append(" c.NUMFOLIOPREIMPRESO AS preImpresso, "); + sql.append(" fr4.NUMSERIE20 AS impressora, "); + sql.append(" e.NOMBEMPRESA AS empresa, "); + sql.append(" fp.DESCPAGO AS formaPagamento, "); + sql.append(" ROUND((100 * cfp.importe) / (coalesce(c.preciopagado,0)+coalesce(c.importetaxaembarque,0)+coalesce(c.importeseguro,0)+coalesce(c.importepedagio,0)+coalesce(c.importeoutros,0)),2) as porcentagem , "); + sql.append(" ct.NSU AS nsu, "); + sql.append(" ct.NUMAUTORIZACION AS autorizacao "); + sql.append(" FROM FISCAL_R4 fr4 "); + sql.append(" INNER JOIN caja c "); + sql.append(" ON c.CAJA_ID = fr4.CAJA_ID "); + sql.append(" INNER JOIN parada pOrigem "); + sql.append(" ON pOrigem.PARADA_ID = c.ORIGEN_ID "); + sql.append(" INNER JOIN parada pDestino "); + sql.append(" ON pDestino.PARADA_ID = c.DESTINO_ID "); + sql.append(" INNER JOIN CLASE_SERVICIO cs "); + sql.append(" ON cs.CLASESERVICIO_ID = c.CLASESERVICIO_ID "); + sql.append(" INNER JOIN EMPRESA e "); + sql.append(" ON e.EMPRESA_ID = c.EMPRESACORRIDA_ID "); + sql.append(" INNER JOIN CAJA_FORMAPAGO cfp "); + sql.append(" ON cfp.CAJA_ID = c.CAJA_ID "); + sql.append(" INNER JOIN FORMA_PAGO fp "); + sql.append(" ON fp.FORMAPAGO_ID = cfp.FORMAPAGO_ID "); + sql.append(" INNER JOIN CAJA_DET_PAGO cdp "); + sql.append(" ON cdp.CAJAFORMAPAGO_ID = cfp.CAJAFORMAPAGO_ID "); + sql.append(" INNER JOIN CAJA_TARJETA ct "); + sql.append(" ON ct.CAJADETPAGO_ID = cdp.CAJADETPAGO_ID "); + sql.append(" WHERE fr4.INDCANCELAMENTO = 'S' "); + //sql.append(" and to_date(fr4.DATAMOV,'yyyyMMdd') between to_date(:DATA_INICIAL,'dd/MM/yyyy') and to_date(:DATA_FINAL,'dd/MM/yyyy')"); + sql.append(" and to_date(fr4.DATAMOV,'yyyyMMdd') >= :DATA_INICIAL "); + sql.append(" and to_date(fr4.DATAMOV,'yyyyMMdd') <= :DATA_FINAL "); + + if(parametros.get("EMPRESA_ID") != null){ + sql.append(" and c.EMPRESAPUNTOVENTA_ID = :EMPRESA_ID"); + } + + if (parametros.get("NUMPUNTOVENTA") != null) { + sql.append(" and c.puntoventa_id IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")"); + } + + sql.append(" order by fr4.CAJA_ID, cfp.CAJAFORMAPAGO_ID "); + + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString()); + if(parametros.get("EMPRESA_ID") != null){ + stmt.setInt("EMPRESA_ID", Integer.valueOf(parametros.get("EMPRESA_ID").toString())); + } + + 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())); + + if(parametros.get("TIPOPUNTOVENTA_ID") != null && !parametros.get("TIPOPUNTOVENTA_ID").toString().equals("-1") ){ + stmt.setInt("TIPOPUNTOVENTA_ID", Integer.valueOf(parametros.get("TIPOPUNTOVENTA_ID").toString())); + } + + ResultSet rset = stmt.executeQuery(); + + while (rset.next()) { + + Map dataResult = new HashMap(); + + dataResult.put("servico", rset.getString("servico")); + dataResult.put("linhas", rset.getString("linhas")); + dataResult.put("agencia", rset.getString("agencia")); + dataResult.put("origem", rset.getString("origem")); + dataResult.put("destino", rset.getString("destino")); + dataResult.put("poltronas", rset.getString("poltronas")); + dataResult.put("passagem", rset.getString("passagem")); + dataResult.put("classe", rset.getString("classe")); + dataResult.put("bilheteiro", rset.getString("bilheteiro")); + dataResult.put("dataVenda", rset.getString("dataVenda")); + dataResult.put("tarifa", rset.getString("tarifa")); + dataResult.put("taxa", rset.getString("taxa")); + dataResult.put("pedagio", rset.getString("pedagio")); + dataResult.put("seguro", rset.getString("seguro")); + dataResult.put("dataEmbarque", rset.getString("dataEmbarque")); + dataResult.put("preImpresso", rset.getString("preImpresso")); + dataResult.put("impressora", rset.getString("impressora")); + dataResult.put("empresa", rset.getString("empresa")); + dataResult.put("formaPagamento", rset.getString("formaPagamento")); + dataResult.put("porcentagem", rset.getString("porcentagem")); + dataResult.put("nsu", rset.getString("nsu")); + dataResult.put("autorizacao", rset.getString("autorizacao")); + this.dados.add(dataResult); + + } + + this.resultSet = rset; + } + }); + } + + /* + * (non-Javadoc) + * + * @see com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio#processaParametros() + */ + @Override + protected void processaParametros() throws Exception { + + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCancelamentoAutomaticoECF_es_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCancelamentoAutomaticoECF_es_BR.properties new file mode 100644 index 000000000..c36856c15 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCancelamentoAutomaticoECF_es_BR.properties @@ -0,0 +1,24 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.relatorio=Relatório: +cabecalho.periodo=Período: +cabecalho.periodoA=à +cabecalho.dataHora=Data/Hora: +cabecalho.impressorPor=Impressor por: +cabecalho.pagina=Página +cabecalho.de=de +cabecalho.filtros=Filtros: + +#Labels header +label.aidf=AIDF +label.empresa=Empresa +label.agencia=Agência +label.serie=Série +label.bilhete=Bilhetes +label.numeracao=Numeração +label.subserie=Subserie +label.formInicio=F. Inicio +label.formFim=F. Fim + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCancelamentoAutomaticoECF_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCancelamentoAutomaticoECF_pt_BR.properties new file mode 100644 index 000000000..c36856c15 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCancelamentoAutomaticoECF_pt_BR.properties @@ -0,0 +1,24 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.relatorio=Relatório: +cabecalho.periodo=Período: +cabecalho.periodoA=à +cabecalho.dataHora=Data/Hora: +cabecalho.impressorPor=Impressor por: +cabecalho.pagina=Página +cabecalho.de=de +cabecalho.filtros=Filtros: + +#Labels header +label.aidf=AIDF +label.empresa=Empresa +label.agencia=Agência +label.serie=Série +label.bilhete=Bilhetes +label.numeracao=Numeração +label.subserie=Subserie +label.formInicio=F. Inicio +label.formFim=F. Fim + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCancelamentoAutomaticoECF.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCancelamentoAutomaticoECF.jasper new file mode 100644 index 000000000..a9f2551f0 Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCancelamentoAutomaticoECF.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCancelamentoAutomaticoECF.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCancelamentoAutomaticoECF.jrxml new file mode 100644 index 000000000..019d05402 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCancelamentoAutomaticoECF.jrxml @@ -0,0 +1,438 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCancelamentoAutomaticoECFController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCancelamentoAutomaticoECFController.java new file mode 100644 index 000000000..b1aa26f53 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCancelamentoAutomaticoECFController.java @@ -0,0 +1,241 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +import org.apache.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Controller; +import org.zkoss.util.resource.Labels; +import org.zkoss.zhtml.Messagebox; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zul.Bandbox; +import org.zkoss.zul.Comboitem; +import org.zkoss.zul.Datebox; +import org.zkoss.zul.Paging; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; +import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioCancelamentoAutomaticoECF; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.service.EmpresaService; +import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; +import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper; +import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioCancelamentoAutomaticoECF; +import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioCancelamentoAutomaticoECFSelecionados; + +/** + * @author Bruno Neves + * + */ +@Controller("relatorioCancelamentoAutomaticoECFController") +@Scope("prototype") +public class RelatorioCancelamentoAutomaticoECFController extends MyGenericForwardComposer { + + /** + * + */ + private static final long serialVersionUID = 1L; + private static Logger log = Logger.getLogger(RelatorioCancelamentoAutomaticoECFController.class); + + @Autowired + private DataSource dataSourceRead; + + @Autowired + private EmpresaService empresaService; + + @Autowired + private TipoPuntoVentaService tipoPuntoVentaService; + + private Datebox datInicial; + private Datebox datFinal; + + private MyComboboxEstandar cmbEmpresa; + private List lsEmpresa; + + private MyComboboxEstandar cmbTipoPuntoVenta; + private List lsTipoPuntoVenta; + + @Autowired + private transient PagedListWrapper plwPuntoVenta; + + private MyTextbox txtNombrePuntoVenta; + private Bandbox bbPesquisaPuntoVenta; + private MyListbox puntoVentaList; + private MyListbox puntoVentaSelList; + + private Paging pagingPuntoVenta; + + private MyTextbox txtBilheteiro; + + @Override + public void doAfterCompose(Component comp) throws Exception { + lsEmpresa = empresaService.obtenerTodos(); + lsTipoPuntoVenta = tipoPuntoVentaService.obtenerTodos(); + super.doAfterCompose(comp); + + puntoVentaList.setItemRenderer(new RenderRelatorioCancelamentoAutomaticoECF()); + puntoVentaSelList.setItemRenderer(new RenderRelatorioCancelamentoAutomaticoECFSelecionados()); + + } + + public List getLsEmpresa() { + return lsEmpresa; + } + + public void setLsEmpresa(List lsEmpresa) { + this.lsEmpresa = lsEmpresa; + } + + private void executarPesquisa() { + HibernateSearchObject puntoVentaBusqueda = + new HibernateSearchObject(PuntoVenta.class, pagingPuntoVenta.getPageSize()); + + puntoVentaBusqueda.addFilterILike("nombpuntoventa", "%" + txtNombrePuntoVenta.getValue() + "%"); + puntoVentaBusqueda.addFilterEqual("activo", Boolean.TRUE); + + puntoVentaBusqueda.addSortAsc("nombpuntoventa"); + + puntoVentaBusqueda.addFilterEqual("activo", Boolean.TRUE); + + plwPuntoVenta.init(puntoVentaBusqueda, puntoVentaList, pagingPuntoVenta); + + if (puntoVentaList.getData().length == 0) { + try { + Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), + Labels.getLabel("relatorioCancelamentoAutomaticoECFController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + } catch (InterruptedException ex) { + ex.printStackTrace(); + } + } + } + + public void onClick$btnPesquisa(Event ev) { + executarPesquisa(); + } + + public void onDoubleClick$puntoVentaSelList(Event ev) { + PuntoVenta puntoVenta = (PuntoVenta) puntoVentaSelList.getSelected(); + puntoVentaSelList.removeItem(puntoVenta); + } + + public void onDoubleClick$puntoVentaList(Event ev) { + PuntoVenta puntoVenta = (PuntoVenta) puntoVentaList.getSelected(); + puntoVentaSelList.addItemNovo(puntoVenta); + } + + public void onClick$btnLimpar(Event ev) { + puntoVentaList.setData(new ArrayList()); + + bbPesquisaPuntoVenta.setText(""); + } + + public void onClick$btnExecutarRelatorio(Event ev) throws Exception { + executarRelatorio(); + } + + /** + * @throws Exception + * + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + private void executarRelatorio() throws Exception { + Relatorio relatorio; + Map parametros = new HashMap(); + StringBuilder filtro = new StringBuilder(); + + filtro.append("Agência: "); + String puntoVentaIds = ""; + String puntoVentas = ""; + List lsPuntoVentaSelecionados = new ArrayList(Arrays.asList(puntoVentaSelList.getData())); + if (lsPuntoVentaSelecionados.isEmpty()) { + puntoVentas = "Todas"; + } else { + for (int i = 0; i < lsPuntoVentaSelecionados.size(); i++) { + PuntoVenta puntoVenta = lsPuntoVentaSelecionados.get(i); + puntoVentas = puntoVentas + puntoVenta.getNombpuntoventa() + ","; + + puntoVentaIds = puntoVentaIds + puntoVenta.getPuntoventaId() + ","; + } + + // removendo ultima virgula + puntoVentaIds = puntoVentaIds.substring(0, puntoVentaIds.length() - 1); + puntoVentas = puntoVentas.substring(0, puntoVentas.length() - 1); + parametros.put("NUMPUNTOVENTA", puntoVentaIds); + } + filtro.append(puntoVentas).append(";"); + + parametros.put("DATA_INICIAL", (java.util.Date) this.datInicial.getValue()); + parametros.put("DATA_FINAL", (java.util.Date) this.datFinal.getValue()); + parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioCancelamentoAutomaticoECFController.window.title")); + parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString()); + + filtro.append(" Empresa: "); + + Comboitem itemEmpresa = cmbEmpresa.getSelectedItem(); + if (itemEmpresa != null) { + Empresa empresa = (Empresa) itemEmpresa.getValue(); + parametros.put("EMPRESA_ID", empresa.getEmpresaId()); + parametros.put("EMPRESA", empresa.getNombempresa()); + filtro.append(empresa.getNombempresa() + ";"); + } else { + filtro.append(" Todas;"); + } + + filtro.append(" Canal Vendas: "); +// Comboitem itemTipoPuntoVenda = cmbTipoPuntoVenta.getSelectedItem(); +// if (itemTipoPuntoVenda != null) { +// TipoPuntoVenta tpv = (TipoPuntoVenta) itemTipoPuntoVenda.getValue(); +// parametros.put("TIPOPUNTOVENTA_ID", tpv.getTipoptovtaId()); +// parametros.put("TIPOPUNTOVENTA", tpv.getDesctipo()); +// filtro.append(tpv.getDesctipo() + ";"); +// } else { +// filtro.append(" Todos;"); +// } + + + parametros.put("FILTROS", filtro.toString()); + relatorio = new RelatorioCancelamentoAutomaticoECF(parametros, dataSourceRead.getConnection()); + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + openWindow("/component/reportView.zul", + Labels.getLabel("relatorioCancelamentoAutomaticoECFController.window.title"), args, MODAL); + } + + public MyListbox getPuntoVentaSelList() { + return puntoVentaSelList; + } + + public void setPuntoVentaSelList(MyListbox puntoVentaSelList) { + this.puntoVentaSelList = puntoVentaSelList; + } + + public List getLsTipoPuntoVenta() { + return lsTipoPuntoVenta; + } + + public void setLsTipoPuntoVenta(List lsTipoPuntoVenta) { + this.lsTipoPuntoVenta = lsTipoPuntoVenta; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioCancelamentoAutomaticoECF.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioCancelamentoAutomaticoECF.java new file mode 100644 index 000000000..92c5bb300 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioCancelamentoAutomaticoECF.java @@ -0,0 +1,25 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios; + +import org.zkoss.util.resource.Labels; + +import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria; +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; + +public class ItemMenuRelatorioCancelamentoAutomaticoECF extends DefaultItemMenuSistema { + + public ItemMenuRelatorioCancelamentoAutomaticoECF() { + super("indexController.mniRelatorioCancelamentoAutomaticoECF.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOCANCELAMENTOAUTOMATICOECF"; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioCancelamentoAUtomaticoECF.zul", + Labels.getLabel("relatorioAidfDetalhadoController.window.title"), getArgs(), desktop); + + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties index 1d43d65fa..e7b00b52d 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties @@ -126,6 +126,7 @@ analitico=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.MenuA analitico.item=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.ItemMenuAnalitico analitico.gerenciais=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.gerenciais.SubMenuGerenciais analitico.gerenciais.aidfDetalhado=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioAidfDetalhado +analitico.gerenciais.cancelamentoAutomaticoECF=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioCancelamentoAutomaticoECF analitico.gerenciais.confFormulario=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioConferenciaFormularioFisico analitico.gerenciais.difTransf=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioDiferencasTransferencias analitico.gerenciais.empresaCorrida=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioEmpresaCorrida diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioCancelamentoAutomaticoECF.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioCancelamentoAutomaticoECF.java new file mode 100644 index 000000000..cc807dca7 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioCancelamentoAutomaticoECF.java @@ -0,0 +1,40 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.web.utilerias.render; + +import org.zkoss.zul.Listcell; +import org.zkoss.zul.Listitem; +import org.zkoss.zul.ListitemRenderer; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; + +/** + * @author Bruno Neves + * + */ +public class RenderRelatorioCancelamentoAutomaticoECF implements ListitemRenderer { + + @Override + public void render(Listitem lstm, Object o) throws Exception { + PuntoVenta puntoVenta = (PuntoVenta) o; + + Listcell lc = new Listcell(puntoVenta.getNombpuntoventa()); + lc.setParent(lstm); + + Empresa empresa = puntoVenta.getEmpresa(); + if (empresa != null) { + lc = new Listcell(empresa.getNombempresa()); + } else { + lc = new Listcell(""); + } + lc.setParent(lstm); + + lc = new Listcell(puntoVenta.getNumPuntoVenta()); + lc.setParent(lstm); + + lstm.setAttribute("data", puntoVenta); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioCancelamentoAutomaticoECFSelecionados.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioCancelamentoAutomaticoECFSelecionados.java new file mode 100644 index 000000000..e7b7bdff4 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioCancelamentoAutomaticoECFSelecionados.java @@ -0,0 +1,61 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.web.utilerias.render; + +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zul.Button; +import org.zkoss.zul.Listcell; +import org.zkoss.zul.Listitem; +import org.zkoss.zul.ListitemRenderer; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; + +/** + * @author Bruno Neves + * + */ +public class RenderRelatorioCancelamentoAutomaticoECFSelecionados implements ListitemRenderer { + + + public void render(Listitem lstm, Object o) throws Exception { + PuntoVenta puntoVenta = (PuntoVenta) o; + + Listcell lc = new Listcell(puntoVenta.getNombpuntoventa()); + lc.setParent(lstm); + + Empresa empresa = puntoVenta.getEmpresa(); + if (empresa != null) { + lc = new Listcell(empresa.getNombempresa()); + } else { + lc = new Listcell(""); + } + lc.setParent(lstm); + + lc = new Listcell(puntoVenta.getNumPuntoVenta()); + lc.setParent(lstm); + + Button btn = new Button(); + lc = new Listcell(); + lc.setParent(lstm); + + btn.setWidth("16"); + btn.setHeight("16"); + btn.setImage("/gui/img/remove.png"); + + btn.addEventListener("onClick", new EventListener() { + @Override + public void onEvent(Event event) throws Exception { + MyListbox listBox = (MyListbox) event.getTarget().getParent().getParent().getParent(); + Listitem listItem = (Listitem) event.getTarget().getParent().getParent(); + listBox.removeItem((PuntoVenta) listItem.getAttribute("data")); + } + }); + lc.appendChild(btn); + + lstm.setAttribute("data", puntoVenta); + } +} diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index cd803efb8..d5456dfaa 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -272,6 +272,7 @@ indexController.mniRelatorioGratuidade.label = Gratuidades indexController.mniRelatorioGratuidadeIdosoDeficiente.label = Gratuidades Idoso/Deficiente indexController.mniRelatorioVendasBilheteiro.label = Vendas por Bilheteiro indexController.mniRelatorioVendasBilheteiroSintetico.label = Vendas por Bilheteiro Sintético +indexController.mniRelatorioCancelamentoAutomaticoECF.label = Relatório de Cancelamento Automatico ECF indexController.mniRelatorioAgenciasNaoImportadas.label = Relatório de Agências não Importadas indexController.mniRelatorioCheckin.label = Checkin's indexController.mniFechamentoParamgeral.label = Configuração de Boleto @@ -694,6 +695,18 @@ relatorioVendasBilheteiroSinteticoController.lbNumero.value = Número Agência relatorioVendasBilheteiroSinteticoController.lbBilheteiro.value = Bilheteiro relatorioVendasBilheteiroSinteticoController.lbCanalVendas.value = Canal Vendas +#relatório de cancelamento automático ECF +relatorioCancelamentoAutomaticoECFController.window.title = Relatório de Cancelamento Automatico ECF +relatorioCancelamentoAutomaticoECFController.lbDatInicial.value = Data inicial +relatorioCancelamentoAutomaticoECFController.lbDatFinal.value = Data final +relatorioCancelamentoAutomaticoECFController.lbPuntoVenta.value = Agência +relatorioCancelamentoAutomaticoECFController.lbEmpresa.value = Empresa +relatorioCancelamentoAutomaticoECFController.btnPesquisa.label = Buscar +relatorioCancelamentoAutomaticoECFController.btnLimpar.label = Limpar +relatorioCancelamentoAutomaticoECFController.lbNumero.value = Número Agência +relatorioCancelamentoAutomaticoECFController.lbBilheteiro.value = Bilheteiro +relatorioCancelamentoAutomaticoECFController.lbCanalVendas.value = Canal Vendas + #Relatório de Demandas relatorioDemandasController.window.title = Relatório de Demandas relatorioDemandasController.lbDatInicial.value = Data Inicial diff --git a/web/gui/relatorios/filtroRelatorioCancelamentoAutomaticoECF.zul b/web/gui/relatorios/filtroRelatorioCancelamentoAutomaticoECF.zul new file mode 100644 index 000000000..1f06776af --- /dev/null +++ b/web/gui/relatorios/filtroRelatorioCancelamentoAutomaticoECF.zul @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +