convert get_next_payment to coffeescript