aeat.application.calculations package¶
Application-layer calculation source stores, proof records, and prefill helpers.
The registry runtime consumes already-resolved binding_values and
relation_values for
domain.calculations.registry.calculate_registry_snapshot(). This
package is the public application facade for the stores, source resolvers, and
typed proof records that produce those inputs from local filing history, IVA
wallet reconciliation, relation prefill, row-set detail captures, and
cross-period clean-state evidence.
This facade is not the formula runtime. It owns persisted observations, source-proof assembly, carry-forward policy, and source resolvers that feed the registry engine; the registry remains the authority for casilla definitions, binding declarations, relation closure, and formula execution.
Direct prior-filing bindings and registry relations are deliberately separate
source owners. PreviousFilingSourceResolver resolves
core.BindingSourceKind.PREVIOUS_FILING binding carries;
RelationPrefillSourceResolver resolves
core.BindingSourceKind.RELATION_PREFILL relation fold-ins and
their materialised target bindings; IvaWalletDecisionSourceResolver
resolves the Modelo 303
core.BindingSourceKind.IVA_WALLET_DECISION compensation authority
outside the ordinary previous-filing carry; and
IvaCompensationAnnualPartitionSourceResolver resolves Modelo 390
core.BindingSourceKind.IVA_COMPENSATION_ANNUAL_PARTITION boxes 97
and 662 from the same FIFO carry projection.
The main public surfaces are:
CalculationObservationRepositoryandIvaWalletDecisionRepository, encrypted stores for priordomain.calculations.registry.RegistryModeloObservationrecords, plusIvaCompensationHistoryRepositoryfor secure Modelo 303 compensation history.PreviousFilingSourceResolver,RelationPrefillSourceResolver, andIvaWalletDecisionSourceResolver, source-mesh adapters that produceapplication.aggregation.CalculationSourceResolutionenvelopes.resolve_bindings_from_local_store()andresolve_relations_from_local_store(), prefill readers over the same local observation substrate;BindingPrefillReportandPrefilledBindingcarry the direct previous-filing coverage.cross_period_dependency_requirements()andevaluate_cross_period_clean_state(), the filing-grade dependency proof whoseCrossPeriodCleanStateVerdictjoinsCrossPeriodDependencyRequirementrows to filing records, revisions, verification reports, and justificante evidence.Row-set assemblers such as
assemble_withholding_observations(), which turn pull-side Detalle cells intoAssembledObservationspayloads for persistence.
See also
application.aggregationDefines the source-mesh contracts consumed by the calculation path.
domain.calculations.registryOwns the pure registry snapshots, binding definitions, relation requirements, and formula runtime.
application.modeloOrchestrates these package-level services inside work calculation, verification, filing, and export workflows.
Submodules¶
- aeat.application.calculations._bienes_inversion_regularizacion module
- aeat.application.calculations._binding_prefill module
PrefilledBindingBindingPrefillReportLocalIvaCompensationRecurrenceLocalIvaCompensationRecurrence.binding_idLocalIvaCompensationRecurrence.amountLocalIvaCompensationRecurrence.source_kindLocalIvaCompensationRecurrence.source_modeloLocalIvaCompensationRecurrence.source_filing_yearLocalIvaCompensationRecurrence.source_periodsLocalIvaCompensationRecurrence.resolved_atLocalIvaCompensationRecurrence.source_locator
resolve_bindings_from_local_store()extract_modelo_303_local_iva_compensation_recurrence()
- aeat.application.calculations._cross_period_clean_state module
- aeat.application.calculations._cross_period_models module
CrossPeriodDependencyOriginCrossPeriodCleanStateBlockerCrossPeriodCleanStateBlocker.MISSING_OBSERVATIONCrossPeriodCleanStateBlocker.MISSING_OBSERVED_CASILLACrossPeriodCleanStateBlocker.MISSING_CURRENT_FILING_RECORDCrossPeriodCleanStateBlocker.DUPLICATE_CURRENT_FILING_RECORDCrossPeriodCleanStateBlocker.SUPERSEDED_DEPENDENCYCrossPeriodCleanStateBlocker.MISSING_CALCULATION_REVISIONCrossPeriodCleanStateBlocker.UNFILED_CALCULATION_REVISIONCrossPeriodCleanStateBlocker.MISSING_COMPLETE_VERIFICATION_REPORTCrossPeriodCleanStateBlocker.LOCAL_FILING_MISSING_EXTERNAL_EVIDENCECrossPeriodCleanStateBlocker.MISSING_AEAT_ACCEPTANCECrossPeriodCleanStateBlocker.MISSING_EXTERNAL_EVIDENCECrossPeriodCleanStateBlocker.MISSING_EXTERNAL_EVIDENCE_RECORDCrossPeriodCleanStateBlocker.MISMATCHED_EXTERNAL_EVIDENCE_RECORDCrossPeriodCleanStateBlocker.MISSING_JUSTIFICANTE_VERIFICATIONCrossPeriodCleanStateBlocker.OBSERVATION_REVISION_VALUE_DIVERGENCECrossPeriodCleanStateBlocker.OPERATOR_MANUAL_SOURCECrossPeriodCleanStateBlocker.INCOMPLETE_GROUP_MEMBER_COVERAGECrossPeriodCleanStateBlocker.MISSING_EXPECTED_GROUP_MEMBER_ROSTERCrossPeriodCleanStateBlocker.UNEXPECTED_GROUP_MEMBER_SOURCECrossPeriodCleanStateBlocker.REGISTRY_REVISION_DIVERGENCE
NoPriorObligationProvenanceKindNoPriorObligationProvenanceCrossPeriodDependencyRequirementCrossPeriodDependencyRequirement.source_modeloCrossPeriodDependencyRequirement.filing_yearCrossPeriodDependencyRequirement.periodCrossPeriodDependencyRequirement.source_casilla_idsCrossPeriodDependencyRequirement.originCrossPeriodDependencyRequirement.origin_idsCrossPeriodDependencyRequirement.legal_refsCrossPeriodDependencyRequirement.source_refsCrossPeriodDependencyRequirement.requires_member_fan_inCrossPeriodDependencyRequirement.key
CrossPeriodExpectedMemberSetCrossPeriodDependencyInventoryItemCrossPeriodDependencyInventoryItem.target_modeloCrossPeriodDependencyInventoryItem.target_revision_idCrossPeriodDependencyInventoryItem.target_filing_yearCrossPeriodDependencyInventoryItem.target_periodCrossPeriodDependencyInventoryItem.dependenciesCrossPeriodDependencyInventoryItem.source_modelos
CrossPeriodDependencyInventoryCrossPeriodDependencyEvidenceCrossPeriodDependencyEvidence.requirementCrossPeriodDependencyEvidence.observation_source_kindCrossPeriodDependencyEvidence.filing_record_idCrossPeriodDependencyEvidence.calculation_revision_idCrossPeriodDependencyEvidence.member_filing_record_idsCrossPeriodDependencyEvidence.member_calculation_revision_idsCrossPeriodDependencyEvidence.calculation_revision_stateCrossPeriodDependencyEvidence.verification_statusCrossPeriodDependencyEvidence.aeat_acceptedCrossPeriodDependencyEvidence.external_evidence_kindCrossPeriodDependencyEvidence.observed_member_nifsCrossPeriodDependencyEvidence.expected_member_nifsCrossPeriodDependencyEvidence.missing_member_nifsCrossPeriodDependencyEvidence.unexpected_member_nifsCrossPeriodDependencyEvidence.blockersCrossPeriodDependencyEvidence.no_prior_obligationCrossPeriodDependencyEvidence.non_official_local_chain_advisoryCrossPeriodDependencyEvidence.modelo_not_applicable_advisoryCrossPeriodDependencyEvidence.zero_value_previous_filing_advisoryCrossPeriodDependencyEvidence.m111_no_retenciones_no_obligation_advisoryCrossPeriodDependencyEvidence.cleanCrossPeriodDependencyEvidence.suppressed_pre_activityCrossPeriodDependencyEvidence.suppressed_first_year_fractionalCrossPeriodDependencyEvidence.operator_declared_suppression_advisory
CrossPeriodCleanStateVerdictCrossPeriodCleanStateVerdict.bucket_idCrossPeriodCleanStateVerdict.target_modeloCrossPeriodCleanStateVerdict.target_filing_yearCrossPeriodCleanStateVerdict.target_periodCrossPeriodCleanStateVerdict.dependenciesCrossPeriodCleanStateVerdict.requires_clean_stateCrossPeriodCleanStateVerdict.cleanCrossPeriodCleanStateVerdict.blockersCrossPeriodCleanStateVerdict.has_non_official_local_chain_advisoryCrossPeriodCleanStateVerdict.has_modelo_not_applicable_advisoryCrossPeriodCleanStateVerdict.has_zero_value_previous_filing_advisoryCrossPeriodCleanStateVerdict.has_m111_no_retenciones_no_obligation_advisoryCrossPeriodCleanStateVerdict.suppressed_pre_activity_dependenciesCrossPeriodCleanStateVerdict.has_operator_declared_suppression_advisoryCrossPeriodCleanStateVerdict.suppressed_first_year_fractional_dependenciesCrossPeriodCleanStateVerdict.has_first_year_fractional_suppression_advisory
- aeat.application.calculations._errors module
- aeat.application.calculations._foreign_asset_redeclaration module
- aeat.application.calculations._iva_compensation_annual_partition module
- aeat.application.calculations._iva_compensation_history module
IvaCompensationAnnualSummaryIvaCompensationAnnualSummary.taxpayer_nifIvaCompensationAnnualSummary.filing_yearIvaCompensationAnnualSummary.expediente_idIvaCompensationAnnualSummary.statusIvaCompensationAnnualSummary.presented_atIvaCompensationAnnualSummary.last_period_compensation_amountIvaCompensationAnnualSummary.generated_not_in_last_period_amountIvaCompensationAnnualSummary.total_pending_amountIvaCompensationAnnualSummary.source_observation_keyIvaCompensationAnnualSummary.source_artefact_sha256
IvaCompensationAnnualCrossCheckIvaCompensationAnnualCrossCheck.filing_yearIvaCompensationAnnualCrossCheck.carry_forward_remaining_amountIvaCompensationAnnualCrossCheck.modelo_390_total_pending_amountIvaCompensationAnnualCrossCheck.expected_last_period_compensation_amountIvaCompensationAnnualCrossCheck.expected_generated_not_in_last_period_amountIvaCompensationAnnualCrossCheck.difference_amountIvaCompensationAnnualCrossCheck.last_period_difference_amountIvaCompensationAnnualCrossCheck.generated_not_in_last_period_difference_amountIvaCompensationAnnualCrossCheck.matchesIvaCompensationAnnualCrossCheck.mismatched_casilla_idsIvaCompensationAnnualCrossCheck.expiry_review_statesIvaCompensationAnnualCrossCheck.summary_source_observation_key
iva_compensation_period_key()IvaCompensationHistoryRepositoryIvaCompensationHistoryRepository.namespaceIvaCompensationHistoryRepository.sensitivityIvaCompensationHistoryRepository.schema_versionIvaCompensationHistoryRepository.payload_typeIvaCompensationHistoryRepository.extract_identifier()IvaCompensationHistoryRepository.load_period()IvaCompensationHistoryRepository.save_period()IvaCompensationHistoryRepository.list_periods()
seed_iva_compensation_period()correct_iva_compensation_period()iva_compensation_state_from_filed_observation()iva_compensation_state_from_registry_observation()iva_compensation_annual_summary_from_filed_observation()cross_check_iva_compensation_annual_summary()
- aeat.application.calculations._iva_wallet_balance module
- aeat.application.calculations._iva_wallet_reconciliation module
- aeat.application.calculations._m111_no_retenciones module
- aeat.application.calculations._maritime_exemption_service module
- aeat.application.calculations._multi_year module
- aeat.application.calculations._observations_repository module
IvaWalletDecisionEnvelopePayloadobservation_key_for_token()observation_key()member_observation_key_for_token()member_observation_key()iva_wallet_decision_key()iva_wallet_decision_event_key()CalculationObservationRepositoryCalculationObservationRepository.namespaceCalculationObservationRepository.sensitivityCalculationObservationRepository.schema_versionCalculationObservationRepository.payload_typeCalculationObservationRepository.extract_identifier()CalculationObservationRepository.load_observation()CalculationObservationRepository.save_observation()CalculationObservationRepository.iter_modelo()
IvaWalletDecisionRepositoryIvaWalletDecisionRepository.namespaceIvaWalletDecisionRepository.history_namespaceIvaWalletDecisionRepository.sensitivityIvaWalletDecisionRepository.schema_versionIvaWalletDecisionRepository.payload_typeIvaWalletDecisionRepository.extract_identifier()IvaWalletDecisionRepository.save_decision()IvaWalletDecisionRepository.load_decision()IvaWalletDecisionRepository.list_decisions()IvaWalletDecisionRepository.load_decision_history()
- aeat.application.calculations._ports module
FiledDeclaracionArtefactProtocolObservedCasillaValueProtocolFiledDeclaracionObservationProtocolFiledDeclaracionObservationProtocol.modeloFiledDeclaracionObservationProtocol.ejercicioFiledDeclaracionObservationProtocol.periodFiledDeclaracionObservationProtocol.expediente_idFiledDeclaracionObservationProtocol.statusFiledDeclaracionObservationProtocol.presented_atFiledDeclaracionObservationProtocol.authenticated_identityFiledDeclaracionObservationProtocol.artefactsFiledDeclaracionObservationProtocol.casillas
- aeat.application.calculations._prorrata_regularizacion module
CASILLA_REGULARIZACION_PRORRATA_DEFINITIVAProrrataRegularizacionFeedProjectionProrrataRegularizacionFeedProjection.resultProrrataRegularizacionFeedProjection.operaciones_sin_derecho_deduccionProrrataRegularizacionFeedProjection.modelo_303_casilla_44_idProrrataRegularizacionFeedProjection.modelo_303_casilla_44_valueProrrataRegularizacionFeedProjection.modelo_390_regularizacion_anual_value
ProrrataDeclaredVolumeLedgerRollupProrrataDeclaredVolumeLedgerRollup.declared_volume_totalProrrataDeclaredVolumeLedgerRollup.declared_volume_con_derechoProrrataDeclaredVolumeLedgerRollup.declared_volume_sin_derechoProrrataDeclaredVolumeLedgerRollup.ledger_volume_totalProrrataDeclaredVolumeLedgerRollup.ledger_volume_con_derechoProrrataDeclaredVolumeLedgerRollup.ledger_volume_sin_derechoProrrataDeclaredVolumeLedgerRollup.included_ledger_idsProrrataDeclaredVolumeLedgerRollup.art_104_tres_excluded_ledger_idsProrrataDeclaredVolumeLedgerRollup.diverges
ProrrataApplicabilityProjectionderive_prorrata_applicability()build_prorrata_missing_provisional_advisory()ProrrataInterruptedSeedbuild_interrumpida_tres_ultimos_seed()build_prorrata_declared_volume_divergence_advisory()project_prorrata_regularizacion_feed()ProrrataRegularizacionSourceResolverbuild_prorrata_regularizacion_advisory()build_prorrata_especial_mandatory_advisory()
- aeat.application.calculations._relation_prefill module
- aeat.application.calculations._revision_carry_gate module
- aeat.application.calculations._row_set_assembly module