cadrumo.domain.contribuyente.inventory package

Inventory ledgers for actividad economica stock valuation.

Defines strict pydantic v2 records for tracking opening stock, period movements (purchases, COGS, counts), and closing stock per activity / year, plus the FIFO and weighted-average (PMP / coste medio) valuation engines required by LIS art. 17.1. LIFO is rejected explicitly via LIFOForbiddenError.

Functions, imported from their defining modules:

parse_valuation_method() — coerce user input into a ValuationMethod, refusing LIFO. compute_inventory_valuation() — value closing stock and COGS for one ledger. compute_inventory_anexo_d_projection() — project complete 2025 acquisition cost and stock variation to 0181, 0177, and 0182.

The package initializer exports no symbols.

Submodules