From fa3596356ca0c4701ab124f1b25d221c703580eb Mon Sep 17 00:00:00 2001 From: anor Date: Wed, 2 Dec 2026 21:58:37 +1000 Subject: [PATCH] Format revised estimate totals for Russian locale --- estimate_interactive.py | 2 +- tests/test_inline_estimate_basis.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/estimate_interactive.py b/estimate_interactive.py index 5e33e2c..6a9acc1 100644 --- a/estimate_interactive.py +++ b/estimate_interactive.py @@ -51,7 +51,7 @@ def revised_answer(result: dict) -> str: f"Ценовая зона: {zone}. Период цен: {period}.", "", ("Предварительный итог: " if not result.get("ok") or result.get("unpriced") else "Итого по локальной смете: ") - + f"{total:,.2f} ₽".replace(",", " "), + + f"{total:,.2f}".replace(",", " ").replace(".", ",") + " ₽", "Позиции и их стоимости приведены в таблице ниже."] if result.get("unpriced"): lines.append("⚠ Часть ресурсов не оценена; итог неполный.") diff --git a/tests/test_inline_estimate_basis.py b/tests/test_inline_estimate_basis.py index 20e739d..65caa9e 100644 --- a/tests/test_inline_estimate_basis.py +++ b/tests/test_inline_estimate_basis.py @@ -79,7 +79,7 @@ def test_basis_switch_is_saved_in_same_answer(case): body = r.json() assert body["estimate"]["applied"]["zone_id"] == 12 assert body["estimate"]["_revision"] == 1 - assert "240" in body["answer"] and "4 квартал 2026" in body["answer"] + assert "240,00 ₽" in body["answer"] and "4 квартал 2026" in body["answer"] assert "**" not in body["answer"] assert seen == [([{"code": "ГЭСН 01-01-001-01", "unit": "м3", "qty": 2}], {"region": "Тестовый край", "zone": "Тестовый край (2 зона)",