fix: UI discounts standard display
This commit is contained in:
parent
b0aba2366d
commit
87d63abe8d
|
@ -15,4 +15,4 @@ class Game:
|
|||
def __str__(self):
|
||||
cleaned_string = self.price.replace("\u202f", "")[:-2]
|
||||
cleaned_string = cleaned_string.replace(",", ".")
|
||||
return f"{self.name}\nЖанр: {self.genre}\nИздатель: {self.publisher}\n" + (str(self.price) if self.discount is None else f"{math.ceil(float(cleaned_string) * (100 - self.discount) / 100)} ₽ -{self.discount}%") + (f"\n{self.count} шт." if self.count is not None else "")
|
||||
return f"{self.name}\nЖанр: {self.genre}\nИздатель: {self.publisher}\n" + (str(self.price) if self.discount is None else f"{math.ceil(float(cleaned_string) * (100 - self.discount) / 100)},00 ₽ -{self.discount}%") + (f"\n{self.count} шт." if self.count is not None else "")
|
||||
|
|
Loading…
Reference in New Issue