refactor log method, add credit option to sales