diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2024-02-12 10:48:37 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2024-02-12 10:48:37 +0700 |
| commit | f300408a52eab119568a331c46c1288f18bd7c8e (patch) | |
| tree | 0d308205d85576281e6f618b6a3ab6764d53a6d2 | |
| parent | 4e54d00cf34d262ffa477d8267fb33682c98e649 (diff) | |
bug fix flashsale price, forgot to divide tax
| -rw-r--r-- | indoteknik_api/models/product_product.py | 3 |
1 files changed, 3 insertions, 0 deletions
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': |
