Procházet zdrojové kódy

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 před 2 roky
rodič
revize
44f2252b04
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3
    0
      src/oscar/apps/partner/prices.py

+ 3
- 0
src/oscar/apps/partner/prices.py Zobrazit soubor

@@ -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
 

Načítá se…
Zrušit
Uložit