* fixed discout calculation
This commit is contained in:
parent
fc2297b17c
commit
6676eaed0e
|
|
@ -356,7 +356,7 @@ class Checklist(models.Model):
|
||||||
# We assume that working promocode was bound correctly through serializer
|
# We assume that working promocode was bound correctly through serializer
|
||||||
# and intentionally don't check if promocode is active here
|
# and intentionally don't check if promocode is active here
|
||||||
promocode = self.promocode
|
promocode = self.promocode
|
||||||
price -= promocode.discount * self.price_rub
|
price -= promocode.discount * self.price_rub / 100
|
||||||
|
|
||||||
free_delivery = promocode.free_delivery
|
free_delivery = promocode.free_delivery
|
||||||
no_comission = promocode.no_comission
|
no_comission = promocode.no_comission
|
||||||
|
|
@ -367,7 +367,7 @@ class Checklist(models.Model):
|
||||||
if not no_comission:
|
if not no_comission:
|
||||||
price += self.commission_rub
|
price += self.commission_rub
|
||||||
|
|
||||||
return price
|
return Decimal.max(Decimal(0), price)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def delivery_price_CN_RU(self) -> Decimal:
|
def delivery_price_CN_RU(self) -> Decimal:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user