ordering = ['type']
def __unicode__(self):
- return u"%s %s %s" % (self.get_type_display(), self.pourcentage, self.commentaire)
+ return u"%s %.0f%% %s" % (self.get_type_display(), self.pourcentage, self.commentaire)
class PostePiece(models.Model):
</fieldset>
<fieldset>
-<h2>Durée prévue du poste </h2>
+<h2>Durée prévue du poste </h2>
<span class="info">Indépendamment du titulaire du poste</span>
<table>
<tbody>
<th>Autres</th>
<th>TOTAL</th>
<th>TOTAL sans charges patronales</th>
- <th>Taux > €</th>
+ <th>Taux > €</th>
<th>TOTAL (EUR)</th>
<th>TOTAL (EUR) sans charges patronales</th>
</tr>
</fieldset>
<fieldset>
-<h2>Financement</h2>
-{% for f in poste.financements.all %}
- <li>{{ f }}</li>
-{% endfor %}
+ <h2>Financement</h2>
+
+ {% if poste.financements.count > 0 %}
+ <table>
+ <thead>
+ <tr>
+ <th>Type</th>
+ <th>Pourcentage</th>
+ <th>Commentaires</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for f in poste.financements.all %}
+ <tr>
+ <td>{{ f.get_type_display }}</td>
+ <td>{{ f.pourcentage|floatformat:0 }} %</td>
+ <td>{{ f.commentaire }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% endif %}
+
</fieldset>
<fieldset>