Commit 8b36b7ea4a5709d1a65b6baf6c8fd805a91a14e3
1 parent
1fa95986
Exists in
master
and in
7 other branches
[Fixed #101] Erro componente digital de pelo menos um dos documentos não recebido
Showing
1 changed file
with
4 additions
and
2 deletions
Show diff stats
rn/ReceberProcedimentoRN.php
@@ -1867,8 +1867,10 @@ class ReceberProcedimentoRN extends InfraRN | @@ -1867,8 +1867,10 @@ class ReceberProcedimentoRN extends InfraRN | ||
1867 | from procedimento proced join documento doc on (doc.id_procedimento = proced.id_procedimento) | 1867 | from procedimento proced join documento doc on (doc.id_procedimento = proced.id_procedimento) |
1868 | join protocolo prot_doc on (doc.id_documento = prot_doc.id_protocolo) | 1868 | join protocolo prot_doc on (doc.id_documento = prot_doc.id_protocolo) |
1869 | left join md_pen_componente_digital comp on (comp.id_documento = doc.id_documento) | 1869 | left join md_pen_componente_digital comp on (comp.id_documento = doc.id_documento) |
1870 | - where proced.id_procedimento = $parNumIdProcedimento and prot_doc.sta_protocolo = 'R' and | ||
1871 | - not exists (select 1 from anexo where anexo.id_protocolo = prot_doc.id_protocolo) "; | 1870 | + where proced.id_procedimento = $parNumIdProcedimento |
1871 | + and prot_doc.sta_protocolo = 'R' | ||
1872 | + and prot_doc.sta_estado <> " . ProtocoloRN::$TE_DOCUMENTO_CANCELADO . " | ||
1873 | + and not exists (select 1 from anexo where anexo.id_protocolo = prot_doc.id_protocolo) "; | ||
1872 | 1874 | ||
1873 | //Adiciona filtro adicional para verificar pelo identificador do documento, caso parâmetro tenha sido informado | 1875 | //Adiciona filtro adicional para verificar pelo identificador do documento, caso parâmetro tenha sido informado |
1874 | if(!is_null($parNumIdDocumento)){ | 1876 | if(!is_null($parNumIdDocumento)){ |