You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Infrastructure/PortaleFatture.BE.Infrastructure/Common/SEND/DatiModuloCommesse/Queries/Persistence/Builder/DatiModuloCommessaTotaleSQLBuilder.cs
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -309,6 +309,13 @@ FROM [cfg].[FrameModuloCommessa]
309
309
) AS GiornoFineLegale
310
310
),
311
311
312
+
-- Tipo contratto dell'ente
313
+
TipoContrattoEnte AS (
314
+
SELECT TOP 1 c.FkIdTipoContratto
315
+
FROM [pfd].[Contratti] c
316
+
WHERE c.internalistitutionid = @idente
317
+
),
318
+
312
319
-- Tipi spedizione
313
320
Categorie AS (
314
321
SELECT IdTipoSpedizione AS FkIdTipoSpedizione
@@ -575,7 +582,7 @@ UNION ALL
575
582
NULL AS ValoreNazionali,
576
583
ce.Source,
577
584
@idente AS FkIdEnte,
578
-
NULL AS FkIdTipoContratto,
585
+
(SELECT FkIdTipoContratto FROM TipoContrattoEnte) AS FkIdTipoContratto,
579
586
@prodotto AS FkProdotto,
580
587
NULL AS FkIdStato,
581
588
ce.Year,
@@ -607,7 +614,7 @@ UNION ALL
607
614
NULL AS ValoreNazionali,
608
615
mm.Source,
609
616
@idente AS FkIdEnte,
610
-
NULL AS FkIdTipoContratto,
617
+
(SELECT FkIdTipoContratto FROM TipoContrattoEnte) AS FkIdTipoContratto,
611
618
@prodotto AS FkProdotto,
612
619
NULL AS FkIdStato,
613
620
mm.Year,
@@ -635,7 +642,7 @@ UNION ALL
635
642
NULL AS ValoreNazionali,
636
643
mtc.Source,
637
644
@idente AS FkIdEnte,
638
-
NULL AS FkIdTipoContratto,
645
+
(SELECT FkIdTipoContratto FROM TipoContrattoEnte) AS FkIdTipoContratto,
0 commit comments