Changed the unmatched offsets from a module to a report, and to show both the unapplied original line items and the unmatched offsets instead of only the unmatched offsets, and added the accumulated balance, in order for ease of use. Removed the match information from the unapplied original line item report. Added the currency and period filters to both the unapplied original line item report and unmatched offset reports.

This commit is contained in:
2023-04-18 01:12:04 +08:00
parent f8895e3bff
commit e2f854b5cc
26 changed files with 1436 additions and 619 deletions

View File

@ -113,13 +113,39 @@ def balance_sheet_url(currency: Currency, period: Period) -> str:
currency=currency, period=period)
def unapplied_url(account: Account | None) -> str:
def unapplied_url(currency: Currency, account: Account | None,
period: Period) -> str:
"""Returns the URL of the unapplied original line items.
:param currency: The currency.
:param account: The account, or None to list the accounts with unapplied
original line items.
:param period: The period.
:return: The URL of the unapplied original line items.
"""
if account is None:
return url_for("accounting-report.unapplied-default")
return url_for("accounting-report.unapplied", account=account)
if currency.code == default_currency_code() and period.is_default:
return url_for("accounting-report.unapplied-accounts-default")
return url_for("accounting-report.unapplied-accounts",
currency=currency, period=period)
return url_for("accounting-report.unapplied",
currency=currency, account=account, period=period)
def unmatched_url(currency: Currency, account: Account | None,
period: Period) -> str:
"""Returns the URL of the unmatched offset line items.
:param currency: The currency.
:param account: The account, or None to list the accounts with unmatched
offset line items.
:param period: The period.
:return: The URL of the unmatched offset line items.
"""
if account is None:
if currency.code == default_currency_code() and period.is_default:
return url_for("accounting-report.unmatched-accounts-default")
return url_for("accounting-report.unmatched-accounts",
currency=currency, period=period)
return url_for("accounting-report.unmatched",
currency=currency, account=account, period=period)