feat(bot): overhaul quote review card template with Jalali dates and DB-aligned validations

This commit is contained in:
2026-09-29 01:30:26 +03:30
parent 1b5fc589fd
commit 17458d8697
4 changed files with 258 additions and 63 deletions
+4 -4
View File
@@ -300,14 +300,14 @@ def compute_quote_missing(payload: dict) -> list[dict]:
add(f"item:{i}:material", f"شناسه کالا برای «{name}»", False, True)
if not item.get("quantity"):
add(f"item:{i}:qty", f"مقدار «{name}»", False, True)
if not (item.get("unit_id") or item.get("unit_name")):
add(f"item:{i}:unit", f"واحد «{name}»", False, True)
if not item.get("unit_id"):
add(f"item:{i}:unit", f"واحد کالا برای «{name}»", False, True)
if not item.get("unit_price"):
add(f"item:{i}:price", f"قیمت واحد «{name}»", False, False)
add(f"item:{i}:price", f"قیمت واحد برای «{name}»", False, False)
if items and not payload.get("termsheets"):
add("terms", "شرایط پرداخت", False, False)
if not payload.get("notes"):
add("notes", "یادداشت", False, False)
add("notes", "توضیحات", False, False)
return out