pasa el test cannot checkout an empty cart
refactoring hasSales