aeat.domain.categories package¶
Public facade for AEAT spending-category taxonomy and profiles.
This package owns the closed autónomo expense vocabulary,
SpendingCategory, its grouping surface
SpendingCategoryFamily, and the
CATEGORY_FAMILY_MEMBERS membership table. Category identifiers are the
stable values used by ledger rows, invoice rows, usage-ratio overrides, Renta
deductibility, and LLM classification hints; renaming an enum member is a
breaking storage and calculation change.
Year-specific profile data is loaded from committed TOML under
registry/aeat/categories/profiles through
load_category_profile_registry(),
resolve_category_profiles(), and
load_category_profiles_from_manual(). Runtime Python owns validation and
resolution behaviour, not legal profile values.
Each CategoryProfile binds a category to
ProportionalityRule, ProportionalityKind,
StatutoryCapPeriod, StatutoryCapVariant,
IvaDeductibilityHint, and at least one CategoryCitation /
CategoryCitationSource, preserving the explainability chain back to
BOE, AEAT help, or Manual práctico evidence. effective_usage_ratio()
applies only the factual proportionality multiplier; modelo applicability,
casilla routing, and filing-grade legal treatment remain in
domain.calculations.registry and the application source mesh.
See also
domain.usage_ratiosStores operator overrides keyed by concrete
SpendingCategoryvalues whose proportionality kind permits a user ratio.domain.rentaEvaluates category profiles and citations into Renta deductible-expense observations.
application.ledgerValidates ledger
category_id/usage_ratio_idfacts before the application source mesh feeds modelo calculation.domain.invoicesCarries the same stable category identifiers on invoice and purchase evidence records used by aggregation.
domain.calculations.registryOwns modelo applicability, binding declarations, formulas, and casilla routing outside this taxonomy surface.
Submodules¶
- aeat.domain.categories._corpus module
- aeat.domain.categories._errors module
- aeat.domain.categories._profile module
- aeat.domain.categories._proportionality module
CategoryCitationSourceCategoryCitationparse_http_url()ProportionalityKindStatutoryCapPeriodStatutoryCapVariantProportionalityRuleProportionalityRule.kindProportionalityRule.fixed_pctProportionalityRule.default_ratioProportionalityRule.statutory_multiplierProportionalityRule.statutory_cap_eur_per_dayProportionalityRule.statutory_cap_eurProportionalityRule.statutory_cap_periodProportionalityRule.statutory_cap_variantsProportionalityRule.citationsProportionalityRule.notes
effective_usage_ratio()
- aeat.domain.categories._registry module
- aeat.domain.categories._spending_category module
SpendingCategorySpendingCategory.CUOTAS_COLEGIALESSpendingCategory.CUOTAS_AUTONOMOS_SSSpendingCategory.MUTUALIDAD_ALTERNATIVASpendingCategory.ARRENDAMIENTO_LOCALSpendingCategory.ARRENDAMIENTO_VIVIENDA_AFECTOSpendingCategory.IBI_LOCAL_AFECTOSpendingCategory.SUMINISTROS_HOME_OFFICE_LUZSpendingCategory.SUMINISTROS_HOME_OFFICE_AGUASpendingCategory.SUMINISTROS_HOME_OFFICE_GASSpendingCategory.SUMINISTROS_HOME_OFFICE_INTERNETSpendingCategory.AMORTIZACION_VIVIENDA_AFECTOSpendingCategory.IBI_VIVIENDA_AFECTOSpendingCategory.COMUNIDAD_VIVIENDA_AFECTOSpendingCategory.TELEFONIA_MOVILSpendingCategory.TELEFONIA_FIJASpendingCategory.MATERIAL_OFICINASpendingCategory.SOFTWARE_SUSCRIPCIONSpendingCategory.HARDWARE_AMORTIZABLESpendingCategory.MOBILIARIO_AMORTIZABLESpendingCategory.REPARACIONES_CONSERVACIONSpendingCategory.VEHICULO_COMBUSTIBLESpendingCategory.VEHICULO_MANTENIMIENTOSpendingCategory.VEHICULO_SEGUROSpendingCategory.VEHICULO_PEAJESpendingCategory.VEHICULO_PARKINGSpendingCategory.MANUTENCION_DIETAS_NACIONALSpendingCategory.MANUTENCION_DIETAS_EXTRANJEROSpendingCategory.ASESORIA_FISCALSpendingCategory.ASESORIA_JURIDICASpendingCategory.ASESORIA_CONTABLESpendingCategory.PUBLICIDAD_MARKETINGSpendingCategory.FORMACION_PROFESIONALSpendingCategory.VIAJES_TRANSPORTESpendingCategory.VIAJES_ALOJAMIENTOSpendingCategory.SEGUROS_RESPONSABILIDAD_CIVILSpendingCategory.SEGUROS_SALUD_AUTONOMOSpendingCategory.GASTOS_BANCARIOSSpendingCategory.GASTOS_FINANCIEROSSpendingCategory.SUMINISTROS_CLIENTE_DIRECTOSSpendingCategory.SUBCONTRATACIONSpendingCategory.TRIBUTOS_FISCALMENTE_DEDUCIBLES
SpendingCategoryFamilySpendingCategoryFamily.SOCIAL_SECURITYSpendingCategoryFamily.PREMISESSpendingCategoryFamily.HOME_OFFICE_SUMINISTROSSpendingCategoryFamily.HOME_OFFICE_OWNERSHIPSpendingCategoryFamily.TELECOMSSpendingCategoryFamily.OFFICESpendingCategoryFamily.VEHICLESpendingCategoryFamily.MEALSSpendingCategoryFamily.PROFESSIONAL_SERVICESSpendingCategoryFamily.TRAVELSpendingCategoryFamily.INSURANCESpendingCategoryFamily.FINANCIALSpendingCategoryFamily.DIRECT_COSTSSpendingCategoryFamily.TAXES
CATEGORY_FAMILY_MEMBERSfamily_for()categories_for_family()