diff --git a/app/reservations/page.js b/app/reservations/page.js index 5fed7a3..aa35e43 100644 --- a/app/reservations/page.js +++ b/app/reservations/page.js @@ -687,10 +687,11 @@ function PaymentDialog({ const amount = reservation.depositAmount || reservation.totalPrice || 0; const currencySign = reservation.currencySign || t("sypSymbol"); const selectedMethod = paymentMethods?.find( - (m) => (m?.id ?? m?.name) === selectedPayment, + (m) => String(m?.id ?? m?.name) === String(selectedPayment) ); const isHaram = selectedMethod?.name?.toLowerCase?.() === "haram"; - const canPay = payingId !== reservation.id && (!isHaram || !!receiptImage); + const hasSelectedMethod = !!selectedMethod; + const canPay = payingId !== reservation.id && hasSelectedMethod && (!isHaram || !!receiptImage); return ( <>