From f300408a52eab119568a331c46c1288f18bd7c8e Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Mon, 12 Feb 2024 10:48:37 +0700 Subject: bug fix flashsale price, forgot to divide tax --- indoteknik_api/models/product_product.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indoteknik_api/models/product_product.py b/indoteknik_api/models/product_product.py index 1db58d8e..4400ad08 100644 --- a/indoteknik_api/models/product_product.py +++ b/indoteknik_api/models/product_product.py @@ -278,11 +278,14 @@ class ProductProduct(models.Model): discount = 0 price_flashsale = 0 + default_divide_tax = float(1.11) if item.price_discount > 0: discount = item.price_discount price_flashsale = base_price - (base_price * discount // 100) + price_flashsale = price_flashsale / default_divide_tax elif item.fixed_price > 0: price_flashsale = item.fixed_price # ask darren for include or exclude + # price_flashsale = price_flashsale / default_divide_tax # darren must fill the fixed price with price exclude discount = (base_price - price_flashsale) // base_price * 100 if price_for == 'odoo': -- cgit v1.2.3