[print] fix wnframework #192, fix in journal voucher

This commit is contained in:
Rushabh Mehta 2013-07-01 12:59:22 +05:30
parent 1bcc19e019
commit e0117896d4

View File

@ -140,7 +140,7 @@ cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
cur_frm.set_df_property("cheque_no", "reqd", doc.voucher_type=="Bank Voucher");
cur_frm.set_df_property("cheque_date", "reqd", doc.voucher_type=="Bank Voucher");
if(wn.model.get("Journal Voucher Detail", {"parent":doc.name}).length!===0 // too late
if(wn.model.get("Journal Voucher Detail", {"parent":doc.name}).length!==0 // too late
|| !doc.company) // too early
return;