[usability] journal entry type fixes #3085

This commit is contained in:
Rushabh Mehta 2015-04-14 14:10:19 +05:30
parent 39539f14ce
commit de9bd108d0

View File

@ -224,8 +224,9 @@ cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
cur_frm.set_df_property("cheque_no", "reqd", doc.voucher_type=="Bank Entry");
cur_frm.set_df_property("cheque_date", "reqd", doc.voucher_type=="Bank Entry");
if((doc.accounts || []).length!==0 || !doc.company) // too early
return;
if(!doc.company) return;
cur_frm.clear_table("accounts");
var update_jv_details = function(doc, r) {
var jvdetail = frappe.model.add_child(doc, "Journal Entry Account", "accounts");