def render(self, context): rate = None if self.base_currency_symbol: rate = get_exchange_currency(self.currency_symbol, self.base_currency_symbol) else: rate = get_exchange_currency(self.currency_symbol) return (self.price * rate)
def render(self, context): rate = None if self.base_currency_symbol: rate = get_exchange_currency(self.currency_symbol, self.base_currency_symbol) else: rate = get_exchange_currency(self.currency_symbol) return Decimal(self.price.resolve(context) * rate).quantize(Decimal("0.01"))
def render(self, context): if self.base_currency_symbol: return get_exchange_currency(self.currency_symbol, self.base_currency_symbol) return get_exchange_currency(self.currency_symbol)