diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index e4fbc74a..3ba86630 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -4158,7 +4158,7 @@ class Facture(BaseClasseCrans): for art in ajoute: if int(art['nombre']) != float(art['nombre']): raise ValueError, u'nombre doit ĂȘtre un entier' - if float(int(art['pu']*100)/100.0) != art['pu']: + if round(art['pu'],2) != art['pu']: raise ValueError, u'pu ne doit pas avoir plus de 2 chiffres apres la virgule' art['nombre'] = int(art['nombre']) if '~~' in ' '.join([unicode(x) for x in art.values()]):