Instead of User.all, it should be User.active as we don't want inactive users (ex-employees, etc) to appear in the time invoice