joining table allocation to actifs
This commit is contained in:
@@ -17,6 +17,15 @@
|
||||
{{form.pc_cible(class_='form-control')}}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="required-field" for="tag">{{form.type.label}}</label>
|
||||
{{form.type(class_='form-control')}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="required-field" for="tag">{{form.bg_color.label}}</label>
|
||||
{{form.bg_color(class_='form-control')}}
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="{{ request.route_url('portfolio') }}">
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
<tbody>
|
||||
{% for item in items %}
|
||||
<tr>
|
||||
<td class="{{ item.bg_color }}">{{ item.classe }}</td>
|
||||
<td class="text-right"><a href="allocation_edit/{{ item.no_cat }}">{{ item.pc_cible }} %</a></td>
|
||||
<td class="{{ item.bg_color }}"><a href="allocation_edit/{{ item.no_cat }}">{{ item.classe }}</a></td>
|
||||
<td class="text-right">{{ item.pc_cible }} %</td>
|
||||
<td class="text-right">{{ item.pc_atteint }}</td>
|
||||
{% if (item.pc_atteint - item.pc_cible) >= 0 %}
|
||||
<td class="text-right" style="color: green;">{{ item.pc_atteint }}</td>
|
||||
<td class="text-right" style="color: green;">{{ '{0:0.1f}'.format(item.pc_ecart) }}</td>
|
||||
{% else %}
|
||||
<td class="text-right" style="color: red;">{{ item.pc_atteint }}</td>
|
||||
<td class="text-right" style="color: red;">{{ '{0:0.1f}'.format(item.pc_ecart) }}</td>
|
||||
{% endif %}
|
||||
<td class="text-right">{{ '{0:0.2f} €'.format(item.valeur) }}</td>
|
||||
<td class="text-right">{{ '{0:0,.0f} €'.format(item.valeur).replace(',',' ') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
@@ -101,7 +101,7 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<table id="actifs_list" class="table table-condensed table-bordered">
|
||||
<table class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Classe</th>
|
||||
@@ -118,40 +118,40 @@
|
||||
<tbody>
|
||||
{% for ligne in actifs %}
|
||||
<tr>
|
||||
<td class="{{ ligne.bg_color }}">{{ ligne.classe }}</td>
|
||||
{% if ligne.type=='ACTION' %}
|
||||
<td><a href="actif_edit/{{ ligne.no_id }}">{{ ligne.libelle }}</a></td>
|
||||
<td class="{{ ligne.Allocation.bg_color }}">{{ ligne.Allocation.classe }}</td>
|
||||
{% if ligne.Allocation.type=='ACTION' %}
|
||||
<td><a href="actif_edit/{{ ligne.no_id }}">{{ ligne.Actifs.libelle }}</a></td>
|
||||
{% else %}
|
||||
<td><a href="actif2_edit/{{ ligne.no_id }}">{{ ligne.libelle }}</a></td>
|
||||
<td><a href="actif2_edit/{{ ligne.no_id }}">{{ ligne.Actifs.libelle }}</a></td>
|
||||
{% endif %}
|
||||
{% if ligne.devise=='EUR' %}
|
||||
<td>{{ '{0:0.2f} €'.format(ligne.cours) }}</td>
|
||||
{% if ligne.Actifs.devise=='EUR' %}
|
||||
<td class="text-right">{{ '{0:0.2f} €'.format(ligne.Actifs.cours) }}</td>
|
||||
{% else %}
|
||||
<td>{{ '{0:0.2f} $'.format(ligne.cours) }}</td>
|
||||
<td class="text-right">{{ '{0:0.2f} $'.format(ligne.Actifs.cours) }}</td>
|
||||
{% endif %}
|
||||
<td class="text-right">{{ ligne.nombre }}</td>
|
||||
<td class="text-right">{{ '{0:0.2f} €'.format(ligne.valeur) }}</td>
|
||||
{% if ligne.plus_value >= 0 %}
|
||||
<td class="text-right" style="color: green;">{{ '{0:0.2f} €'.format(ligne.plus_value) }}</td>
|
||||
<td class="text-right" style="color: green;">{{ '{0:0.1f}'.format(ligne.pc_plusvalue) }}</td>
|
||||
<td class="text-right">{{ ligne.Actifs.nombre }}</td>
|
||||
<td class="text-right">{{ '{0:0,.2f} €'.format(ligne.Actifs.valeur).replace(',',' ') }}</td>
|
||||
{% if ligne.Actifs.plus_value >= 0 %}
|
||||
<td class="text-right" style="color: green;">{{ '{0:0.2f} €'.format(ligne.Actifs.plus_value) }}</td>
|
||||
<td class="text-right" style="color: green;">{{ '{0:0.1f}'.format(ligne.Actifs.pc_plusvalue) }}</td>
|
||||
{% else %}
|
||||
<td class="text-right" style="color: red;">{{ '{0:0.2f} €'.format(ligne.plus_value) }}</td>
|
||||
<td class="text-right" style="color: red;">{{ '{0:0.1f}'.format(ligne.pc_plusvalue) }}</td>
|
||||
<td class="text-right" style="color: red;">{{ '{0:0.2f} €'.format(ligne.Actifs.plus_value) }}</td>
|
||||
<td class="text-right" style="color: red;">{{ '{0:0.1f}'.format(ligne.Actifs.pc_plusvalue) }}</td>
|
||||
{% endif %}
|
||||
<td class="text-right">{{ '{0:0.1f}'.format(ligne.ter) }}</td>
|
||||
<td class="text-right">{{ '{0:0.1f}'.format(ligne.pc_allocation) }}</td>
|
||||
<td class="text-right">{{ '{0:0.1f}'.format(ligne.Actifs.ter) }}</td>
|
||||
<td class="text-right">{{ '{0:0.1f}'.format(ligne.Actifs.pc_allocation) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
<tr>
|
||||
<td class="text-right" colspan="4"><b>Total</b></td>
|
||||
<td>{{ '{0:0.2f} €'.format(total_valeur) }}</td>
|
||||
<td>{{ '{0:0,.2f} €'.format(total_valeur).replace(',',' ') }}</td>
|
||||
{% if total_pv >= 0 %}
|
||||
<td class="text-right" style="color: green;">{{ '{0:0.1f}'.format(total_pv) }}</td>
|
||||
<td class="text-right" style="color: green;">{{ '{0:0.2f} €'.format(total_pc_value) }}</td>
|
||||
<td class="text-right" style="color: green;">{{ '{0:0.2f} €'.format(total_pv) }}</td>
|
||||
<td class="text-right" style="color: green;">{{ '{0:0.1f}'.format(total_pc_value) }}</td>
|
||||
{% else %}
|
||||
<td class="text-right" style="color: red;">{{ '{0:0.1f}'.format(total_pv) }}</td>
|
||||
<td class="text-right" style="color: red;">{{ '{0:0.2f} €'.format(total_pc_value) }}</td>
|
||||
<td class="text-right" style="color: red;">{{ '{0:0.2f} €'.format(total_pv) }}</td>
|
||||
<td class="text-right" style="color: red;">{{ '{0:0.1f}'.format(total_pc_value) }}</td>
|
||||
{% endif %}
|
||||
<td></td>
|
||||
<td class="text-right"><b>100.0</b></td>
|
||||
@@ -172,7 +172,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span class="glyphicon glyphicon-remove"></span></button>
|
||||
<h4 class="modal-title" id="choixTypeActif">Choix du type d'actif à créer</h4>
|
||||
<h4 class="modal-title" id="choixTypeActif">Choix du type</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user