accounting.journal_entry package

Subpackages

Submodules

accounting.journal_entry.converters module

The path converters for the journal entry management.

class accounting.journal_entry.converters.DateConverter(map: Map, *args: t.Any, **kwargs: t.Any)

Bases: BaseConverter

The date converter to convert the ISO date from and to the corresponding date in the routes.

to_python(value: str) date

Converts an ISO date to a date.

Parameters:

value – The ISO date.

Returns:

The corresponding date.

to_url(value: date) str

Converts a date to its ISO date.

Parameters:

value – The date.

Returns:

The ISO date.

class accounting.journal_entry.converters.JournalEntryConverter(map: Map, *args: t.Any, **kwargs: t.Any)

Bases: BaseConverter

The journal entry converter to convert the journal entry ID from and to the corresponding journal entry in the routes.

to_python(value: str) JournalEntry

Converts a journal entry ID to a journal entry.

Parameters:

value – The journal entry ID.

Returns:

The corresponding journal entry.

to_url(value: JournalEntry) str

Converts a journal entry to its ID.

Parameters:

value – The journal entry.

Returns:

The ID.

class accounting.journal_entry.converters.JournalEntryTypeConverter(map: Map, *args: t.Any, **kwargs: t.Any)

Bases: BaseConverter

The journal entry converter to convert the journal entry type ID from and to the corresponding journal entry type in the routes.

to_python(value: str) JournalEntryType

Converts a journal entry ID to a journal entry.

Parameters:

value – The journal entry ID.

Returns:

The corresponding journal entry type.

to_url(value: JournalEntryType) str

Converts a journal entry type to its ID.

Parameters:

value – The journal entry type.

Returns:

The ID.

accounting.journal_entry.template_filters module

The template filters for the journal entry management.

accounting.journal_entry.template_filters.format_amount_input(value: Decimal | None) str

Format an amount for an input value.

Parameters:

value – The amount.

Returns:

The formatted amount text for an input value.

accounting.journal_entry.template_filters.text2html(value: str) str

Converts plain text into HTML.

Parameters:

value – The plain text.

Returns:

The HTML.

accounting.journal_entry.template_filters.to_transfer(uri: str) str

Adds the transfer journal entry type to the URI.

Parameters:

uri – The URI.

Returns:

The result URL, with the transfer journal entry type added.

accounting.journal_entry.template_filters.with_type(uri: str) str

Adds the journal entry type to the URI, if it is specified.

Parameters:

uri – The URI.

Returns:

The result URL, optionally with the journal entry type added.

accounting.journal_entry.views module

The views for the journal entry management.

accounting.journal_entry.views.bp: Blueprint = <Blueprint 'journal-entry'>

The view blueprint for the journal entry management.

Module contents

The journal entry management.

accounting.journal_entry.init_app(app: Flask, bp: Blueprint) None

Initialize the application.

Parameters:
  • app – The Flask application.

  • bp – The blueprint of the accounting application.

Returns:

None.