diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 8a4065a8..c67531ea 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -3229,6 +3229,8 @@ 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']: + raise ValueError, u'pu ne doit pas avoir plus de 2 chiffres apres la virgule' art['nombre'] = int(art['nombre']) if '~~' in ' '.join([str(x) for x in art.values()]): raise ValueError, u'Ne pas mettre de ~~ dans les champs'