fix views
optimze sales calcs