cascade project name to other items, if selected in one item during purchase cycle

This commit is contained in:
Anand Doshi 2012-08-10 15:37:54 +05:30
parent f08cbe185d
commit 544b0f64d1

View File

@ -636,4 +636,15 @@ cur_frm.cscript.check_charge_type_and_get_tax_amount = function(doc, tax, t, cl,
cur_frm.cscript.toggle_contact_section = function(doc) {
doc.supplier ? unhide_field("contact_section") : hide_field("contact_section");
}
cur_frm.cscript.project_name = function(doc, cdt, cdn) {
var item_doc = locals[cdt][cdn];
if (item_doc.project_name) {
$.each(getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname, doc.doctype),
function(i, v) {
if (v && !v.project_name) v.project_name = item_doc.project_name;
});
refresh_field(cur_frm.cscript.fname);
}
}