diff --git a/src/lib/components/billing/estimatedTotal.svelte b/src/lib/components/billing/estimatedTotal.svelte deleted file mode 100644 index 7e7e84803..000000000 --- a/src/lib/components/billing/estimatedTotal.svelte +++ /dev/null @@ -1,144 +0,0 @@ - - -{#if estimation} - - - {#if estimation} - {#each estimation.items ?? [] as item} - {#if item.value > 0} - -

{item.label}

-

{formatCurrency(item.value)}

-
- {/if} - {/each} - {#each estimation.discounts ?? [] as item} - - {/each} -
- -

Total due

-

- {formatCurrency(estimation.grossAmount)} -

-
- -

- You'll pay {formatCurrency(estimation.grossAmount)} now. - {#if couponData?.code}Once your credits run out,{:else}Then{/if} you'll be charged - {formatCurrency(estimation.amount)} every 30 days. -

- {/if} - - - {#if budgetEnabled} -
- -
- {/if} -
-
-{/if} diff --git a/src/lib/components/billing/estimatedTotalBox.svelte b/src/lib/components/billing/estimatedTotalBox.svelte index 112d506c1..438120824 100644 --- a/src/lib/components/billing/estimatedTotalBox.svelte +++ b/src/lib/components/billing/estimatedTotalBox.svelte @@ -1,96 +1,146 @@ - - - - - {currentPlan.name} plan - {formatCurrency(currentPlan.price)} - - - Additional seats ({collaborators?.length ?? 0}) - {formatCurrency(extraSeatsCost)} - - {#if couponData?.status === 'active'} - - {/if} - - +{#if estimation} + + + + + {#each estimation.items ?? [] as item} + + {item.label} + {formatCurrency(item.value)} + + {/each} + + {#if couponData?.status === 'active'} + + {/if} + + + Total due + + {formatCurrency(estimatedTotal)} + + + - Upcoming charge
- Due on {!currentPlan.trialDays - ? toLocaleDate(billingPayDate.toString()) - : toLocaleDate(trialEndDate.toString())}
- {formatCurrency(estimatedTotal)} + You'll pay {formatCurrency(estimatedTotal)} + now. + {#if couponData?.code}Once your credits run out,{:else}Then{/if} you'll be charged + {formatCurrency(estimation.grossAmount)} every 30 days. + + + + {#if budgetEnabled} +
+ +
+ {/if} +
- - - You'll pay {formatCurrency(estimatedTotal)} now, with your first billing cycle - starting on - {!currentPlan.trialDays - ? toLocaleDate(billingPayDate.toString()) - : toLocaleDate(trialEndDate.toString())}. {#if couponData?.status === 'active'}Once your credits run out, you'll be charged - {formatCurrency(currentPlan.price)} plus usage fees every 30 days. - {/if} - - - - {#if budgetEnabled} -
- -
- {/if} -
-
-
+ +{/if} diff --git a/src/routes/(console)/apply-credit/+page.svelte b/src/routes/(console)/apply-credit/+page.svelte index 0c743dcad..0bf665efc 100644 --- a/src/routes/(console)/apply-credit/+page.svelte +++ b/src/routes/(console)/apply-credit/+page.svelte @@ -361,9 +361,9 @@ fixedCoupon={!!data?.couponData?.code} {billingPlan} {collaborators} - plans={$plansInfo} bind:couponData - bind:billingBudget> + bind:billingBudget + organizationId={selectedOrgId}> {#if campaign?.template === 'review' && (campaign?.cta || campaign?.claimed || campaign?.unclaimed)}

{campaign?.cta}

diff --git a/src/routes/(console)/create-organization/+page.svelte b/src/routes/(console)/create-organization/+page.svelte index 77049390e..b4f7eaec1 100644 --- a/src/routes/(console)/create-organization/+page.svelte +++ b/src/routes/(console)/create-organization/+page.svelte @@ -252,7 +252,6 @@ {:else} diff --git a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte index ae83f8c26..1456eda32 100644 --- a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte +++ b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte @@ -355,10 +355,10 @@ + bind:billingBudget + organizationId={data.organization.$id} /> {:else if data.organization.billingPlan !== BillingPlan.CUSTOM} {/if}