summaryrefslogtreecommitdiff
path: root/templates/pages/const.mako
blob: 95098ea1053c2470de146e84fd9a2427f2f503c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<%inherit file="/page.mako" />

<ul class="arrow">
    <li><span class="heading">Beschreibung:</span> ${exp.description}</li>
    <li><span class="heading">Kategorie:</span> ${exp.category.name}</li>
    <li><span class="heading">Betrag:</span> ${exp.expense | eur}</li>
    <li><span class="heading">Betrag pro Monat:</span> ${exp.monthly | eur}</li>
    <li><span class="heading">Start:</span> ${dformat(exp.start)}</li>
    <li><span class="heading">Ende:</span> ${dformat(exp.end)}</li>
    <li><span class="heading">Zahlungsrhythmus:</span> 
    % if exp.months == 1:
        monatlich
    % elif exp.months == 6:
        halbjährlich
    % elif exp.months == 12:
        jährlich
    % else:
        alle ${exp.months} Monate
    % endif
</ul>
<p><a href=${"/const/edit/%s" % exp.id | url}>Bearbeiten</a>  <a href=${"/const/add/from/%s" % exp.id | url}>Erstelle neuen auf dem jetzigen basierenden Eintrag</a></p>

<% 
    def create(p):
        return ("const/%s" % p.id, "%s (%s-%s)<br>%s" % (p.description, dformat(p.start), dformat(p.end), eur(p.expense)))

    p = exp.prev
    if p:
        context.write(self.left_arrow(*create(p)))

    p = exp.next
    if p:
        context.write(self.right_arrow(*create(p)))
%>

<%block name="heading">
    Konstante Kosten
</%block>