Skip to content

Commit 61ea62e

Browse files
Merge pull request Expensify#75594 from ShridharGoel/amountFix
Use 'Collect' pricing for reporting upgrade path
2 parents 1038561 + e76ae44 commit 61ea62e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/pages/workspace/upgrade/UpgradeIntro.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ function UpgradeIntro({feature, onUpgrade, buttonDisabled, loading, isCategorizi
4747

4848
const formattedPrice = useMemo(() => {
4949
const upgradeCurrency = Object.hasOwn(CONST.SUBSCRIPTION_PRICES, preferredCurrency) ? preferredCurrency : CONST.PAYMENT_CARD_CURRENCY.USD;
50+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
51+
const shouldUseTeamPricing = isCategorizing || isDistanceRateUpgrade || isReporting;
5052
return `${convertToShortDisplayString(
5153
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
52-
CONST.SUBSCRIPTION_PRICES[upgradeCurrency][isCategorizing || isDistanceRateUpgrade ? CONST.POLICY.TYPE.TEAM : CONST.POLICY.TYPE.CORPORATE][CONST.SUBSCRIPTION.TYPE.ANNUAL],
54+
CONST.SUBSCRIPTION_PRICES[upgradeCurrency][shouldUseTeamPricing ? CONST.POLICY.TYPE.TEAM : CONST.POLICY.TYPE.CORPORATE][CONST.SUBSCRIPTION.TYPE.ANNUAL],
5355
upgradeCurrency,
5456
)} `;
55-
}, [preferredCurrency, isCategorizing, isDistanceRateUpgrade]);
57+
}, [preferredCurrency, isCategorizing, isDistanceRateUpgrade, isReporting]);
5658

5759
const allIconNames = Object.values(CONST.UPGRADE_FEATURE_INTRO_MAPPING)
5860
.map((feat) => feat?.icon)

0 commit comments

Comments
 (0)