fix(payment-request): only consider paid transactions

This commit is contained in:
Mangesh-Khairnar 2020-10-22 01:07:49 +05:30
parent c8a04fec35
commit 1a6d82a447
2 changed files with 2 additions and 1 deletions

View File

@ -400,7 +400,7 @@ def get_existing_payment_request_amount(ref_dt, ref_dn):
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

View File

@ -21,6 +21,7 @@ frappe.ui.form.on('Mpesa Settings', {
},
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', {