diff --git a/backend/app/schemas/concept.py b/backend/app/schemas/concept.py index e4625448..5b765519 100644 --- a/backend/app/schemas/concept.py +++ b/backend/app/schemas/concept.py @@ -29,11 +29,47 @@ class TEAP(BaseModel): class FinancialModel(BaseModel): + """Static developer P&L for a concept variant (PR-1, эпик #1881). + + Full static cost cascade + VAT + profit tax → net profit + ROI. NOT a DCF — + timing/discounting lands in PR-3. VAT is a documented simplification (see + ``compute_financial`` docstring), not exact НК РФ mechanics. + + The legacy summary fields (``revenue_rub`` / ``cost_rub`` / + ``gross_margin_rub`` / ``irr``) are kept for backward-compat; the new fields + expose the full cascade and the net P&L. + """ + + # ── Legacy summary (backward-compat) ─────────────────────────────────────── revenue_rub: float cost_rub: float gross_margin_rub: float irr: float + # ── Revenue breakdown ────────────────────────────────────────────────────── + revenue_residential_rub: float + revenue_parking_rub: float + + # ── Cost cascade ─────────────────────────────────────────────────────────── + construction_rub: float + pir_rub: float + networks_rub: float + developer_services_rub: float + contingency_rub: float + marketing_rub: float + land_rub: float + + # ── БДР / taxes → net profit ─────────────────────────────────────────────── + vat_rub: float + profit_before_tax_rub: float + profit_tax_rub: float + net_profit_rub: float + + # ── Metrics ──────────────────────────────────────────────────────────────── + roi: float # net profit / total cost + margin_pct: float # net profit / revenue + irr_is_proxy: bool = True # frontend caveat: not a real DCF IRR (см. PR-3) + class ConceptVariant(BaseModel): strategy: Literal["max_area", "max_insolation", "balanced"] diff --git a/backend/app/services/generative/exporters/pdf.py b/backend/app/services/generative/exporters/pdf.py index ab99ef15..8c16f9a3 100644 --- a/backend/app/services/generative/exporters/pdf.py +++ b/backend/app/services/generative/exporters/pdf.py @@ -93,14 +93,41 @@ def _teap_table(variants: Sequence[ConceptVariant]) -> str: def _financial_table(variants: Sequence[ConceptVariant]) -> str: - """HTML-таблица финмодели (деньги в млн руб; IRR — proxy, помечен).""" + """HTML-таблица финмодели (деньги в млн руб; полный каскад + БДР; IRR proxy).""" headers = "".join( f"
{html.escape(_SUBTITLE)}
" f"{_teap_table(variants)}" f"{_financial_table(variants)}" - "IRR-proxy — аннуализированная маржа-на-затраты без " - "дисконтирования (не настоящий IRR). Цены и себестоимость — рыночные " - "ориентиры, не калиброванная модель ценообразования.
" + "Статический девелоперский расчёт (без дисконтирования / DCF). " + "НДС — упрощённая оценка (встроенный НДС в положительной марже, не полная " + "механика входного/выходного НДС НК РФ). Налог на прибыль — 25% (с 2025). " + "IRR-proxy — аннуализированный чистый ROI без дисконтирования (не настоящий " + "IRR). Цены и себестоимость — рыночные ориентиры, не калиброванная модель. " + "Коммерческие/офисные площади не учитываются (нет в ТЭП).
" "