ソースを参照

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
 

読み込み中…
キャンセル
保存