mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 11:53:12 +00:00
Do not fail on empty discount
This commit is contained in:
parent
f612e4192f
commit
b85384b226
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue