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'
89 ligne
['poste'].implantation
.region
.code
,
90 ligne
['poste'].implantation
.adresse_physique_pays
.nom
,
91 ligne
['poste'].implantation
.nom_court
93 row
.add_cell(ligne
['valeur_point'], decimalplaces
=2)
95 ligne
['dossier'].employe
.id or 'VACANT',
96 ligne
['dossier'].employe
.nom
,
97 ligne
['dossier'].employe
.prenom
,
98 ligne
['poste'].type_poste
.nom
,
100 unicode(ligne
['dossier'].classement
),
101 ligne
['dossier'].classement
102 and ligne
['dossier'].classement
.coefficient
,
103 ligne
['regime_travail'],
104 ligne
['local_expatrie'],
105 ligne
['dossier'].statut
.code
,
107 row
.add_cell(ligne
['dossier'].date_fin
, datastylename
='iso-date')
108 row
.add_cell(backgroundcolor
='#d3d3d3')
110 ligne
['date_debut'], ligne
['date_fin']
111 ], datastylename
='iso-date')
112 row
.add_cell(ligne
['jours'])
113 row
.add_cell(backgroundcolor
='#d3d3d3')
114 row
.add_cell(ligne
['devise'])
116 ligne
['salaire_bstg'], ligne
['salaire_bstg_eur']
119 ligne
['dossier'].organisme_bstg
120 and ligne
['dossier'].organisme_bstg
.nom
,
122 row
.add_cell(backgroundcolor
='#d3d3d3')
124 [ligne
['salaire_theorique']] + ligne
['traitements'] +
125 [ligne
['total_traitements']],
128 row
.add_cell(backgroundcolor
='#d3d3d3')
130 ligne
['indemnites'] + [ligne
['total_indemnites']],
133 row
.add_cell(backgroundcolor
='#d3d3d3')
135 ligne
['primes'] + [ligne
['total_primes']],
138 row
.add_cell(backgroundcolor
='#d3d3d3')
140 ligne
['charges'] + [ligne
['total_charges']],
143 row
.add_cell(backgroundcolor
='#d3d3d3')
145 ligne
['total_traitements'], ligne
['total_indemnites'],
146 ligne
['total_primes'], ligne
['total_charges']
148 row
.add_cell(backgroundcolor
='#d3d3d3')
150 ligne
['masse_salariale'], ligne
['masse_salariale_eur']