fixes bug#23407
qua: dev: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@109039 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
7675a5e836
commit
b520412241
|
@ -44,7 +44,7 @@ public class RelatorioSegundaVia extends Relatorio {
|
|||
String sql = getSqlDados(dataInicial, dataFinal, empresaId, puntoVentaId);
|
||||
ResultSet rset = null;
|
||||
NamedParameterStatement stmt = null;
|
||||
Connection conexao = this.relatorio.getConexao();
|
||||
Connection conexao = this.relatorio.getConexao() ;
|
||||
|
||||
stmt = new NamedParameterStatement(conexao, sql);
|
||||
stmt.setTimestamp("dataInicial", getDataHoraInicial(dataInicial));
|
||||
|
@ -141,7 +141,7 @@ public class RelatorioSegundaVia extends Relatorio {
|
|||
sql.append("ca.cvecategoria as siglaTipoPassagem,");
|
||||
sql.append("ca.desccategoria as tipoPassagem,");
|
||||
sql.append("(select sum(cfpv.importe) from caja_formapago cfpv where cfpv.caja_id = c.caja_id and cfpv.activo = 1) as valortotal,");
|
||||
sql.append("tar.precio as tarifa, ");
|
||||
sql.append("c.preciopagado as tarifa, ");
|
||||
sql.append("c.importeseguro as seguro, ");
|
||||
sql.append("c.importepedagio as pedagio, ");
|
||||
sql.append("c.importetaxaembarque as taxa, ");
|
||||
|
@ -158,13 +158,7 @@ public class RelatorioSegundaVia extends Relatorio {
|
|||
sql.append("inner join parada po on po.parada_id = c.origen_id ");
|
||||
sql.append("inner join parada pd on pd.parada_id = c.destino_id ");
|
||||
sql.append("inner join punto_venta pt on pt.puntoventa_id = c.puntoventa_id ");
|
||||
sql.append("inner join vigencia_tarifa vt ON c.fechorventa BETWEEN vt.feciniciovigencia AND vt.fecfinvigencia and vt.activo = 1");
|
||||
sql.append("inner join tarifa tar ON (tar.ruta_id = c.ruta_id");
|
||||
sql.append(" AND tar.marca_id = c.marca_id");
|
||||
sql.append(" AND tar.claseservicio_id = c.claseservicio_id");
|
||||
sql.append(" AND tar.vigenciatarifa_id = vt.vigenciatarifa_id");
|
||||
sql.append(" AND tar.origen_id = c.origen_id");
|
||||
sql.append(" AND tar.destino_id = c.destino_id and tar.activo = 1)");
|
||||
|
||||
|
||||
sql.append("where b.indsegundaviaimpressa = 1 and c.motivoreimpresion_id = 99 ");
|
||||
if (dataInicial != null && dataFinal != null) {
|
||||
|
|
Loading…
Reference in New Issue