diff --git a/UI/src/models/game.py b/UI/src/models/game.py index 1d77dd2..c711a3e 100644 --- a/UI/src/models/game.py +++ b/UI/src/models/game.py @@ -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 "")