Commits

Ian George committed 96194a7

Negating discounts by default

Comments (0)

Files changed (2)

     with cd(env.django_settings.PROJECT_PATH):
         run('hg pull %s' % env.REPO_URL)
         run('hg update')
-    restart()
-
+        run('touch django.wsgi')
 
 ########################################################################
 # misc

quiet/shop/models/basket.py

     def get_absolute_url(self):
         return self.item_object.get_absolute_url()
 
-    def net_price(self, negate_discount=False, use_deposit=True):
+    def net_price(self, negate_discount=True, use_deposit=True):
         price = self.quantity * self.price
         if self.item_type == BasketItem.DISCOUNT and negate_discount and price > 0:
             price *= -1
             price *= self.deposit
         return price
 
-    def tax_price(self, negate_discount=False):
+    def tax_price(self, negate_discount=True):
         price = self.quantity * (self.tax or 0)
         if self.item_type == BasketItem.DISCOUNT and negate_discount and price > 0:
             price *= -1
         return price
 
-    def total_price(self, negate_discount=False, use_deposit=True):
+    def total_price(self, negate_discount=True, use_deposit=True):
         price = self.quantity * (self.price + (self.tax or 0))
         if self.item_type == BasketItem.DISCOUNT and negate_discount and price > 0:
             price *= -1