diff --git a/src/accounting/report/report_rows.py b/src/accounting/report/report_rows.py index 24e1b8e..7e67e84 100644 --- a/src/accounting/report/report_rows.py +++ b/src/accounting/report/report_rows.py @@ -62,13 +62,13 @@ class JournalRow(ReportRow): """The account.""" def as_dict(self) -> dict[str, t.Any]: - return {"date": self.transaction.date, - "currency": str(self.currency), - "account": str(self.account), - "summary": self.summary, - "debit": self.amount if self.is_debit else None, - "credit": None if self.is_debit else self.amount, - "note": self.transaction.note} + return {"Date": self.transaction.date, + "Currency": str(self.currency), + "Account": str(self.account), + "Summary": self.summary, + "Debit": self.amount if self.is_debit else None, + "Credit": None if self.is_debit else self.amount, + "Note": self.transaction.note} class LedgerRow(ReportRow): @@ -103,13 +103,13 @@ class LedgerRow(ReportRow): def as_dict(self) -> dict[str, t.Any]: if self.is_total: - return {"date": "Total", - "summary": None, - "debit": self.debit, - "credit": self.credit, - "balance": self.balance} - return {"date": self.date, - "summary": self.summary, - "debit": self.debit, - "credit": self.credit, - "balance": self.balance} + return {"Date": "Total", + "Summary": None, + "Debit": self.debit, + "Credit": self.credit, + "Balance": self.balance} + return {"Date": self.date, + "Summary": self.summary, + "Debit": self.debit, + "Credit": self.credit, + "Balance": self.balance} diff --git a/src/accounting/report/reports.py b/src/accounting/report/reports.py index e004b34..d975cb8 100644 --- a/src/accounting/report/reports.py +++ b/src/accounting/report/reports.py @@ -198,8 +198,8 @@ class Journal(JournalEntryReport[JournalRow]): @property def csv_field_names(self) -> list[str]: - return ["date", "currency", "account", "summary", "debit", "credit", - "note"] + return ["Date", "Currency", "Account", "Summary", "Debit", "Credit", + "Note"] @property def csv_filename(self) -> str: @@ -345,7 +345,7 @@ class Ledger(JournalEntryReport[LedgerRow]): @property def csv_field_names(self) -> list[str]: - return ["date", "summary", "debit", "credit", "balance"] + return ["Date", "Summary", "Debit", "Credit", "Balance"] @property def csv_filename(self) -> str: