# coding=utf-8 class Formater(object): @staticmethod def formatPrice(value): return int(round(float(value or 0) * 100,0)) @staticmethod def formatPriceShow(value): return '%.2f' % (float(value or 0)/100.0) @staticmethod def formatCount(value): return int(round(float(value or 0) * 100, 0)) @staticmethod def formatCountShow(value): return '%.2f' % (float(value or 0) / 100.0) @staticmethod def formatAmount(value): return int(round(float(value or 0) * 10000, 0)) @staticmethod def formatAmountShow(value): return '%.2f' % (float(value or 0) / 10000.0 + 0.0000001)