Commit b85384b2 authored by Hugo LEVY-FALK's avatar Hugo LEVY-FALK Committed by chirac

Do not fail on empty discount

parent f612e419
......@@ -133,7 +133,7 @@ class DiscountForm(Form):
amount = discount/100 * invoice_price
else:
amount = discount
if amount > 0:
if amount:
name = _("{}% discount") if is_relative else _("{}€ discount")
name = name.format(discount)
Vente.objects.create(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment