From 7c85b37442831fffd3b4e052b7a3b5a3d8b0617e Mon Sep 17 00:00:00 2001 From: williamfl2007 Date: Fri, 25 Oct 2024 18:03:35 -0300 Subject: [PATCH] Ajuste sintetico --- src/relatorio/relatorio-sintetico.repository.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/relatorio/relatorio-sintetico.repository.ts b/src/relatorio/relatorio-sintetico.repository.ts index 3dbc1874..16bb86ae 100644 --- a/src/relatorio/relatorio-sintetico.repository.ts +++ b/src/relatorio/relatorio-sintetico.repository.ts @@ -146,6 +146,7 @@ export class RelatorioSinteticoRepository { query = query + ` (select distinct dta.id,dta."valorLancamento" from detalhe_a dta inner join item_transacao_agrupado tt on dta."itemTransacaoAgrupadoId"=tt.id + inner join transacao_agrupado tta on tta."id"=tt."transacaoAgrupadoId" and tt."statusId"<>'5' left join item_transacao itt on itt."itemTransacaoAgrupadoId" = tt."id" left join arquivo_publicacao app on app."itemTransacaoId"=itt.id WHERE `; @@ -164,6 +165,7 @@ export class RelatorioSinteticoRepository { (select distinct dta.id,dta."valorLancamento" from detalhe_a dta inner join item_transacao_agrupado tt on dta."itemTransacaoAgrupadoId"=tt.id + inner join transacao_agrupado tta on tta."id"=tt."transacaoAgrupadoId" and tt."statusId"<>'5' left join item_transacao itt on itt."itemTransacaoAgrupadoId" = tt."id" left join arquivo_publicacao app on app."itemTransacaoId"=itt.id WHERE `; @@ -225,6 +227,7 @@ export class RelatorioSinteticoRepository { query = query + ` from item_transacao_agrupado ita inner join detalhe_a da on da."itemTransacaoAgrupadoId"= ita.id inner join item_transacao it on ita.id = it."itemTransacaoAgrupadoId" + inner join transacao_agrupado ta on ta."id"=ita."transacaoAgrupadoId" and ta."statusId"<>'5' inner join arquivo_publicacao ap on ap."itemTransacaoId"=it.id inner join cliente_favorecido cf on cf.id=it."clienteFavorecidoId" left join ocorrencia oc on oc."detalheAId"=da.id