Skip to content

Commit

Permalink
Merge pull request #753 from rufener/bugfix
Browse files Browse the repository at this point in the history
bugfix
  • Loading branch information
rufener authored Jan 10, 2024
2 parents 1eb1520 + ab5973c commit 8da1097
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions back/infolica/views/facture_emolument.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion front/.env
Original file line number Diff line number Diff line change
Expand Up @@ -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"


#==================================
Expand Down

0 comments on commit 8da1097

Please sign in to comment.