From 43b0f2efe63c7e8c5dfd818ed61d70bdbc62cdab Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" Date: Wed, 8 Jun 2022 17:36:42 +0530 Subject: [PATCH] [DEV] Accounts: Added total of future amount, Remaining Balance in Payable and Receivable reports. --- erpnext/accounts/report/accounts_payable/accounts_payable.js | 5 +++++ .../report/accounts_receivable/accounts_receivable.py | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js index f6961eb95fa..7cf14e67385 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.js +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js @@ -136,6 +136,11 @@ frappe.query_reports["Accounts Payable"] = { "label": __("Tax Id"), "fieldtype": "Data", "hidden": 1 + }, + { + "fieldname": "show_future_payments", + "label": __("Show Future Payments"), + "fieldtype": "Check", } ], diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index de9d63d849a..85e0f2bdd00 100755 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -160,6 +160,8 @@ class ReceivablePayableReport(object): "range3", "range4", "range5", + "future_amount", + "remaining_balance" ] def update_voucher_balance(self, gle): @@ -563,7 +565,7 @@ class ReceivablePayableReport(object): jea.party, jea.party_type, je.posting_date as future_date, - sum({0}) as future_amount, + sum('{0}') as future_amount, je.cheque_no as future_ref from `tabJournal Entry` as je inner join `tabJournal Entry Account` as jea