Просмотр исходного кода

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 лет назад
Родитель
Сommit
44f2252b04
1 измененных файлов: 3 добавлений и 0 удалений
  1. 3
    0
      src/oscar/apps/partner/prices.py

+ 3
- 0
src/oscar/apps/partner/prices.py Просмотреть файл

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

Загрузка…
Отмена
Сохранить