aeat.domain.calculations.registry._record_design module

Read-only extraction of official AEAT record-design rows.

Parses official AEAT record-design workbooks (PDF or XLS/XLSX) and derives coverage casillas from a ModeloRevision so that the extracted layout can be compared against the registry declarations.

extract_record_design(path)[source]

Return fixed-width field rows from a supported official record-design source.

Return type:

tuple[RecordDesignSheet, ...]

Returns:

Tuple of RecordDesignSheet objects parsed from the source file.

Parameters:

path (Path)

extract_record_design_workbook(path)[source]

Return RecordDesignSheet rows described by workbook path.

Return type:

tuple[RecordDesignSheet, ...]

Parameters:

path (Path)

extract_record_design_xls_workbook(path)[source]

Return official fixed-width field rows from a legacy binary XLS workbook.

Return type:

tuple[RecordDesignSheet, ...]

Returns:

Tuple of RecordDesignSheet objects parsed from the XLS workbook.

Parameters:

path (Path)

extract_record_design_pdf(path)[source]

Return RecordDesignSheet rows extracted from an official AEAT PDF.

Return type:

tuple[RecordDesignSheet, ...]

Parameters:

path (Path)

extract_record_design_pdf_bytes(pdf_bytes, *, source_label='in-memory record-design PDF')[source]

Return fixed-width field rows extracted from PDF bytes.

Return type:

tuple[RecordDesignSheet, ...]

Returns:

Tuple of RecordDesignSheet objects extracted from the PDF content.

Parameters: