Format revised estimate totals for Russian locale

This commit is contained in:
anor
2026-12-02 21:58:37 +10:00
parent 856dbebdd1
commit fa3596356c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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("⚠ Часть ресурсов не оценена; итог неполный.")
+1 -1
View File
@@ -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 зона)",