Browse Source

Do not fail on empty discount

mac_vendor
Hugo LEVY-FALK 7 years ago
committed by chirac
parent
commit
b85384b226
  1. 2
      cotisations/forms.py

2
cotisations/forms.py

@ -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(

Loading…
Cancel
Save