瀏覽代碼

It shouldn't be needed to change the strategy to use a diffferent price object when OSCAR_OFFERS_INCL_TAX setting is changed

master
Lars van de Kerkhof 2 年之前
父節點
當前提交
44f2252b04
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      src/oscar/apps/partner/prices.py

+ 3
- 0
src/oscar/apps/partner/prices.py 查看文件

@@ -1,4 +1,5 @@
1 1
 from oscar.core import prices
2
+from django.conf import settings
2 3
 
3 4
 
4 5
 class Base(object):
@@ -21,6 +22,8 @@ class Base(object):
21 22
     #: Price to use for offer calculations
22 23
     @property
23 24
     def effective_price(self):
25
+        if settings.OSCAR_OFFERS_INCL_TAX:
26
+            return self.incl_tax
24 27
         # Default to using the price excluding tax for calculations
25 28
         return self.excl_tax
26 29
 

Loading…
取消
儲存