sale calulation fixes