diff --git a/app/components/profile_header/profile_header.rb b/app/components/profile_header/profile_header.rb index 994aff22e..15a21342e 100644 --- a/app/components/profile_header/profile_header.rb +++ b/app/components/profile_header/profile_header.rb @@ -16,10 +16,10 @@ def upgrade_available? end def price_per_month - if organization.upgraded_business_plan_at.present? && organization.upgrade_discount.present? && organization.upgraded_business_plan_at > 6.months.ago - number_to_currency(organization.business_plan.price_per_month - (organization.business_plan.price_per_month * organization.upgrade_discount / 100.to_f)) - else + if organization.upgraded_business_plan_at.blank? || organization.upgrade_discount.blank? || organization.upgraded_business_plan_at.before?(6.months.ago) number_to_currency(organization.business_plan.price_per_month) + else + number_to_currency(organization.business_plan.price_per_month - (organization.business_plan.price_per_month * organization.upgrade_discount / 100.to_f)) end end end