We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 02161e1 commit d2049d2Copy full SHA for d2049d2
1 file changed
apps/sim/lib/billing/credits/purchase.ts
@@ -25,9 +25,10 @@ export async function setUsageLimitForCredits(
25
): Promise<void> {
26
try {
27
const { basePrice } = getPlanPricing(plan)
28
- // `||` not `??` — 0 is never a valid seat count for a paid sub.
+
29
const seatCount = seats || 1
30
- const planBase = Number(basePrice) * seatCount
+ const planBase =
31
+ entityType === 'organization' ? Number(basePrice) * seatCount : Number(basePrice)
32
const creditBalanceNum = Number(creditBalance)
33
const newLimit = planBase + creditBalanceNum
34
0 commit comments