fix: use zero-decimal-aware conversion for no-show fee acknowledgment text#28221
Closed
uma1100 wants to merge 1 commit intocalcom:mainfrom
Closed
fix: use zero-decimal-aware conversion for no-show fee acknowledgment text#28221uma1100 wants to merge 1 commit intocalcom:mainfrom
uma1100 wants to merge 1 commit intocalcom:mainfrom
Conversation
… 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>
3 tasks
Member
sahitya-chandra
left a comment
There was a problem hiding this comment.
@uma1100 can you add a before and after image or video of the changes, so that we can verify it
Ryukemeister
reviewed
Mar 2, 2026
Contributor
Ryukemeister
left a comment
There was a problem hiding this comment.
I think there's already a PR for this, so this one's a duplicate. think we can close this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes incorrect amount display in the no-show fee acknowledgment checkbox for zero-decimal currencies (e.g. JPY, KRW).
Bug
When a host sets a no-show fee in a zero-decimal currency like JPY (¥1,000), the HOLD payment acknowledgment text incorrectly showed ¥10 instead of ¥1,000.
Before:
このイベントに出席しなかった場合、不参加費用として ¥10 が私のカードに請求されることに同意します。After:
このイベントに出席しなかった場合、不参加費用として ¥1,000 が私のカードに請求されることに同意します。Root Cause
Payment.tsxhardcodedamount / 100to convert from Stripe's smallest currency unit. For zero-decimal currencies (JPY, KRW, etc.), Stripe stores the amount already in the base unit, so dividing by 100 results in a 100x smaller value.Fix
Replace
props.payment.amount / 100with the existingconvertFromSmallestToPresentableCurrencyUnitutility from@calcom/lib/currencyConversions, which already correctly handles zero-decimal currencies.How to reproduce
Checklist
yarn type-check:cipassesconvertFromSmallestToPresentableCurrencyUnit) for consistency