diff --git a/back/infolica/views/facture_emolument.py b/back/infolica/views/facture_emolument.py index 75d712b4..34a7eda3 100644 --- a/back/infolica/views/facture_emolument.py +++ b/back/infolica/views/facture_emolument.py @@ -277,16 +277,16 @@ def emolument_new_view(request): for scategory in category: for position in scategory: for i in range(len(position['nombre'])): - if int(position['nombre'][i] or '0') > 0 or float(position['prix'][i] or '0') > 0: + if float(position['nombre'][i] or 0) > 0 or float(position['prix'][i] or 0) > 0: params = Utils._params( emolument_affaire_id=emol_affaire.id, tableau_emolument_id=int(position['id']), position=position['nom'], - prix_unitaire=_round_nearest(float(position['montant'])) or 0, + prix_unitaire=_round_nearest(float(position['montant']) or 0), nombre=float(position['nombre'][i] or '0'), batiment=i, batiment_f=1 if i == 0 else float(form_general['batiment_f'][i-1]), - montant=_round_nearest(float(position['prix'][i])) or 0 + montant=_round_nearest(float(position['prix'][i]) or 0) ) # save emolument @@ -298,16 +298,17 @@ def emolument_new_view(request): # save divers tarif horaire for dth in divers_tarifhoraire: - if dth['nom'] is not None and dth['nombre'] is not None and dth['montant'] is not None: + if dth['nom'] is not None and dth['nombre'] is not None and dth['montant'] is not None and \ + dth['nom'] != '' and dth['nombre'] != '' and dth['montant'] != '': params = Utils._params( emolument_affaire_id=emol_affaire.id, tableau_emolument_id=emoluments_divers_tarifhoraire_id, position=dth['nom'], - prix_unitaire=float(dth['montant']), + prix_unitaire=_round_nearest(float(dth['montant']) or 0), nombre=float(dth['nombre']), batiment=0, batiment_f=1, - montant=_round_nearest(float(dth['prix'])) or 0 + montant=_round_nearest(float(dth['prix']) or 0) ) # save emolument diff --git a/front/.env b/front/.env index fc84e57b..9124e283 100644 --- a/front/.env +++ b/front/.env @@ -3,7 +3,7 @@ VUE_APP_API_URL="{API_URL}" PUBLIC_PATH = "{PUBLIC_PATH}" VUE_APP_STATUS = "development" -VUE_APP_VERSION = "1.11.3" +VUE_APP_VERSION = "1.11.4" #==================================