{% macro show_card(card) %}
{{ card.label }} {% if card.count %} ({{ card.count }}) {% endif %}

{{ card.value }}

{% if card.diff %}

{{ card.diff }}%

{% endif %} {% if card.billed %}

{{ card.billed }}%

{% endif %} {% if card.delivered %}

{{ card.delivered }}%

{% endif %}
{% endmacro %}

{{ title }}

{{ company }}

{% if frequency == "Daily" %} {{ frappe.format_date(future_from_date) }} {% else %} {{ frappe.format_date(future_from_date) }} - {{ frappe.format_date(future_to_date) }} {% endif %}

{% if cards %}
{% for card in cards %} {{ show_card(card) }} {% endfor %}
{% endif %} {% if issue_list %}

{{ _("Open Issues ") }} ({{ issue_count }})

{% for t in issue_list %}
{{ _(t.subject) }} {{ _(t.status) }}
{% endfor %}
{% endif %} {% if project_list %}

{{ _("Open Projects ") }} ({{ project_count }})

{% for t in project_list %}
{{ _(t.project_name) }} {{ _(t.status) }}
{% endfor %}
{% endif %} {% if events or todo_list or notifications %}

{{ _("Pending Activities") }}

{% if events %}

{{ _("Upcoming Calendar Events ") }} ({{ event_count }})

{% for e in events %} {% if loop.index==1 or events[loop.index-1].date != e.date %}

{{ e.date }}

{% endif %}
{{ e.subject }} {% if e.all_day %} {{ _("All Day") }} {% elif (not e.ends_on_label or e.starts_on_label == e.ends_on_label)%} {{ e.starts_on_label }} {% else %} {{ e.starts_on_label }} - {{ e.ends_on_label }} {% endif %}
{% endfor %}
{% endif %} {% if todo_list %}

{{ _("Open To Do ") }} ({{ todo_count }})

{% for t in todo_list %}
{{ _(t.description) }} {{ _(t.status) }}
{% endfor %}
{% endif %} {% if notifications %}

{{ _("Open Notifications") }}

{% for n in notifications %}
{{ _(n.key) }} {{ n.value }}
{% endfor %}
{% endif %} {% endif %} {% if add_quote %}
{{ quote.text }}
- {{ quote.author }}
{% endif %} {% if purchase_orders_items_overdue_list %}

{{ _("Purchase Order Items not received on time") }}


Item Code Quantity Rate Amount

{% for po in purchase_order_list %}
{{ po.po }}
{% for t in purchase_orders_items_overdue_list %} {% if t.parent == po.po %}
{{ _(t.item_code) }} {{ t.missing_qty }} {{ t.rate }} {{ t.amount }}
{% endif %} {% endfor %}
{% endfor %}


Please take necessary action
{% endif %}