From 12975f671d12369d47969471b8bc7d21736c1d2c Mon Sep 17 00:00:00 2001
From: Usman Baig
Date: Fri, 20 Feb 2026 16:21:35 +0100
Subject: [PATCH] fix: update invoice preview handling in OrganizationSettings
to reset state and provide user feedback on calculation errors
---
components/settings/OrganizationSettings.tsx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/components/settings/OrganizationSettings.tsx b/components/settings/OrganizationSettings.tsx
index cf1d82f..6474be3 100644
--- a/components/settings/OrganizationSettings.tsx
+++ b/components/settings/OrganizationSettings.tsx
@@ -364,6 +364,7 @@ export default function OrganizationSettings() {
}
let cancelled = false
setIsLoadingPreview(true)
+ setInvoicePreview(null)
const interval = changePlanYearly ? 'year' : 'month'
const limit = getLimitForTierIndex(changePlanTierIndex)
previewInvoice({ plan_id: PLAN_ID_SOLO, interval, limit })
@@ -1471,7 +1472,11 @@ export default function OrganizationSettings() {
on {new Date(invoicePreview.period_end * 1000).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' })}{' '}
(prorated)
- ) : null}
+ ) : (
+
+ Unable to calculate preview. Your next invoice will reflect prorations.
+
+ )}
)}