Masse salariale WIP et bugfix
[auf_rh_dae.git] / project / rh / masse_salariale.py
index 36d1394..9db560b 100644 (file)
@@ -131,9 +131,14 @@ class MasseSalariale():
             bstg_remun = None
             if bstg_dossier:
                 for r in bstg_dossier.rh_remunerations.all():
-                    if r.type in TYPE_REMUN_BSTG:
+                    if r.type.id in TYPE_REMUN_BSTG:
                         bstg_remun = r
 
+            if bstg_remun:
+                bstg_remun_euro = bstg_remun
+                self.convertir(bstg_remun_euro)
+                print bstg_remun.devise, bstg_remun_euro.devise
+
             salaire_complement = 0.0
             salaire_base = 0.0
             indemnites = {
@@ -252,9 +257,7 @@ class MasseSalariale():
                     ('devise', remuns[0].devise),
                     ('salaire_bstg_annuel', bstg_remun.montant \
                             if bstg_remun else ""),
-                    ('salaire_bstg_total',
-                                self.convertir(bstg_remun) \
-                                * regime * date_delta.days \
+                    ('salaire_bstg_total', bstg_remun_euro.montant \
                             if bstg_remun else ""),
                     ('organisme_bstg', dossier.organisme_bstg or ""),
                     ('salaire_base_brut', \