fixed bug#14845

qua:Wallysson
dev:Valdir

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@95960 d1611594-4594-4d17-8e1d-87c2c4800839
master
frederico 2019-07-19 18:50:10 +00:00
parent 9755332720
commit 150214542d
11 changed files with 774 additions and 0 deletions

View File

@ -0,0 +1,112 @@
package com.rjconsultores.ventaboletos.relatorios.impl;
import java.sql.Connection;
import java.util.Date;
import java.sql.ResultSet;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
public class RelatorioTrocoSimples extends Relatorio {
public RelatorioTrocoSimples(Map<String, Object> parametros, Connection conexao) throws Exception {
super(parametros, conexao);
this.setCustomDataSource(new ArrayDataSource(this) {
public void initDados() throws Exception {
Connection conexao = this.relatorio.getConexao();
Map<String, Object> parametros = this.relatorio.getParametros();
String sql = getSql(parametros);
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
ResultSet rset = stmt.executeQuery();
while (rset.next()) {
Map<String, Object> dataResult = new HashMap<String, Object>();
dataResult.put("valorTroco", rset.getBigDecimal("valorTroco"));
dataResult.put("puntoVenta", rset.getString("puntoVenta"));
dataResult.put("bilhetero", getNombUsuarioCompleto(rset.getString("bilhetero"), rset.getString("paterno"), rset.getString("materno")));
dataResult.put("boleto", rset.getString("boleto"));
dataResult.put("transacao", rset.getString("transacao"));
this.dados.add(dataResult);
}
this.resultSet = rset;
}
});
}
@Override
protected void processaParametros() throws Exception {
}
private String getSql(Map<String, Object> parametros) {
StringBuilder sql = new StringBuilder();
String formatToDate = ("'dd/MM/yyyy hh24:mi:ss'");
SimpleDateFormat formatSemHora = new SimpleDateFormat("dd/MM/yyyy");
Date dataInicial = (Date) parametros.get("DATA_INICIAL");
Date dataFinal = (Date) parametros.get("DATA_FINAL");
Integer empresaId = (Integer) parametros.get("EMPRESA_ID");
String puntoVentas = (String) parametros.get("NUMPUNTOVENTA");
Integer usuarioId = (Integer) parametros.get("BILHETEIRO_ID");
sql.append("SELECT ee.impingreso as valorTroco, ");
sql.append("pv.nombpuntoventa as puntoVenta, ");
sql.append("u.nombusuario as bilhetero, ");
sql.append("u.nombpaterno as paterno, ");
sql.append("u.nombmaterno as materno, ");
sql.append("ee.boleto_id AS boleto, ");
sql.append("ee.descinfo AS transacao ");
sql.append("FROM TIPO_EVENTO_EXTRA tee ");
sql.append("INNER JOIN EVENTO_EXTRA ee ON ee.tipoeventoextra_id = tee.tipoeventoextra_id ");
sql.append("INNER JOIN PUNTO_VENTA pv ON pv.puntoventa_id = ee.puntoventa_id ");
sql.append("INNER JOIN USUARIO u ON u.USUARIO_ID = ee.USUARIO_ID ");
sql.append("WHERE tee.cvesistema = 'TIPO_EVENTO_EXTRA_TROCO_SIMPLES' ");
if (empresaId != null) {
sql.append(" AND ee.empresa_id = " + empresaId);
}
if (dataInicial != null && dataFinal != null) {
sql.append(" AND ee.fechoringreso BETWEEN TO_DATE('" + formatSemHora.format(dataInicial) + " 00:00:00', " + formatToDate + ") "
+ "AND TO_DATE('" + formatSemHora.format(dataFinal) + " 23:59:59', " + formatToDate + ") ");
}
if (puntoVentas != null && !puntoVentas.isEmpty()) {
sql.append(" AND pv.puntoventa_id IN (" + puntoVentas + ") ");
}
if(usuarioId != null) {
sql.append(" AND ee.usuario_id = " + usuarioId);
}
return sql.toString();
}
public String getNombUsuarioCompleto(String nome, String nomePaterno, String nomeMaterno) {
StringBuilder sNome = new StringBuilder(nome);
if(StringUtils.isNotBlank(nomePaterno)) {
sNome.append(" ")
.append(nomePaterno);
}
if(StringUtils.isNotBlank(nomeMaterno)) {
sNome.append(" ")
.append(nomeMaterno);
}
return sNome.toString();
}
}

View File

@ -0,0 +1,19 @@
#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:
label.puntoVenta=Agência
label.bilheteiro=Bilheteiro
label.valorTroco=Valor Troco
label.boleto=Boleto
label.transacao=Transação
label.totalTroco=Total Troco:

View File

@ -0,0 +1,19 @@
#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:
label.puntoVenta=Agência
label.bilheteiro=Bilheteiro
label.valorTroco=Valor Troco
label.boleto=Boleto
label.transacao=Transação
label.totalTroco=Total Troco:

View File

@ -0,0 +1,188 @@
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RelatorioTrocoSimples" pageWidth="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="9b78f5a7-cc2c-45b3-a908-80ed959450ef">
<property name="ireport.zoom" value="1.3310000000000008"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="USUARIO" class="java.lang.String"/>
<parameter name="FILTROS" class="java.lang.String"/>
<parameter name="NOME_RELATORIO" class="java.lang.String"/>
<field name="valorTroco" class="java.math.BigDecimal"/>
<field name="puntoVenta" class="java.lang.String"/>
<field name="bilhetero" class="java.lang.String"/>
<field name="boleto" class="java.lang.String"/>
<field name="transacao" class="java.lang.String"/>
<variable name="total_troco" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[$F{valorTroco}]]></variableExpression>
</variable>
<title>
<band height="91" splitType="Stretch">
<line>
<reportElement uuid="54719d85-3e16-47ba-8a7d-50d626129e3d" x="0" y="68" width="554" height="1"/>
</line>
<textField>
<reportElement uuid="abfa62bc-56f8-4add-8903-0b64e8dbac7a" x="265" y="0" width="186" height="25"/>
<textElement textAlignment="Right">
<font size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="1a6a5b3b-d765-4d73-98d5-bd050b49dcf3" mode="Transparent" x="451" y="41" width="104" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.impressorPor}+" "+$P{USUARIO}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="9f8fb8ed-d527-4abf-9a65-791a8a9ce032" positionType="Float" x="0" y="84" width="554" height="1"/>
</line>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="942f5b46-6e12-4ef7-8f5f-28c8b90062e1" mode="Transparent" x="265" y="25" width="267" height="16" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.pagina}+" "+$V{PAGE_NUMBER}+" "+$R{cabecalho.de}]]></textFieldExpression>
</textField>
<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
<reportElement uuid="2acc421d-eff6-44d3-a35d-23d25afbba1a" mode="Transparent" x="533" y="25" width="21" height="16" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false">
<reportElement uuid="54330d46-2a96-4065-b0ee-7d80265e78b0" mode="Transparent" x="451" y="0" width="104" height="25" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="852c6b40-a6cd-4a7d-9067-57114f688220" x="0" y="69" width="555" height="15"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="16fc4ee9-a895-4859-831b-4f609ff16d50" mode="Transparent" x="0" y="0" width="265" height="41" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="14" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression>
</textField>
</band>
</title>
<columnHeader>
<band height="15" splitType="Stretch">
<textField>
<reportElement uuid="68191269-1e16-42c9-b30a-216b713c2248" x="465" y="0" width="90" height="15"/>
<textElement markup="none">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.valorTroco}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="05d13cc3-cf84-4f7c-9870-469abfedbe4c" x="0" y="0" width="125" height="15"/>
<textElement textAlignment="Center" markup="none">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.puntoVenta}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="9a6d0d0c-292f-432e-a913-6af81eeaa4e8" x="125" y="0" width="127" height="15"/>
<textElement textAlignment="Center" markup="none">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.bilheteiro}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="120e5f49-3558-4246-b8a3-8f548f0880eb" x="252" y="0" width="83" height="15"/>
<textElement textAlignment="Center" markup="none">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.boleto}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="43676e8a-4c56-4b0c-b986-30e243ccb426" x="335" y="0" width="130" height="15"/>
<textElement textAlignment="Center" markup="none">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.transacao}]]></textFieldExpression>
</textField>
</band>
</columnHeader>
<detail>
<band height="15" splitType="Stretch">
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00" isBlankWhenNull="true">
<reportElement uuid="ddc9d137-b7ca-4f6d-a74d-deebadf6a0f6" stretchType="RelativeToTallestObject" x="465" y="0" width="90" height="15"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{valorTroco}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="670dca95-d431-469c-8b4a-094ca0639c12" stretchType="RelativeToTallestObject" x="0" y="0" width="125" height="15"/>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{puntoVenta}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="50796f6d-a1a4-4f01-8ed3-d1a6ee379275" stretchType="RelativeToTallestObject" x="125" y="0" width="127" height="15"/>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{bilhetero}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="fc5531a4-0bea-446c-9ab7-0556cb5f1fa7" stretchType="RelativeToTallestObject" x="252" y="0" width="83" height="15"/>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{boleto}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="9d763742-fe7c-4aab-b7bc-36a40a205c99" stretchType="RelativeToTallestObject" x="335" y="0" width="130" height="15"/>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{transacao}]]></textFieldExpression>
</textField>
</band>
</detail>
<summary>
<band height="15" splitType="Stretch">
<textField pattern="¤ #,##0.00" isBlankWhenNull="true">
<reportElement uuid="fb1971f4-87ae-4655-b5b9-68d6d3ea9790" x="465" y="0" width="90" height="15"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$V{total_troco}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="46410d89-69fc-40e0-aa04-1410ef9507fd" x="281" y="0" width="184" height="15"/>
<textElement textAlignment="Right" markup="none">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.totalTroco}]]></textFieldExpression>
</textField>
</band>
</summary>
<noData>
<band height="50">
<textField>
<reportElement uuid="ca28756b-0f01-49c4-ad61-436c3ec083a1" x="0" y="24" width="575" height="26"/>
<textElement markup="none">
<font size="11" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
</textField>
</band>
</noData>
</jasperReport>

View File

@ -0,0 +1,281 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
import java.text.SimpleDateFormat;
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.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.Usuario;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioTrocoSimples;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxUsuario;
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.RenderRelatorioVendasBilheteiro;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioVendasBilheteiroSelecionados;
@Controller("relatorioTrocoSimplesController")
@Scope("prototype")
public class RelatorioTrocoSimplesController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
private Datebox dtInicial;
private Datebox dtFinal;
private MyComboboxEstandar cmbEmpresa;
private List<Empresa> lsEmpresa;
@Autowired
private transient PagedListWrapper<PuntoVenta> plwPuntoVenta;
private MyTextbox txtNombrePuntoVenta;
private Bandbox bbPesquisaPuntoVenta;
private Paging pagingPuntoVenta;
private MyListbox puntoVentaList;
private MyListbox puntoVentaSelList;
private MyComboboxUsuario cmbUsuario;
@Autowired
private EmpresaService empresaService;
@Autowired
private DataSource dataSourceRead;
@Override
public void doAfterCompose(Component comp) throws Exception {
lsEmpresa = empresaService.obtenerTodos();
super.doAfterCompose(comp);
puntoVentaList.setItemRenderer(new RenderRelatorioVendasBilheteiro());
puntoVentaSelList.setItemRenderer(new RenderRelatorioVendasBilheteiroSelecionados());
}
@SuppressWarnings({ "rawtypes", "unchecked" })
private void executarRelatorio() throws Exception {
Relatorio relatorio;
Map<String, Object> parametros = new HashMap<String, Object>();
StringBuilder filtro = new StringBuilder();
SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
if (!validar()) {
return;
}
if (dtInicial.getValue() != null) {
filtro.append("Período: ")
.append(format.format(dtInicial.getValue()))
.append(" - ")
.append(format.format(dtFinal.getValue()))
.append(";");
}
filtro.append("Agência: ");
String puntoVentaIds = "";
String puntoVentas = "";
List<PuntoVenta> lsPuntoVentaSelecionados = new ArrayList(Arrays.asList(puntoVentaSelList.getData()));
if (lsPuntoVentaSelecionados.size() > 0) {
for (int i = 0; i < lsPuntoVentaSelecionados.size(); i++) {
PuntoVenta puntoVenta = lsPuntoVentaSelecionados.get(i);
puntoVentas = puntoVentas + puntoVenta.getNombpuntoventa() + ",";
puntoVentaIds = puntoVentaIds + puntoVenta.getPuntoventaId() + ",";
}
puntoVentaIds = puntoVentaIds.substring(0, puntoVentaIds.length() - 1);
puntoVentas = puntoVentas.substring(0, puntoVentas.length() - 1);
parametros.put("NUMPUNTOVENTA", puntoVentaIds);
} else {
filtro.append("Todas ");
}
filtro.append(puntoVentas).append(";");
filtro.append("Bilheteiro: ");
Comboitem itemUsuario = cmbUsuario.getSelectedItem();
if (itemUsuario != null) {
Usuario usuario = (Usuario) itemUsuario.getValue();
if(usuario.getUsuarioId() != -1) {
parametros.put("BILHETEIRO_ID", usuario.getUsuarioId());
filtro.append(usuario.getNombusuario() + ";");
}else {
filtro.append(" Todos; ");
}
} else {
filtro.append(" Todos; ");
}
parametros.put("DATA_INICIAL", (java.util.Date) dtInicial.getValue());
parametros.put("DATA_FINAL", (java.util.Date) dtFinal.getValue());
parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioTrocoSimples.window.title"));
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString());
parametros.put("USUARIO_NOME", UsuarioLogado.getUsuarioLogado().getNombusuario());
filtro.append("Empresa: ");
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
if (itemEmpresa != null) {
Empresa empresa = (Empresa) itemEmpresa.getValue();
parametros.put("EMPRESA_ID", empresa.getEmpresaId());
filtro.append(empresa.getNombempresa() + ";");
} else {
filtro.append(" Todas; ");
}
parametros.put("FILTROS", filtro.toString());
relatorio = new RelatorioTrocoSimples(parametros, dataSourceRead.getConnection());
Map args = new HashMap();
args.put("relatorio", relatorio);
openWindow("/component/reportView.zul",
Labels.getLabel("relatorioTrocoSimples.window.title"), args, MODAL);
}
private boolean validar() {
try {
if (dtInicial.getValue() == null || dtFinal.getValue() == null) {
Messagebox.show(Labels.getLabel("relatorioTrocoSimples.MSG.informarDatas"),
Labels.getLabel("relatorioTrocoSimples.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
return false;
}
} catch (InterruptedException ex) {
return false;
}
return true;
}
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
executarRelatorio();
}
private void executarPesquisa() {
HibernateSearchObject<PuntoVenta> puntoVentaBusqueda = new HibernateSearchObject<PuntoVenta>(PuntoVenta.class, pagingPuntoVenta.getPageSize());
puntoVentaBusqueda.addFilterILike("nombpuntoventa", "%" + txtNombrePuntoVenta.getValue() + "%");
puntoVentaBusqueda.addFilterEqual("activo", Boolean.TRUE);
puntoVentaBusqueda.addFilterNotEqual("puntoventaId", -1);
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("relatorioVendasBilheteiroController.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<PuntoVenta>());
bbPesquisaPuntoVenta.setText("");
}
public List<Empresa> getLsEmpresa() {
return lsEmpresa;
}
public void setLsEmpresa(List<Empresa> lsEmpresa) {
this.lsEmpresa = lsEmpresa;
}
public MyComboboxEstandar getCmbEmpresa() {
return cmbEmpresa;
}
public void setCmbEmpresa(MyComboboxEstandar cmbEmpresa) {
this.cmbEmpresa = cmbEmpresa;
}
public PagedListWrapper<PuntoVenta> getPlwPuntoVenta() {
return plwPuntoVenta;
}
public void setPlwPuntoVenta(PagedListWrapper<PuntoVenta> plwPuntoVenta) {
this.plwPuntoVenta = plwPuntoVenta;
}
public MyTextbox getTxtNombrePuntoVenta() {
return txtNombrePuntoVenta;
}
public void setTxtNombrePuntoVenta(MyTextbox txtNombrePuntoVenta) {
this.txtNombrePuntoVenta = txtNombrePuntoVenta;
}
public MyListbox getPuntoVentaList() {
return puntoVentaList;
}
public void setPuntoVentaList(MyListbox puntoVentaList) {
this.puntoVentaList = puntoVentaList;
}
public MyListbox getPuntoVentaSelList() {
return puntoVentaSelList;
}
public void setPuntoVentaSelList(MyListbox puntoVentaSelList) {
this.puntoVentaSelList = puntoVentaSelList;
}
public Datebox getDtVendaInicial() {
return dtInicial;
}
public void setDtVendaInicial(Datebox dtVendaInicial) {
this.dtInicial = dtVendaInicial;
}
public Datebox getDtVendaFinal() {
return dtFinal;
}
public void setDtVendaFinal(Datebox dtVendaFinal) {
this.dtFinal = dtVendaFinal;
}
}

View File

@ -0,0 +1,26 @@
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional;
import org.zkoss.util.resource.Labels;
import com.rjconsultores.ventaboletos.constantes.ConstantesFuncionSistema;
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
public class ItemMenuRelatorioTrocoSimples extends DefaultItemMenuSistema {
public ItemMenuRelatorioTrocoSimples() {
super("indexController.mniTrocoSimples.mniRelatorioTrocoSimples.label");
}
@Override
public String getClaveMenu() {
return ConstantesFuncionSistema.CLAVE_RELATORIO_TROCO_SIMPLES;
}
@Override
public void ejecutar() {
PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioTrocoSimples.zul",
Labels.getLabel("relatorioTrocoSimples.window.title"), getArgs() ,desktop);
}
}

View File

@ -94,6 +94,7 @@ esquemaOperacional.configuracaoVendaEmbarcada=com.rjconsultores.ventaboletos.web
esquemaOperacional.configuracaoVendaEmbarcada.ItemMenuCadastroOperadorEmbarcada=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuCadastroOperadorEmbarcada
esquemaOperacional.trocoSimples=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.SubMenuTrocoSimples
esquemaOperacional.trocoSimples.ItemMenuCadastroEmpresaTrocoSimples=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuCadastroEmpresaTrocoSimples
esquemaOperacional.trocoSimples.ItemMenuRelatorioTrocoSimples=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuRelatorioTrocoSimples
tarifasOficial=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial.MenuTarifasOficial
tarifasOficial.seguroKm=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial.ItemMenuSeguroKm
tarifasOficial.seguroTarifa=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial.ItemMenuSeguroTarifa

View File

@ -8218,6 +8218,11 @@ editarEmpresaTrocoSimples.valorSugerir=Valor para Sugestão de Troco Simples
editarEmpresaTrocoSimples.token=Token
editarEmpresaTrocoSimples.MSG.suscribirOK = Cadastro da empresa no Troco Simples registrado com sucesso.
editarEmpresaTrocoSimples.MSG.cadastroExistente = Já existe uma configuração para esta Empresa.
editarEmpresaTrocoSimples.MSG.borrarPergunta = Remover configurações do troco simples para empresa?
editarEmpresaTrocoSimples.MSG.borrarOK = Configuração removida com Sucesso.
editarConvenioController.MSG.erro= Erro ao salvar
busquedaEmpresaTrocoSimples.valorSugerir= Valor Sugerido
editarEmpresaTrocoSimples.MSG.borrarPergunta = Remover configurações do troco simples para empresa?
editarEmpresaTrocoSimples.MSG.borrarOK = Configuração removida com Sucesso.

View File

@ -8725,6 +8725,16 @@ editarEmpresaTrocoSimples.MSG.borrarOK = Configuração removida com Sucesso.
editarConvenioController.MSG.erro= Erro ao salvar
busquedaEmpresaTrocoSimples.valorSugerir= Valor Sugerido
indexController.mniTrocoSimples.mniRelatorioTrocoSimples.label=Relatório Troco Simples
relatorioTrocoSimples.window.title=Relatório Troco Simples
relatorioTrocoSimples.dataInicial.label=Data Inicial
relatorioTrocoSimples.dataFinal.label=Data Final
relatorioTrocoSimples.empresa.label=Empresa
relatorioTrocoSimples.puntoVenta.label=Agência
relatorioTrocoSimples.bilheteiro.label=Bilheteiro
relatorioTrocoSimples.MSG.informarDatas=Favor informar Data Inicial e Data Final.
#viewTestEmailController
viewTestEmailController.window.title= Testar configurações da conta
viewTestEmailController.btnFechar.tooltiptext = Apagar

View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winFiltroRelatorioTrocoSimples"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winFiltroRelatorioTrocoSimples" apply="${relatorioTrocoSimplesController}"
contentStyle="overflow:auto"
height="316px" width="728px" border="normal">
<grid fixedLayout="true">
<columns>
<column width="25%" />
<column width="30%" />
<column width="15%" />
<column width="30%" />
</columns>
<rows>
<row>
<label
value="${c:l('relatorioTrocoSimples.dataInicial.label')}" />
<datebox id="dtInicial" width="100%" mold="rounded"
format="dd/MM/yyyy" maxlength="10" />
<label
value="${c:l('relatorioTrocoSimples.dataFinal.label')}" />
<datebox id="dtFinal" width="100%" mold="rounded"
format="dd/MM/yyyy" maxlength="10" />
</row>
<row spans="1,3">
<label
value="${c:l('relatorioTrocoSimples.empresa.label')}"/>
<combobox id="cmbEmpresa"
buttonVisible="true"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
model="@{winFiltroRelatorioTrocoSimples$composer.lsEmpresa}"
width="100%" />
</row>
<row spans="1,3">
<label
value="Agencia" />
<bandbox id="bbPesquisaPuntoVenta" width="100%"
mold="rounded" readonly="true">
<bandpopup>
<vbox>
<hbox>
<label
value="${c:l('relatorioVendasBilheteiroController.lbPuntoVenta.value')}" />
<textbox id="txtNombrePuntoVenta"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
width="300px" mold="rounded" />
<button id="btnPesquisa"
image="/gui/img/find.png"
label="${c:l('relatorioLinhaOperacionalController.btnPesquisa.label')}" />
<button id="btnLimpar"
image="/gui/img/eraser.png"
label="${c:l('relatorioLinhaOperacionalController.btnLimpar.label')}" />
</hbox>
<paging id="pagingPuntoVenta"
pageSize="10" />
<listbox id="puntoVentaList"
mold="paging"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true" height="100%" width="700px">
<listhead>
<listheader
label="${c:l('relatorioVendasBilheteiroController.lbPuntoVenta.value')}" />
<listheader width="35%"
label="${c:l('relatorioVendasBilheteiroController.lbEmpresa.value')}" />
<listheader width="20%"
label="${c:l('relatorioVendasBilheteiroController.lbNumero.value')}" />
</listhead>
</listbox>
</vbox>
</bandpopup>
</bandbox>
</row>
<row spans="4">
<listbox id="puntoVentaSelList" mold="paging"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true" height="100px" width="100%">
<listhead>
<listheader
label="${c:l('relatorioVendasBilheteiroController.lbPuntoVenta.value')}" />
<listheader width="35%"
label="${c:l('relatorioVendasBilheteiroController.lbEmpresa.value')}" />
<listheader width="20%"
label="${c:l('relatorioVendasBilheteiroController.lbNumero.value')}" />
<listheader width="15%" />
</listhead>
</listbox>
<paging id="pagingSelPuntoVenta" pageSize="10" />
</row>
<row spans="1,3">
<label
value="${c:l('relatorioTrocoSimples.bilheteiro.label')}" />
<combobox id="cmbUsuario"
buttonVisible="true"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxUsuario"
width="100%" />
</row>
</rows>
</grid>
<toolbar>
<button id="btnExecutarRelatorio" image="/gui/img/find.png"
label="${c:l('relatorio.lb.btnExecutarRelatorio')}" />
</toolbar>
</window>
</zk>