From 3b26b24af611f7b314d1696dab6c03b8d7a29e26 Mon Sep 17 00:00:00 2001 From: Abhishek Balam Date: Wed, 29 Apr 2020 11:28:40 +0530 Subject: [PATCH] fix semicolons as per codacy review --- erpnext/accounts/doctype/journal_entry/journal_entry.js | 4 ++-- .../doctype/journal_entry_template/journal_entry_template.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index 2e5d6b3847..ccfdfceadb 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -12,7 +12,7 @@ frappe.ui.form.on("Journal Entry", { refresh: function(frm) { erpnext.toggle_naming_series(); - + if(frm.doc.docstatus==1) { frm.add_custom_button(__('Ledger'), function() { frappe.route_options = { @@ -144,7 +144,7 @@ frappe.ui.form.on("Journal Entry", { } } }); - } + } else if(frm.doc.voucher_type=="Opening Entry") { return frappe.call({ type:"GET", diff --git a/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.js b/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.js index 2a549778d7..13e9a3d80c 100644 --- a/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.js +++ b/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.js @@ -30,8 +30,8 @@ frappe.ui.form.on("Journal Entry Template", { row.account = d.account; }); refresh_field("accounts"); - } - + }; + if(!frm.doc.company) return; frm.trigger("clear_child");