def testGetPriceGross(self): """ """ p = IPrices(self.item1) self.assertEqual(p.getPriceGross(), 44.0) p = IPrices(self.item2) self.assertEqual(p.getPriceGross(), 57.0)
def getBasePrice(self): """ """ p = IPrices(self.context) price = p.getPriceGross() cm = ICurrencyManagement(self.context) return cm.priceToString(price)
def getCurrentPrice(self): """ """ pm = IPropertyManagement(self.context) total_diff = 0.0 for property_id, selected_option in self.request.form.items(): if property_id.startswith("property"): total_diff += pm.getPriceForCustomer(property_id[9:], selected_option) p = IPrices(self.context) price = p.getPriceGross() + total_diff cm = ICurrencyManagement(self.context) return cm.priceToString(price)
def getCurrentPrice(self): """ """ pm = IPropertyManagement(self.context) total_diff = 0.0 for property_id, selected_option in self.request.form.items(): if property_id.startswith("property"): total_diff += pm.getPriceForCustomer( property_id[9:], selected_option ) p = IPrices(self.context) price = p.getPriceGross() + total_diff cm = ICurrencyManagement(self.context) return cm.priceToString(price)
def testGetPriceGross(self): """ """ p = IPrices(self.order) self.assertEqual("%.2f" % p.getPriceGross(), "151.00")
def testGetPriceGross(self): """ """ pp = IPrices(self.item1) self.assertEqual(pp.getPriceGross(), 4536.0)
def testGetPriceGross(self): """ """ p = IPrices(self.cart) self.assertEqual(p.getPriceGross(), 111.00)
def testGetPriceGross(self): """ """ p = IPrices(self.shop.products.product_1) self.assertEqual(p.getPriceGross(), 22.0)