Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
bdd6877a4f
@ -35,7 +35,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
if(!doc.price_list_currency) set_multiple(cdt, cdn, {price_list_currency: doc.currency, plc_conversion_rate: 1});
|
||||
// load default charges
|
||||
|
||||
if(doc.__islocal){
|
||||
if(doc.__islocal && !doc.customer){
|
||||
hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
|
||||
}
|
||||
}
|
||||
@ -100,10 +100,13 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
//customer
|
||||
cur_frm.cscript.customer = function(doc,dt,dn) {
|
||||
var callback = function(r,rt) {
|
||||
var doc = locals[cur_frm.doctype][cur_frm.docname];
|
||||
get_server_fields('get_shipping_address',doc.customer,'',doc, dt, dn, 0);
|
||||
var callback2 = function(r, rt) {
|
||||
if(doc.customer) unhide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory','customer_group','shipping_address']);
|
||||
cur_frm.refresh();
|
||||
}
|
||||
var doc = locals[cur_frm.doctype][cur_frm.docname];
|
||||
get_server_fields('get_shipping_address',doc.customer,'',doc, dt, dn, 0, callback2);
|
||||
|
||||
}
|
||||
|
||||
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
|
||||
|
Loading…
x
Reference in New Issue
Block a user