Merge branch 'qwann/k-fet/decimal_issue2' into 'k-fet'

Qwann/k fet/decimal issue2

`grant` is a Decimal and thus can not be casted implicitly to float.

See merge request !158
This commit is contained in:
Aurélien Delobelle 2017-02-11 22:04:10 +01:00
commit 49e6101156

View file

@ -41,5 +41,4 @@ def highlight_clipper(clipper, q):
@register.filter()
def ukf(balance, is_cof):
grant = is_cof and (1 + Settings.SUBVENTION_COF() / 100) or 1
# float nécessaire car sinon problème avec le round de future.builtins
return floor(float(balance) * 10 * grant)
return floor(balance * 10 * grant)