accounting.report.reports package
Submodules
accounting.report.reports.balance_sheet module
The balance sheet.
- class accounting.report.reports.balance_sheet.AccountCollector(currency: Currency, period: Period)
Bases:
objectThe balance sheet account collector.
- accounts: list[ReportAccount]
The balance sheet accounts.
- class accounting.report.reports.balance_sheet.BalanceSheet(currency: Currency, period: Period)
Bases:
BaseReportThe balance sheet.
- csv() Response
Returns the report as CSV for download.
- Returns:
The response of the report for download.
- html() str
Composes and returns the report as HTML.
- Returns:
The report as HTML.
- class accounting.report.reports.balance_sheet.CSVHalfRow(title: str | None, amount: Decimal | None)
Bases:
objectA half row in the CSV.
- amount: Decimal | None
The amount.
- title: str | None
The title.
- class accounting.report.reports.balance_sheet.CSVRow
Bases:
BaseCSVRowA row in the CSV.
- asset_amount: Decimal | None
The amount of the asset.
- asset_title: str | None
The title of the asset.
- liability_amount: Decimal | None
The amount of the liability.
- liability_title: str | None
The title of the liability.
- property values: list[str | Decimal | None]
Returns the values of the row.
- Returns:
The values of the row.
- class accounting.report.reports.balance_sheet.PageParams(currency: Currency, period: Period, has_data: bool, assets: Section, liabilities: Section, owner_s_equity: Section)
Bases:
BasePageParamsThe HTML page parameters.
- property currency_options: list[OptionLink]
Returns the currency options.
- Returns:
The currency options.
- property has_data: bool
Returns whether there is any data on the page.
- Returns:
True if there is any data, or False otherwise.
- period_chooser: PeriodChooser
The period chooser.
- property report_chooser: ReportChooser
Returns the report chooser.
- Returns:
The report chooser.
- class accounting.report.reports.balance_sheet.ReportAccount(account: Account, amount: Decimal, url: str)
Bases:
objectAn account in the report.
- amount: Decimal
The amount of the account.
- url: str
The URL to the ledger of the account.
- class accounting.report.reports.balance_sheet.Section(title: BaseAccount)
Bases:
objectA section.
- subsections: list[Subsection]
The subsections in the section.
- title: BaseAccount
The title account.
- property total: Decimal
Returns the total of the section.
- Returns:
The total of the section.
- class accounting.report.reports.balance_sheet.Subsection(title: BaseAccount)
Bases:
objectA subsection.
- accounts: list[ReportAccount]
The accounts in the subsection.
- title: BaseAccount
The title account.
- property total: Decimal
Returns the total of the subsection.
- Returns:
The total of the subsection.
accounting.report.reports.income_expenses module
The income and expenses log.
- class accounting.report.reports.income_expenses.CSVRow(date: date | str | None, account: str | None, description: str | None, income: str | Decimal | None, expense: str | Decimal | None, balance: str | Decimal | None, note: str | None)
Bases:
BaseCSVRowA row in the CSV.
- account: str | None
The account.
- balance: str | Decimal | None
The balance.
- date: date | str | None
The date.
- description: str | None
The description.
- expense: str | Decimal | None
The expense.
- income: str | Decimal | None
The income.
- note: str | None
The note.
- property values: list[str | Decimal | None]
Returns the values of the row.
- Returns:
The values of the row.
- class accounting.report.reports.income_expenses.IncomeExpenses(currency: Currency, account: CurrentAccount, period: Period)
Bases:
BaseReportThe income and expenses log.
- csv() Response
Returns the report as CSV for download.
- Returns:
The response of the report for download.
- html() str
Composes and returns the report as HTML.
- Returns:
The report as HTML.
- class accounting.report.reports.income_expenses.LineItemCollector(currency: Currency, account: CurrentAccount, period: Period)
Bases:
objectThe line item collector.
- brought_forward: ReportLineItem | None
The brought-forward line item.
- line_items: list[ReportLineItem]
The line items.
- total: ReportLineItem | None
The total line item.
- class accounting.report.reports.income_expenses.PageParams(currency: Currency, account: CurrentAccount, period: Period, has_data: bool, pagination: Pagination[ReportLineItem], brought_forward: ReportLineItem | None, line_items: list[ReportLineItem], total: ReportLineItem | None)
Bases:
BasePageParamsThe HTML page parameters.
- account: CurrentAccount
The account.
- property account_options: list[OptionLink]
Returns the account options.
- Returns:
The account options.
- brought_forward: ReportLineItem | None
The brought-forward line item.
- property currency_options: list[OptionLink]
Returns the currency options.
- Returns:
The currency options.
- property has_data: bool
Returns whether there is any data on the page.
- Returns:
True if there is any data, or False otherwise.
- line_items: list[ReportLineItem]
The line items.
- pagination: Pagination[ReportLineItem]
The pagination.
- period_chooser: PeriodChooser
The period chooser.
- property report_chooser: ReportChooser
Returns the report chooser.
- Returns:
The report chooser.
- total: ReportLineItem | None
The total line item.
- class accounting.report.reports.income_expenses.ReportLineItem(line_item: JournalEntryLineItem | None = None)
Bases:
objectA line item in the report.
- balance: Decimal | None
The balance.
- date: date | None
The date.
- description: str | None
The description.
- expense: Decimal | None
The expense amount.
- income: Decimal | None
The income amount.
- is_brought_forward: bool
Whether this is the brought-forward line item.
- is_total: bool
Whether this is the total line item.
- note: str | None
The note.
- url: str | None
The URL to the journal entry line item.
accounting.report.reports.income_statement module
The income statement.
- class accounting.report.reports.income_statement.AccumulatedTotal(title: str)
Bases:
objectAn accumulated total.
- amount: Decimal
The amount of the account.
- title: str
The account.
- class accounting.report.reports.income_statement.CSVRow(text: str | None, amount: str | Decimal | None)
Bases:
BaseCSVRowA row in the CSV.
- amount: str | Decimal | None
The amount.
- text: str | None
The text.
- property values: list[str | Decimal | None]
Returns the values of the row.
- Returns:
The values of the row.
- class accounting.report.reports.income_statement.IncomeStatement(currency: Currency, period: Period)
Bases:
BaseReportThe income statement.
- csv() Response
Returns the report as CSV for download.
- Returns:
The response of the report for download.
- html() str
Composes and returns the report as HTML.
- Returns:
The report as HTML.
- class accounting.report.reports.income_statement.PageParams(currency: Currency, period: Period, has_data: bool, sections: list[Section])
Bases:
BasePageParamsThe HTML page parameters.
- property currency_options: list[OptionLink]
Returns the currency options.
- Returns:
The currency options.
- property has_data: bool
Returns whether there is any data on the page.
- Returns:
True if there is any data, or False otherwise.
- period_chooser: PeriodChooser
The period chooser.
- property report_chooser: ReportChooser
Returns the report chooser.
- Returns:
The report chooser.
- class accounting.report.reports.income_statement.ReportAccount(account: Account, amount: Decimal, url: str)
Bases:
objectAn account in the report.
- amount: Decimal
The amount of the account.
- url: str
The URL to the ledger of the account.
- class accounting.report.reports.income_statement.Section(title: BaseAccount, accumulated_title: str)
Bases:
objectA section.
- accumulated: AccumulatedTotal
The accumulated total.
- subsections: list[Subsection]
The subsections in the section.
- title: BaseAccount
The title account.
- property total: Decimal
Returns the total of the section.
- Returns:
The total of the section.
- class accounting.report.reports.income_statement.Subsection(title: BaseAccount)
Bases:
objectA subsection.
- accounts: list[ReportAccount]
The accounts in the subsection.
- title: BaseAccount
The title account.
- property total: Decimal
Returns the total of the subsection.
- Returns:
The total of the subsection.
accounting.report.reports.journal module
The journal.
- class accounting.report.reports.journal.CSVRow(journal_entry_date: str | date, currency: str, account: str, description: str | None, debit: str | Decimal | None, credit: str | Decimal | None, note: str | None)
Bases:
BaseCSVRowA row in the CSV.
- account: str
The account.
- credit: str | Decimal | None
The credit amount.
- currency: str
The currency.
- date: str | date
The date.
- debit: str | Decimal | None
The debit amount.
- description: str | None
The description.
- note: str | None
The note.
- property values: list[str | Decimal | None]
Returns the values of the row.
- Returns:
The values of the row.
- class accounting.report.reports.journal.Journal(period: Period)
Bases:
BaseReportThe journal.
- csv() Response
Returns the report as CSV for download.
- Returns:
The response of the report for download.
- html() str
Composes and returns the report as HTML.
- Returns:
The report as HTML.
- class accounting.report.reports.journal.PageParams(period: Period, pagination: Pagination[JournalEntryLineItem], line_items: list[JournalEntryLineItem])
Bases:
BasePageParamsThe HTML page parameters.
- property has_data: bool
Returns whether there is any data on the page.
- Returns:
True if there is any data, or False otherwise.
- line_items: list[JournalEntryLineItem]
The line items.
- pagination: Pagination[JournalEntryLineItem]
The pagination.
- period_chooser: PeriodChooser
The period chooser.
- property report_chooser: ReportChooser
Returns the report chooser.
- Returns:
The report chooser.
- class accounting.report.reports.journal.ReportLineItem(line_item: JournalEntryLineItem)
Bases:
objectA line item in the report.
- amount: Decimal
The amount.
- credit: Decimal | None
The credit amount.
- debit: Decimal | None
The debit amount.
- description: str | None
The description.
- journal_entry: JournalEntry
The journal entry.
- line_item: JournalEntryLineItem
The journal entry line item.
- accounting.report.reports.journal.get_csv_rows(line_items: list[JournalEntryLineItem]) list[CSVRow]
Composes and returns the CSV rows from the line items.
- Parameters:
line_items – The line items.
- Returns:
The CSV rows.
accounting.report.reports.ledger module
The ledger.
- class accounting.report.reports.ledger.CSVRow(date: date | str | None, description: str | None, debit: str | Decimal | None, credit: str | Decimal | None, balance: str | Decimal | None, note: str | None)
Bases:
BaseCSVRowA row in the CSV.
- balance: str | Decimal | None
The balance.
- credit: str | Decimal | None
The credit amount.
- date: date | str | None
The date.
- debit: str | Decimal | None
The debit amount.
- description: str | None
The description.
- note: str | None
The note.
- property values: list[str | Decimal | None]
Returns the values of the row.
- Returns:
The values of the row.
- class accounting.report.reports.ledger.Ledger(currency: Currency, account: Account, period: Period)
Bases:
BaseReportThe ledger.
- csv() Response
Returns the report as CSV for download.
- Returns:
The response of the report for download.
- html() str
Composes and returns the report as HTML.
- Returns:
The report as HTML.
- class accounting.report.reports.ledger.LineItemCollector(currency: Currency, account: Account, period: Period)
Bases:
objectThe line item collector.
- brought_forward: ReportLineItem | None
The brought-forward line item.
- line_items: list[ReportLineItem]
The line items.
- total: ReportLineItem | None
The total line item.
- class accounting.report.reports.ledger.PageParams(currency: Currency, account: Account, period: Period, has_data: bool, pagination: Pagination[ReportLineItem], brought_forward: ReportLineItem | None, line_items: list[ReportLineItem], total: ReportLineItem | None)
Bases:
BasePageParamsThe HTML page parameters.
- property account_options: list[OptionLink]
Returns the account options.
- Returns:
The account options.
- brought_forward: ReportLineItem | None
The brought-forward line item.
- property currency_options: list[OptionLink]
Returns the currency options.
- Returns:
The currency options.
- property has_data: bool
Returns whether there is any data on the page.
- Returns:
True if there is any data, or False otherwise.
- line_items: list[ReportLineItem]
The line items.
- pagination: Pagination[ReportLineItem]
The pagination.
- period_chooser: PeriodChooser
The period chooser.
- property report_chooser: ReportChooser
Returns the report chooser.
- Returns:
The report chooser.
- total: ReportLineItem | None
The total line item.
- class accounting.report.reports.ledger.ReportLineItem(line_item: JournalEntryLineItem | None = None)
Bases:
objectA line item in the report.
- balance: Decimal | None
The balance.
- credit: Decimal | None
The credit amount.
- date: date | None
The date.
- debit: Decimal | None
The debit amount.
- description: str | None
The description.
- is_brought_forward: bool
Whether this is the brought-forward line item.
- is_total: bool
Whether this is the total line item.
- note: str | None
The note.
- url: str | None
The URL to the journal entry line item.
accounting.report.reports.search module
The search.
- class accounting.report.reports.search.LineItemCollector
Bases:
objectThe line item collector.
- line_items: list[JournalEntryLineItem]
The line items.
- class accounting.report.reports.search.PageParams(pagination: Pagination[JournalEntryLineItem], line_items: list[JournalEntryLineItem])
Bases:
BasePageParamsThe HTML page parameters.
- property has_data: bool
Returns whether there is any data on the page.
- Returns:
True if there is any data, or False otherwise.
- line_items: list[JournalEntryLineItem]
The line items.
- pagination: Pagination[JournalEntryLineItem]
The pagination.
- property report_chooser: ReportChooser
Returns the report chooser.
- Returns:
The report chooser.
- class accounting.report.reports.search.Search
Bases:
BaseReportThe search.
- csv() Response
Returns the report as CSV for download.
- Returns:
The response of the report for download.
- html() str
Composes and returns the report as HTML.
- Returns:
The report as HTML.
accounting.report.reports.trial_balance module
The trial balance.
- class accounting.report.reports.trial_balance.CSVRow(text: str | None, debit: str | Decimal | None, credit: str | Decimal | None)
Bases:
BaseCSVRowA row in the CSV.
- credit: str | Decimal | None
The credit amount.
- debit: str | Decimal | None
The debit amount.
- text: str | None
The text.
- property values: list[str | Decimal | None]
Returns the values of the row.
- Returns:
The values of the row.
- class accounting.report.reports.trial_balance.PageParams(currency: Currency, period: Period, accounts: list[ReportAccount], total: Total)
Bases:
BasePageParamsThe HTML page parameters.
- accounts: list[ReportAccount]
The accounts in the trial balance.
- property currency_options: list[OptionLink]
Returns the currency options.
- Returns:
The currency options.
- property has_data: bool
Returns whether there is any data on the page.
- Returns:
True if there is any data, or False otherwise.
- period_chooser: PeriodChooser
The period chooser.
- property report_chooser: ReportChooser
Returns the report chooser.
- Returns:
The report chooser.
- class accounting.report.reports.trial_balance.ReportAccount(account: Account, amount: Decimal, url: str)
Bases:
objectAn account in the report.
- credit: Decimal | None
The credit amount.
- debit: Decimal | None
The debit amount.
- url: str
The URL to the ledger of the account.
- class accounting.report.reports.trial_balance.Total(debit: Decimal, credit: Decimal)
Bases:
objectThe totals.
- credit: Decimal | None
The credit amount.
- debit: Decimal | None
The debit amount.
- class accounting.report.reports.trial_balance.TrialBalance(currency: Currency, period: Period)
Bases:
BaseReportThe trial balance.
- csv() Response
Returns the report as CSV for download.
- Returns:
The response of the report for download.
- html() str
Composes and returns the report as HTML.
- Returns:
The report as HTML.
accounting.report.reports.unapplied module
The unapplied original line items.
- class accounting.report.reports.unapplied.CSVRow(journal_entry_date: str | date, currency: str, description: str | None, amount: str | Decimal, net_balance: str | Decimal)
Bases:
BaseCSVRowA row in the CSV.
- amount: str | Decimal
The amount.
- currency: str
The currency.
- date: str | date
The date.
- description: str | None
The description.
- net_balance: str | Decimal
The net balance.
- property values: list[str | date | Decimal | None]
Returns the values of the row.
- Returns:
The values of the row.
- class accounting.report.reports.unapplied.PageParams(currency: Currency, account: Account, pagination: Pagination[JournalEntryLineItem], line_items: list[JournalEntryLineItem])
Bases:
BasePageParamsThe HTML page parameters.
- property account_options: list[OptionLink]
Returns the account options.
- Returns:
The account options.
- property currency_options: list[OptionLink]
Returns the currency options.
- Returns:
The currency options.
- property has_data: bool
Returns whether there is any data on the page.
- Returns:
True if there is any data, or False otherwise.
- line_items: list[JournalEntryLineItem]
The line items.
- pagination: Pagination[JournalEntryLineItem]
The pagination.
- property report_chooser: ReportChooser
Returns the report chooser.
- Returns:
The report chooser.
- class accounting.report.reports.unapplied.UnappliedOriginalLineItems(currency: Currency, account: Account)
Bases:
BaseReportThe unapplied original line items.
- csv() Response
Returns the report as CSV for download.
- Returns:
The response of the report for download.
- html() str
Composes and returns the report as HTML.
- Returns:
The report as HTML.
- accounting.report.reports.unapplied.get_csv_rows(line_items: list[JournalEntryLineItem]) list[CSVRow]
Composes and returns the CSV rows from the line items.
- Parameters:
line_items – The line items.
- Returns:
The CSV rows.
accounting.report.reports.unapplied_accounts module
The accounts with unapplied original line items.
- class accounting.report.reports.unapplied_accounts.AccountsWithUnappliedOriginalLineItems(currency: Currency)
Bases:
BaseReportThe accounts with unapplied original line items.
- csv() Response
Returns the report as CSV for download.
- Returns:
The response of the report for download.
- html() str
Composes and returns the report as HTML.
- Returns:
The report as HTML.
- class accounting.report.reports.unapplied_accounts.CSVRow(account: str, count: int | str)
Bases:
BaseCSVRowA row in the CSV.
- account: str
The currency.
- count: int | str
The number of unapplied original line items.
- property values: list[str | date | Decimal | None]
Returns the values of the row.
- Returns:
The values of the row.
- class accounting.report.reports.unapplied_accounts.PageParams(currency: Currency, accounts: list[Account])
Bases:
BasePageParamsThe HTML page parameters.
- property account_options: list[OptionLink]
Returns the account options.
- Returns:
The account options.
- property currency_options: list[OptionLink]
Returns the currency options.
- Returns:
The currency options.
- property has_data: bool
Returns whether there is any data on the page.
- Returns:
True if there is any data, or False otherwise.
- property report_chooser: ReportChooser
Returns the report chooser.
- Returns:
The report chooser.
accounting.report.reports.unmatched module
The unmatched offsets.
- class accounting.report.reports.unmatched.CSVRow(journal_entry_date: str | date, currency: str, description: str | None, debit: str | Decimal, credit: str | Decimal, balance: str | Decimal)
Bases:
BaseCSVRowA row in the CSV.
- balance: str | Decimal
The balance.
- credit: str | Decimal | None
The credit amount.
- currency: str
The currency.
- date: str | date
The date.
- debit: str | Decimal | None
The debit amount.
- description: str | None
The description.
- property values: list[str | date | Decimal | None]
Returns the values of the row.
- Returns:
The values of the row.
- class accounting.report.reports.unmatched.PageParams(currency: Currency, account: Account, match_status: str | LazyString, matched_pairs: list[OffsetPair], pagination: Pagination[JournalEntryLineItem], line_items: list[JournalEntryLineItem])
Bases:
BasePageParamsThe HTML page parameters.
- property account_options: list[OptionLink]
Returns the account options.
- Returns:
The account options.
- property currency_options: list[OptionLink]
Returns the currency options.
- Returns:
The currency options.
- property has_data: bool
Returns whether there is any data on the page.
- Returns:
True if there is any data, or False otherwise.
- line_items: list[JournalEntryLineItem]
The line items.
- match_status: str | LazyString
The match status message.
- matched_pairs: list[OffsetPair]
A list of matched pairs.
- pagination: Pagination[JournalEntryLineItem]
The pagination.
- property report_chooser: ReportChooser
Returns the report chooser.
- Returns:
The report chooser.
- class accounting.report.reports.unmatched.UnmatchedOffsets(currency: Currency, account: Account)
Bases:
BaseReportThe unmatched offsets.
- csv() Response
Returns the report as CSV for download.
- Returns:
The response of the report for download.
- html() str
Composes and returns the report as HTML.
- Returns:
The report as HTML.
- accounting.report.reports.unmatched.get_csv_rows(line_items: list[JournalEntryLineItem]) list[CSVRow]
Composes and returns the CSV rows from the line items.
- Parameters:
line_items – The line items.
- Returns:
The CSV rows.
accounting.report.reports.unmatched_accounts module
The accounts with unmatched offsets.
- class accounting.report.reports.unmatched_accounts.AccountsWithUnmatchedOffsets(currency: Currency)
Bases:
BaseReportThe accounts with unmatched offsets.
- csv() Response
Returns the report as CSV for download.
- Returns:
The response of the report for download.
- html() str
Composes and returns the report as HTML.
- Returns:
The report as HTML.
- class accounting.report.reports.unmatched_accounts.CSVRow(account: str, count: int | str)
Bases:
BaseCSVRowA row in the CSV.
- account: str
The currency.
- count: int | str
The number of unapplied original line items.
- property values: list[str | date | Decimal | None]
Returns the values of the row.
- Returns:
The values of the row.
- class accounting.report.reports.unmatched_accounts.PageParams(currency: Currency, accounts: list[Account])
Bases:
BasePageParamsThe HTML page parameters.
- property account_options: list[OptionLink]
Returns the account options.
- Returns:
The account options.
- property currency_options: list[OptionLink]
Returns the currency options.
- Returns:
The currency options.
- property has_data: bool
Returns whether there is any data on the page.
- Returns:
True if there is any data, or False otherwise.
- property report_chooser: ReportChooser
Returns the report chooser.
- Returns:
The report chooser.
Module contents
The reports.