%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}
%self:detail>
% endfor
<%self:detail name="Constant" sum="${e.constsum}" set="${e.consts}" args="exp">
${exp.monthly} -- ${exp.description}
%self:detail>
<%self:detail name="In Summa" sum="${e.sum}" set="${e.all}" args="exp">
${exp.day}.${exp.month}. -- ${exp.description}: ${exp.expense}
%self:detail>
% endfor
<%def name="heading()">
% if len(exps) > 1:
Current expenses
% else:
Expenses for ${get_d(exps[0])}
% endif
%def>
<%def name="get_d(e)">
${e.date.year}/${e.date.month}
%def>
<%def name="js()">
${parent.js()}
%def>
<%def name="detail(name, sum, set)">
${name}: ${sum}
% for exp in set:
- ${caller.body(exp)}
% endfor
%def>