From 8b2778b29f711f47414c3501372e1a158cb38576 Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Tue, 7 Oct 2025 11:18:30 +0530 Subject: [PATCH 1/4] fix(process statement of accounts): allow renaming (cherry picked from commit dbab718aaa76a56cd2b1900b0e781ba90b6666e5) # Conflicts: # erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json --- .../process_statement_of_accounts.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json index 0b3095d84ab..90a9c7649ac 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json @@ -1,5 +1,6 @@ { "actions": [], + "allow_rename": 1, "autoname": "Prompt", "creation": "2020-05-22 16:46:18.712954", "doctype": "DocType", @@ -401,7 +402,11 @@ } ], "links": [], +<<<<<<< HEAD "modified": "2025-08-04 18:21:12.603623", +======= + "modified": "2025-10-07 11:17:05.444394", +>>>>>>> dbab718aaa (fix(process statement of accounts): allow renaming) "modified_by": "Administrator", "module": "Accounts", "name": "Process Statement Of Accounts", From 546ab05eb5ff596a36231314ff51b148a175b2ab Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Tue, 7 Oct 2025 12:29:24 +0530 Subject: [PATCH 2/4] feat(process statement of accounts): added more frequency options for auto email (cherry picked from commit d610d1dccd80a1e8f657f4b9b975533467b5fc12) # Conflicts: # erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json --- .../process_statement_of_accounts.json | 6 +++++- .../process_statement_of_accounts.py | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json index 90a9c7649ac..eb737c49912 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json @@ -68,7 +68,7 @@ "fieldname": "frequency", "fieldtype": "Select", "label": "Frequency", - "options": "Weekly\nMonthly\nQuarterly" + "options": "Daily\nWeekly\nBiweekly\nMonthly\nQuarterly" }, { "fieldname": "company", @@ -402,11 +402,15 @@ } ], "links": [], +<<<<<<< HEAD <<<<<<< HEAD "modified": "2025-08-04 18:21:12.603623", ======= "modified": "2025-10-07 11:17:05.444394", >>>>>>> dbab718aaa (fix(process statement of accounts): allow renaming) +======= + "modified": "2025-10-07 12:19:20.719898", +>>>>>>> d610d1dccd (feat(process statement of accounts): added more frequency options for auto email) "modified_by": "Administrator", "module": "Accounts", "name": "Process Statement Of Accounts", diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py index 76f1e573c41..273aa6c03de 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py @@ -8,7 +8,7 @@ import frappe from frappe import _ from frappe.desk.reportview import get_match_cond from frappe.model.document import Document -from frappe.utils import add_days, add_months, format_date, getdate, today +from frappe.utils import add_days, add_months, add_to_date, format_date, getdate, today from frappe.utils.jinja import validate_template from frappe.utils.pdf import get_pdf from frappe.www.printview import get_print_style @@ -55,7 +55,7 @@ class ProcessStatementOfAccounts(Document): enable_auto_email: DF.Check filter_duration: DF.Int finance_book: DF.Link | None - frequency: DF.Literal["Weekly", "Monthly", "Quarterly"] + frequency: DF.Literal["Daily", "Weekly", "Biweekly", "Monthly", "Quarterly"] from_date: DF.Date | None ignore_cr_dr_notes: DF.Check ignore_exchange_rate_revaluation_journals: DF.Check @@ -529,8 +529,9 @@ def send_emails(document_name, from_scheduler=False, posting_date=None): if doc.enable_auto_email and from_scheduler: new_to_date = getdate(posting_date or today()) - if doc.frequency == "Weekly": - new_to_date = add_days(new_to_date, 7) + if doc.frequency in ("Daily", "Weekly", "Biweekly"): + frequency = {"Daily": 1, "Weekly": 7, "Biweekly": 14} + new_to_date = add_days(new_to_date, frequency[doc.frequency]) else: new_to_date = add_months(new_to_date, 1 if doc.frequency == "Monthly" else 3) new_from_date = add_months(new_to_date, -1 * doc.filter_duration) From 054468a5eff3d583827661992aeddc23091bfa0c Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Tue, 7 Oct 2025 16:04:23 +0530 Subject: [PATCH 3/4] fix(process statement of accounts): naming of reports (cherry picked from commit 4a4c2188ec5818c02ee83d34e5f2ef25e450c89a) # Conflicts: # erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.html # erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html --- .../process_statement_of_accounts.html | 4 ++ ...ement_of_accounts_accounts_receivable.html | 54 +++++++++++++++++++ 2 files changed, 58 insertions(+) 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..a4d0245fc45 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,11 @@ {% endif %} +<<<<<<< HEAD

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

+======= +

{{ _("GENERAL LEDGER") }}

+>>>>>>> 4a4c2188ec (fix(process statement of accounts): naming of reports)
{% if filters.party[0] == filters.party_name[0] %}
{{ _("Customer: ") }} {{ filters.party_name[0] }}
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 526c5b01437..5b0e2c08db2 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 @@ -8,10 +8,64 @@ } +<<<<<<< HEAD
{% if letter_head.content %}
{{ letter_head.content }}

+======= +
+ {% if letter_head.content %} +
{{ letter_head.content }}
+
+ {% endif %} +
+ + +

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

+

+ {{ 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[-1] %} + + {% set ns = namespace(idx=None) %} + {% for i in report.columns %} + {% if i.fieldname == "age" and ns.idx is none %} + {% set ns.idx = loop.index0 %} +>>>>>>> 4a4c2188ec (fix(process statement of accounts): naming of reports) {% endif %}
{% endif %}
-<<<<<<< HEAD -

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

-=======

{{ _("GENERAL LEDGER") }}

->>>>>>> 4a4c2188ec (fix(process statement of accounts): naming of reports)
{% if filters.party[0] == filters.party_name[0] %}
{{ _("Customer: ") }} {{ filters.party_name[0] }}
diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json index eb737c49912..5c451dc55c2 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json @@ -402,15 +402,7 @@ } ], "links": [], -<<<<<<< HEAD -<<<<<<< HEAD - "modified": "2025-08-04 18:21:12.603623", -======= - "modified": "2025-10-07 11:17:05.444394", ->>>>>>> dbab718aaa (fix(process statement of accounts): allow renaming) -======= "modified": "2025-10-07 12:19:20.719898", ->>>>>>> d610d1dccd (feat(process statement of accounts): added more frequency options for auto email) "modified_by": "Administrator", "module": "Accounts", "name": "Process Statement Of Accounts", 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 5b0e2c08db2..89ea90f6eb7 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,14 +6,8 @@ .print-format td { vertical-align:middle !important; } - + -<<<<<<< HEAD -
- {% if letter_head.content %} -
{{ letter_head.content }}
-
-=======
{% if letter_head.content %}
{{ letter_head.content }}
@@ -65,223 +59,251 @@ {% for i in report.columns %} {% if i.fieldname == "age" and ns.idx is none %} {% set ns.idx = loop.index0 %} ->>>>>>> 4a4c2188ec (fix(process statement of accounts): naming of reports) {% endif %} -
- + {% endfor %} -

{{ _(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') }} -
+ {% set age = report.columns[ns.idx].label %} + {% set range1 = report.columns[ns.idx+1].label %} + {% set range2 = report.columns[ns.idx+2].label %} + {% set range3 = report.columns[ns.idx+3].label %} + {% set range4 = report.columns[ns.idx+4].label %} + {% set range5 = report.columns[ns.idx+5].label %} -
-
- {% 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(balance_row) %} + + + + + + + + + + + + - {% 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) %} -
{{ _("Amount in {0}").format(data[0]["currency"] ~ "") }}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(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 %} - {% 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(report.report_name == "Accounts Receivable" and filters.show_sales_person) %} - +
{{ _("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") }}{{ _(" ") }}{{ _(age) }}{{ _(range1) }}{{ _(range2) }}{{ _(range3) }}{{ _(range4) }}{{ _(range5) }}{{ _("Total") }}
{{ frappe.format((data[i]["posting_date"]), 'Date') }}{{ data[i]["age"] }} - {% if not(filters.show_future_payments) %} - {{ data[i]["voucher_type"] }} -
- {% endif %} - {{ data[i]["voucher_no"] }} -
{{ _("Total Outstanding") }} + {{ frappe.utils.flt(balance_row["age"], 2) }} + + {{ frappe.utils.fmt_money(balance_row["range1"], currency=balance_row["currency"]) }} + + {{ frappe.utils.fmt_money(balance_row["range2"], currency=balance_row["currency"]) }} + + {{ frappe.utils.fmt_money(balance_row["range3"], currency=balance_row["currency"]) }} + + {{ frappe.utils.fmt_money(balance_row["range4"], currency=balance_row["currency"]) }} + + {{ frappe.utils.fmt_money(balance_row["range5"], currency=balance_row["currency"]) }} + + {{ frappe.utils.fmt_money(frappe.utils.flt(balance_row["outstanding"]), currency=balance_row["currency"]) }} +
{{ _("Future Payments") }} + {{ frappe.utils.fmt_money(frappe.utils.flt(balance_row["future_amount"]), currency=balance_row["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) and filters.show_remarks %} + + {% 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) and filters.show_remarks %} + + {% 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 %} - - + {% endif %} + + {% endfor %} + + + {% if (filters.show_future_payments) or filters.show_remarks %} + {% endif %} + {% if not(filters.show_future_payments) %} - -
{{ _("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") }}
{{ frappe.format(data[i]["posting_date"], '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"] }} @@ -289,132 +311,73 @@
{{ 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')}} -

- - - - - - - - - - - - - - - - - - - -
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() }}

+ {% else %} + {{ frappe.utils.fmt_money(data|sum(attribute="invoiced"), currency=data[0]["currency"]) }} + {{ frappe.utils.fmt_money(data|sum(attribute="outstanding"), currency=data[0]["currency"]) }} + + + {{ frappe.utils.fmt_money(data|sum(attribute="future_amount"), currency=data[0]["currency"]) }} + {{ frappe.utils.fmt_money(data|sum(attribute="remaining_balance"), currency=data[0]["currency"]) }} + {% endif %} + + +
+{% 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()) }}