{% $.each(data, (company, summary) => { %}
{{ company }}
{% $.each(["Sales Invoice", "Purchase Invoice"], (idx, doctype) => { %} {% if summary[doctype] %} {% endif %} {% }); %}
{{ __("Invoice Type") }} {{ __("Opening Invoices") }} {{ __("Total Outstanding") }}
{{ __(doctype) }} {{ summary[doctype].total_invoices }} {{ format_currency(summary[doctype].outstanding_amount, summary.currency, 2) }}
{% }); %}