ajout TER & rendement et changement catégorien en allocation
This commit is contained in:
@@ -11,11 +11,11 @@
|
||||
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="categorie">Catégorie</label>
|
||||
<label class="control-label col-xs-2" for="classe">Classe</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="categorie" name="categorie">
|
||||
<div tal:repeat="item categories_list">
|
||||
<option value="${item.categorie}" tal:attributes="selected actif.categorie==item.categorie and 'selected' or None">${item.categorie}</option>
|
||||
<select class="form-control" id="classe" name="classe">
|
||||
<div tal:repeat="item allocation_list">
|
||||
<option value="${item.classe}" tal:attributes="selected actif.classe==item.classe and 'selected' or None">${item.classe}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
@@ -66,6 +66,39 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="pru">PRU</label>
|
||||
<div class="col-xs-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">€</div>
|
||||
<input class="form-control" type="text" id="pru" name="pru" value="${actif.pru}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre doit être composé de chiffres et/ou de ." />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="ter">TER</label>
|
||||
<div class="col-xs-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">%</div>
|
||||
<input class="form-control" type="text" id="ter" name="ter" value="${actif.ter}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre doit être composé de chiffres et/ou de ." />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="rdt">Rendement</label>
|
||||
<div class="col-xs-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">%</div>
|
||||
<input class="form-control" type="text" id="rdt" name="rdt" value="${actif.rdt}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre doit être composé de chiffres et/ou de ." />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="categorie">Catégorie</label>
|
||||
<label class="control-label col-xs-2" for="classe">Classe</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="categorie" name="categorie">
|
||||
<div tal:repeat="item categories_list">
|
||||
<option value="${item.categorie}" tal:attributes="selected actif.categorie==item.categorie and 'selected' or None">${item.categorie}</option>
|
||||
<select class="form-control" id="classe" name="classe">
|
||||
<div tal:repeat="item allocation_list">
|
||||
<option value="${item.classe}" tal:attributes="selected actif.classe==item.classe and 'selected' or None">${item.classe}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
@@ -51,6 +51,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="ter">TER</label>
|
||||
<div class="col-xs-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">%</div>
|
||||
<input class="form-control" type="text" id="ter" name="ter" value="${actif.ter}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre doit être composé de chiffres et/ou de ." />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="rdt">Rendement</label>
|
||||
<div class="col-xs-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">%</div>
|
||||
<input class="form-control" type="text" id="rdt" name="rdt" value="${actif.rdt}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre doit être composé de chiffres et/ou de ." />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<table id="actifs_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Catégorie</th>
|
||||
<th>Classe</th>
|
||||
<th>Symbole</th>
|
||||
<th>Libellé</th>
|
||||
<th class="text-right">Nombre</th>
|
||||
@@ -31,7 +31,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr tal:repeat="ligne items">
|
||||
<td class="${ligne.bg_color}">${ligne.categorie}</td>
|
||||
<td class="${ligne.bg_color}">${ligne.classe}</td>
|
||||
<td>${ligne.symbole}</td>
|
||||
<td tal:condition="ligne.type=='ACTION'"><a href="actif_edit/${ligne.no_id}">${ligne.libelle}</a></td>
|
||||
<td tal:condition="ligne.type<>'ACTION'"><a href="actif2_edit/${ligne.no_id}">${ligne.libelle}</a></td>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
<br />
|
||||
<div class="row">
|
||||
<form id="categorie_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="categorie"
|
||||
<form id="categorie_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="allocation"
|
||||
data-fv-framework="bootstrap"
|
||||
data-fv-icon-valid="glyphicon glyphicon-ok"
|
||||
data-fv-icon-invalid="glyphicon glyphicon-remove"
|
||||
@@ -13,9 +13,9 @@
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Classe</label>
|
||||
<div class="col-xs-2">
|
||||
<select class="form-control" id="categorie" name="categorie">
|
||||
<select class="form-control" id="allocation" name="allocation">
|
||||
<div tal:repeat="item classes_list">
|
||||
<option value="${item.classe}" tal:attributes="selected categorie.categorie==item.classe and 'selected' or None">${item.classe}</option>
|
||||
<option value="${item.classe}" tal:attributes="selected allocation.classe==item.classe and 'selected' or None">${item.classe}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="pc_cible">Pourcentage cible</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control" type="text" id="pc_cible" name="pc_cible" value="${categorie.pc_cible}"
|
||||
<input class="form-control" type="text" id="pc_cible" name="pc_cible" value="${allocation.pc_cible}"
|
||||
data-fv-digits="true"
|
||||
data-fv-digits-message="Le nombre doit être composé que de chiffres" />
|
||||
</div>
|
||||
@@ -33,12 +33,12 @@
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/categories_list">
|
||||
<a class="btn btn-default" href="${request.application_url}/allocation_list">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<button class="btn btn-warning" type="submit" name="form.deleted"
|
||||
tal:condition="categorie.no_cat <> 0">
|
||||
tal:condition="allocation.no_cat <> 0">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<div class="col-md-6">
|
||||
<p>
|
||||
<a href="allocation_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvelle catégorie</a>
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvelle classe</a>
|
||||
</p>
|
||||
<table id="categories_list" class="table table-condensed table-bordered">
|
||||
<table id="allocation_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Classe</th>
|
||||
@@ -19,7 +19,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr tal:repeat="item items">
|
||||
<td class="${item.bg_color}"><a href="allocation_edit/${item.no_cat}">${item.categorie}</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-center">${item.type}</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
<br />
|
||||
<div class="row">
|
||||
<form id="categorie_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="categorie"
|
||||
data-fv-framework="bootstrap"
|
||||
data-fv-icon-valid="glyphicon glyphicon-ok"
|
||||
data-fv-icon-invalid="glyphicon glyphicon-remove"
|
||||
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Libellé</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" name="categorie"
|
||||
value="${categorie.categorie}" placeholder="15 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le symbole est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="15"
|
||||
data-fv-stringlength-message="15 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Type</label>
|
||||
<div class="col-xs-2">
|
||||
<select class="form-control" id="type" name="type">
|
||||
<div tal:repeat="item types_list">
|
||||
<option value="${item}" tal:attributes="selected categorie.type==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="pc_cible">Pourcentage cible</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control" type="text" id="pc_cible" name="pc_cible" value="${categorie.pc_cible}"
|
||||
data-fv-digits="true"
|
||||
data-fv-digits-message="Le nombre doit être composé que de chiffres" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/categories_list">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<button class="btn btn-warning" type="submit" name="form.deleted"
|
||||
tal:condition="categorie.no_cat <> 0">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#categorie_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
@@ -9,7 +9,7 @@
|
||||
<table id="categories_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Catégorie</th>
|
||||
<th>Classe</th>
|
||||
<th class="text-right">% cible</th>
|
||||
<th class="text-right">% actuel</th>
|
||||
<th class="text-right">Ecart</th>
|
||||
@@ -18,7 +18,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr tal:repeat="item items">
|
||||
<td class="${item.bg_color}">${item.categorie}</td>
|
||||
<td class="${item.bg_color}">${item.classe}</td>
|
||||
<td class="text-right">${item.pc_cible} %</td>
|
||||
<td class="text-right">${layout.to_percent(item.pc_atteint)}</td>
|
||||
<td tal:condition="(item.pc_atteint - item.pc_cible)>=0" class="text-right" style="color: green;">${layout.to_percent(item.pc_atteint - item.pc_cible)}</td>
|
||||
@@ -38,17 +38,19 @@
|
||||
<table id="actifs_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Catégorie</th>
|
||||
<th>Classe</th>
|
||||
<th>Libellé</th>
|
||||
<th class="text-right">Valeur</th>
|
||||
<th class="text-right">+/- Valeur</th>
|
||||
<th class="text-right">% de +/-</th>
|
||||
<th class="text-right">% PF</th>
|
||||
<th class="text-right">TER</th>
|
||||
<th class="text-right">Rendement</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr tal:repeat="ligne actifs">
|
||||
<td class="${ligne.bg_color}">${ligne.categorie}</td>
|
||||
<td class="${ligne.bg_color}">${ligne.classe}</td>
|
||||
<td>${ligne.libelle}</td>
|
||||
<td class="text-right">${layout.to_euro(ligne.valeur)}</td>
|
||||
<td tal:condition="ligne.plus_value>=0" class="text-right" style="color: green;">${layout.to_euro(ligne.plus_value)}</td>
|
||||
@@ -56,6 +58,8 @@
|
||||
<td tal:condition="ligne.pc_plusvalue>=0" class="text-right" style="color: green;">${layout.to_percent(ligne.pc_plusvalue)}</td>
|
||||
<td tal:condition="ligne.pc_plusvalue <0" class="text-right" style="color: red;">${layout.to_percent(ligne.pc_plusvalue)}</td>
|
||||
<td class="text-right">${ligne.pc_allocation} %</td>
|
||||
<td class="text-right">${layout.to_percent(ligne.ter)}</td>
|
||||
<td class="text-right">${layout.to_percent(ligne.rdt)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
@@ -63,6 +67,7 @@
|
||||
<td class="text-right">${layout.to_euro(total_pv)}</td>
|
||||
<td class="text-right">${layout.to_percent(total_pc_value)}</td>
|
||||
<td class="text-right">100 %</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
<li><a href="${request.application_url}/actifs_list">ACTIFS</a></li>
|
||||
<li><a href="${request.application_url}/allocation_list">ALLOCATION</a></li>
|
||||
<li><a href="${request.application_url}/doc_list">DOCS</a></li>
|
||||
<li><a href="${request.application_url}/histo_list">HISTORIQUE</a></li>
|
||||
${panel('dropdown_menu_panel')}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user