diff --git a/store/models.py b/store/models.py index d245b20..bed5970 100644 --- a/store/models.py +++ b/store/models.py @@ -356,7 +356,7 @@ class Checklist(models.Model): # We assume that working promocode was bound correctly through serializer # and intentionally don't check if promocode is active here promocode = self.promocode - price -= promocode.discount * self.price_rub + price -= promocode.discount * self.price_rub / 100 free_delivery = promocode.free_delivery no_comission = promocode.no_comission @@ -367,7 +367,7 @@ class Checklist(models.Model): if not no_comission: price += self.commission_rub - return price + return Decimal.max(Decimal(0), price) @property def delivery_price_CN_RU(self) -> Decimal: