cadrumo.application.filing.export_producer module

Producer-value projection for the declaration export renderer.

class SelectedAccountLexicals(iban=None, swift_bic=None, bank_name=None, bank_address=None, bank_city=None, bank_country_code=None)[source]

Bases: object

Rendered lexical values for one selected bank account.

Parameters:
  • iban (str | None)

  • swift_bic (str | None)

  • bank_name (str | None)

  • bank_address (str | None)

  • bank_city (str | None)

  • bank_country_code (str | None)

iban: str | None
swift_bic: str | None
bank_name: str | None
bank_address: str | None
bank_city: str | None
bank_country_code: str | None
class M303ProfileLexicals(redeme_enrolled=None, exclusively_foral=None, regime_composition_code=None, cash_accounting_regime_enrolled=None, voluntary_sii_enrolled=None, hydrocarbon_deposit_advance_payment_deduction_entitled=None, is_foral=False)[source]

Bases: object

Rendered lexical values for a Modelo 303 profile’s enrolment facts.

Parameters:
  • redeme_enrolled (str | None)

  • exclusively_foral (str | None)

  • regime_composition_code (str | None)

  • cash_accounting_regime_enrolled (str | None)

  • voluntary_sii_enrolled (str | None)

  • hydrocarbon_deposit_advance_payment_deduction_entitled (str | None)

  • is_foral (bool)

redeme_enrolled: str | None
exclusively_foral: str | None
regime_composition_code: str | None
cash_accounting_regime_enrolled: str | None
voluntary_sii_enrolled: str | None
hydrocarbon_deposit_advance_payment_deduction_entitled: str | None
is_foral: bool
class M303FilingLexicals(joint_return_elected=None, annual_volume_nonzero=None, recipient_of_cash_accounting_operations=None, prorrata_special_option=None, prorrata_special_revocation=None, insolvency_declared=None, insolvency_judicial_order_date=None, insolvency_filing_subtype=None, exonerado_390_applicable=None, prorrata_transition_applicable=False)[source]

Bases: object

Rendered lexical values for a Modelo 303 filing’s period-specific facts.

Parameters:
  • joint_return_elected (str | None)

  • annual_volume_nonzero (str | None)

  • recipient_of_cash_accounting_operations (str | None)

  • prorrata_special_option (str | None)

  • prorrata_special_revocation (str | None)

  • insolvency_declared (str | None)

  • insolvency_judicial_order_date (str | None)

  • insolvency_filing_subtype (str | None)

  • exonerado_390_applicable (str | None)

  • prorrata_transition_applicable (bool)

joint_return_elected: str | None
annual_volume_nonzero: str | None
recipient_of_cash_accounting_operations: str | None
prorrata_special_option: str | None
prorrata_special_revocation: str | None
insolvency_declared: str | None
insolvency_judicial_order_date: str | None
insolvency_filing_subtype: str | None
exonerado_390_applicable: str | None
prorrata_transition_applicable: bool
class M303ForalLexicals(prorrata_special_option, prorrata_special_revocation)[source]

Bases: object

Rendered lexical values for a Modelo 303 foral prorrata election.

Parameters:
  • prorrata_special_option (str | None)

  • prorrata_special_revocation (str | None)

prorrata_special_option: str | None
prorrata_special_revocation: str | None
m222_producer_values(model_profile)[source]

Resolve the grupo-fiscal producer identities Modelo 222’s layout cites.

Every one of these keys was declared in the vocabulary and produced by nothing, so the layout’s twenty-three header fields – numero de grupo and entidad dominante among them – rendered blank on a return that exists to identify a fiscal group.

A profile of the wrong type yields every key as None rather than raising: this resolver runs for every modelo, and only Modelo 222’s snapshot validator may decide that a 222 filing without group facts is invalid.

Return type:

dict[FilingProducerKey, object]

Parameters:

model_profile (FilingModelProfileFacts)

m296_producer_values(model_profile)[source]

Resolve the declarante identities Modelo 296’s tipo-1 record cites.

All twelve m296.dec.* keys were declared in the vocabulary and produced by nothing, so the ejercicio, the declarante NIF and the razon social rendered blank on the IRNR annual withholding summary.

This covers the declarante record only. The four detail records – perceptor, perceptor-intereses and the two anexos – cite a further hundred keys that are NOT header facts: they are per-payee and per-pago rows, and each of those records is published as a single non-repeating record, so a resolver here would put one payee into a one-row layout and drop the rest. They are deliberately left unresolved until the records repeat.

A profile of the wrong type yields every key as None rather than raising: this resolver runs for every modelo, and only Modelo 296’s snapshot validator may decide that a 296 filing without declarante facts is invalid.

Return type:

dict[FilingProducerKey, object]

Parameters:

model_profile (FilingModelProfileFacts)

m353_producer_values(model_profile)[source]

Resolve the grupo de entidades producer identities Modelo 353’s layout cites.

All five m353.* keys were declared in the vocabulary and produced by nothing, so the número de grupo at offset 109 and the sin-actividad and normativa-foral marks rendered blank on the aggregate return of a régimen especial del grupo de entidades.

A profile of the wrong type yields every key as None rather than raising: this resolver runs for every modelo, and only Modelo 353’s snapshot validator may decide that a 353 filing without group facts is invalid.

Return type:

dict[FilingProducerKey, object]

Parameters:

model_profile (FilingModelProfileFacts)

m202_producer_values(model_profile)[source]

Resolve the régimen marks and principal CNAE modelo 202’s layout cites.

A profile of the wrong type yields every key as None rather than raising: this runs for every modelo, and only modelo 202’s own snapshot validator may decide that a 202 filing without these facts is invalid.

Return type:

dict[FilingProducerKey, object]

Parameters:

model_profile (FilingModelProfileFacts)

m210_producer_values(model_profile)[source]

Resolve the twelve party, property and settlement scopes modelo 210’s layout cites.

A profile of the wrong type, or a scope the filing does not carry, yields None rather than raising: AEAT writes an empty alphanumeric header field to blancos, and only a caller knows which scopes its filing has.

Return type:

dict[FilingProducerKey, object]

Parameters:

model_profile (FilingModelProfileFacts)

m200_producer_values(model_profile)[source]

Resolve the header facts modelo 200’s layout cites.

A profile of the wrong type yields every key as None rather than raising: this runs for every modelo, and AEAT writes an empty alphanumeric header field to blancos.

Return type:

dict[FilingProducerKey, object]

Parameters:

model_profile (FilingModelProfileFacts)

filing_producer_values(snapshot)[source]

Resolve every canonical producer identity from one immutable snapshot.

Return type:

dict[FilingProducerKey, object]

Parameters:

snapshot (FilingProducerSnapshot)

m303_rectificativa_motive_producer_values(amendment)[source]

Project the closed two-checkbox truth table from one persisted motive.

Return type:

dict[FilingProducerKey, bool | None]

Parameters:

amendment (AmendmentEvidence | None)

selected_account_lexicals(snapshot)[source]

Project the snapshot’s selected refund or charge account into its rendered lexicals.

Return type:

SelectedAccountLexicals

Parameters:

snapshot (FilingProducerSnapshot)

m303_profile_lexicals(iva_profile, m303_facts)[source]

Project the Modelo 303 IVA profile and filing facts into rendered lexicals.

Return type:

M303ProfileLexicals

Parameters:
m303_filing_lexicals(m303_facts)[source]

Project the Modelo 303 filing facts into their rendered period-specific lexicals.

Return type:

M303FilingLexicals

Parameters:

m303_facts (M303FilingFacts | None)

m303_foral_lexicals(m303_filing)[source]

Project the Modelo 303 filing lexicals into the foral prorrata election lexicals.

Return type:

M303ForalLexicals

Parameters:

m303_filing (M303FilingLexicals)

yes_no(value)[source]
Return type:

str

Parameters:

value (bool)

m303_a30_entitlement_applicable(period)[source]
Return type:

bool

Parameters:

period (Period)