- {selected.items.map((line) => (
-
-
- {line.menuItemName} × {formatNumber(line.quantity, numberLocale)}
-
-
- {formatCurrency(line.unitPrice * line.quantity, numberLocale)}
-
-
- ))}
-
-
-
- {t("subtotal")}
- {formatCurrency(selected.subtotal, numberLocale)}
-
- {selected.discountAmount > 0 ? (
-
- {t("discount")}
- -{formatCurrency(selected.discountAmount, numberLocale)}
-
- ) : null}
-
- {t("tax")}
- {formatCurrency(selected.taxTotal, numberLocale)}
-
-
- {t("total")}
- {formatCurrency(selected.total, numberLocale)}
-
- {(selected.paidAmount ?? 0) > 0 ? (
-
- {t("paidSoFar")}
- {formatCurrency(selected.paidAmount, numberLocale)}
-
- ) : null}
-
- {t("remaining")}
- {formatCurrency(effectiveRemaining, numberLocale)}
-
- {loyaltyDiscount > 0 ? (
-
- {t("loyaltyRedeemApplied")}
- -{formatCurrency(loyaltyDiscount, numberLocale)}
-
- ) : null}
-
- {selected.customerId && payCustomer ? (
-
-
- {t("loyaltyBalance", {
- points: formatNumber(payCustomer.loyaltyPoints, numberLocale),
- })}
-
-
- {
- const n = Math.min(
- maxLoyaltyRedeem,
- Math.max(0, parseInt(e.target.value, 10) || 0)
- );
- setLoyaltyRedeem(n);
- }}
- className="h-8 w-24 tabular-nums"
- disabled={maxLoyaltyRedeem === 0}
- />
-
-
-
{t("loyaltyRedeemHint")}
-
- ) : null}
-
-
-
- {t("splitPayments")}
-
- {paymentRows.map((row, idx) => (
-
-
- {
- const amount = e.target.value;
- setPaymentRows((rows) =>
- rows.map((r, i) => (i === idx ? { ...r, amount } : r))
- );
- }}
- placeholder="0"
- />
- {paymentRows.length > 1 ? (
-
- ) : null}
-
- ))}
-
-
-
- {payMessage ? (
-
{payMessage}
- ) : null}
- {lastPaidOrderId ? (
-
- ) : null}
-
-
setCancelReason(e.target.value)}
- placeholder={t("cancelReasonPlaceholder")}
- className="h-9"
- maxLength={500}
- />
-
-
-
-
-
- >
- ) : null}
-