Skip to content

Instantly share code, notes, and snippets.

@anandpdoshi
Created January 9, 2013 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anandpdoshi/4493550 to your computer and use it in GitHub Desktop.
Save anandpdoshi/4493550 to your computer and use it in GitHub Desktop.
cur_frm.cscript.custom_purpose = function(doc) {
if(doc.purpose==="Sales Return") {
cur_frm.toggle_reqd("sales_invoice_no", true);
} else {
cur_frm.toggle_reqd("sales_invoice_no", false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment