summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-03-30 11:11:48 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-03-30 11:11:48 +0700
commitc55f17416265b328c6a04d203c0fc49d00f08473 (patch)
treea35aa5247f6141ea65bc88115227e8bd60bfb501
parent59f9937dd87deb4e3a1a4e061e0d773b408ead5f (diff)
bug fix discount solr
-rw-r--r--indoteknik_custom/models/apache_solr.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/indoteknik_custom/models/apache_solr.py b/indoteknik_custom/models/apache_solr.py
index 63b332a5..ff31e487 100644
--- a/indoteknik_custom/models/apache_solr.py
+++ b/indoteknik_custom/models/apache_solr.py
@@ -32,12 +32,12 @@ class ApacheSolr(models.Model):
if price_excl_after_disc == 0:
price_excl = variant._get_website_price_exclude_tax()
price_excl_after_disc = variant._get_website_price_after_disc_and_tax()
- discount = variant._get_website_disc()
+ discount = variant._get_website_disc(0)
tax = variant._get_website_tax()
elif variant._get_website_price_after_disc_and_tax() < price_excl_after_disc:
price_excl_after_disc = variant._get_website_price_after_disc_and_tax()
price_excl = variant._get_website_price_exclude_tax()
- discount = variant._get_website_disc()
+ discount = variant._get_website_disc(0)
tax = variant._get_website_tax()
else:
price_excl_after_disc = price_excl_after_disc
@@ -48,7 +48,7 @@ class ApacheSolr(models.Model):
variants_code += variant.default_code or ''+', '
else:
price_excl = template.product_variant_id._get_website_price_exclude_tax()
- discount = template.product_variant_id._get_website_price_after_disc_and_tax()
+ discount = template.product_variant_id._get_website_disc(0)
price_excl_after_disc = template.product_variant_id._get_website_price_after_disc_and_tax()
tax = template.product_variant_id._get_website_tax()