Untitled diff

बनाया गया Diff कभी समाप्त नहीं होता
दोनों टेक्स्ट समान हैं
इन दो टेक्स्ट के बीच कोई अंतर नहीं है
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')