Convert an integer money value to a fixed point string
(value)
| 58 | return binascii.hexlify(b[::-1]).decode('utf8') |
| 59 | |
| 60 | def str_money_value(value): |
| 61 | """Convert an integer money value to a fixed point string""" |
| 62 | r = '%i.%08i' % (value // COIN, value % COIN) |
| 63 | r = r.rstrip('0') |
| 64 | if r[-1] == '.': |
| 65 | r += '0' |
| 66 | return r |
| 67 | |
| 68 | |
| 69 | class ValidationError(Exception): |
no outgoing calls