[Fix] get_shipping_address() takes at least 1 argument (0 given) (#14328)
This commit is contained in:
parent
c1cf495a93
commit
5ecc26bf15
@ -169,21 +169,25 @@ erpnext.utils.validate_mandatory = function(frm, label, value, trigger_on) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
erpnext.utils.get_shipping_address = function(frm, callback){
|
erpnext.utils.get_shipping_address = function(frm, callback){
|
||||||
frappe.call({
|
if (frm.doc.company) {
|
||||||
method: "frappe.contacts.doctype.address.address.get_shipping_address",
|
frappe.call({
|
||||||
args: {
|
method: "frappe.contacts.doctype.address.address.get_shipping_address",
|
||||||
company: frm.doc.company,
|
args: {
|
||||||
address: frm.doc.shipping_address
|
company: frm.doc.company,
|
||||||
},
|
address: frm.doc.shipping_address
|
||||||
callback: function(r){
|
},
|
||||||
if(r.message){
|
callback: function(r){
|
||||||
frm.set_value("shipping_address", r.message[0]) //Address title or name
|
if(r.message){
|
||||||
frm.set_value("shipping_address_display", r.message[1]) //Address to be displayed on the page
|
frm.set_value("shipping_address", r.message[0]) //Address title or name
|
||||||
}
|
frm.set_value("shipping_address_display", r.message[1]) //Address to be displayed on the page
|
||||||
|
}
|
||||||
|
|
||||||
if(callback){
|
if(callback){
|
||||||
return callback();
|
return callback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
} else {
|
||||||
|
frappe.msgprint(__("Select company first"));
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user