Added note to the CSV output of ledgers.
This commit is contained in:
parent
1d0a79e33c
commit
b806b1ed1f
@ -95,6 +95,8 @@ class LedgerRow(ReportRow):
|
||||
"""The credit amount."""
|
||||
self.balance: Decimal | None = None
|
||||
"""The balance."""
|
||||
self.note: str | None = None
|
||||
"""The note."""
|
||||
if entry is not None:
|
||||
self.entry = entry
|
||||
self.summary = entry.summary
|
||||
@ -107,9 +109,11 @@ class LedgerRow(ReportRow):
|
||||
"Summary": None,
|
||||
"Debit": self.debit,
|
||||
"Credit": self.credit,
|
||||
"Balance": self.balance}
|
||||
"Balance": self.balance,
|
||||
"Note": None}
|
||||
return {"Date": self.date,
|
||||
"Summary": self.summary,
|
||||
"Debit": self.debit,
|
||||
"Credit": self.credit,
|
||||
"Balance": self.balance}
|
||||
"Balance": self.balance,
|
||||
"Note": self.note}
|
||||
|
@ -342,10 +342,11 @@ class Ledger(JournalEntryReport[LedgerRow]):
|
||||
if row.entry is not None:
|
||||
row.transaction = transactions[row.entry.transaction_id]
|
||||
row.date = row.transaction.date
|
||||
row.note = row.transaction.note
|
||||
|
||||
@property
|
||||
def csv_field_names(self) -> list[str]:
|
||||
return ["Date", "Summary", "Debit", "Credit", "Balance"]
|
||||
return ["Date", "Summary", "Debit", "Credit", "Balance", "Note"]
|
||||
|
||||
@property
|
||||
def csv_filename(self) -> str:
|
||||
|
Loading…
Reference in New Issue
Block a user