Fixed merge conflict

This commit is contained in:
Nabin Hait
2014-11-05 12:41:02 +05:30
28 changed files with 252 additions and 454 deletions

View File

@@ -589,18 +589,18 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
});
frappe.ui.form.on(cur_frm.doctype,"project_name", function(frm) {
frappe.call({
method:'erpnext.projects.doctype.project.project.get_cost_center_name' ,
args: { project_name: frm.doc.project_name },
callback: function(r, rt) {
if(!r.exc && r.message) {
$.each(frm.doc[cur_frm.cscript.fname] || [], function(i, row) {
if(frappe.meta.has_field(cur_frm.cscript.tname , "cost_center")) {
if(in_list(["Delivery Note", "Sales Invoice"], frm.doc.doctype)) {
frappe.call({
method:'erpnext.projects.doctype.project.project.get_cost_center_name' ,
args: { project_name: frm.doc.project_name },
callback: function(r, rt) {
if(!r.exc) {
$.each(frm.doc[cur_frm.cscript.fname] || [], function(i, row) {
frappe.model.set_value(row.doctype, row.name, "cost_center", r.message);
msgprint(__("Cost Center For Item with Item Code '"+row.item_name+"' has been Changed to "+ r.message));
}
})
})
}
}
}
})
})
}
})