summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_api/models/product_product.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_api/models/product_product.py b/indoteknik_api/models/product_product.py
index bd6f516d..3ecad627 100644
--- a/indoteknik_api/models/product_product.py
+++ b/indoteknik_api/models/product_product.py
@@ -287,7 +287,8 @@ class ProductProduct(models.Model):
elif item.fixed_price > 0:
price_flashsale = item.fixed_price # ask darren for include or exclude
price_flashsale = price_flashsale + (price_flashsale * default_tax / 100)
- discount = (base_price - price_flashsale) // base_price * 100
+ discount = (base_price - price_flashsale) * 100 / base_price
+ discount = (math.ceil(discount*100)/100)
price_flashsale = item.fixed_price
# price_flashsale = price_flashsale / default_divide_tax # darren must fill the fixed price with price exclude