feat: show preorder payment method during pricing
Admins need the customer's cash or check term before they set the price. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+12
-1
@@ -11,10 +11,21 @@ const CASH_PHASE_RAW_STATUSES = new Set([
|
||||
export function settlementMethodLabel(method?: string | null): string {
|
||||
if (!method) return 'انتخابنشده'
|
||||
if (method === 'check') return 'چکی'
|
||||
if (method === 'cash_check') return 'نقدی-چکی'
|
||||
if (method === 'cash_check') return 'نصف نقد، نصف چکی'
|
||||
return 'نقدی'
|
||||
}
|
||||
|
||||
export function settlementPlanLabel(
|
||||
method?: string | null,
|
||||
checkTermMonths?: number | null,
|
||||
): string {
|
||||
const base = settlementMethodLabel(method)
|
||||
if ((method === 'check' || method === 'cash_check') && checkTermMonths) {
|
||||
return `${base} · چک ${checkTermMonths} ماهه`
|
||||
}
|
||||
return base
|
||||
}
|
||||
|
||||
export function orderShowsCashActions(
|
||||
order: { settlementMethod?: SettlementMethod | null; rawStatus?: string },
|
||||
): boolean {
|
||||
|
||||
Reference in New Issue
Block a user