if no address, only then have address type as Office
This commit is contained in:
parent
a773e5251b
commit
44c9def74f
@ -55,7 +55,11 @@ cur_frm.cscript.make_address = function() {
|
|||||||
address.supplier = cur_frm.doc.name;
|
address.supplier = cur_frm.doc.name;
|
||||||
address.supplier_name = cur_frm.doc.supplier_name;
|
address.supplier_name = cur_frm.doc.supplier_name;
|
||||||
address.address_title = cur_frm.doc.supplier_name;
|
address.address_title = cur_frm.doc.supplier_name;
|
||||||
address.address_type = "Office";
|
|
||||||
|
if(!(cur_frm.address_list.data && cur_frm.address_list.data.length)) {
|
||||||
|
address.address_type = "Office";
|
||||||
|
}
|
||||||
|
|
||||||
wn.set_route("Form", "Address", address.name);
|
wn.set_route("Form", "Address", address.name);
|
||||||
},
|
},
|
||||||
get_query: function() {
|
get_query: function() {
|
||||||
|
|||||||
@ -65,7 +65,11 @@ cur_frm.cscript.make_address = function() {
|
|||||||
address.customer = cur_frm.doc.name;
|
address.customer = cur_frm.doc.name;
|
||||||
address.customer_name = cur_frm.doc.customer_name;
|
address.customer_name = cur_frm.doc.customer_name;
|
||||||
address.address_title = cur_frm.doc.customer_name;
|
address.address_title = cur_frm.doc.customer_name;
|
||||||
address.address_type = "Office";
|
|
||||||
|
if(!(cur_frm.address_list.data && cur_frm.address_list.data.length)) {
|
||||||
|
address.address_type = "Office";
|
||||||
|
}
|
||||||
|
|
||||||
wn.set_route("Form", "Address", address.name);
|
wn.set_route("Form", "Address", address.name);
|
||||||
},
|
},
|
||||||
get_query: function() {
|
get_query: function() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user