Enhance financial report accuracy by including closing journals in profit and loss calculations and trial balances; add idempotency check for journal entry creation.

This commit is contained in:
2026-10-20 18:52:04 +05:30
parent 3f16e0cb44
commit 21c7ba54ea
10 changed files with 56 additions and 26 deletions
+2
View File
@@ -38,6 +38,7 @@ namespace General_Ledger_Service.Repositories
{
var net = await _context.JournalEntryLines
.Where(l => l.Journal.IsPosted
&& l.Journal.JournalType != "CLOSING"
&& l.Journal.EntryDate >= periodStart
&& l.Journal.EntryDate <= periodEnd
&& l.Account.AccountTypeId == 5
@@ -53,6 +54,7 @@ namespace General_Ledger_Service.Repositories
{
return await _context.JournalEntryLines
.Where(l => l.Journal.IsPosted
&& l.Journal.JournalType != "CLOSING"
&& l.Journal.EntryDate >= periodStart
&& l.Journal.EntryDate <= periodEnd
&& l.AccountId == accountId)