mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
chore: rename and add trigger in journal entry
(cherry picked from commit 0ccb6d8242)
This commit is contained in:
@@ -50,6 +50,8 @@ frappe.ui.form.on("Journal Entry", {
|
|||||||
frm.trigger("make_inter_company_journal_entry");
|
frm.trigger("make_inter_company_journal_entry");
|
||||||
}, __('Make'));
|
}, __('Make'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
erpnext.accounts.unreconcile_payments.add_unreconcile_btn(frm);
|
||||||
},
|
},
|
||||||
before_save: function(frm) {
|
before_save: function(frm) {
|
||||||
if ((frm.doc.docstatus == 0) && (!frm.doc.is_system_generated)) {
|
if ((frm.doc.docstatus == 0) && (!frm.doc.is_system_generated)) {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class UnreconcilePayments(Document):
|
|||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def doc_has_payments(doctype, docname):
|
def doc_has_references(doctype, docname):
|
||||||
if doctype in ["Sales Invoice", "Purchase Invoice"]:
|
if doctype in ["Sales Invoice", "Purchase Invoice"]:
|
||||||
return frappe.db.count(
|
return frappe.db.count(
|
||||||
"Payment Ledger Entry",
|
"Payment Ledger Entry",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ erpnext.accounts.unreconcile_payments = {
|
|||||||
add_unreconcile_btn(frm) {
|
add_unreconcile_btn(frm) {
|
||||||
if (frm.doc.docstatus == 1) {
|
if (frm.doc.docstatus == 1) {
|
||||||
frappe.call({
|
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": {
|
"args": {
|
||||||
"doctype": frm.doc.doctype,
|
"doctype": frm.doc.doctype,
|
||||||
"docname": frm.doc.name
|
"docname": frm.doc.name
|
||||||
|
|||||||
Reference in New Issue
Block a user