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:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user