leonardo 2016-08-24 20:17:14 +00:00
parent 8802806b27
commit 3751d85aae
2 changed files with 4 additions and 3 deletions

View File

@ -59,8 +59,9 @@ public class RelatorioVendasBilheteiro extends Relatorio {
sql.append(" join PARADA p_destino on p_destino.PARADA_ID = c.DESTINO_ID "); sql.append(" join PARADA p_destino on p_destino.PARADA_ID = c.DESTINO_ID ");
sql.append(" join CATEGORIA ct on ct.CATEGORIA_ID = c.CATEGORIA_ID "); sql.append(" join CATEGORIA ct on ct.CATEGORIA_ID = c.CATEGORIA_ID ");
sql.append(" join CLASE_SERVICIO cs on cs.CLASESERVICIO_ID = c.CLASESERVICIO_ID "); sql.append(" join CLASE_SERVICIO cs on cs.CLASESERVICIO_ID = c.CLASESERVICIO_ID ");
sql.append(" join MARCA m on m.marca_id = c.marca_id ");
sql.append(" where "); sql.append(" where ");
sql.append(" c.MARCA_ID = :MARCA_ID "); sql.append(" m.EMPRESA_ID = :EMPRESA_ID ");
sql.append(" and c.FECHORVENTA >= :DATA_INICIAL "); sql.append(" and c.FECHORVENTA >= :DATA_INICIAL ");
sql.append(" and c.FECHORVENTA <= :DATA_FINAL "); sql.append(" and c.FECHORVENTA <= :DATA_FINAL ");
if (parametros.get("NUMPUNTOVENTA") != null) { if (parametros.get("NUMPUNTOVENTA") != null) {
@ -83,7 +84,7 @@ public class RelatorioVendasBilheteiro extends Relatorio {
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString()); NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString());
stmt.setInt("MARCA_ID", Integer.valueOf(parametros.get("MARCA_ID").toString())); 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_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())); stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime()));

View File

@ -183,7 +183,7 @@ public class RelatorioVendasBilheteiroController extends MyGenericForwardCompose
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem(); Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
if (itemEmpresa != null) { if (itemEmpresa != null) {
Empresa empresa = (Empresa) itemEmpresa.getValue(); Empresa empresa = (Empresa) itemEmpresa.getValue();
parametros.put("MARCA_ID", empresa.getEmpresaId()); parametros.put("EMPRESA_ID", empresa.getEmpresaId());
parametros.put("EMPRESA", empresa.getNombempresa()); parametros.put("EMPRESA", empresa.getNombempresa());
filtro.append(empresa.getNombempresa() + ";"); filtro.append(empresa.getNombempresa() + ";");
} else { } else {