alexandre.lima 2017-10-17 18:30:45 +00:00
parent 36a6cc969c
commit 0e317869c1
1 changed files with 7 additions and 1 deletions

View File

@ -79,7 +79,13 @@ public class RelatorioBilhetesVendidos extends Relatorio {
sql.append(" and pv.PUNTOVENTA_ID IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")"); sql.append(" and pv.PUNTOVENTA_ID IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")");
} }
if (parametros.get("STATUS") != null) { if (parametros.get("STATUS") != null) {
sql.append(" and b.INDSTATUSBOLETO in (" + parametros.get("STATUS") + ") "); if (parametros.get("STATUS").toString().contains("V") && parametros.get("STATUS").toString().contains("C")) {
sql.append(" AND ((b.INDSTATUSBOLETO = 'C' AND B.INDCANCELACION = 1) OR (b.INDSTATUSBOLETO = 'V' AND B.INDCANCELACION = 0)) ");
} else if (parametros.get("STATUS").toString().contains("C")) {
sql.append(" AND b.INDSTATUSBOLETO = 'C' AND B.INDCANCELACION = 1 ");
} else if (parametros.get("STATUS").toString().contains("V")) {
sql.append(" AND b.INDSTATUSBOLETO = 'V' AND B.INDCANCELACION = 0 ");
}
} }
sql.append(" and B.BOLETOORIGINAL_ID is null "); sql.append(" and B.BOLETOORIGINAL_ID is null ");
sql.append(" order by u.CVEUSUARIO, "); sql.append(" order by u.CVEUSUARIO, ");