fixes bug#19271

dev:thiago
qua:

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@101708 d1611594-4594-4d17-8e1d-87c2c4800839
master
wilian 2020-05-20 21:17:12 +00:00
parent f412de083f
commit cde7cd7f7b
1 changed files with 3 additions and 2 deletions

View File

@ -117,7 +117,8 @@ public class RelatorioBPe extends Relatorio {
sql.append(" when '100' then ( ");
sql.append(" case ");
sql.append(" when bpe.tiposubstituicao is null and bpeSub.bpe_id is null then 'Autorizado' ");
sql.append(" when bpe.tiposubstituicao is null and bpeSub.bpe_id is null and bpe.indcontingencia = 0 then 'Autorizado' ");
sql.append(" when bpe.tiposubstituicao is null and bpeSub.bpe_id is null and bpe.indcontingencia = 1 then 'Aut.Conting.' ");
sql.append(" when bpe.tiposubstituicao is not null then 'Autorizado/Substitução' ");
sql.append(" when bpeSub.bpe_id is not null then 'Autorizado/Substituído' ");
sql.append(" else 'Autorizado' ");
@ -191,7 +192,7 @@ public class RelatorioBPe extends Relatorio {
} else if (status != null && status.equals("R")) {//Rejeitado
sql.append(" AND bpe.CODSTAT NOT IN ('100','135','102','150','-1','-2') ");
}else if (status != null && status.equals("AA")) {//Autorizado Contingencia
sql.append(" AND bpe.CODSTAT = '150' AND bol.ACTIVO = 1 ");
sql.append(" AND bpe.CODSTAT IN ('100', '150') AND bpe.INDCONTINGENCIA = 1 AND bol.ACTIVO = 1 ");
}else if (status != null && status.equals("RC")) {//Rejeitado Envio Contingencia
sql.append(" AND bpe.CODSTAT IN ('-10','-20') AND bol.ACTIVO = 1 ");
} else if (status != null && status.equals("PE")) {//Pendente Envio