accounting.report package

Subpackages

Submodules

accounting.report.converters module

The path converters for the report management.

class accounting.report.converters.CurrentAccountConverter(map: Map, *args: t.Any, **kwargs: t.Any)

Bases: BaseConverter

The converter to convert the current account code from and to the corresponding account in the routes.

to_python(value: str) CurrentAccount

Converts an account code to an account.

Parameters:

value – The account code.

Returns:

The corresponding account.

to_url(value: CurrentAccount) str

Converts an account to account code.

Parameters:

value – The account.

Returns:

Its code.

class accounting.report.converters.NeedOffsetAccountConverter(map: Map, *args: t.Any, **kwargs: t.Any)

Bases: BaseConverter

The converter to convert the unapplied original line item account code from and to the corresponding account in the routes.

to_python(value: str) Account

Converts an account code to an account.

Parameters:

value – The account code.

Returns:

The corresponding account.

to_url(value: Account) str

Converts an account to account code.

Parameters:

value – The account.

Returns:

Its code.

class accounting.report.converters.PeriodConverter(map: Map, *args: t.Any, **kwargs: t.Any)

Bases: BaseConverter

The converter to convert the period specification from and to the corresponding period in the routes.

to_python(value: str) Period

Converts a period specification to a period.

Parameters:

value – The period specification.

Returns:

The corresponding period.

to_url(value: Period) str

Converts a period to its specification.

Parameters:

value – The period.

Returns:

Its specification.

accounting.report.template_filters module

The template filters for the reports.

accounting.report.template_filters.format_amount(value: Decimal | None) str | None

Formats an amount for the report.

Parameters:

value – The amount.

Returns:

The formatted amount text.

accounting.report.views module

The views for the report management.

accounting.report.views.bp: Blueprint = <Blueprint 'accounting-report'>

The view blueprint for the reports.

Module contents

The report management.

accounting.report.init_app(app: Flask, url_prefix: str) None

Initialize the application.

Parameters:
  • app – The Flask application.

  • url_prefix – The URL prefix of the accounting application.

Returns:

None.