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
+1
View File
@@ -44,6 +44,7 @@ namespace General_Ledger_Service.Repositories
// Actual = posted base debit - credit per (account, period), summed in the database.
var actuals = await _context.JournalEntryLines
.Where(l => l.Journal.IsPosted
&& l.Journal.JournalType != "CLOSING"
&& accountIds.Contains(l.AccountId)
&& periodIds.Contains(l.Journal.PeriodId))
.GroupBy(l => new { l.AccountId, l.Journal.PeriodId })