fixes bug#23738

dev: Julio
qua: 

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@110724 d1611594-4594-4d17-8e1d-87c2c4800839
master
julio 2022-02-03 17:51:31 +00:00
parent 917b9e6ffd
commit b10ac5c78b
1 changed files with 26 additions and 12 deletions

View File

@ -1,5 +1,6 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -15,6 +16,7 @@ import org.zkoss.zul.Datebox;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBaixasVendasInternet; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBaixasVendasInternet;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBaixasVendasInternetSintetico; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBaixasVendasInternetSintetico;
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta; import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
@ -33,20 +35,32 @@ public class RelatorioBaixasVendasInternetController extends MyGenericForwardCom
public void onClick$btnExecutarRelatorio(Event ev) throws Exception { public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
Map<String, Object> args = new HashMap<String, Object>(); Map<String, Object> args = new HashMap<String, Object>();
String title = null;
PuntoVenta puntoVenta = (PuntoVenta) cmbPuntoVenta.getSelectedItem().getValue(); PuntoVenta puntoVenta = (PuntoVenta) cmbPuntoVenta.getSelectedItem().getValue();
Date datInicial = null;
if (this.fecInicio.getValue() != null) {
datInicial = DateUtil.inicioFecha(this.fecInicio.getValue());
}
Date datFinal = null;
if (this.fecFinal.getValue() != null) {
datFinal = DateUtil.fimFecha(this.fecFinal.getValue());
}
if (puntoVenta != null && puntoVenta.getPuntoventaId() != null && puntoVenta.getPuntoventaId() != -1) { if (puntoVenta != null && puntoVenta.getPuntoventaId() != null && puntoVenta.getPuntoventaId() != -1) {
RelatorioBaixasVendasInternet relatorio = new RelatorioBaixasVendasInternet(dataSourceRead.getConnection(), fecInicio.getValue(), fecFinal.getValue(), puntoVenta); RelatorioBaixasVendasInternet relatorio = new RelatorioBaixasVendasInternet(dataSourceRead.getConnection(), datInicial, datFinal, puntoVenta);
args.put("relatorio", relatorio); args.put("relatorio", relatorio);
openWindow("/component/reportView.zul", title = Labels.getLabel("indexController.mniRelatorioBaixasVendasInternet.label");
Labels.getLabel("indexController.mniRelatorioBaixasVendasInternet.label"), args, MODAL);
} else { } else {
// criar o relatorio sintetico com a outra consulta // criar o relatorio sintetico com a outra consulta
RelatorioBaixasVendasInternetSintetico relatorio = new RelatorioBaixasVendasInternetSintetico(dataSourceRead.getConnection(), fecInicio.getValue(), fecFinal.getValue()); RelatorioBaixasVendasInternetSintetico relatorio = new RelatorioBaixasVendasInternetSintetico(dataSourceRead.getConnection(), datInicial, datFinal);
args.put("relatorio", relatorio); args.put("relatorio", relatorio);
openWindow("/component/reportView.zul", title = Labels.getLabel("indexController.mniRelatorioBaixasVendasInternetSintetico.label");
Labels.getLabel("indexController.mniRelatorioBaixasVendasInternetSintetico.label"), args, MODAL);
} }
openWindow("/component/reportView.zul", title, args, MODAL);
} }
} }