+{% load l10n %}
+{% load dae %}
+
+{% for f in remunForm.management_form %}
+ {{ f }}
+{% endfor %}
+
+<table id="global-cost">
<tr>
<th>Type</th>
- <th colspan="2">Devise locale</th>
- <th colspan="2">Conversion en Euros</th>
+ <th>Devise locale</th>
+ <th>Annuel<br/>(visé)</th>
+ <th>Annuel Euros<br/>(visé)</th>
+ {% if remunForm.read_only %}
+ <th>Annuel Euros<br/>(ajusté par période)</th>
+ {% endif %}
<th>Précision</th>
+ {% if not remunForm.read_only %}
+ <th>Supprimer</th>
+ {% endif %}
+</tr>
+{% for group in remunForm.group_list %}
+{% if group.key != 'RAS' %}
+{% if group.key == 'Charges' %}
+<tr class="total-row">
+ <th><strong>Total employé</strong></th>
+ <th><!-- Laisser ce td pour que le javascript fonctionne bien. --></th>
+ <th class="total"></th>
+ <th class="total"></th>
+ {% if remunForm.read_only %}
+ <th class="total"></th>
+ {% endif %}
+ <th> </th>
+ {% if not remunForm.read_only %}
+ <th> </th>
+ {% endif %}
+</tr>
+{% endif %}
+<tr>
+
+</tr>
+<tr>
+ <th colspan="6">{{ group.name }}</th>
</tr>
-{% for remun in dossier.remuneration_set.all %}
- <tr>
- <td>{{ remun.type }}</td>
- <td>
- {{ remun.devise }}
- <input name="montant_mois-{{ remun.id }}"
- value="{{ remun.montant_mois }}" /></td>
- <td><input name="cg-montant-{{ remun.id }}"
- value="{{ remun.montant|default_if_none:'' }}" /></td>
- <td><input name="montant_euro_mois-{{ remun.id }}"
- value="{{ remun.montant_euro_mois }}" /></td>
- <td><input name="montant_euro-{{ remun.id }}"
- value="{{ remun.montant_euro }}" /></td>
- <td><input name="cg-precision-{{ remun.id }}"
- value="{{ remun.precision|default_if_none:'' }}" /></td>
- </tr>
-{% empty %}
- <tr>
- <td colspan="6">
- Aucun coût au registre
+{% for f in group.forms %}
+<tr class="calculable remunform">
+ {{ f.id }}
+ <td class="spaced">{{ f.type.errors }} {{ f.type }}
+ {% if f.instance.date_debut or f.instance.date_fin %}
+ {% if f.instance.date_debut or f.instance.date_fin %}({% endif %}
+ {% if f.instance.date_debut %}{{f.instance.date_debut}}{% endif %}
+ -
+ {% if f.instance.date_fin %}{{f.instance.date_fin}}{% endif %}
+ {% if f.instance.date_debut or f.instance.date_fin %}){% endif %}
+ {% endif %}
+ </td>
+ <td>{{ f.devise.errors }} {{ f.devise }}</td>
+ <td class="monnaie cumulable">{{ f.montant.errors }} {{ f.montant }}</td>
+ <td class="euro cumulable" id="id_{{ f.prefix }}-montant_annuel_euros"></td>
+ <!-- <td class="euro-ajuste cumulable" id="id_{{ f.prefix }}-montant_annuel_euros_ajuste">{{ f.instance.montant_ajuste_euros|stringformat:".2f" }}</td> -->
+ {% if remunForm.read_only %}
+ <td class="euro-ajuste cumulable" id="id_{{ f.prefix }}-montant_annuel_euros_ajuste">
+ {% remun_ajuste f.instance annee_remun %}
</td>
- </tr>
+ {% endif %}
+ <td>{{ f.commentaire.errors }} {{ f.commentaire }}</td>
+ {% if not remunForm.read_only %}
+ <td>{{ f.DELETE }}</td>
+ {% endif %}
+</tr>
{% endfor %}
+<tr class="sous-totaux">
+ <td class="spaced">Sous-total{% if not remunForm.read_only %} -
+ <a class="addlink" href="#">
+ [<span class="icon">Ajouter une ligne</span>]
+ </a>
+ {% endif %}
+ </td>
+ <td><!-- Laisser ce td pour que le javascript fonctionne bien. --></td>
+ <td class="sous-total"></td>
+ <td class="sous-total"></td>
+ {% if remunForm.read_only %}
+ <td class="sous-total"></td>
+ {% endif %}
+ <td> </td>
+ {% if not remunForm.read_only %}
+ <td> </td>
+ {% endif %}
+</tr>
+{% endif %}
+{% endfor %}
+<tr class="total-row">
+ <th><strong>Total AUF</strong></th>
+ <th><!-- Laisser ce td pour que le javascript fonctionne bien. --></th>
+ <th class="total"></th>
+ <th class="total"></th>
+ {% if remunForm.read_only %}
+ <th class="total"></th>
+ {% endif %}
+ <th> </th>
+ {% if not remunForm.read_only %}
+ <th> </th>
+ {% endif %}
+</tr>
+<tr>
+ <th><strong>Rémunération autre source</strong></th>
+ <th><!-- Laisser ce td pour que le javascript fonctionne bien. --></th>
+ <th></th>
+ <th></th>
+ {% if remunForm.read_only %}
+ <th></th>
+ {% endif %}
+ <th> </th>
+ {% if not remunForm.read_only %}
+ <th> </th>
+ {% endif %}
+</tr>
+{% for f in remunForm.groups.RAS.forms %}
+<tr class="calculable remunform">
+ {{ f.id }}
+ <td class="spaced">{{ f.type.errors }} {{ f.type }}</td>
+ <td>{{ f.devise.errors }} {{ f.devise }}</td>
+ <td class="monnaie cumulable">{{ f.montant.errors }} {{ f.montant }}</td>
+ <td class="euro cumulable" id="id_{{ f.prefix }}-montant_annuel_euros"></td>
+ {% if remunForm.read_only %}
+ <td class="euro-ajuste cumulable" id="id_{{ f.prefix }}-montant_annuel_euros_ajuste">
+ {% remun_ajuste f.instance annee_remun %}
+ </td>
+ {% endif %}
+ <td>{{ f.commentaire.errors }} {{ f.commentaire }}</td>
+ {% if not remunForm.read_only %}
+ <td>{{ f.DELETE }}</td>
+ {% endif %}
+</tr>
+{% endfor %}
+<tr class="sous-totaux">
+ <td class="spaced">Sous-total{% if not remunForm.read_only %} -
+ <a class="addlink" href="#">
+ [<span class="icon">Ajouter une ligne</span>]
+ </a>
+ {% endif %}
+ </td>
+ <td><!-- Laisser ce td pour que le javascript fonctionne bien. --></td>
+ <td class="sous-total"></td>
+ <td class="sous-total"></td>
+ {% if remunForm.read_only %}
+ <td class="sous-total"></td>
+ {% endif %}
+ <td> </td>
+ {% if not remunForm.read_only %}
+ <td> </td>
+ {% endif %}
+</tr>
+</table>