diff --git a/uber/models/__init__.py b/uber/models/__init__.py
index 28ab68c4a..51efe4b75 100644
--- a/uber/models/__init__.py
+++ b/uber/models/__init__.py
@@ -417,8 +417,8 @@ def __getattr__(self, name):
try:
return sum(item[0] * item[1] for item in cost_calc[1].items()) / 100
except AttributeError:
- if len(cost_calc) > 2:
- return cost_calc[1] * cost_calc[2] / 100
+ if len(cost_calc) > 3:
+ return cost_calc[1] * cost_calc[3] / 100
else:
return cost_calc[1] / 100
except Exception:
diff --git a/uber/templates/preregistration/index.html b/uber/templates/preregistration/index.html
index 0d261aba3..2dc364634 100644
--- a/uber/templates/preregistration/index.html
+++ b/uber/templates/preregistration/index.html
@@ -56,7 +56,17 @@
{% if attendee.badge_type in c.BADGE_TYPE_PRICES %}
- - {{ attendee.badge_type_label|replace(' ', '-') }}-level r{% else %}
- R{% endif %}egistration for {{ c.EVENT_NAME }}{% if attendee.badges %} for {{ attendee.badges }} people{% endif %}{% if (attendee.default_badge_cost and attendee.age_discount|abs < attendee.default_badge_cost) or attendee.default_promo_code_group_cost %} ({{ ((attendee.default_badge_cost or attendee.default_promo_code_group_cost) - attendee.age_discount|abs)|format_currency }}){% endif %}
+ {% set badge_cost = attendee.default_badge_cost + attendee.default_badge_upgrade_cost %}
+ {% elif (attendee.default_badge_cost and attendee.age_discount and attendee.age_discount|abs < attendee.default_badge_cost) or attendee.default_promo_code_group_cost %}
+ {% set badge_cost = (attendee.default_badge_cost or attendee.default_promo_code_group_cost) - attendee.age_discount|abs %}
+ {% elif attendee.promo_code %}
+ {% set badge_cost = attendee.badge_cost_without_promo_code %}
+ {% else %}
+ {% set badge_cost = 0 %}
+ {% endif %}
+ - {% if attendee.badge_type in c.BADGE_TYPE_PRICES %}{{ attendee.badge_type_label|replace(' ', '-') }}-level r{% else %}R{% endif %}egistration for {{ c.EVENT_NAME }}
+ {% if attendee.badges %} for {{ attendee.badges }} people{% endif %}
+ {% if badge_cost %} ({{ badge_cost|format_currency }}){% endif %}
{% if attendee.requested_hotel_info %}
- Requested hotel booking info
{% endif %}
|