Skip to content

Commit

Permalink
Merge pull request #4376 from magfest/fix-amount-unpaid
Browse files Browse the repository at this point in the history
Fix amount_unpaid for group badges with receipts
  • Loading branch information
kitsuta committed May 29, 2024
2 parents 49c940e + 2f28680 commit 62a3b32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion uber/models/attendee.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ def amount_refunded(cls):

@property
def amount_unpaid(self):
if self.paid == c.PAID_BY_GROUP:
if self.paid == c.PAID_BY_GROUP and not self.active_receipt:
personal_cost = max(0, self.total_cost - self.badge_cost)
else:
personal_cost = self.total_cost
Expand Down
2 changes: 1 addition & 1 deletion uber/templates/group_admin/dealers.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<td style="text-align:left" data-order="{{ group.name }}" data-search="{{ group.name }}">
<a href="form?id={{ group.id }}">{{ group.name|default('?????', boolean=True) }}</a></td>
<td>
{{ group.status_label }}{% if group.convert_badges and group.badges_purchased %} <span class="text-danger" data-bs-toggle="tooltip" data-bs-placement="top" title="This {{ c.DEALER_TERM }}'s badges will be converted to individual badges tonight!"><i class="fa fa-exclamation-circle" aria-hidden="true"></i></span>{% endif %}
{{ group.status_label }}{% if group.convert_badges and group.badges_purchased %} <span class="text-danger" data-bs-toggle="tooltip" data-bs-placement="top" title="This {{ c.DEALER_TERM }}'s badges will be converted to individual badges tonight!"><i class="fa fa-exclamation-circle"></i></span>{% endif %}
</td>
<td>{{ group.website|url_to_link(target="_blank", is_relative=False) }}</td>
<td data-order="{{ group.badges_purchased }}" data-search="{{ group.badges_purchased }}"> {{ group.badges_purchased }} / {{ group.badges }} </td>
Expand Down

0 comments on commit 62a3b32

Please sign in to comment.