appriasal copy fix

This commit is contained in:
Rushabh Mehta 2011-11-04 10:41:12 +05:30
parent 9207f51ced
commit 36fc1d06fb

View File

@ -1,13 +1,21 @@
cur_frm.add_fetch('employee', 'company', 'company');
cur_frm.cscript.onload = function(doc,cdt,cdn){
if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
if(doc.employee) cur_frm.cscript.employee(doc,cdt,cdn);
if(doc.amended_from && doc.__islocal) cur_frm.cscript.refresh_appraisal_details(doc, cdt, cdn);
if(doc.employee)
cur_frm.cscript.employee(doc,cdt,cdn);
if(doc.amended_from && doc.__islocal)
cur_frm.cscript.refresh_appraisal_details(doc, cdt, cdn);
}
cur_frm.cscript.onload_post_render = function(doc,cdt,cdn){
if(doc.employee)
cur_frm.cscript.employee(doc,cdt,cdn);
}
cur_frm.cscript.refresh = function(doc,cdt,cdn){
if(user == doc.kra_approver && doc.status == 'Submitted') unhide_field(['Update', 'Declare Completed', 'Calculate Total Score']);
if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
if(user == doc.kra_approver && doc.status == 'Submitted')
unhide_field(['Update', 'Declare Completed', 'Calculate Total Score']);
else hide_field(['Update', 'Declare Completed', 'Calculate Total Score']);
if(!doc.docstatus) unhide_field('Fetch Template');