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:
@@ -7,15 +7,14 @@ namespace General_Ledger_Service.Services.CsvDocuments
|
||||
public static byte[] Generate(List<GeneralLedgerLineDto> rows)
|
||||
{
|
||||
var csv = new CsvBuilder();
|
||||
csv.AddRow("Account Code", "Account Name", "Date", "Particulars", "J.R. (Journal No.)", "Debit", "Credit", "Balance");
|
||||
csv.AddRow("Account Code", "Account Name", "Date", "Particulars", "J.R. (Journal No.)", "Debit", "Credit");
|
||||
|
||||
foreach (var row in rows)
|
||||
{
|
||||
csv.AddRow(
|
||||
row.AccountCode, row.AccountName, row.EntryDate, row.Narration, row.JournalNo,
|
||||
row.DebitAmount == 0 ? null : row.DebitAmount,
|
||||
row.CreditAmount == 0 ? null : row.CreditAmount,
|
||||
row.RunningBalance);
|
||||
row.CreditAmount == 0 ? null : row.CreditAmount);
|
||||
}
|
||||
|
||||
return csv.Build();
|
||||
|
||||
Reference in New Issue
Block a user