From a227b9a9a657ea3db7d3851f91e37dd74827a706 Mon Sep 17 00:00:00 2001 From: Mitchy25 <42224026+Mitchy25@users.noreply.github.com> Date: Tue, 12 Nov 2019 00:59:53 +1300 Subject: [PATCH] Fix Bank Reconcilaition for Payment Entries (#19190) * Fix Bank Reconciliation with Payment Entries * Update bank_reconciliation.js --- .../page/bank_reconciliation/bank_reconciliation.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.js index 854b973bea..efc76f9158 100644 --- a/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.js +++ b/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.js @@ -529,9 +529,16 @@ erpnext.accounts.ReconciliationRow = class ReconciliationRow { frappe.db.get_doc(dt, event.value) .then(doc => { let displayed_docs = [] + let payment = [] if (dt === "Payment Entry") { payment.currency = doc.payment_type == "Receive" ? doc.paid_to_account_currency : doc.paid_from_account_currency; payment.doctype = dt + payment.posting_date = doc.posting_date; + payment.party = doc.party; + payment.reference_no = doc.reference_no; + payment.reference_date = doc.reference_date; + payment.paid_amount = doc.paid_amount; + payment.name = doc.name; displayed_docs.push(payment); } else if (dt === "Journal Entry") { doc.accounts.forEach(payment => { @@ -564,8 +571,8 @@ erpnext.accounts.ReconciliationRow = class ReconciliationRow { const details_wrapper = me.dialog.fields_dict.payment_details.$wrapper; details_wrapper.append(frappe.render_template("linked_payment_header")); - displayed_docs.forEach(values => { - details_wrapper.append(frappe.render_template("linked_payment_row", values)); + displayed_docs.forEach(payment => { + details_wrapper.append(frappe.render_template("linked_payment_row", payment)); }) }) }