diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index 383b4b620d..a98130bfc4 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -350,6 +350,9 @@ frappe.ui.form.on("Journal Entry Account", { account: function(frm, dt, dn) { var d = locals[dt][dn]; if(d.account) { + if(!frm.doc.company) frappe.throw(__("Please select Company first")); + if(!frm.doc.posting_date) frappe.throw(__("Please select Posting Date first")); + return frappe.call({ method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_account_balance_and_party_type", args: {