feat: store payment method before preorder pricing

Reject pricing until the customer picks cash or check terms, then open that payment path after the invoice.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-15 11:25:05 +03:30
co-authored by Cursor
parent 7b25c565fc
commit 29124b06a5
8 changed files with 195 additions and 32 deletions
@@ -0,0 +1,2 @@
-- روش پرداخت و مدت چک قبل از قیمت‌گذاری روی سفارش ذخیره می‌شود
ALTER TABLE "Order" ADD COLUMN "checkTermMonths" INTEGER;
+3 -1
View File
@@ -397,8 +397,10 @@ model Order {
userId String
companyId String
companyName String
// روش تسویه بعد از قیمت‌گذاری ادمین توسط مشتری انتخاب می‌شود
// روش پرداخت هنگام ثبت پیش‌سفارش انتخاب می‌شود؛ قیمت‌گذاری به آن وابسته است
settlementType SettlementType?
/// مدت چک به ماه (۱ تا ۴) وقتی روش پرداخت چکی یا نصف‌نقد نصف‌چکی است
checkTermMonths Int?
checkMode CheckRegistrationMode?
status OrderStatus @default(awaiting_review)
totalMeterage Float @default(0)