aeat.domain.iva package¶
Public facade for the registry-backed Spanish IVA substrate.
This package owns the canonical IVA taxonomy, dated rate lookup, settlement
flow mapping, invoice classification bridge, prorrata calculations, OSS/IOSS
regime metadata, recargo-equivalencia rates, refund eligibility, and SEPA marca
derivation. Runtime Python owns validation and deterministic resolution;
statutory rate windows, catalogue text, and recargo tables are loaded from
committed registry files under registry/aeat/iva.
The facade exposes closed identifiers such as IvaCategory,
EUMemberState, IvaRateKind, IvaCitationSource,
IvaFlowDirection, and IvaSettlementSide; loaders and lookups
such as load_iva_catalogues(), resolve_catalogue(),
load_iva_rate_table(), lookup_rate(), load_recargo_rates(),
and recargo_rate_for(); and the classification axis stack
(IvaTerritorialScope, CustomerTaxStatus,
TransactionKind, InvoiceKind) resolved by
classify_iva() into IvaClassificationResult.
Ledger and invoice callers use IvaInvoiceClassification,
classify_invoice_line_for_iva(), invoice_line_to_iva_observation(),
and derive_flow_for_classification() to carry the
category/rate/flow/settlement-side tuple without re-encoding IVA rules.
Legal prorrata remains a distinct LIVA arts. 101-103 substrate through
ProrrataInputs, ProrrataReference, ProrrataResult,
compute_prorrata_general(), and compute_sectoral_prorrata(); it is
not a usage-ratio or ledger business-percentage mechanism.
Callers from outside this subpackage import exclusively from
domain.iva and must not reach into private modules. This domain
surface is pure substrate logic: repositories, CLI commands, modelo binding,
and live AEAT access belong to application and adapter layers.
See also
domain.invoicesInvoice records and helpers that use this IVA substrate to produce registry-ready invoice and IVA observations.
application.aggregationSource-mesh resolvers that convert bucket-local ledger and invoice facts into IVA, OSS/IOSS, and prorrata-aware calculation payloads.
domain.calculations.registryBinding declarations, observation models, and formulas that consume the resolved IVA substrate during modelo calculation.
application.modeloWork-unit calculation and verification flows that persist the registry results; they do not own IVA taxonomy or rate lookup.
Submodules¶
- aeat.domain.iva._catalogue module
- aeat.domain.iva._classification module
IvaTerritorialScopeInvoiceKindCustomerTaxStatusTransactionKindTransactionKind.GOODSTransactionKind.SERVICES_GENERALTransactionKind.SERVICES_LAND_RELATEDTransactionKind.SERVICES_PASSENGER_TRANSPORTTransactionKind.SERVICES_RESTAURANTTransactionKind.IMMOVABLE_PROPERTYTransactionKind.PASSENGER_CARTransactionKind.CONSTRUCTION_REVERSE_CHARGETransactionKind.WASTE_REVERSE_CHARGETransactionKind.ELECTRONICS_REVERSE_CHARGETransactionKind.EXTERNAL_SCHEME_SERVICESTransactionKind.OSS_UNION_GOODS_DISTANCE_SALETransactionKind.OSS_UNION_GOODS_INTERFACE_FACILITATEDTransactionKind.OSS_UNION_SERVICESTransactionKind.IOSS_DISTANCE_SALE_LOW_VALUE
IvaInvoiceClassificationCriteriaIvaInvoiceClassificationCriteria.transaction_dateIvaInvoiceClassificationCriteria.issuer_residencyIvaInvoiceClassificationCriteria.customer_residencyIvaInvoiceClassificationCriteria.customer_tax_statusIvaInvoiceClassificationCriteria.kindIvaInvoiceClassificationCriteria.directionIvaInvoiceClassificationCriteria.issuer_member_stateIvaInvoiceClassificationCriteria.customer_member_stateIvaInvoiceClassificationCriteria.rate_tier
IvaClassificationResultclassify_iva()
- aeat.domain.iva._corpus module
- aeat.domain.iva._errors module
- aeat.domain.iva._flow module
- aeat.domain.iva._invoice_classification module
- aeat.domain.iva._lookup module
- aeat.domain.iva._oss module
- aeat.domain.iva._prorrata module
ProrrataRegimeProrrataKindInputClassificationProrrataInputsProrrataSectorProrrataResultProrrataReferenceProrrataInputDeductionvalidate_prorrata_reference()compute_prorrata_general()deductible_percentage_for()classify_input_deduction()is_especial_mandatory()RegularizacionProrrataDireccionRegularizacionProrrataResultRegularizacionProrrataResult.cuotas_soportadas_deduciblesRegularizacionProrrataResult.prorrata_provisional_pctRegularizacionProrrataResult.prorrata_definitiva_pctRegularizacionProrrataResult.deduccion_provisionalRegularizacionProrrataResult.deduccion_definitivaRegularizacionProrrataResult.importeRegularizacionProrrataResult.direccion
compute_prorrata_definitiva_anual()compute_regularizacion_prorrata_anual()requires_sectoral_separation()compute_sectoral_prorrata()sum_deductible_amounts()
- aeat.domain.iva._rates module
- aeat.domain.iva._recargo_equivalencia module
- aeat.domain.iva._refund_eligibility module
- aeat.domain.iva._saturation module
- aeat.domain.iva._schema module
IvaCategoryIvaCategory.DOMESTIC_GENERAL_21IvaCategory.DOMESTIC_REDUCED_10IvaCategory.DOMESTIC_SUPER_REDUCED_4IvaCategory.DOMESTIC_ZEROIvaCategory.DOMESTIC_EXEMPTIvaCategory.DOMESTIC_NOT_SUBJECTIvaCategory.DOMESTIC_REVERSE_CHARGEIvaCategory.INTRA_COMMUNITY_SUPPLYIvaCategory.INTRA_COMMUNITY_ACQUISITION_REVERSE_CHARGEIvaCategory.INTRA_COMMUNITY_TRIANGULATIONIvaCategory.EXPORT_THIRD_COUNTRY_ZERO_RATEDIvaCategory.EXPORT_ASSIMILATED_ZERO_RATEDIvaCategory.IMPORT_THIRD_COUNTRYIvaCategory.RECARGO_EQUIVALENCIAIvaCategory.REGIMEN_SIMPLIFICADOIvaCategory.OPERACION_NO_SUJETAIvaCategory.ERRONEOUS_INVOICEIvaCategory.UNKNOWN
IvaCashAccountingTreatmentIvaCashAccountingPaymentEvidenceIvaExemptionArticleEUMemberStateEUMemberState.ATEUMemberState.BEEUMemberState.BGEUMemberState.CYEUMemberState.CZEUMemberState.DEEUMemberState.DKEUMemberState.EEEUMemberState.ESEUMemberState.FIEUMemberState.FREUMemberState.GREUMemberState.HREUMemberState.HUEUMemberState.IEEUMemberState.ITEUMemberState.LTEUMemberState.LUEUMemberState.LVEUMemberState.MTEUMemberState.NLEUMemberState.PLEUMemberState.PTEUMemberState.ROEUMemberState.SEEUMemberState.SIEUMemberState.SKEUMemberState.XI
IvaRateKindIvaCitationSourceIvaRateRecordIvaCitationIvaRegulationIvaRegulation.categoryIvaRegulation.labelIvaRegulation.descriptionIvaRegulation.triggers_whenIvaRegulation.iva_treatmentIvaRegulation.requires_reverse_chargeIvaRegulation.requires_supplier_iva_idIvaRegulation.boe_referencesIvaRegulation.manual_referencesIvaRegulation.citationsIvaRegulation.notes
IvaCatalogueIvaVerificationIssueIvaVerificationReport
- aeat.domain.iva._sepa_marca module
- aeat.domain.iva._verify module