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)
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)