-{% extends 'rh/rapports/base.html' %}
+{% extends 'admin/base_site.html' %}
{% load adminmedia rapports i18n l10n %}
-{% block nomrapport %}Rapport de masse salariale{% endblock %}
-{% block count_elements %}<h2>Rapport année {{ request.GET.annee }}</h2>{% endblock %}
+{% block content_title %}<h1>Rapport de masse salariale</h1>{% endblock %}
{% block extrastyle %}
{{ block.super }}
<style type="text/css">
- #changelist .actions .filter {width: auto; float: left;}
- #changelist .actions .filter h3 {font-size: 11px; margin-left: 0.5em;}
- #result_list .highlighted {background: #ffff88;}
+table.rapport { border: 1px solid #dddddd; }
+table.rapport th { background: white; }
+table.rapport th.traitements { background: #ecab44; }
+table.rapport th.indemnites { background: #fff840; }
+table.rapport th.primes { background: #d7fb0f; }
+table.rapport th.charges { background: #fb680f; }
+table.rapport .highlighted { background: #ffff88; }
+th.section-end, td.section-end { border-right: 10px solid #dddddd; }
+td.nowrap { white-space: nowrap; }
</style>
{% endblock %}
{% block extrahead %}
{{ block.super }}
-<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-1.5.1.min.js"></script>
-<script type="text/javascript" src="{% admin_media_prefix %}js/jquery-stickytableheaders.js"></script>
+<script type="text/javascript"
+ src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}rh/FixedHeader.min.js"></script>
<script type="text/javascript">
-$(function() {
- $('#result_list tr').click(function() {
+$(document).ready(function() {
+ new FixedHeader($('table.rapport').get(0));
+ $('table.rapport tr').click(function() {
$(this).toggleClass('highlighted');
});
});
</script>
{% endblock %}
-{% block contentrapport %}
-{% if url_ods %}
-<ul class="object-tools">
- <li>
- <a href="{{ url_ods }}">Exporter en ods</a>
- </li>
-</ul>
-{% endif %}
-<form method="GET">
- <input type="hidden" name="ne_pas_grouper" value="True" />
- <div class="actions">
- <div class="filter">
- <h3>Région</h3>
- {{ form.region }}
- </div>
- <div class="filter">
- <h3>Implantation</h3>
- {{ form.implantation }}
- </div>
- <div class="filter">
- <h3>Année</h3>
- {{ form.annee }}
- </div>
- <div class="filter" style="margin-left:20px">
- <h3> </h3>
- <button type="submit" class="button" title="Exécuter l'action sélectionnée">Rechercher</button>
- </div>
- <div class="clear"></div>
- {% comment %}
- <label>Plage de dates:
- {{ form.date_debut }} au {{ form.date_fin }}
- </label>
- {% endcomment %}
- </div>
+{% block content %}
+<form class="module">
+ <table style="width: 100%">
+ {{ form }}
+ <tr>
+ <td></td>
+ <td>
+ <input type="submit" value="Afficher">
+ <input type="submit" name="ods" value="Format Calc">
+ </td>
+ </tr>
+ </table>
</form>
-<div class="clear"></div>
+{% if lignes %}
+<p>
+ <strong>Masse salariale totale: {{ masse_salariale_totale }} EUR</strong>
+</p>
-<script type="text/javascript">
- jQuery(document).ready(function(){
- $("#result_list").stickyTableHeaders();
- });
-</script>
-<table id="result_list" class="results">
-<thead>
-<tr>
- {% table_header headers %}
-</tr>
-</thead>
-{% localize on %}
-{% spaceless %}
-{% for row in rapport %}
- <tr class="{% cycle 'row1' 'row2' %}">
- {% for column in header_keys %}
- {% if column == 'sep' %}
- <td style="background:gray;"> </td>
- {% else %}
- {% if row|hash:column|is_float %}
- <td>
- {% comment %}
- {% if options.backgroundcolor %}
- style="background-color:{{ options.backgroundcolor }}"
- {% endif %}
- {% endcomment %}
- {{ row|hash:column|floatformat:2|localize }}
- {% if column != "point" %}
- {% if forloop.last or column|contains:"euro" %}
- EUR
- {% else %}
- {{ row.devise }}
- {% endif %}
- {% endif %}
- </td>
- {% else %}
- <td>{{ row|hash:column|default:"" }}</td>
- {% endif %}
- {% endif %}
- {% endfor %}
- </tr>
-{% endfor %}{% endspaceless %}
+<table class="rapport">
+ <thead>
<tr>
- <td colspan="{{ colspan }}" style="text-align:right;font-weight:bold;">
- TOTAL :
- </td>
- <td>{{ total_euro }}</td>
+ <th>Bureau</th>
+ <th>Pays</th>
+ <th>Implantation</th>
+ <th>Valeur du point</th>
+ <th>Numéro d'employé</th>
+ <th>Nom</th>
+ <th>Prénom</th>
+ <th>Type de poste</th>
+ <th>Intitulé du poste</th>
+ <th>Niveau actuel</th>
+ <th>Points</th>
+ <th>Régime de travail annuel</th>
+ <th>Local / Expatrié</th>
+ <th>Statut</th>
+ <th class="section-end">Date de fin de contrat</th>
+ <th>Date de début</th>
+ <th>Date de fin</th>
+ <th class="section-end">Nombre de jours</th>
+ <th>Devise</th>
+ <th>Salaire BSTG ANNUEL</th>
+ <th>Salaire BSTG EUR</th>
+ <th class="section-end">Organisme BSTG</th>
+ <th class="traitements">
+ Salaire théorique annuel
+ </th>
+ {% for titre in titres_traitements %}
+ <th class="traitements">{{ titre }}</th>
+ {% endfor %}
+ <th class="traitements section-end">
+ Total des traitements
+ </th>
+ {% for titre in titres_indemnites %}
+ <th class="indemnites">{{ titre }}</th>
+ {% endfor %}
+ <th class="indemnites section-end">Total des indemnités</th>
+ {% for titre in titres_primes %}
+ <th class="primes">{{ titre }}</th>
+ {% endfor %}
+ <th class="primes section-end">Total des primes</th>
+ {% for titre in titres_charges %}
+ <th class="charges">{{ titre }}</th>
+ {% endfor %}
+ <th class="charges section-end">Total des charges</th>
+ <th class="traitements">Total des traitements</th>
+ <th class="indemnites">Total des indemnités</th>
+ <th class="primes">Total des primes</th>
+ <th class="charges section-end">Total des charges</th>
+ <th>Masse salariale</th>
+ <th>Masse salariale EUR</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for ligne in lignes %}
+ <tr class="{% cycle 'row1' 'row2' %}">
+ <td>{{ ligne.poste.implantation.region.code }}</td>
+ <td>{{ ligne.poste.implantation.adresse_physique_pays.nom }}</td>
+ <td>{{ ligne.poste.implantation.nom_court }}</td>
+ <td class="nowrap">
+ {% if ligne.valeur_point %}
+ {{ ligne.valeur_point }} {{ ligne.valeur_point_devise }}
+ {% endif %}
+ </td>
+ <td>
+ {% if ligne.dossier %}
+ {{ ligne.dossier.employe.id|stringformat:"d" }}
+ {% else %}
+ VACANT
+ {% endif %}
+ </td>
+ <td>{{ ligne.dossier.employe.nom }}</td>
+ <td>{{ ligne.dossier.employe.prenom }}</td>
+ <td>{{ ligne.poste.type_poste.nom }}</td>
+ <td>{{ ligne.poste.nom }}</td>
+ <td>{{ ligne.dossier.classement }}</td>
+ <td class="nowrap">
+ {{ ligne.dossier.classement.coefficient|floatformat:2 }}
+ </td>
+ <td class="nowrap">
+ {{ ligne.regime_travail|floatformat }} %
+ </td>
+ <td>{{ ligne.local_expatrie }}</td>
+ <td>{{ ligne.dossier.statut.code }}</td>
+ <td class="section-end">{{ ligne.dossier.date_fin|date }}</td>
+ <td>
+ {{ ligne.date_debut|date }}
+ </td>
+ <td>
+ {{ ligne.date_fin|date }}
+ </td>
+ <td class="section-end">
+ {{ ligne.jours }}
+ </td>
+ <td>{{ ligne.devise }}</td>
+ <td class="nowrap">
+ {% if ligne.salaire_bstg %}
+ {{ ligne.salaire_bstg }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ <td class="nowrap">
+ {% if ligne.salaire_bstg_eur %}
+ {{ ligne.salaire_bstg_eur }} EUR
+ {% endif %}
+ </td>
+ <td class="section-end">{{ ligne.dossier.organisme_bstg.nom }}</td>
+ <td class="nowrap">
+ {% if ligne.salaire_theorique %}
+ {{ ligne.salaire_theorique }} {{ ligne.valeur_point_devise }}
+ {% endif %}
+ </td>
+ {% for traitement in ligne.traitements %}
+ <td class="nowrap">
+ {% if traitement %}
+ {{ traitement }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ {% endfor %}
+ <td class="section-end nowrap">
+ {% if ligne.total_traitements %}
+ {{ ligne.total_traitements }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ {% for indemnite in ligne.indemnites %}
+ <td class="nowrap">
+ {% if indemnite %}
+ {{ indemnite }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ {% endfor %}
+ <td class="section-end nowrap">
+ {% if ligne.total_indemnites %}
+ {{ ligne.total_indemnites }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ {% for prime in ligne.primes %}
+ <td class="nowrap">
+ {% if prime %}
+ {{ prime }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ {% endfor %}
+ <td class="section-end nowrap">
+ {% if ligne.total_primes %}
+ {{ ligne.total_primes }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ {% for charge in ligne.charges %}
+ <td class="nowrap">
+ {% if charge %}
+ {{ charge }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ {% endfor %}
+ <td class="section-end nowrap">
+ {% if ligne.total_charges %}
+ {{ ligne.total_charges }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ <td class="nowrap">
+ {% if ligne.total_traitements %}
+ {{ ligne.total_traitements }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ <td class="nowrap">
+ {% if ligne.total_indemnites %}
+ {{ ligne.total_indemnites }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ <td class="nowrap">
+ {% if ligne.total_primes %}
+ {{ ligne.total_primes }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ <td class="section-end nowrap">
+ {% if ligne.total_charges %}
+ {{ ligne.total_charges }} {{ ligne.devise }}
+ {% endif %}
+ </td>
+ <td class="nowrap">
+ {{ ligne.masse_salariale }} {{ ligne.devise }}
+ </td>
+ <td class="nowrap">
+ {{ ligne.masse_salariale_eur }} EUR
+ </td>
</tr>
+ {% endfor %}
+ </tbody>
</table>
-{% endlocalize %}
+{% endif %}
+
{% endblock %}