{#- Zakat Dashboard -- Fava extension report template. This is a FRAGMENT. Fava 1.30 renders it and injects the result into its own _layout.html, so it must not `extends` anything and must not emit , or . CSS is inlined because Fava exposes no static-asset route for extensions; behaviour lives in ZakatDashboard.js, loaded through has_js_module. -#} {% set ctx = extension.report() %} {% set report = ctx.report %} {% set cur = ctx.currency %} {% set dp = ctx.places %} {% macro m(value, places=None) %}{{ extension.money(value, cur, dp if places is none else places) }}{% endmacro %} {% macro n(value, places=None) %}{{ extension.number(value, dp if places is none else places) }}{% endmacro %}
{% if ctx.error %} {% else %} {% set gold = report.gold %} {% set silver = report.silver %}

Zakat Dashboard

As of {{ report.as_of }} ({{ ctx.as_of_hijri }}){% if ctx.filter_active %} — from Fava’s time filter{% endif %} Currency {{ cur }} Rate {{ ctx.constants.rate }} Data {% if ctx.errors %}⚠ {{ ctx.errors|length }} error{{ '' if ctx.errors|length == 1 else 's' }} {% elif ctx.warnings %}⚠ {{ ctx.warnings|length }} warning{{ '' if ctx.warnings|length == 1 else 's' }} {% else %}✓ OK{% endif %}
{% set tabs = [ ('overview', 'Overview'), ('yearly', 'Yearly Summary'), ('wealth', 'Wealth & Nisab'), ('detail', 'Calculation Detail'), ('payments', 'Payments'), ('about', 'About Zakat & Methodology'), ] %}
{% for key, label in tabs %} {% endfor %}
{#- ===================== 1. OVERVIEW ===================== -#}
{% if ctx.errors %} {% for w in ctx.errors %} {% endfor %} {% endif %} {% for w in ctx.warnings %}

Warning — {{ w.code }}

{{ w.message }}

{% if w.detail %}
{{ w.detail }}
{% endif %}
{% endfor %} {% for w in ctx.notes %}

Note

{{ w.message }}

{% endfor %} {% if report.is_empty %}

Nothing to calculate yet

No account carries the beancount_zakat metadata, or none of the tagged accounts has any postings on or before {{ report.as_of }}. See the About Zakat & Methodology tab for how to tag your accounts.

{% else %}

Net Zakat Liability / Paid in Excess till date

{% for b in ctx.bases %}

{{ b.basis.label }} basis

{{ extension.balance(b.remaining_or_excess, cur, dp) }}

{% if b.status == 'outstanding' %} ● Outstanding {% elif b.status == 'excess' %} ✓ Paid in excess {% else %} — Settled {% endif %} {% if b.qualifies_now %} ✓ Sahib-e-nisab today {% endif %}

Cumulative liability (lifetime)
{{ m(b.cumulative_liability) }}
Zakat paid (net of refunds)
{{ m(b.payments_total) }}
Remaining / excess
{{ m(b.remaining_or_excess) }}
{% endfor %}

Accounts in scope

Only accounts carrying beancount_zakat metadata take part. Everything else in your ledger is ignored.

{% for label, accounts in [ ('Zakatable assets', report.asset_accounts), ('Deductible liabilities', report.liability_accounts), ('Zakat payments', report.payment_accounts), ] %} {% endfor %}
Account classification, read from Open directive metadata.
RoleAccounts
{{ label }} {% if accounts %}
    {% for account in accounts %}
  • {{ account }}
  • {% endfor %}
{% else %}none{% endif %}
{% endif %}
{#- ===================== 2. YEARLY SUMMARY ===================== -#} {#- ===================== 3. WEALTH & NISAB ===================== -#} {#- ===================== 4. CALCULATION DETAIL ===================== -#} {#- ===================== 5. PAYMENTS ===================== -#} {#- ===================== 6. ABOUT (must be last) ===================== -#} {% endif %}