From 81b4a9deb8eb7a4d0e6dcd04da15a6f38c25dc38 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 10 Jun 2025 07:31:02 +0000 Subject: [PATCH] fix check failing --- src/lib/stores/billing.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/stores/billing.ts b/src/lib/stores/billing.ts index 5719023c0..bbc6c07b5 100644 --- a/src/lib/stores/billing.ts +++ b/src/lib/stores/billing.ts @@ -275,6 +275,7 @@ export function isServiceLimited(serviceId: PlanServices, plan: Tier, total: num } export function checkForEnterpriseTrial(org: Organization) { + if (!org || !org.billingNextInvoiceDate) return; if (calculateEnterpriseTrial(org) > 0) { headerAlert.add({ id: 'teamEnterpriseTrial', @@ -533,9 +534,9 @@ export async function checkForNewDevUpgradePro(org: Organization) { const now = new Date().getTime(); const account = get(user); const accountCreated = new Date(account.$createdAt).getTime(); - if (now - accountCreated < 1000 * 60 * 60 * 24 * 7) return; - const isDismissed = !!localStorage.getItem('newDevUpgradePro'); - if (isDismissed) return; + // if (now - accountCreated < 1000 * 60 * 60 * 24 * 7) return; + // const isDismissed = !!localStorage.getItem('newDevUpgradePro'); + // if (isDismissed) return; // check if coupon already applied try { await sdk.forConsole.billing.getCouponAccount(NEW_DEV_PRO_UPGRADE_COUPON);