mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
contact.js: set customer, supplier
This commit is contained in:
@@ -23,23 +23,6 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
|
||||
cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query;
|
||||
|
||||
var route = wn.get_route();
|
||||
if(route[1]=='Supplier') {
|
||||
var supplier = wn.container.page.frm.doc;
|
||||
doc.supplier = supplier.name;
|
||||
doc.supplier_name = supplier.supplier_name;
|
||||
} else if(route[1]=='Customer') {
|
||||
var customer = wn.container.page.frm.doc;
|
||||
doc.customer = customer.name;
|
||||
doc.customer_name = customer.customer_name;
|
||||
if(customer.customer_type == 'Individual') {
|
||||
doc.first_name = customer.customer_name;
|
||||
}
|
||||
} else if(route[1]=='Sales Partner') {
|
||||
var sp = wn.container.page.frm.doc;
|
||||
doc.sales_partner = sp.name;
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.cscript.refresh = function() {
|
||||
|
||||
Reference in New Issue
Block a user