chore: rename and add trigger in journal entry
This commit is contained in:
parent
69683776a5
commit
0ccb6d8242
@ -50,6 +50,8 @@ frappe.ui.form.on("Journal Entry", {
|
||||
frm.trigger("make_inter_company_journal_entry");
|
||||
}, __('Make'));
|
||||
}
|
||||
|
||||
erpnext.accounts.unreconcile_payments.add_unreconcile_btn(frm);
|
||||
},
|
||||
|
||||
make_inter_company_journal_entry: function(frm) {
|
||||
|
@ -54,7 +54,7 @@ class UnreconcilePayments(Document):
|
||||
|
||||
|
||||
@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",
|
||||
|
@ -4,7 +4,7 @@ erpnext.accounts.unreconcile_payments = {
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user