{%= __(report.report_name) %}
{% if (subtitle && subtitle.trim()) { %}
{{ subtitle }}
{% } else { %}
{%= __("Supplier") %}: {%= (filters.party.length && filters.party.join(", ")) || __("All Parties") %}
{%= __("Report Date") %}: {%= frappe.datetime.str_to_user(filters.report_date) %}
{% } %}
{% if(filters.show_remarks) { %} {% } %} {% for(var i=0, l=data.length; i {% if(filters.show_remarks) { %} {% } %} {% } %}
{%= __("Date") %} {%= __("Reference") %}{%= __("Remarks") %}{%= __("Age (Days)") %} {%= __("Invoiced Amount") %} {%= __("Outstanding Amount") %}
{%= frappe.datetime.str_to_user(data[i]["posting_date"]) %} {% if(i == data.length - 1) { %} {%= __("Total") %} {% } else { %} {%= data[i]["voucher_no"] %} {% } %} {% if(data[i]["remarks"] && data[i]["remarks"] != "No Remarks") { %} {%= data[i]["remarks"] %} {% } %} {%= data[i]["age"] %} {%= format_currency(data[i]["invoiced"], data[i]["currency"]) %} {%= format_currency(data[i]["outstanding"], data[i]["currency"]) %}
  {% if(filters.show_future_payments) { %} {% var balance_row = data.slice(-1).pop(); var start = report.columns.findIndex(e => e.fieldname == 'age'); var currency = data[data.length - 1]["currency"]; var ranges = [ report.columns[start].label, report.columns[start+1].label, report.columns[start+2].label, report.columns[start+3].label, report.columns[start+4].label, report.columns[start+5].label ]; %} {% if(balance_row) { %}
{% for(var i = 0; i < ranges.length; i++) { %} {% } %}
{%= __(ranges[i]) %}{%= __("Total") %}
{%= __("Total Outstanding") %} {%= format_number(balance_row["age"], null, 2) %} {%= format_currency(balance_row["range1"], currency) %} {%= format_currency(balance_row["range2"], currency) %} {%= format_currency(balance_row["range3"], currency) %} {%= format_currency(balance_row["range4"], currency) %} {%= format_currency(balance_row["range5"], currency) %} {%= format_currency(flt(balance_row["outstanding"]), currency) %}
{% } %} {% } %}

{%= __("Printed on {0}", [ frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) ]) %}