Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 5
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)