Digest: Default main template ${user.email} ${user.lang} % set company, user = user.company_id, user % set data = object.compute_kpis(user.company, user) % set tips = object.compute_tips(company, user) % set kpi_actions = object.compute_kpis_actions(company, user) % set kpis = data.yesterday.keys()
${company.name} at a glance
${datetime.date.today().strftime('%B %d, %Y')}

% for kpi in kpis:

${object.fields_get()[kpi]['string']} %if kpi in kpi_actions: View more %endif
${data['yesterday'][kpi][kpi]}
Yesterday % if data['yesterday'][kpi]['margin'] != 0.0: % if data['yesterday'][kpi]['margin'] > 0.0: ${"%.2f" % data['yesterday'][kpi]['margin']} % % endif % if data['yesterday'][kpi]['margin'] < 0.0: ${"%.2f" % data['yesterday'][kpi]['margin']} % % endif % endif
${data['lastweek'][kpi][kpi]}
Last 7 Days % if data['lastweek'][kpi]['margin'] != 0.0: % if data['lastweek'][kpi]['margin'] > 0.0: ${"%.2f" % data['lastweek'][kpi]['margin']} % % endif % if data['lastweek'][kpi]['margin'] < 0.0: ${"%.2f" % data['lastweek'][kpi]['margin']} % %endif %endif
${data['lastmonth'][kpi][kpi]}
Last 30 Days % if data['lastmonth'][kpi]['margin'] != 0.0: % if data['lastmonth'][kpi]['margin'] > 0.0: ${"%.2f" % data['lastmonth'][kpi]['margin']} % % endif % if data['lastmonth'][kpi]['margin'] < 0.0: ${"%.2f" % data['lastmonth'][kpi]['margin']} % %endif %endif
% endfor % if tips:

${ctx['tip_description']|safe}
% endif ]]>