aeat.application.modelo._m349_ledger_guard module¶
Modelo 349 raw-ledger safety guard.
Modelo 349 operator rows require counterparty identity fields that raw ledger
transactions do not carry. The supported source paths are business invoices or
explicit operador detail rows, so raw intra-community ledger classifications must
fail closed instead of producing a zero-row declaration. The guard reads the
bucket transaction catalogue through
TransactionCatalogueRepository only to detect
that refusal condition; it does not resolve registry binding values itself.
- raise_if_m349_intracom_ledger_rows_need_operator_rows(*, work_unit, transaction_repository, detail_rows)[source]¶
Refuse M349 calculation when raw ledger rows lack declarable operator rows.
- Return type:
- Parameters:
work_unit (WorkUnit)
transaction_repository (TransactionCatalogueRepositoryProtocol | None)
detail_rows (tuple[Modelo184MemberRow | Modelo232VinculadaRow | Modelo349OperadorRow | Modelo349RectificacionRow | Modelo347ContraparteRow, ...])