

def trunc_decimal(val, places):
    'Legacy compatibility, rounds the way the old satchmo 0.8.1 used to round.'
    if ((val is None) or (val == '')):
        return val
    if (val < 0):
        roundfactor = '-0.01'
    else:
        roundfactor = '0.01'
    return round_decimal(val=val, places=places, roundfactor=roundfactor, normalize=True)

dataset/ETHPy150Open dokterbob/satchmo/satchmo/apps/satchmo_utils/numbers.py trunc_decimal/original