commit | 1a6d82a447d7348ca2a06d343e8c7b5203e198fa | [log] [tgz] |
---|---|---|
author | Mangesh-Khairnar <mkhairnar10@gmail.com> | Thu Oct 22 01:07:49 2020 +0530 |
committer | Mangesh-Khairnar <mkhairnar10@gmail.com> | Thu Oct 22 01:07:49 2020 +0530 |
tree | 904614c4387315fcb235bd182963b41073c6bd97 | |
parent | c8a04fec35880e13e39b5c0b1fd9417eba356713 [diff] |
fix(payment-request): only consider paid transactions
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 51c090c..cb58f89 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py
@@ -400,7 +400,7 @@ reference_doctype = %s and reference_name = %s and docstatus = 1 - and status != 'Paid' + and status = 'Paid' """, (ref_dt, ref_dn)) return flt(existing_payment_request_amount[0][0]) if existing_payment_request_amount else 0
diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.js b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.js index c24a104..a7e6dec 100644 --- a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.js +++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.js
@@ -21,6 +21,7 @@ }, setup_account_balance_html: function(frm) { + if (!frm.doc.account_balance) return; $("div").remove(".form-dashboard-section.custom"); frm.dashboard.add_section( frappe.render_template('account_balance', {