6 def masse_salariale(lignes
, annee
, titres_traitements
, titres_indemnites
,
7 titres_primes
, titres_charges
, masse_salariale_totale
):
8 doc
= odsgen
.Document()
9 doc
.add_iso_date_style('iso-date')
11 table
= doc
.add_table(name
=u
'Masse salariale')
13 ['1.75cm', '5cm', '4cm', '3cm', '3.5cm', '5cm', '4cm', '6cm',
14 '14cm', '2.5cm', '1.5cm', '4.5cm', '3cm', '1.5cm', '3.75cm',
15 '0.5cm', '2.5cm', '2cm', '3cm', '0.5cm', '1.5cm', '4cm',
16 '3.25cm', '5cm', '0.5cm', '4.25cm'] +
17 ['5cm'] * len(titres_traitements
) + ['4cm', '0.5cm'] +
18 ['5cm'] * len(titres_indemnites
) + ['4cm', '0.5cm'] +
19 ['5cm'] * len(titres_primes
) + ['4cm', '0.5cm'] +
20 ['5cm'] * len(titres_charges
) + ['4cm', '0.5cm'] +
21 ['3.75cm'] * 4 + ['0.5cm', '2.75cm', '4cm']
23 table
.add_column(columnwidth
=width
)
27 u
'Bureau', u
'Pays', u
'Implantation', u
'Valeur du point',
28 u
"Numéro d'employé", u
'Nom', u
'Prénom', u
'Type de poste',
29 u
'Intitulé du poste', u
'Niveau actuel', u
'Points',
30 u
'Régime de travail annuel', u
'Local / Expatrié', u
'Statut',
31 u
'Date de fin de contrat'
33 row
.add_cell(backgroundcolor
='#d3d3d3')
35 u
'Date de début', u
'Date de fin', u
'Nombre de jours'
37 row
.add_cell(backgroundcolor
='#d3d3d3')
39 u
'Devise', u
'Salaire BSTG ANNUEL', u
'Salaire BSTG EUR',
42 row
.add_cell(backgroundcolor
='#d3d3d3')
44 [u
'Salaire théorique annuel'] + titres_traitements
+
45 [u
'Total des traitements'],
46 backgroundcolor
='#ecab44', fontweight
='bold'
48 row
.add_cell(backgroundcolor
='#d3d3d3')
50 titres_indemnites
+ [u
'Total des indemnités'],
51 backgroundcolor
='#fff840', fontweight
='bold'
53 row
.add_cell(backgroundcolor
='#d3d3d3')
55 titres_primes
+ [u
'Total des primes'],
56 backgroundcolor
='#d7fb0f', fontweight
='bold'
58 row
.add_cell(backgroundcolor
='#d3d3d3')
60 titres_charges
+ [u
'Total des charges'],
61 backgroundcolor
='#fb680f', fontweight
='bold'
63 row
.add_cell(backgroundcolor
='#d3d3d3')
65 u
'Total des traitements', backgroundcolor
='#ecab44',
69 u
'Total des indemnités', backgroundcolor
='#fff840',
73 u
'Total des primes', backgroundcolor
='#d7fb0f',
77 u
'Total des charges', backgroundcolor
='#fb680f',
80 row
.add_cell(backgroundcolor
='#d3d3d3')
82 [u
'Masse salariale', u
'Masse salariale EUR'],
83 backgroundcolor
='#e6c6ed', fontweight
='bold'
90 # GESTION de l'affichage des VACANTS
91 if 'dossier' not in ligne
.keys():
93 ligne
['poste'].implantation
.zone_administrative
.code
,
94 ligne
['poste'].implantation
.adresse_physique_pays
.nom
,
95 ligne
['poste'].implantation
.nom_court
97 row
.add_cell(ligne
['valeur_point'], decimalplaces
=2)
99 'VACANT', #ligne['dossier'].employe.id or 'VACANT',
100 '', #ligne['dossier'].employe.nom,
101 '', #ligne['dossier'].employe.prenom,
102 ligne
['poste'].type_poste
.nom
,
104 '', #unicode(ligne['dossier'].classement),
105 '', #ligne['dossier'].classement
106 #and ligne['dossier'].classement.coefficient,
107 ligne
['regime_travail'],
108 ligne
['local_expatrie'],
109 '', #ligne['dossier'].statut.code,
112 '', #ligne['dossier'].date_fin, datastylename='iso-date'
114 row
.add_cell(backgroundcolor
='#d3d3d3')
116 '', #ligne['date_debut'], ligne['date_fin']
117 ], datastylename
='iso-date')
118 row
.add_cell(ligne
['jours'])
119 row
.add_cell(backgroundcolor
='#d3d3d3')
120 row
.add_cell(ligne
['devise'])
122 '', #ligne['salaire_bstg'], ligne['salaire_bstg_eur']
125 '', #ligne['dossier'].organisme_bstg
126 #and ligne['dossier'].organisme_bstg.nom,
128 row
.add_cell(backgroundcolor
='#d3d3d3')
130 [ligne
['salaire_theorique']] + ligne
['traitements'] +
131 [ligne
['total_traitements']],
134 row
.add_cell(backgroundcolor
='#d3d3d3')
136 ligne
['indemnites'] + [ligne
['total_indemnites']],
139 row
.add_cell(backgroundcolor
='#d3d3d3')
141 ligne
['primes'] + [ligne
['total_primes']],
144 row
.add_cell(backgroundcolor
='#d3d3d3')
146 ligne
['charges'] + [ligne
['total_charges']],
149 row
.add_cell(backgroundcolor
='#d3d3d3')
151 ligne
['total_traitements'], ligne
['total_indemnites'],
152 ligne
['total_primes'], ligne
['total_charges']
154 row
.add_cell(backgroundcolor
='#d3d3d3')
156 ligne
['masse_salariale'], ligne
['masse_salariale_eur']
161 ligne
['poste'].implantation
.zone_administrative
.code
,
162 ligne
['poste'].implantation
.adresse_physique_pays
.nom
,
163 ligne
['poste'].implantation
.nom_court
165 row
.add_cell(ligne
['valeur_point'], decimalplaces
=2)
167 ligne
['dossier'].employe
.id or 'VACANT',
168 ligne
['dossier'].employe
.nom
,
169 ligne
['dossier'].employe
.prenom
,
170 ligne
['poste'].type_poste
.nom
,
172 unicode(ligne
['dossier'].classement
),
173 ligne
['dossier'].classement
174 and ligne
['dossier'].classement
.coefficient
,
175 ligne
['regime_travail'],
176 ligne
['local_expatrie'],
177 ligne
['dossier'].statut
.code
,
179 row
.add_cell(ligne
['dossier'].date_fin
, datastylename
='iso-date')
180 row
.add_cell(backgroundcolor
='#d3d3d3')
182 ligne
['date_debut'], ligne
['date_fin']
183 ], datastylename
='iso-date')
184 row
.add_cell(ligne
['jours'])
185 row
.add_cell(backgroundcolor
='#d3d3d3')
186 row
.add_cell(ligne
['devise'])
188 ligne
['salaire_bstg'], ligne
['salaire_bstg_eur']
191 ligne
['dossier'].organisme_bstg
192 and ligne
['dossier'].organisme_bstg
.nom
,
194 row
.add_cell(backgroundcolor
='#d3d3d3')
196 [ligne
['salaire_theorique']] + ligne
['traitements'] +
197 [ligne
['total_traitements']],
200 row
.add_cell(backgroundcolor
='#d3d3d3')
202 ligne
['indemnites'] + [ligne
['total_indemnites']],
205 row
.add_cell(backgroundcolor
='#d3d3d3')
207 ligne
['primes'] + [ligne
['total_primes']],
210 row
.add_cell(backgroundcolor
='#d3d3d3')
212 ligne
['charges'] + [ligne
['total_charges']],
215 row
.add_cell(backgroundcolor
='#d3d3d3')
217 ligne
['total_traitements'], ligne
['total_indemnites'],
218 ligne
['total_primes'], ligne
['total_charges']
220 row
.add_cell(backgroundcolor
='#d3d3d3')
222 ligne
['masse_salariale'], ligne
['masse_salariale_eur']