+{% load dae %}
<fieldset>
<h2>Contrat</h2>
<table>
<tbody>
<tr>
<th>Type de contrat</th>
- <td colspan="4">{{ dossier.type_contrat }}</td>
+ <td>{{ dossier.type_contrat }}</td>
+ </tr>
+ <tr>
<th>Remplacement</th>
<td>{%if dossier.remplacement %}oui{% else %}non{%endif %}</td>
</tr>
<tr>
- <th rowspan="2">Durée</th>
- <td colspan=2> du {{ dossier.contrat_date_debut }}</td>
- <td colspan=2>au {{ dossier.contrat_date_fin }}</td>
+ <th>Est un cadre?</th>
+ <td>{%if dossier.est_cadre %}oui{% else %}non{%endif %}</td>
+ </tr>
+ <tr>
+ <th>Durée</th>
+ <td> du {{ dossier.contrat_date_debut }} au {{ dossier.contrat_date_fin }}</td>
+ </tr>
+ <tr>
<th>Régime de travail</th>
<td>{{ dossier.regime_travail|floatformat:0 }}%</td>
</tr>
<tr>
<th>Nombre d'heure par semaine</th>
- <td colspan=5>{{ dossier.regime_travail_nb_heure_semaine|floatformat:0 }}H</td>
+ <td>{{ dossier.regime_travail_nb_heure_semaine|floatformat:0 }}H</td>
+ </tr>
+ <tr>
+ <th>Statut</th>
+ <td>{{ dossier.statut }} {{ dossier.statut_residence }}</td>
</tr>
<tr>
- <th>Statut : </th>
- <td colspan="4">{{ dossier.statut }} {{ dossier.statut_residence }}</td>
<th>Organisme BSTG</th>
{% if dossier.organisme_bstg or dossier.organisme_bstg_autre %}
<td>{% if dossier.organisme_bstg %}{{ dossier.organisme_bstg }}{% endif %} {{ dossier.organisme_bstg_autre }}</td>
<h2>Classement et salaire de base</h2>
<h3>Ancien dossier <span class="info">(le cas échéant)</span></h3>
-{% if dossier.employe.id_rh.dossier_set.count > 0 %}
+{% with dossier.employe.id_rh.get_latest_dossier_ordered_by_date_fin_and_principal as ancien_dossier %}
+{% if ancien_dossier %}
<table>
- <tbody>
- <tr>
- <td colspan="7">
- {{ dossier.employe }} <span class="info">{{ dossier.employe.id_rh.dossier_set.all.0.poste1.type_poste.nom }} {{ dossier.employe.id_rh.dossier_set.all.0.complement1 }}</span>
- </td>
- </tr>
- <tr>
- <th>Classement antérieur</th>
- <th>Salaire antérieur</th>
- <th>Statut antérieur</th>
- <th>Type contrat</th>
- </tr>
- <tr>
- <td>{{ dossier.classement_anterieur|default:"" }}</td>
- <td class="montant">{{ dossier.salaire_anterieur|floatformat:0 }}</td>
- <td>{{ dossier.statut_anterieur|default:"" }}</td>
- <td>{{ dossier.type_contrat|default:"" }}</td>
- </tr>
- </tbody>
+ <tbody>
+ <tr>
+ <th>Classement</th>
+ <th>Statut</th>
+ <th>Implantation</th>
+ <th>Employé</th>
+ <th>Poste</th>
+ </tr>
+ <tr class="gris-bkg">
+ <td>{{ ancien_dossier.classement|default:"" }}</td>
+ <td>{{ ancien_dossier.statut|default:"" }}</td>
+ <td>{{ ancien_dossier.poste.implantation }}</td>
+ <td>{{ dossier.employe }}</td>
+ <td>{{ ancien_dossier.poste.nom }}</td>
+ </tr>
+ {% if ancien_dossier and ancien_dossier.remunerations.all.count > 0 %}
+ <tr>
+ <td colspan="1">
+ Rémunération
+ </td>
+ <td colspan="4">
+ {% rh_remun_form_for_year ancien_dossier %}
+ </td>
+ </tr>
+ {% endif %}
+ </tbody>
</table>
{% else %}
<p>Il n'y a pas d'ancien dossier pour cet employé</p>
{% endif %}
+{% endwith %}
<h3>Précédent titulaire <span class="info">(le cas échéant)</span></h3>
{% if dossier.classement_titulaire_anterieur %}
+{% with dossier.get_dossier_precedent_titulaire as precedent_titulaire %}
<table>
<tbody>
<tr>
- <td colspan="3">
- {{ dossier.employe_anterieur|default:"" }}
- </td>
+ <th>Classement</th>
+ <th>Statut</th>
+ <th>Implantation</th>
+ <th>Employé</th>
+ <th>Poste</th>
</tr>
<tr>
- <th>Classement du titulaire antérieur</th>
- <th>Salaire du titulaire antérieur</th>
- <th>Statut du titulaire antérieur</th>
+ <td>{{ precedent_titulaire.classement|default:"" }}</td>
+ <td>{{ precedent_titulaire.statut|default:"" }}</td>
+ <td>{{ precedent_titulaire.poste.implantation }}</td>
+ <td>{{ precedent_titulaire.employe }}</td>
+ <td>{{ precedent_titulaire.poste.nom }}</td>
</tr>
+ {% if precedent_titulaire and precedent_titulaire.remunerations.all.count > 0 %}
<tr>
- <td>{{ dossier.classement_titulaire_anterieur|default:"" }}</td>
- <td class="montant">{{ dossier.salaire_titulaire_anterieur|floatformat:0 }}</td>
- <td>{{ dossier.statut_titulaire_anterieur|default:"" }}</td>
+ <td colspan="1">
+ Rémunération
+ </td>
+ <td colspan="4">
+ {% rh_remun_form_for_year precedent_titulaire %}
+ </td>
</tr>
+ {% endif %}
</tbody>
<table>
+{% endwith %}
{% else %}
<p>Il n'y a pas de précédent titulaire</p>
{% endif %}
-<h3>Proposition de classement</h3>
-<table>
- <tbody>
- <tr>
- <th>Classement proposé</th>
- <th colspan="6">Salaire proposé</span></th>
- </tr>
- <tr>
- <td>{{ dossier.classement }}</td>
- <td colspan="2">{{ dossier.salaire|floatformat:0 }} {{ dossier.devise.code }}</td>
- <td colspan="4" id="salaire-propose-euros" class="montant">{{ dossier.get_salaire_euros|floatformat:0 }} €</td>
- </tr>
- </tbody>
-</table>
-
</fieldset>
-
-<fieldset>
-<h2>Accès et ouverture des comptes</h2>
-<table>
- <tbody>
- <tr>
- <th>Compte compatabilité<th>
- <td>{% if dossier.compte_compta %}oui{% else %}non{% endif %}</td>
- <th>Compte courriel</th>
- <td>{% if dossier.compte_courriel %}oui{% else %}non{% endif %}</td>
- </tr>
- </tbody>
-</table>
-</fieldset>
-