Untitled diff

생성일 비교 결과 만료 없음
두 텍스트가 동일합니다
두 텍스트 간 차이점이 없습니다행: 9 · 차이: 0
0 삭제
9 행
0 추가
9 행
def calculate_user_discount(user: User, order: Order) -> Decimal:
def calculate_user_discount(user: User, order: Order) -> Decimal:
if user.is_premium and order.total > 1000:
if user.is_premium and order.total > 1000:
return order.total * Decimal('0.15')
return order.total * Decimal('0.15')
elif user.is_premium:
elif user.is_premium:
return order.total * Decimal('0.10')
return order.total * Decimal('0.10')
elif order.total > 1000:
elif order.total > 1000:
return order.total * Decimal('0.05')
return order.total * Decimal('0.05')
else:
else:
return Decimal('0')
return Decimal('0')
감지된 변경 사항이 없습니다.