chore: rename and add trigger in journal entry
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index 35a3788..cdd1203 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -50,6 +50,8 @@
frm.trigger("make_inter_company_journal_entry");
}, __('Make'));
}
+
+ erpnext.accounts.unreconcile_payments.add_unreconcile_btn(frm);
},
make_inter_company_journal_entry: function(frm) {
diff --git a/erpnext/accounts/doctype/unreconcile_payments/unreconcile_payments.py b/erpnext/accounts/doctype/unreconcile_payments/unreconcile_payments.py
index 01f910e..9b80c0a 100644
--- a/erpnext/accounts/doctype/unreconcile_payments/unreconcile_payments.py
+++ b/erpnext/accounts/doctype/unreconcile_payments/unreconcile_payments.py
@@ -54,7 +54,7 @@
@frappe.whitelist()
-def doc_has_payments(doctype, docname):
+def doc_has_references(doctype, docname):
if doctype in ["Sales Invoice", "Purchase Invoice"]:
return frappe.db.count(
"Payment Ledger Entry",
diff --git a/erpnext/public/js/utils/unreconcile.js b/erpnext/public/js/utils/unreconcile.js
index 46555fe..df07643 100644
--- a/erpnext/public/js/utils/unreconcile.js
+++ b/erpnext/public/js/utils/unreconcile.js
@@ -4,7 +4,7 @@
add_unreconcile_btn(frm) {
if (frm.doc.docstatus == 1) {
frappe.call({
- "method": "erpnext.accounts.doctype.unreconcile_payments.unreconcile_payments.doc_has_payments",
+ "method": "erpnext.accounts.doctype.unreconcile_payments.unreconcile_payments.doc_has_references",
"args": {
"doctype": frm.doc.doctype,
"docname": frm.doc.name