fixes bug #9386
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@74911 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
03a15687d6
commit
7dc6349ece
|
@ -2439,9 +2439,9 @@ public class FiscalHibernateDAO extends HibernateDaoSupport implements FiscalDAO
|
||||||
sb.append(" left join inscricao_estadual ie on ie.empresa_id = f.empresa_id and ie.estado_id = eof.estado_id and ie.activo = 1");
|
sb.append(" left join inscricao_estadual ie on ie.empresa_id = f.empresa_id and ie.estado_id = eof.estado_id and ie.activo = 1");
|
||||||
sb.append(" left join ciudad cie on cie.ciudad_id = ie.ciudad_id");
|
sb.append(" left join ciudad cie on cie.ciudad_id = ie.ciudad_id");
|
||||||
sb.append(" left join caja b on b.activo = 1 and b.indreimpresion = 0 and b.rmd_id = (case when coalesce(f.indcancelacion, 0) = 1 then -1 else f.rmd_id end) and b.empresacorrida_id = f.empresa_id and b.foliormd = f.folio and to_char(b.fechorventa, 'ddmmyyyy') = to_char(f.fechorfolio, 'ddmmyyyy')");
|
sb.append(" left join caja b on b.activo = 1 and b.indreimpresion = 0 and b.rmd_id = (case when coalesce(f.indcancelacion, 0) = 1 then -1 else f.rmd_id end) and b.empresacorrida_id = f.empresa_id and b.foliormd = f.folio and to_char(b.fechorventa, 'ddmmyyyy') = to_char(f.fechorfolio, 'ddmmyyyy')");
|
||||||
sb.append(" left join parada po on po.parada_id = b.origen_id");
|
sb.append(" left join parada po on po.parada_id = b.origen_id and po.activo = 1 ");
|
||||||
sb.append(" left join ciudad co on co.ciudad_id = po.ciudad_id");
|
sb.append(" left join ciudad co on co.ciudad_id = po.ciudad_id and co.activo = 1 ");
|
||||||
sb.append(" left join estado eo on eo.estado_id = co.estado_id");
|
sb.append(" left join estado eo on eo.estado_id = co.estado_id and eo.activo = 1 ");
|
||||||
sb.append(" left join parada pd on pd.parada_id = b.destino_id");
|
sb.append(" left join parada pd on pd.parada_id = b.destino_id");
|
||||||
sb.append(" left join ciudad cd on cd.ciudad_id = pd.ciudad_id");
|
sb.append(" left join ciudad cd on cd.ciudad_id = pd.ciudad_id");
|
||||||
sb.append(" left join estado ed on ed.estado_id = cd.estado_id");
|
sb.append(" left join estado ed on ed.estado_id = cd.estado_id");
|
||||||
|
@ -2455,12 +2455,12 @@ public class FiscalHibernateDAO extends HibernateDaoSupport implements FiscalDAO
|
||||||
sb.append(" left join ciudad cds on cds.ciudad_id = pds.ciudad_id");
|
sb.append(" left join ciudad cds on cds.ciudad_id = pds.ciudad_id");
|
||||||
sb.append(" left join estado eds on eds.estado_id = cds.estado_id");
|
sb.append(" left join estado eds on eds.estado_id = cds.estado_id");
|
||||||
sb.append(" left join aidf a on a.aidf_id = b.aidf_id");
|
sb.append(" left join aidf a on a.aidf_id = b.aidf_id");
|
||||||
sb.append(" where f.activo = 1 and po.activo = 1 and co.activo = 1 and eo.activo = 1 ");
|
sb.append(" where f.activo = 1 ");
|
||||||
sb.append(" and f.indinactivo = 0");
|
sb.append(" and f.indinactivo = 0 ");
|
||||||
sb.append(" and f.indbpr = 1");
|
sb.append(" and f.indbpr = 1 ");
|
||||||
sb.append(" and f.fechorfolio >= to_date(?,'DD/MM/YYYY HH24:MI:SS') and f.fechorfolio <= to_date(?,'DD/MM/YYYY HH24:MI:SS')");
|
sb.append(" and f.fechorfolio >= to_date(?,'DD/MM/YYYY HH24:MI:SS') and f.fechorfolio <= to_date(?,'DD/MM/YYYY HH24:MI:SS') ");
|
||||||
sb.append(" and f.empresa_id = ?");
|
sb.append(" and f.empresa_id = ? ");
|
||||||
sb.append(" and eof.cveestado like ?");
|
sb.append(" and eof.cveestado like ? ");
|
||||||
sb.append(" and (b.motivocancelacion_id is null or b.motivocancelacion_id <> 35) ");
|
sb.append(" and (b.motivocancelacion_id is null or b.motivocancelacion_id <> 35) ");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -114,11 +114,11 @@ public class ExportacaoBPR {
|
||||||
Map<String, ExportacaoRMDTipoRMD> group = new HashMap<String, ExportacaoRMDTipoRMD>(0);
|
Map<String, ExportacaoRMDTipoRMD> group = new HashMap<String, ExportacaoRMDTipoRMD>(0);
|
||||||
|
|
||||||
for (ExportacaoBPRBase base : listaRegistroBPR) {
|
for (ExportacaoBPRBase base : listaRegistroBPR) {
|
||||||
String numeroAIDF = base.getNumeroAIDF();
|
|
||||||
|
|
||||||
if (numeroAIDF == null || numeroAIDF.trim().isEmpty() || numeroAIDF.trim().equals("0")) {
|
// String numeroAIDF = base.getNumeroAIDF();
|
||||||
continue;
|
// if (numeroAIDF == null || numeroAIDF.trim().isEmpty() || numeroAIDF.trim().equals("0")) {
|
||||||
}
|
// continue;
|
||||||
|
// }
|
||||||
|
|
||||||
String key = base.getCodigoEstabelecimento() + "-" + base.getNumeroAIDFRMD() + "-" + base.getNumeroFormularioBilheteAIDF();
|
String key = base.getCodigoEstabelecimento() + "-" + base.getNumeroAIDFRMD() + "-" + base.getNumeroFormularioBilheteAIDF();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue