Skip to content

Commit 326cb16

Browse files
committed
fix: 588
Merged PR 179: Fix whitelist datafine null
1 parent d3cdbf9 commit 326cb16

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Infrastructure/PortaleFatture.BE.Infrastructure/Common/SEND/Fatture/Queries/Persistence/Builder/FattureQueryRicercaBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ public static string SelectWhiteListAnni()
562562
return $@"
563563
SELECT DISTINCT Anno
564564
FROM [pfd].[FattureWhiteList]
565+
WHERE DataFine IS NULL
565566
ORDER BY Anno DESC;
566567
";
567568
}

src/Infrastructure/PortaleFatture.BE.Infrastructure/Common/SEND/Fatture/Queries/Persistence/WhiteListFatturaEnteMesiQueryPersistence.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public sealed class WhiteListFatturaEnteMesiQueryPersistence(WhiteListFatturaEnt
1111
private static readonly string _orderBy = FattureQueryRicercaBuilder.OrderByWhiteListMesi();
1212
public async Task<IEnumerable<int>?> Execute(IDbConnection? connection, string schema, IDbTransaction? transaction, CancellationToken cancellationToken = default)
1313
{
14-
var where = " WHERE anno=@anno";
14+
var where = " WHERE anno=@anno AND DataFine IS NULL";
1515
return await ((IDatabase)this).SelectAsync<int>(connection!, _sqlSelectAll + where + _orderBy, _command, transaction);
1616
}
1717
}

0 commit comments

Comments
 (0)