diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html index 0109b957c1e..b7626ded0dc 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html @@ -1,291 +1,217 @@ - + + +
+ +
+ + +
+
+ {%= __(report.report_name) %} +
+
+ + +
+
+
+ {%= __("Customer") %}: + {%= + (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 + + + + + + + {% } %} +
{%= __(" ") %}{%= __(range1) %}{%= __(range2) %}{%= __(range3) %}{%= __(range4) %}{%= __(range5) %}{%= __(range6) %}{%= __("Total") %}{%= __("Date") %}{%= __("Reference") %} + {% if(i != data.length - 1 && data[i]["remarks"] && data[i]["remarks"] != "No Remarks") { %} + {%= data[i]["remarks"] %} + {% } %} + {%= __("Age (Days)") %}{%= __("Invoiced Amount") %}{%= __("Outstanding Amount") %}
{%= __("Total Outstanding") %} - {%= format_number(balance_row["age"], null, 2) %} - - {%= format_currency(balance_row["range1"], data[data.length-1]["currency"]) %} - - {%= format_currency(balance_row["range2"], data[data.length-1]["currency"]) %} - - {%= format_currency(balance_row["range3"], data[data.length-1]["currency"]) %} - - {%= format_currency(balance_row["range4"], data[data.length-1]["currency"]) %} - - {%= format_currency(balance_row["range5"], data[data.length-1]["currency"]) %} - - {%= format_currency(flt(balance_row["outstanding"]), data[data.length-1]["currency"]) %} -
{%= __("Future Payments") %} - {%= format_currency(flt(balance_row[("future_amount")]), data[data.length-1]["currency"]) %} -
{%= frappe.datetime.str_to_user(data[i]["posting_date"]) %} + {% if(i == data.length - 1) { %} + {%= __("Total") %} + {% } else { %} + {%= data[i]["voucher_no"] %} + {% } %} + {%= 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) %}
+
{% } %} {% } %} - - - - {% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %} - - - {% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %} - - - {% } else { %} - - {% } %} - {% if(!filters.show_future_payments) { %} - - {% } %} - - {% if(!filters.show_future_payments) { %} - - - {% } %} - - {% if(filters.show_future_payments) { %} - {% if(report.report_name === "Accounts Receivable") { %} - - {% } %} - - - - {% } %} - {% } else { %} - - - - - - {% } %} - - -
- {% if subtitle %} - {{ subtitle }} -
- {% endif %} -
- - {% for(var i=0, l=data.length; i - {% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %} - {% if(data[i]["party"]) { %} - - - +

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

- {% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %} - - {% } %} - - {% if(!filters.show_future_payments) { %} - - {% } %} - - - - {% if(!filters.show_future_payments) { %} - - - {% } %} - - - {% if(filters.show_future_payments) { %} - {% if(report.report_name === "Accounts Receivable") { %} - - {% } %} - - - - {% } %} - {% } else { %} - - {% if(!filters.show_future_payments) { %} - - {% } %} - {% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %} - - {% } %} - - - - - {% if(!filters.show_future_payments) { %} - - - {% } %} - - - {% if(filters.show_future_payments) { %} - {% if(report.report_name === "Accounts Receivable") { %} - - {% } %} - - - - {% } %} - {% } %} - {% } else { %} - {% if(data[i]["party"]|| " ") { %} - {% if(!data[i]["is_total_row"]) { %} - - {% } else { %} - - {% } %} - - - - - {% } %} - {% } %} - - {% } %} - -
{%= __("Date") %}{%= __("Age (Days)") %}{%= __("Reference") %}{%= __("Sales Person") %}{%= __("Reference") %}{%= (filters.party) ? __("Remarks"): __("Party") %}{%= __("Invoiced Amount") %}{%= __("Paid Amount") %}{%= report.report_name === "Accounts Receivable" ? __('Credit Note') : __('Debit Note') %}{%= __("Outstanding Amount") %}{%= __("Customer LPO No.") %}{%= __("Future Payment Ref") %}{%= __("Future Payment Amount") %}{%= __("Remaining Balance") %}{%= (filters.party) ? __("Remarks"): __("Party") %}{%= __("Total Invoiced Amount") %}{%= __("Total Paid Amount") %}{%= report.report_name === "Accounts Receivable Summary" ? __('Credit Note Amount') : __('Debit Note Amount') %}{%= __("Total Outstanding Amount") %}
{%= frappe.datetime.str_to_user(data[i]["posting_date"]) %}{%= data[i]["age"] %} - {% if(!filters.show_future_payments) { %} - {%= data[i]["voucher_type"] %} -
- {% } %} - {%= data[i]["voucher_no"] %} -
{%= data[i]["sales_person"] %} - {% if(!filters.party?.length) { %} - {%= data[i]["party"] %} - {% if(data[i]["customer_name"] && data[i]["customer_name"] != data[i]["party"]) { %} -
{%= data[i]["customer_name"] %} - {% } else if(data[i]["supplier_name"] != data[i]["party"]) { %} -
{%= data[i]["supplier_name"] %} - {% } %} - {% } %} -
- {% if data[i]["remarks"] %} - {%= __("Remarks") %}: - {%= data[i]["remarks"] %} - {% } %} -
-
- {%= format_currency(data[i]["invoiced"], data[i]["currency"]) %} - {%= format_currency(data[i]["paid"], data[i]["currency"]) %} - {%= format_currency(data[i]["credit_note"], data[i]["currency"]) %} - {%= format_currency(data[i]["outstanding"], data[i]["currency"]) %} - {%= data[i]["po_no"] %}{%= data[i]["future_ref"] %}{%= format_currency(data[i]["future_amount"], data[i]["currency"]) %}{%= format_currency(data[i]["remaining_balance"], data[i]["currency"]) %}{%= __("Total") %} - {%= format_currency(data[i]["invoiced"], data[i]["currency"] ) %} - {%= format_currency(data[i]["paid"], data[i]["currency"]) %}{%= format_currency(data[i]["credit_note"], data[i]["currency"]) %} - {%= format_currency(data[i]["outstanding"], data[i]["currency"]) %} - {%= data[i]["po_no"] %}{%= data[i]["future_ref"] %}{%= format_currency(data[i]["future_amount"], data[i]["currency"]) %}{%= format_currency(data[i]["remaining_balance"], data[i]["currency"]) %} - {% if(!filters.party?.length) { %} - {%= data[i]["party"] %} - {% if(data[i]["customer_name"] && data[i]["customer_name"] != data[i]["party"]) { %} -
{%= data[i]["customer_name"] %} - {% } else if(data[i]["supplier_name"] != data[i]["party"]) { %} -
{%= data[i]["supplier_name"] %} - {% } %} - {% } %} -
{%= __("Remarks") %}: - {%= data[i]["remarks"] %} -
{%= __("Total") %}{%= format_currency(data[i]["invoiced"], data[i]["currency"]) %}{%= format_currency(data[i]["paid"], data[i]["currency"]) %}{%= format_currency(data[i]["credit_note"], data[i]["currency"]) %}{%= format_currency(data[i]["outstanding"], data[i]["currency"]) %}
-

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

+
\ No newline at end of file