Skip to content

Commit 9e54f6d

Browse files
uma1100claude
andcommitted
fix: use zero-decimal-aware conversion for no-show fee acknowledgment text
Zero-decimal currencies (e.g. JPY, KRW) must not be divided by 100 when converting from Stripe's smallest unit. The previous `amount / 100` caused ¥1,000 to display as ¥10 in the HOLD payment acknowledgment checkbox. Replace the hardcoded division with the existing `convertFromSmallestToPresentableCurrencyUnit` utility which already handles zero-decimal currencies correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 17af50b commit 9e54f6d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/features/ee/payments/components/Payment.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { useEffect, useState } from "react";
99
import getStripe from "@calcom/app-store/stripepayment/lib/client";
1010
import { useBookingSuccessRedirect } from "@calcom/features/bookings/lib/bookingSuccessRedirect";
1111
import { WEBAPP_URL } from "@calcom/lib/constants";
12+
import { convertFromSmallestToPresentableCurrencyUnit } from "@calcom/lib/currencyConversions";
1213
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
1314
import { useLocale } from "@calcom/lib/hooks/useLocale";
1415
import type { EventType, Payment } from "@calcom/prisma/client";
@@ -83,7 +84,7 @@ export const PaymentFormComponent = (
8384
<div className="bg-cal-info mb-5 mt-2 rounded-md p-3">
8485
<CheckboxField
8586
description={t("acknowledge_booking_no_show_fee", {
86-
amount: props.payment.amount / 100,
87+
amount: convertFromSmallestToPresentableCurrencyUnit(props.payment.amount, props.payment.currency),
8788
formatParams: { amount: { currency: props.payment.currency } },
8889
})}
8990
onChange={(e) => setHoldAcknowledged(e.target.checked)}

0 commit comments

Comments
 (0)