update from Atlas
This commit is contained in:
@@ -67,8 +67,9 @@ class Order: # the Context
|
||||
fmt = '<Order total: {:.2f} due: {:.2f}>'
|
||||
return fmt.format(self.total(), self.due())
|
||||
|
||||
# <2>
|
||||
|
||||
def fidelity_promo(order): # <2>
|
||||
def fidelity_promo(order): # <3>
|
||||
"""5% discount for customers with 1000 or more fidelity points"""
|
||||
return order.total() * .05 if order.customer.fidelity >= 1000 else 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user