<%inherit file="/page.mako" /> % for e in exps: % if len(exps) > 1:

${get_d(e)}

% endif % for c in e.catexps: <%self:detail name="${c.cat.name}" sum="${c.expense}" set="${c.all}" args="exp"> ${exp.day}.${exp.month}. -- ${exp.description}: ${exp.expense} % endfor <%self:detail name="Constant" sum="${e.constsum}" set="${e.consts}" args="exp"> ${exp.monthly} -- ${exp.description} <%self:detail name="In Summa" sum="${e.sum}" set="${e.all}" args="exp"> ${exp.day}.${exp.month}. -- ${exp.description}: ${exp.expense}
% endfor <% if e.date.month == 1: date = "%s/12" % (e.date.year - 1) else: date = "%s/%s" % (e.date.year, e.date.month - 1) %> ${date} % if not is_last: <% if e.date.month == 13 - len(exps): date = "%s/1" % (e.date.year + 1) else: date = "%s/%s" % (e.date.year, e.date.month + len(exps)) %> ${date} % endif <%def name="heading()"> % if len(exps) > 1: Current expenses % else: Expenses for ${get_d(exps[0])} % endif <%def name="get_d(e)"> ${e.date.year}/${e.date.month} <%def name="js()"> ${parent.js()} <%def name="detail(name, sum, set)">
${name}: ${sum}