diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.html b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.html index 81ebf9744c4..5efd9b165dc 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.html +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.html @@ -13,7 +13,7 @@ {% endif %} -

{{ _("STATEMENTS OF ACCOUNTS") }}

+

{{ _("STATEMENT OF ACCOUNTS") }}

{% if filters.party[0] == filters.party_name[0] %}
{{ _("Customer: ") }} {{ filters.party_name[0] }}
@@ -22,11 +22,11 @@
{{ _("Customer Name: ") }} {{filters.party_name[0] }}
{% endif %}
- {{ _("Date: ") }} - {{ frappe.format(filters.from_date, 'Date')}} - {{ _("to") }} - {{ frappe.format(filters.to_date, 'Date')}} -
+ {{ _("Date: {0} to {1}").format( + frappe.format(filters.from_date, "Date"), + frappe.format(filters.to_date, 'Date') + ) }} +

@@ -54,7 +54,7 @@
{% endif %} -
{{ _("Remarks") }}: {{ row.remarks }} +
{{ _("Remarks:") }} {{ row.remarks }} {% if row.bill_no %}
{{ _("Supplier Invoice No") }}: {{ row.bill_no }} {% endif %} @@ -83,17 +83,20 @@
{% if ageing %} -

{{ _("Ageing Report based on ") }} {{ ageing.ageing_based_on }} - {{ _("up to " ) }} {{ frappe.format(filters.to_date, 'Date')}} +

+ {{ _("Ageing Report based on {0} up to {1}").format( + ageing.ageing_based_on, + frappe.format(filters.to_date, "Date") + ) }}

- - - - - + + + + + diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html index bf8de073853..e9b1577c028 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html @@ -6,228 +6,302 @@ .print-format td { vertical-align:middle !important; } - + -
- {% if letter_head.content %} -
{{ letter_head.content }}
-
- {% endif %} -
- - -

{{ _(report.report_name) }}

-

- {{ filters.customer_name }} -

-
- {% if (filters.tax_id) %} - {{ _("Tax Id: ") }}{{ filters.tax_id }} - {% endif %} -
-
- {{ _(filters.ageing_based_on) }} - {{ _("Until") }} - {{ frappe.format(filters.report_date, 'Date') }} -
- -
-
- {% if(filters.payment_terms) %} - {{ _("Payment Terms") }}: {{ filters.payment_terms }} - {% endif %} -
-
- {% if(filters.credit_limit) %} - {{ _("Credit Limit") }}: {{ frappe.utils.fmt_money(filters.credit_limit) }} - {% endif %} -
-
- - {% if(filters.show_future_payments) %} - {% set balance_row = data.slice(-1).pop() %} - {% for i in report.columns %} - {% if i.fieldname == 'age' %} - {% set elem = i %} - {% endif %} - {% endfor %} - {% set start = report.columns.findIndex(elem) %} - {% set range1 = report.columns[start].label %} - {% set range2 = report.columns[start+1].label %} - {% set range3 = report.columns[start+2].label %} - {% set range4 = report.columns[start+3].label %} - {% set range5 = report.columns[start+4].label %} - {% set range6 = report.columns[start+5].label %} - - {% if(balance_row) %} -
0 - 30 Days30 - 60 Days60 - 90 Days90 - 120 DaysAbove 120 Days{{ _("0 - 30 Days") }}{{ _("30 - 60 Days") }}{{ _("60 - 90 Days") }}{{ _("90 - 120 Days") }}{{ _("Above 120 Days") }}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Amount in {{ data[0]["currency"] ~ "" }})
{{ _(" ") }}{{ _(range1) }}{{ _(range2) }}{{ _(range3) }}{{ _(range4) }}{{ _(range5) }}{{ _(range6) }}{{ _("Total") }}
{{ _("Total Outstanding") }} - {{ format_number(balance_row["age"], null, 2) }} - - {{ frappe.utils.fmt_money(balance_row["range1"], data[data.length-1]["currency"]) }} - - {{ frappe.utils.fmt_money(balance_row["range2"], data[data.length-1]["currency"]) }} - - {{ frappe.utils.fmt_money(balance_row["range3"], data[data.length-1]["currency"]) }} - - {{ frappe.utils.fmt_money(balance_row["range4"], data[data.length-1]["currency"]) }} - - {{ frappe.utils.fmt_money(balance_row["range5"], data[data.length-1]["currency"]) }} - - {{ frappe.utils.fmt_money(flt(balance_row["outstanding"]), data[data.length-1]["currency"]) }} -
{{ _("Future Payments") }} - {{ frappe.utils.fmt_money(flt(balance_row[("future_amount")]), data[data.length-1]["currency"]) }} -
- {% endif %} +
+ {% if letter_head.content %} +
{{ letter_head.content }}
+
{% endif %} - + + + +

{{ _(report.report_name) }}

+

+ {{ filters.customer_name }} +

+
+ {% if (filters.tax_id) %} + {{ _("Tax Id: {0}").format(filters.tax_id) }} + {% endif %} +
+
+ {{ _("{0} until {1}").format( + _(filters.ageing_based_on), + frappe.format(filters.report_date, 'Date') + ) }} +
+ +
+
+ {% if(filters.payment_terms) %} + {{ _("Payment Terms:") }} {{ filters.payment_terms }} + {% endif %} +
+
+ {% if(filters.credit_limit) %} + {{ _("Credit Limit:") }} {{ frappe.utils.fmt_money(filters.credit_limit) }} + {% endif %} +
+
+ +{% if(filters.show_future_payments) %} + {% set balance_row = data.slice(-1).pop() %} + {% for i in report.columns %} + {% if i.fieldname == 'age' %} + {% set elem = i %} + {% endif %} + {% endfor %} + {% set start = report.columns.findIndex(elem) %} + {% set range1 = report.columns[start].label %} + {% set range2 = report.columns[start+1].label %} + {% set range3 = report.columns[start+2].label %} + {% set range4 = report.columns[start+3].label %} + {% set range5 = report.columns[start+4].label %} + {% set range6 = report.columns[start+5].label %} + + {% if(balance_row) %} +
+ + + + + + + + + + + + - {% if(report.report_name == "Accounts Receivable" or report.report_name == "Accounts Payable") %} - - - - {% if(report.report_name == "Accounts Receivable" and filters.show_sales_person) %} - - - {% else %} - - {% endif %} - {% if not(filters.show_future_payments) %} - - {% endif %} - - {% if not(filters.show_future_payments) %} - - - {% endif %} - - {% if(filters.show_future_payments) %} - {% if(report.report_name == "Accounts Receivable") %} - - {% endif %} - - - - {% endif %} - {% else %} - - - - - - {% endif %} + + + + + + + + - {% for i in range(data|length) %} - - {% if(report.report_name == "Accounts Receivable" or report.report_name == "Accounts Payable") %} - {% if(data[i]["party"]) %} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - {% if(report.report_name == "Accounts Receivable" and filters.show_sales_person) %} - +
{{ _("Amount in {0}").format(data[0]["currency"] ~ "") }}
{{ _("Date") }}{{ _("Age (Days)") }}{{ _("Reference") }}{{ _("Sales Person") }}{{ _("Reference") }} - {% if (filters.customer or filters.supplier or filters.customer_name) %} - {{ _("Remarks") }} - {% else %} - {{ _("Party") }} - {% endif %} - {{ _("Invoiced Amount") }}{{ _("Paid Amount") }} - {% if report.report_name == "Accounts Receivable" %} - {{ _('Credit Note') }} - {% else %} - {{ _('Debit Note') }} - {% endif %} - {{ _("Outstanding Amount") }}{{ _("Customer LPO No.") }}{{ _("Future Payment Ref") }}{{ _("Future Payment Amount") }}{{ _("Remaining Balance") }} - {% if (filters.customer or filters.supplier or filters.customer_name) %} - {{ _("Remarks")}} - {% else %} - {{ _("Party") }} - {% endif %} - {{ _("Total Invoiced Amount") }}{{ _("Total Paid Amount") }} - {% if report.report_name == "Accounts Receivable Summary" %} - {{ _('Credit Note Amount') }} - {% else %} - {{ _('Debit Note Amount') }} - {% endif %} - {{ _("Total Outstanding Amount") }}{{ _(" ") }}{{ _(range1) }}{{ _(range2) }}{{ _(range3) }}{{ _(range4) }}{{ _(range5) }}{{ _(range6) }}{{ _("Total") }}
{{ (data[i]["posting_date"]) }}{{ data[i]["age"] }} - {% if not(filters.show_future_payments) %} - {{ data[i]["voucher_type"] }} -
- {% endif %} - {{ data[i]["voucher_no"] }} -
{{ _("Total Outstanding") }} + {{ format_number(balance_row["age"], null, 2) }} + + {{ frappe.utils.fmt_money(balance_row["range1"], data[data.length-1]["currency"]) }} + + {{ frappe.utils.fmt_money(balance_row["range2"], data[data.length-1]["currency"]) }} + + {{ frappe.utils.fmt_money(balance_row["range3"], data[data.length-1]["currency"]) }} + + {{ frappe.utils.fmt_money(balance_row["range4"], data[data.length-1]["currency"]) }} + + {{ frappe.utils.fmt_money(balance_row["range5"], data[data.length-1]["currency"]) }} + + {{ frappe.utils.fmt_money(flt(balance_row["outstanding"]), data[data.length-1]["currency"]) }} +
{{ _("Future Payments") }} + {{ frappe.utils.fmt_money(flt(balance_row[("future_amount")]), data[data.length-1]["currency"]) }} +
{{ data[i]["sales_person"] }}
+ {% endif %} +{% endif %} + + + + {% if(report.report_name == "Accounts Receivable" or report.report_name == "Accounts Payable") %} + + + + {% if(report.report_name == "Accounts Receivable" and filters.show_sales_person) %} + + + {% else %} + + {% endif %} + {% if not(filters.show_future_payments) %} + + {% endif %} + + {% if not(filters.show_future_payments) %} + + + {% endif %} + + {% if(filters.show_future_payments) %} + {% if(report.report_name == "Accounts Receivable") %} + + {% endif %} + + + + {% endif %} + {% else %} + + + + + + {% endif %} + + + + {% for i in range(data|length) %} + + {% if(report.report_name == "Accounts Receivable" or report.report_name == "Accounts Payable") %} + {% if(data[i]["party"]) %} + + + - {% if not (filters.show_future_payments) %} + {% if(report.report_name == "Accounts Receivable" and filters.show_sales_person) %} + + {% endif %} + + {% if not (filters.show_future_payments) %} + + {% endif %} + + + + {% if not(filters.show_future_payments) %} + + + {% endif %} + + + {% if(filters.show_future_payments) %} + {% if(report.report_name == "Accounts Receivable") %} + + {% endif %} + + + + {% endif %} + {% else %} + + {% if not(filters.show_future_payments) %} + + {% endif %} + {% if(report.report_name == "Accounts Receivable" and filters.show_sales_person) %} + + {% endif %} + + + + + {% if not(filters.show_future_payments) %} + + + {% endif %} + + + {% if(filters.show_future_payments) %} + {% if(report.report_name == "Accounts Receivable") %} + + {% endif %} + + + + {% endif %} + {% endif %} + {% else %} + {% if(data[i]["party"] or " ") %} + {% if not(data[i]["is_total_row"]) %} - {% endif %} - - - - {% if not(filters.show_future_payments) %} - - - {% endif %} - - - {% if(filters.show_future_payments) %} - {% if(report.report_name == "Accounts Receivable") %} - - {% endif %} - - - - {% endif %} {% else %} - - {% if not(filters.show_future_payments) %} - - {% endif %} - {% if(report.report_name == "Accounts Receivable" and filters.show_sales_person) %} - - {% endif %} - - - - - {% if not(filters.show_future_payments) %} - - - {% endif %} - - - {% if(filters.show_future_payments) %} - {% if(report.report_name == "Accounts Receivable") %} - - {% endif %} - - - - {% endif %} - {% endif %} - {% else %} - {% if(data[i]["party"] or " ") %} - {% if not(data[i]["is_total_row"]) %} - - {% else %} - - {% endif %} - - - - + {% endif %} + + + + {% endif %} - - {% endfor %} - - - - - - - - - -
{{ _("Date") }}{{ _("Age (Days)") }}{{ _("Reference") }}{{ _("Sales Person") }}{{ _("Reference") }} + {% if (filters.customer or filters.supplier or filters.customer_name) %} + {{ _("Remarks") }} + {% else %} + {{ _("Party") }} + {% endif %} + {{ _("Invoiced Amount") }}{{ _("Paid Amount") }} + {% if report.report_name == "Accounts Receivable" %} + {{ _("Credit Note") }} + {% else %} + {{ _("Debit Note") }} {% endif %} + {{ _("Outstanding Amount") }}{{ _("Customer LPO No.") }}{{ _("Future Payment Ref") }}{{ _("Future Payment Amount") }}{{ _("Remaining Balance") }} + {% if (filters.customer or filters.supplier or filters.customer_name) %} + {{ _("Remarks")}} + {% else %} + {{ _("Party") }} + {% endif %} + {{ _("Total Invoiced Amount") }}{{ _("Total Paid Amount") }} + {% if report.report_name == "Accounts Receivable Summary" %} + {{ _("Credit Note Amount") }} + {% else %} + {{ _("Debit Note Amount") }} + {% endif %} + {{ _("Total Outstanding Amount") }}
{{ (data[i]["posting_date"]) }}{{ data[i]["age"] }} + {% if not(filters.show_future_payments) %} + {{ data[i]["voucher_type"] }} +
+ {% endif %} + {{ data[i]["voucher_no"] }} +
{{ data[i]["sales_person"] }} + {% if(not(filters.customer or filters.supplier or filters.customer_name)) %} + {{ data[i]["party"] }} + {% if(data[i]["customer_name"] and data[i]["customer_name"] != data[i]["party"]) %} +
{{ data[i]["customer_name"] }} + {% elif(data[i]["supplier_name"] != data[i]["party"]) %} +
{{ data[i]["supplier_name"] }} + {% endif %} + {% endif %} +
+ {% if data[i]["remarks"] %} + {{ _("Remarks") }}: + {{ data[i]["remarks"] }} + {% endif %} +
+
+ {{ frappe.utils.fmt_money(data[i]["invoiced"], currency=data[i]["currency"]) }} + {{ frappe.utils.fmt_money(data[i]["paid"], currency=data[i]["currency"]) }} + {{ frappe.utils.fmt_money(data[i]["credit_note"], currency=data[i]["currency"]) }} + {{ frappe.utils.fmt_money(data[i]["outstanding"], currency=data[i]["currency"]) }} + {{ data[i]["po_no"] }}{{ data[i]["future_ref"] }}{{ frappe.utils.fmt_money(data[i]["future_amount"], currency=data[i]["currency"]) }}{{ frappe.utils.fmt_money(data[i]["remaining_balance"], currency=data[i]["currency"]) }}{{ _("Total") }} + {{ frappe.utils.fmt_money(data[i]["invoiced"], data[i]["currency"]) }} + {{ frappe.utils.fmt_money(data[i]["paid"], currency=data[i]["currency"]) }}{{ frappe.utils.fmt_money(data[i]["credit_note"], currency=data[i]["currency"]) }} + {{ frappe.utils.fmt_money(data[i]["outstanding"], currency=data[i]["currency"]) }} + {{ data[i]["po_no"] }}{{ data[i]["future_ref"] }}{{ frappe.utils.fmt_money(data[i]["future_amount"], currency=data[i]["currency"]) }}{{ frappe.utils.fmt_money(data[i]["remaining_balance"], currency=data[i]["currency"]) }} - {% if(not(filters.customer or filters.supplier or filters.customer_name)) %} + {% if(not(filters.customer | filters.supplier)) %} {{ data[i]["party"] }} {% if(data[i]["customer_name"] and data[i]["customer_name"] != data[i]["party"]) %}
{{ data[i]["customer_name"] }} @@ -235,132 +309,62 @@
{{ data[i]["supplier_name"] }} {% endif %} {% endif %} -
- {% if data[i]["remarks"] %} - {{ _("Remarks") }}: - {{ data[i]["remarks"] }} - {% endif %} -
+
{{ _("Remarks") }}: + {{ data[i]["remarks"] }}
- {{ frappe.utils.fmt_money(data[i]["invoiced"], currency=data[i]["currency"]) }} - {{ frappe.utils.fmt_money(data[i]["paid"], currency=data[i]["currency"]) }} - {{ frappe.utils.fmt_money(data[i]["credit_note"], currency=data[i]["currency"]) }} - {{ frappe.utils.fmt_money(data[i]["outstanding"], currency=data[i]["currency"]) }} - {{ data[i]["po_no"] }}{{ data[i]["future_ref"] }}{{ frappe.utils.fmt_money(data[i]["future_amount"], currency=data[i]["currency"]) }}{{ frappe.utils.fmt_money(data[i]["remaining_balance"], currency=data[i]["currency"]) }}{{ _("Total") }} - {{ frappe.utils.fmt_money(data[i]["invoiced"], data[i]["currency"]) }} - {{ frappe.utils.fmt_money(data[i]["paid"], currency=data[i]["currency"]) }}{{ frappe.utils.fmt_money(data[i]["credit_note"], currency=data[i]["currency"]) }} - {{ frappe.utils.fmt_money(data[i]["outstanding"], currency=data[i]["currency"]) }} - {{ data[i]["po_no"] }}{{ data[i]["future_ref"] }}{{ frappe.utils.fmt_money(data[i]["future_amount"], currency=data[i]["currency"]) }}{{ frappe.utils.fmt_money(data[i]["remaining_balance"], currency=data[i]["currency"]) }} - {% if(not(filters.customer | filters.supplier)) %} - {{ data[i]["party"] }} - {% if(data[i]["customer_name"] and data[i]["customer_name"] != data[i]["party"]) %} -
{{ data[i]["customer_name"] }} - {% elif(data[i]["supplier_name"] != data[i]["party"]) %} -
{{ data[i]["supplier_name"] }} - {% endif %} - {% endif %} -
{{ _("Remarks") }}: - {{ data[i]["remarks"] }} -
{{ _("Total") }}{{ frappe.utils.fmt_money(data[i]["invoiced"], currency=data[i]["currency"]) }}{{ frappe.utils.fmt_money(data[i]["paid"], currency=data[i]["currency"]) }}{{ frappe.utils.fmt_money(data[i]["credit_note"], currency=data[i]["currency"]) }}{{ frappe.utils.fmt_money(data[i]["outstanding"], currency=data[i]["currency"]) }}{{ _("Total") }}{{ frappe.utils.fmt_money(data[i]["invoiced"], currency=data[i]["currency"]) }}{{ frappe.utils.fmt_money(data[i]["paid"], currency=data[i]["currency"]) }}{{ frappe.utils.fmt_money(data[i]["credit_note"], currency=data[i]["currency"]) }}{{ frappe.utils.fmt_money(data[i]["outstanding"], currency=data[i]["currency"]) }}
{{ frappe.utils.fmt_money(data|sum(attribute="invoiced"), currency=data[0]["currency"]) }}{{ frappe.utils.fmt_money(data|sum(attribute="paid"), currency=data[0]["currency"]) }}{{ frappe.utils.fmt_money(data|sum(attribute="credit_note"), currency=data[0]["currency"]) }}{{ frappe.utils.fmt_money(data|sum(attribute="outstanding"), currency=data[0]["currency"]) }}
-
- {% if ageing %} -

{{ _("Ageing Report based on ") }} {{ ageing.ageing_based_on }} - {{ _("up to " ) }} {{ frappe.format(filters.report_date, 'Date')}} -

- - - - - - - - + {% endif %} - - - - - - - - - - -
0 - 30 Days30 - 60 Days60 - 90 Days90 - 120 DaysAbove 120 Days
{{ frappe.utils.fmt_money(ageing.range1, currency=data[0]["currency"]) }}{{ frappe.utils.fmt_money(ageing.range2, currency=data[0]["currency"]) }}{{ frappe.utils.fmt_money(ageing.range3, currency=data[0]["currency"]) }}{{ frappe.utils.fmt_money(ageing.range4, currency=data[0]["currency"]) }}{{ frappe.utils.fmt_money(ageing.range5, currency=filters.presentation_currency) }}
- {% endif %} - {% if terms_and_conditions %} -
- {{ terms_and_conditions }} -
- {% endif %} -

{{ _("Printed On ") }}{{ frappe.utils.now() }}

+ {% endfor %} + + + + + {{ frappe.utils.fmt_money(data|sum(attribute="invoiced"), currency=data[0]["currency"]) }} + {{ frappe.utils.fmt_money(data|sum(attribute="paid"), currency=data[0]["currency"]) }} + {{ frappe.utils.fmt_money(data|sum(attribute="credit_note"), currency=data[0]["currency"]) }} + {{ frappe.utils.fmt_money(data|sum(attribute="outstanding"), currency=data[0]["currency"]) }} + + +
+{% if ageing %} +

+ {{ _("Ageing Report based on {0} up to {1}").format( + ageing.ageing_based_on, + frappe.format(filters.report_date, "Date") + ) }} +

+ + + + + + + + + + + + + + + + + + + +
{{ _("0 - 30 Days") }}{{ _("30 - 60 Days") }}{{ _("60 - 90 Days") }}{{ _("90 - 120 Days") }}{{ _("Above 120 Days") }}
{{ frappe.utils.fmt_money(ageing.range1, currency=data[0]["currency"]) }}{{ frappe.utils.fmt_money(ageing.range2, currency=data[0]["currency"]) }}{{ frappe.utils.fmt_money(ageing.range3, currency=data[0]["currency"]) }}{{ frappe.utils.fmt_money(ageing.range4, currency=data[0]["currency"]) }}{{ frappe.utils.fmt_money(ageing.range5, currency=filters.presentation_currency) }}
+{% endif %} +{% if terms_and_conditions %} +
+ {{ terms_and_conditions }} +
+{% endif %} +

{{ _("Printed on {0}").format(frappe.utils.now()) }}