Merge branch 'frappe:develop' into solufy_rec_pay_report
diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js
index f6961eb..7cf14e6 100644
--- a/erpnext/accounts/report/accounts_payable/accounts_payable.js
+++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js
@@ -136,6 +136,11 @@
 			"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 1911152..786d924 100755
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -163,6 +163,8 @@
 			"range3",
 			"range4",
 			"range5",
+			"future_amount",
+			"remaining_balance"
 		]
 
 	def get_voucher_balance(self, ple):
@@ -544,7 +546,7 @@
 				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