mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-05 01:16:27 +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
|
amount = discount/100 * invoice_price
|
||||||
else:
|
else:
|
||||||
amount = discount
|
amount = discount
|
||||||
if amount > 0:
|
if amount:
|
||||||
name = _("{}% discount") if is_relative else _("{}€ discount")
|
name = _("{}% discount") if is_relative else _("{}€ discount")
|
||||||
name = name.format(discount)
|
name = name.format(discount)
|
||||||
Vente.objects.create(
|
Vente.objects.create(
|
||||||
|
|
Loading…
Reference in a new issue