mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-23 12:06:43 +00:00
[cleanup] move contact, address to frappe 💥
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
cur_frm.cscript.refresh = function(doc,dt,dn){
|
||||
frappe.ui.form.on('Sales Partner', {
|
||||
refresh: function(frm) {
|
||||
frappe.contact_link = {doc: frm.doc, fieldname: 'name', doctype: 'Sales Person'}
|
||||
|
||||
if(doc.__islocal){
|
||||
hide_field(['address_html', 'contact_html']);
|
||||
erpnext.utils.clear_address_and_contact(cur_frm);
|
||||
if(doc.__islocal){
|
||||
hide_field(['address_html', 'contact_html']);
|
||||
erpnext.utils.clear_address_and_contact(frm);
|
||||
}
|
||||
else{
|
||||
unhide_field(['address_html', 'contact_html']);
|
||||
erpnext.utils.render_address_and_contact(frm);
|
||||
}
|
||||
}
|
||||
else{
|
||||
unhide_field(['address_html', 'contact_html']);
|
||||
erpnext.utils.render_address_and_contact(cur_frm);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user