Beispiel #1
0
def decimal_to_string(value, currency):
    """ Convert value to currency string """
    if currency == 'euro':
        return euro(value)
    elif currency == 'gbp':
        return pound(value)
    return sek(value)
Beispiel #2
0
def decimal_to_string(value, currency):
    """ Convert value to currency string """
    if currency == 'euro':
        return euro(value)
    elif currency == 'gbp':
        return pound(value)
    return sek(value)
Beispiel #3
0
def total_monetized(self):
    """ Shows currency in admin, currently only euro's, pounds, sek and dollars """
    if self.currency == 'euro':
        return '€ %s' % euro(self.total)
    elif self.currency == 'gbp':
        return '£ %s' % pound(self.total)
    elif self.currency == 'dollar':
        return '$ %s' % pound(self.total)
    elif self.currency == 'sek':
        return '&kronor; %s' % sek(self.total)
Beispiel #4
0
def total_monetized(self):
    """ Shows currency in admin, currently only euro's, pounds, sek and dollars """
    if self.currency == 'euro':
        return '€ %s' % euro(self.total)
    elif self.currency == 'gbp':
        return '£ %s' % pound(self.total)
    elif self.currency == 'dollar':
        return '$ %s' % pound(self.total)
    elif self.currency == 'sek':
        return '&kronor; %s' % sek(self.total)
def total_monetized(self):
    """ Shows currency in admin, currently only euro's, pounds, sek and dollars """
    if self.currency == "euro":
        return "€ %s" % euro(self.total)
    elif self.currency == "gbp":
        return "£ %s" % pound(self.total)
    elif self.currency == "dollar":
        return "$ %s" % pound(self.total)
    elif self.currency == "sek":
        return "&kronor; %s" % sek(self.total)