|
|
|
@ -1108,14 +1108,18 @@ class Tournament(BaseModel): |
|
|
|
return True |
|
|
|
return True |
|
|
|
|
|
|
|
|
|
|
|
def options_fee(self): |
|
|
|
def options_fee(self): |
|
|
|
|
|
|
|
def format_currency(amount): |
|
|
|
|
|
|
|
"""Format currency amount, removing unnecessary decimals""" |
|
|
|
|
|
|
|
return f"{amount:g}" if amount % 1 == 0 else f"{amount:.2f}" |
|
|
|
|
|
|
|
|
|
|
|
options = [] |
|
|
|
options = [] |
|
|
|
# Entry fee |
|
|
|
# Entry fee |
|
|
|
if self.entry_fee is not None and self.entry_fee > 0: |
|
|
|
if self.entry_fee is not None and self.entry_fee > 0: |
|
|
|
options.append(f"Frais d'inscription: {self.entry_fee} € par joueur") |
|
|
|
options.append(f"Frais d'inscription: {format_currency(self.entry_fee)} € par joueur") |
|
|
|
|
|
|
|
|
|
|
|
# Club member fee reduction |
|
|
|
# Club member fee reduction |
|
|
|
if self.club_member_fee_deduction and self.club_member_fee_deduction > 0: |
|
|
|
if self.club_member_fee_deduction and self.club_member_fee_deduction > 0: |
|
|
|
options.append(f"Réduction de {self.club_member_fee_deduction} € pour les membres du club") |
|
|
|
options.append(f"Réduction de {format_currency(self.club_member_fee_deduction)} € pour les membres du club") |
|
|
|
|
|
|
|
|
|
|
|
return options |
|
|
|
return options |
|
|
|
|
|
|
|
|
|
|
|
@ -1133,6 +1137,9 @@ class Tournament(BaseModel): |
|
|
|
date = formats.date_format(self.registration_date_limit.astimezone(timezone), format='j F Y H:i') |
|
|
|
date = formats.date_format(self.registration_date_limit.astimezone(timezone), format='j F Y H:i') |
|
|
|
options.append(f"Clôture des inscriptions le {date}") |
|
|
|
options.append(f"Clôture des inscriptions le {date}") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Période de désinscription |
|
|
|
|
|
|
|
options.append(f"Désinscription possible jusqu'à {self.unregister_delta_in_hours}h avant le tournoi") |
|
|
|
|
|
|
|
|
|
|
|
options.append(self.get_selection_status_localized) |
|
|
|
options.append(self.get_selection_status_localized) |
|
|
|
|
|
|
|
|
|
|
|
# Cible d'équipes |
|
|
|
# Cible d'équipes |
|
|
|
|