ajout histo_edit.pt et calcul de l'évolution de la valeur de la part
This commit is contained in:
@@ -89,11 +89,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="rdt">Rendement</label>
|
||||
<label class="control-label col-xs-2" for="pc_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}"
|
||||
<input class="form-control" type="text" id="rdt" name="pc_rdt" value="${actif.pc_rdt}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre doit être composé de chiffres et/ou de ." />
|
||||
</div>
|
||||
|
||||
@@ -63,11 +63,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="rdt">Rendement</label>
|
||||
<label class="control-label col-xs-2" for="pc_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}"
|
||||
<input class="form-control" type="text" id="pc_rdt" name="pc_rdt" value="${actif.pc_rdt}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre doit être composé de chiffres et/ou de ." />
|
||||
</div>
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
|
||||
<p>
|
||||
<a href="${request.application_url}/" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="allocation_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvelle classe</a>
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<p>
|
||||
<a href="allocation_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvelle classe</a>
|
||||
</p>
|
||||
<table id="allocation_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
67
caotek_mesavoirs/templates/actifs/histo_edit.pt
Normal file
67
caotek_mesavoirs/templates/actifs/histo_edit.pt
Normal file
@@ -0,0 +1,67 @@
|
||||
<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="histo_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="item"
|
||||
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">Date</label>
|
||||
<div class="col-xs-2">
|
||||
<p class="form-control-static"><b>${item.date.strftime('%d-%m-%Y')}</b></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="mvt_cash">Montant cash</label>
|
||||
<div class="col-xs-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">€</div>
|
||||
<input class="form-control" type="text" id="mvt_cash" name="mvt_cash" value="${item.mvt_cash}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant doit être composé de chiffres ou de ., +, -" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Nombre part</label>
|
||||
<div class="col-xs-2">
|
||||
<p class="form-control-static"><b>${item.nb_part}</b></p>
|
||||
</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}/histo_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="item.no_id <> 0">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#histo_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
@@ -4,6 +4,8 @@
|
||||
<p>
|
||||
<a href="${request.application_url}/" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="histo_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Ajout/retrait de cash</a>
|
||||
</p>
|
||||
|
||||
<table id="histo_list" class="table table-striped table-bordered">
|
||||
@@ -14,8 +16,9 @@
|
||||
<th>Valeur Pf</th>
|
||||
<th>Nb Part</th>
|
||||
<th>Valeur Part</th>
|
||||
<th>Nb Part ref</th>
|
||||
<th>Cours ref</th>
|
||||
<th>Valeur Part ref</th>
|
||||
<th>No Id</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -33,7 +36,14 @@
|
||||
pageLength: 50,
|
||||
bLengthChange: false,
|
||||
columnDefs: [
|
||||
{className:"text-right", "targets": [1,2,3,4,5,6]}
|
||||
{className:"text-right", "targets": [1,2,3,4,5,6]},
|
||||
{className:"text-center", "targets": [7]},
|
||||
{ "targets": 7,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/histo_edit/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
@@ -28,6 +28,34 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<table id="portfolio" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Porteffeuille</th>
|
||||
<th class="text-right">Montant</th>
|
||||
<th class="text-right">%</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Valorisation</td>
|
||||
<td class="text-right">${layout.to_euro(member.pf_valeur)}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Plus value</td>
|
||||
<td class="text-right">${layout.to_euro(member.pf_plusvalue)}</td>
|
||||
<td class="text-right">${layout.to_percent(member.pf_plusvalue_pc, 1)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rendemant brut</td>
|
||||
<td class="text-right">${layout.to_euro(member.pf_rendement)}</td>
|
||||
<td class="text-right">${layout.to_percent(member.pf_rdt_pc, 1)}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -55,8 +83,8 @@
|
||||
<th class="text-right">% de +/-</th>
|
||||
<th class="text-right">% PF</th>
|
||||
<th class="text-right">TER</th>
|
||||
<th class="text-right">% Rdt</th>
|
||||
<th class="text-right">Rdt brut</th>
|
||||
<th class="text-right">% Rdt</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -70,8 +98,8 @@
|
||||
<td tal:condition="ligne.pc_plusvalue <0" class="text-right" style="color: red;">${layout.to_percent(ligne.pc_plusvalue,1)}</td>
|
||||
<td class="text-right">${ligne.pc_allocation} %</td>
|
||||
<td class="text-right">${layout.to_percent(ligne.ter,2)}</td>
|
||||
<td class="text-right">${layout.to_percent(ligne.rdt,1)}</td>
|
||||
<td class="text-right">${u'%.0f €' % (ligne.valeur * ligne.rdt / 100)}</td>
|
||||
<td class="text-right">${u'%.0f €' % (ligne.rendement)}</td>
|
||||
<td class="text-right">${layout.to_percent(ligne.pc_rdt,1)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="2"><b>Total</b></td>
|
||||
|
||||
Reference in New Issue
Block a user