|
@@ -111,9 +111,9 @@ def main(CodeAgent, MoisRH, AnneeRH, auto=False):
|
|
|
fraisdep.Depart = el.Depart
|
|
fraisdep.Depart = el.Depart
|
|
|
# mettre a jour le codedepart
|
|
# mettre a jour le codedepart
|
|
|
fraisdep.Itineraire = " - ".join([loc for loc in (fraisdep.Depart, el.Localisation) if loc])
|
|
fraisdep.Itineraire = " - ".join([loc for loc in (fraisdep.Depart, el.Localisation) if loc])
|
|
|
- fraisdep.Distance1_perso = int(el.DistanceTranche1) if el.VehiculePersoTranche1 == "True" else 0
|
|
|
|
|
- fraisdep.Distance2_perso = int(el.DistanceTranche2) if el.VehiculePersoTranche2 == "True" else 0
|
|
|
|
|
- fraisdep.Distance2_service = int(el.DistanceTranche2) if not el.VehiculePersoTranche2 == "True" else 0
|
|
|
|
|
|
|
+ fraisdep.Distance1_perso = int(el.DistanceTranche1) if el.VehiculePersoTranche1 else 0
|
|
|
|
|
+ fraisdep.Distance2_perso = int(el.DistanceTranche2) if el.VehiculePersoTranche2 else 0
|
|
|
|
|
+ fraisdep.Distance2_service = int(el.DistanceTranche2) if not el.VehiculePersoTranche2 else 0
|
|
|
fraisdep.Repas = int(el.Repas)
|
|
fraisdep.Repas = int(el.Repas)
|
|
|
|
|
|
|
|
# Indexation des objets par jour
|
|
# Indexation des objets par jour
|
|
@@ -123,9 +123,9 @@ def main(CodeAgent, MoisRH, AnneeRH, auto=False):
|
|
|
else :
|
|
else :
|
|
|
# Mise à jour d'un objet existant
|
|
# Mise à jour d'un objet existant
|
|
|
index_dep[el.DateRH.day].Itineraire += " - {}".format(el.Localisation)
|
|
index_dep[el.DateRH.day].Itineraire += " - {}".format(el.Localisation)
|
|
|
- index_dep[el.DateRH.day].Distance1_perso += int(el.DistanceTranche1) if el.VehiculePersoTranche1 == "True" else 0
|
|
|
|
|
- index_dep[el.DateRH.day].Distance2_perso += int(el.DistanceTranche2) if el.VehiculePersoTranche2 == "True" else 0
|
|
|
|
|
- index_dep[el.DateRH.day].Distance2_service += int(el.DistanceTranche2) if not el.VehiculePersoTranche2 == "True" else 0
|
|
|
|
|
|
|
+ index_dep[el.DateRH.day].Distance1_perso += int(el.DistanceTranche1) if el.VehiculePersoTranche1 else 0
|
|
|
|
|
+ index_dep[el.DateRH.day].Distance2_perso += int(el.DistanceTranche2) if el.VehiculePersoTranche2 else 0
|
|
|
|
|
+ index_dep[el.DateRH.day].Distance2_service += int(el.DistanceTranche2) if not el.VehiculePersoTranche2 else 0
|
|
|
index_dep[el.DateRH.day].Repas += int(el.Repas)
|
|
index_dep[el.DateRH.day].Repas += int(el.Repas)
|
|
|
|
|
|
|
|
|
|
|