From daf700429d21b6a4ade95514095526b4d73f677d Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Thu, 19 Feb 2026 14:57:45 -0600 Subject: [PATCH] refactor: update billing pricing calculations and display - Revised pricing calculations for Hobby and Startup tiers to reflect accurate annual rates with 20% discount. - Updated comments for clarity and consistency in pricing logic. - Adjusted billing display to show the correct annual pricing for additional servers. --- .../dashboard/settings/billing/show-billing.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx b/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx index cdb127880..740c5179c 100644 --- a/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx +++ b/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx @@ -43,20 +43,20 @@ export const calculatePrice = (count: number, isAnnual = false) => { return count * 3.5; }; -/** Hobby: $4.50/mo por servidor; anual $45.90 por servidor (o 20% off = 43.92). */ +/** Hobby: $4.50/mo per server; annual 20% off = $43.20/yr per server (4.5 * 12 * 0.8). */ export const calculatePriceHobby = (count: number, isAnnual = false) => { const perServerMonthly = 4.5; - const perServerAnnual = 45.9; + const perServerAnnual = 43.2; // 4.5 * 12 * 0.8 return isAnnual ? count * perServerAnnual : count * perServerMonthly; }; -/** Startup: incluye 3 servidores ($15/mo); del 4ยบ en adelante $4.50 c/u. Anual 20% off. */ +/** Startup: 3 servers included ($15/mo); extra servers $4.50/mo each. Annual 20% off. */ export const STARTUP_SERVERS_INCLUDED = 3; export const calculatePriceStartup = (count: number, isAnnual = false) => { const baseMonthly = 15; const extraMonthly = 4.5; - const baseAnnual = 144; // 15*12 con 20% off - const extraAnnual = 45.9; + const baseAnnual = 144; // 15 * 12 * 0.8 + const extraAnnual = 43.2; // 4.5 * 12 * 0.8, consistent with Hobby annual if (count <= STARTUP_SERVERS_INCLUDED) return isAnnual ? baseAnnual : baseMonthly; return isAnnual @@ -686,7 +686,7 @@ export const ShowBilling = () => {

Add more servers as you'd like for{" "} - {isAnnual ? "$45.90/yr" : "$4.50/mo"} + {isAnnual ? "$43.20/yr" : "$4.50/mo"}

{isAnnual && (

@@ -813,7 +813,7 @@ export const ShowBilling = () => {

Add more servers as you'd like for{" "} - {isAnnual ? "$45.90/yr" : "$4.50/mo"} + {isAnnual ? "$43.20/yr" : "$4.50/mo"}

{isAnnual && (