diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2024-02-12 11:14:02 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2024-02-12 11:14:02 +0700 |
| commit | 0060d2789962593280e91d8ea4251a7c18d6115c (patch) | |
| tree | f00eb557762ab751e8988fb9ecbb149c9262864e | |
| parent | f300408a52eab119568a331c46c1288f18bd7c8e (diff) | |
bug fix tax in flashsale price if using fixed price
| -rw-r--r-- | indoteknik_api/models/product_product.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indoteknik_api/models/product_product.py b/indoteknik_api/models/product_product.py index 4400ad08..bd6f516d 100644 --- a/indoteknik_api/models/product_product.py +++ b/indoteknik_api/models/product_product.py @@ -279,14 +279,17 @@ class ProductProduct(models.Model): discount = 0 price_flashsale = 0 default_divide_tax = float(1.11) + default_tax = float(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 + price_flashsale = price_flashsale + (price_flashsale * default_tax / 100) discount = (base_price - price_flashsale) // base_price * 100 + price_flashsale = item.fixed_price + # price_flashsale = price_flashsale / default_divide_tax # darren must fill the fixed price with price exclude if price_for == 'odoo': base_price = self._v2_get_website_price_exclude_tax() |
