added SWR
This commit is contained in:
@@ -52,9 +52,9 @@
|
||||
<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>
|
||||
<td>Safe Withdrawal Rate</td>
|
||||
<td class="text-right text-success"><b>${layout.to_euro(swr_amount)}</b></td>
|
||||
<td class="text-right text-success"><b>${layout.to_percent(swr_rate, 1)}</b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -107,7 +107,6 @@
|
||||
<th class="text-right">Valeur</th>
|
||||
<th class="text-right">+/- Valeur</th>
|
||||
<th class="text-right">% de +/-</th>
|
||||
<th class="text-right">Rdt brut</th>
|
||||
<th class="text-right">% TER</th>
|
||||
<th class="text-right">% PF</th>
|
||||
</tr>
|
||||
@@ -125,7 +124,6 @@
|
||||
<td tal:condition="ligne.plus_value <0" class="text-right" style="color: red;">${layout.to_euro(ligne.plus_value)}</td>
|
||||
<td tal:condition="ligne.pc_plusvalue>=0" class="text-right" style="color: green;">${ligne.pc_plusvalue}</td>
|
||||
<td tal:condition="ligne.pc_plusvalue <0" class="text-right" style="color: red;">${ligne.pc_plusvalue}</td>
|
||||
<td class="text-right">${layout.to_euro(ligne.rendement)}</td>
|
||||
<td class="text-right">${layout.zero2space(ligne.ter)}</td>
|
||||
<td class="text-right">${ligne.pc_allocation}</td>
|
||||
</tr>
|
||||
@@ -136,7 +134,6 @@
|
||||
<td tal:condition="total_pv>=0" class="text-right" style="color: green;"><b>${layout.to_euro(total_pv)}</b></td>
|
||||
<td tal:condition="total_pv <0" class="text-right" style="color: red;"><b>${layout.to_euro(total_pv)}</b></td>
|
||||
<td class="text-right"><b>${layout.to_percent(total_pc_value, 1)}</b></td>
|
||||
<td class="text-right"><b>${layout.to_euro(total_rdt)}</b></td>
|
||||
<td></td>
|
||||
<td class="text-right"><b>100.0</b></td>
|
||||
</tr>
|
||||
|
||||
@@ -21,7 +21,6 @@ import hashlib
|
||||
import imaplib
|
||||
|
||||
from sqlalchemy.exc import DBAPIError
|
||||
from ..security import groupfinder
|
||||
|
||||
import json
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ def portfolio(request):
|
||||
# totaliser les pourcentages
|
||||
total += item.pc_cible
|
||||
|
||||
swr_rate = 3.5
|
||||
if total != 100:
|
||||
message = 'Attention, le total de votre répartition cible est incorrect : %s.' % total
|
||||
|
||||
@@ -111,7 +112,9 @@ def portfolio(request):
|
||||
'total_valeur': total_valeur,
|
||||
'total_pv': total_pv,
|
||||
'total_pc_value': total_pc_value,
|
||||
'total_rdt': total_rdt
|
||||
'total_rdt': total_rdt,
|
||||
'swr_rate' : swr_rate,
|
||||
'swr_amount': float(member.pf_valeur) * swr_rate / 100,
|
||||
}
|
||||
|
||||
@view_config(route_name='actif_edit', renderer='../templates/portfolio/actif_edit.pt', permission='view')
|
||||
|
||||
Reference in New Issue
Block a user