aeat.domain.transactions._irpf_categories module

Ledger IRPF category catalogue for invoice-withholding treatment.

class LedgerIrpfCategoryDescriptor(id, purpose, directions, net_paid_invoice, related_category_ids=())[source]

Bases: object

One public --irpf-category value understood by ledger workflows.

Parameters:
id: str
purpose: Literal['activity_income_withholding', 'rent_expense_withholding', 'employment_income']
directions: tuple[TransactionDirection, ...]
net_paid_invoice: bool
related_category_ids: tuple[str, ...]
ledger_irpf_category_catalogue()[source]

Return public LedgerIrpfCategoryDescriptor rows for ledger IRPF categories.

Return type:

tuple[LedgerIrpfCategoryDescriptor, ...]

has_non_work_irpf_category(value)[source]

Return whether a row carries an explicit non-salary withholding axis.

Return type:

bool

Parameters:

value (str | None)

has_activity_irpf_category(value)[source]

Return whether a row carries the actividad-economica withholding axis.

Return type:

bool

Parameters:

value (str | None)

has_rent_irpf_category(value)[source]

Return whether a row carries an explicit rental withholding axis.

Return type:

bool

Parameters:

value (str | None)

format_irpf_category_ids(ids)[source]

Render stable category ids for operator-facing validator messages.

Return type:

str

Parameters:

ids (frozenset[str] | tuple[str, ...])